Skip to content

Commit

Permalink
postfix permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Feb 28, 2015
1 parent aa4f47a commit b28cf88
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,33 @@
file { 'postfix-directory':
path => '/etc/postfix',
ensure => directory,
owner => 'postfix',
group => 'postfix',
owner => 'root',
group => 'root',
require => [Package['postfix']],
}
file { 'conf-saslpassword':
path => '/etc/postfix/sasl_passwd',
ensure => present,
mode => 0400,
owner => 'postfix',
group => 'postfix',
mode => 0400,
owner => 'root',
group => 'root',
content => template('postfix-gmail/sasl_passwd.erb'),
require => [Package['postfix'],File['postfix-directory']],
notify => Exec['run_postmap'],
}
exec { 'run_postmap':
path => "/usr/sbin/:/usr/bin/",
command => "postmap /etc/postfix/sasl_passwd",
creates => '/etc/postfix/sasl_passwd.db',
subscribe => File['conf-postfix'],
subscribe => [File['conf-postfix'],File['conf-saslpassword']],
require => File['conf-saslpassword'],
refreshonly => true,
}
file { 'conf-postfix':
path => '/etc/postfix/main.cf',
ensure => present,
content => template('postfix-gmail/main.cf.erb'),
notify => Service['service-postfix'],
notify => [Service['service-postfix'],Exec['run_postmap']],
require => [Package['postfix'], File['conf-saslpassword']],
}

Expand Down

0 comments on commit b28cf88

Please sign in to comment.