Commit be8581f7 authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

postfix: fix CentOS/master.cf bug

parent 72f551ab
release/004.013 (2015-01-08b)
[postfix] Fix master.cf config file for CentOS; break class out of
postfix.pp into postfix/server.pp. (adamhl)
release/004.012 (2015-01-08)
Add 4 new rsyslog formats to the templates available:
......
......@@ -17,9 +17,11 @@ class base::postfix {
enable => true,
hasstatus => true,
restart => '/usr/sbin/postfix reload',
require => [ File['/etc/postfix/main.cf'],
File['/etc/postfix/master.cf'],
Package['postfix'] ],
require => [
File['/etc/postfix/main.cf'],
File['/etc/postfix/master.cf'],
Package['postfix']
],
}
# We want the CentOS version of master.cf to be the same as the RedHat
......@@ -60,22 +62,3 @@ class base::postfix {
# work if sendmail is not installed. Since we'd rather not have sendmail
# installed, just assume that people are doing this manually.
}
# Standard Postfix server configuration that allows both incoming and
# outgoing mail. Override things selectively so that we accept mail from
# the network and deliver mail locally.
class base::postfix::server inherits base::postfix {
File['/etc/postfix/master.cf'] {
source => "puppet:///modules/base/postfix/etc/postfix/master-server.cf.${::operatingsystem}",
}
File['/etc/postfix/main.cf'] {
source => 'puppet:///modules/base/postfix/etc/postfix/main-server.cf',
}
# Allow incoming mail from anywhere.
base::iptables::rule { 'smtp':
description => 'Allow incoming SMTP traffic from anywhere',
protocol => 'tcp',
port => [ 25, 465, 587 ],
}
}
# class base::postfix::server: incoming and outgoing email server
# Standard Postfix server configuration that allows both incoming and
# outgoing mail. Override things selectively so that we accept mail from
# the network and deliver mail locally.
class base::postfix::server inherits base::postfix {
# We want the CentOS version of master.cf to be the same as the RedHat
# version:
if ($::operatingsystem =~ /(?i:centos)/) {
$mastercfsuffix = 'RedHat'
} else {
$mastercfsuffix = $::operatingsystem
}
File['/etc/postfix/master.cf'] {
source => "puppet:///modules/base/postfix/etc/postfix/master-server.cf.$mastercfsuffix",
}
File['/etc/postfix/main.cf'] {
source => 'puppet:///modules/base/postfix/etc/postfix/main-server.cf',
}
# Allow incoming mail from anywhere.
base::iptables::rule { 'smtp':
description => 'Allow incoming SMTP traffic from anywhere',
protocol => 'tcp',
port => [ 25, 465, 587 ],
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment