Commit ff64e64814d45ab2c99e9b8cfba3f5f128f4182e
1 parent
71dc7fd7
Exists in
master
and in
27 other branches
Uses postconf to configure main.cf
Signed-off-by: David Carlos <ddavidcarlos1392@gmail.com> Signed-off-by: Lucas Severo <lucassalves65@gmail.com> Signed-off-by: Alessando Caetano <alessandro.caetanob@gmail.com>
Showing
2 changed files
with
9 additions
and
2 deletions
Show diff stats
cookbooks/mailman/files/centos/master.cf
| ... | ... | @@ -122,7 +122,7 @@ scache unix - - n - 1 scache |
| 122 | 122 | #scalemail-backend unix - n n - 2 pipe |
| 123 | 123 | # flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store |
| 124 | 124 | # ${nexthop} ${user} ${extension} |
| 125 | -# | |
| 125 | + | |
| 126 | 126 | mailman unix - n n - - pipe |
| 127 | 127 | flags=FR user=mailman:mailman argv=/usr/lib/mailman/bin/postfix-to-mailman.py |
| 128 | 128 | ${nexthop} ${user} | ... | ... |
cookbooks/mailman/recipes/default.rb
| ... | ... | @@ -83,11 +83,18 @@ cookbook_file '/etc/cron.d/mailman-spb' do |
| 83 | 83 | mode 0644 |
| 84 | 84 | end |
| 85 | 85 | |
| 86 | +execute 'postfix:disable-email-prod' do | |
| 87 | + command "postconf 'default_transport = fs_mail'" | |
| 88 | + not_if "cat /etc/postfix/main.cf | grep 'default_transport = fs_mail'" | |
| 89 | + action :nothing | |
| 90 | +end | |
| 91 | + | |
| 86 | 92 | cookbook_file '/etc/postfix/master.cf' do |
| 87 | 93 | unless node['environment'] == "prod" |
| 88 | 94 | source 'master.cf.development' |
| 95 | + notifies :run, 'execute[postfix:disable-email-prod]' | |
| 89 | 96 | end |
| 90 | - notifies :reload, 'service[postfix]' | |
| 97 | + notifies :restart, 'service[postfix]' | |
| 91 | 98 | end |
| 92 | 99 | |
| 93 | 100 | execute 'set-mailman-default-list' do | ... | ... |