From b28cf88e716f054ee7ff2549073648522c05caed Mon Sep 17 00:00:00 2001 From: root Date: Sat, 28 Feb 2015 12:12:46 +0100 Subject: [PATCH] postfix permissions --- manifests/init.pp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 1b0dd66..a41746b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -9,24 +9,25 @@ 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, } @@ -34,7 +35,7 @@ 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']], }