smtpd: Simplify config, use single config file
This commit is contained in:
parent
39e4838d1c
commit
9b410f3896
6 changed files with 14 additions and 32 deletions
|
@ -23,13 +23,11 @@ class smtpd {
|
|||
$package = "opensmtpd"
|
||||
$service = "opensmtpd"
|
||||
$confdir = "/etc/opensmtpd"
|
||||
$aliases = "/etc/aliases"
|
||||
|
||||
package { $package:
|
||||
ensure => installed,
|
||||
before => [
|
||||
File["${confdir}/smtpd.conf"],
|
||||
File["${confdir}/smtpd.conf.local"],
|
||||
],
|
||||
before => File["${confdir}/smtpd.conf"],
|
||||
}
|
||||
|
||||
exec { "/usr/sbin/alternatives --set mta /usr/sbin/sendmail.opensmtpd":
|
||||
|
@ -49,6 +47,7 @@ class smtpd {
|
|||
$package = undef
|
||||
$service = "smtpd"
|
||||
$confdir = "/etc/mail"
|
||||
$aliases = "/etc/mail/aliases"
|
||||
|
||||
file { "/etc/mailer.conf":
|
||||
ensure => present,
|
||||
|
@ -71,18 +70,6 @@ class smtpd {
|
|||
}
|
||||
|
||||
file { "${confdir}/smtpd.conf":
|
||||
ensure => present,
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
group => $::operatingsystem ? {
|
||||
"openbsd" => "wheel",
|
||||
default => "root",
|
||||
},
|
||||
source => "puppet:///modules/smtpd/smtpd.conf.${::operatingsystem}",
|
||||
notify => Service[$service],
|
||||
}
|
||||
|
||||
file { "${confdir}/smtpd.conf.local":
|
||||
ensure => present,
|
||||
mode => "0644",
|
||||
owner => "root",
|
||||
|
@ -155,7 +142,7 @@ class smtpd::server(
|
|||
|
||||
$mda = "/usr/local/bin/procmail -Y -t -f %{sender}"
|
||||
|
||||
File["/etc/mail/smtpd.conf.local"] {
|
||||
File["${confdir}/smtpd.conf"] {
|
||||
content => template("smtpd/server.conf.erb"),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue