SHARE
TWEET

Untitled

a guest Mar 17th, 2018 97 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class profile::smtp {
  2.   postfix::config{  'relay_domains':
  3.     ensure  => present,
  4.     value => 'HOSTNAME.SOMESERVER [SOME.RELAY.TLD]:587',
  5.     }
  6.   postfix::hash { '/etc/postfix/sasl_passwd':
  7.     ensure    => 'present',
  8.     content => '[SOME.RELAY.TLD]:587 SUPERSECRET@WHATEVEN:ENCODEDPASS',
  9.   }
  10.   postfix::config{
  11.   'smtp_sasl_auth_enable':         value => 'yes';
  12.   'smtp_sasl_password_maps':       value => 'hash:/etc/postfix/sasl_passwd';
  13.   'smtp_sasl_security_options':    value => 'noanonymous';
  14.   'relayhost':                     value => '[SOME.RELAY.TLD]:587';
  15.   'smtp_tls_security_level':       value => 'encrypt';
  16.   'myhostname':                    value => 'SOMEEXAMPLE.HOSTNAME';
  17.   }
  18.   class { 'postfix':
  19.   smtp_listen => 'all'
  20.   }
  21. }
  22.  
  23. ======================================================================
  24. above this line works
  25. below this line does not
  26. ======================================================================
  27. class profile::smtp {
  28.   include postfix
  29.   postfix::config{  'relay_domains':
  30.     ensure  => present,
  31.     value => 'HOSTNAME.SOMESERVER [SOME.RELAY.TLD]:587',
  32.     }
  33.   postfix::hash { '/etc/postfix/sasl_passwd':
  34.     ensure    => 'present',
  35.     content => '[SOME.RELAY.TLD]:587 SUPERSECRET@WHATEVEN:ENCODEDPASS',
  36.   }
  37.   postfix::config{
  38.   'smtp_sasl_auth_enable':         value => 'yes';
  39.   'smtp_sasl_password_maps':       value => 'hash:/etc/postfix/sasl_passwd';
  40.   'smtp_sasl_security_options':    value => 'noanonymous';
  41.   'relayhost':                     value => '[SOME.RELAY.TLD]:587';
  42.   'smtp_tls_security_level':       value => 'encrypt';
  43.   'myhostname':                    value => 'HOSTNAME.EXAMPLE.COM';
  44.   }
  45.  smtp_listen = 'all'
  46. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top