Sendmail server support and dovecot improvements.
This commit is contained in:
parent
4438b4f782
commit
42cec9dbf4
4 changed files with 157 additions and 20 deletions
|
@ -35,8 +35,8 @@ class sendmail::client inherits sendmail::common {
|
|||
file { "/usr/share/sendmail/cf/submit.mc":
|
||||
ensure => present,
|
||||
content => template("sendmail/submit.mc.erb"),
|
||||
owner => root,
|
||||
group => bin,
|
||||
owner => "root",
|
||||
group => "bin",
|
||||
mode => 0444,
|
||||
notify => Exec["make submit.cf"],
|
||||
}
|
||||
|
@ -45,8 +45,8 @@ class sendmail::client inherits sendmail::common {
|
|||
file { "/etc/mail/submit.mc":
|
||||
ensure => present,
|
||||
content => template("sendmail/submit.mc.erb"),
|
||||
owner => root,
|
||||
group => root,
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 0644,
|
||||
notify => Exec["make submit.cf"],
|
||||
}
|
||||
|
@ -68,10 +68,10 @@ class sendmail::client inherits sendmail::common {
|
|||
|
||||
file { "/etc/mail/submit.cf":
|
||||
ensure => present,
|
||||
owner => root,
|
||||
owner => "root",
|
||||
group => $operatingsystem ? {
|
||||
openbsd => wheel,
|
||||
default => root,
|
||||
openbsd => "wheel",
|
||||
default => "root",
|
||||
},
|
||||
mode => 0644,
|
||||
source => $operatingsystem ? {
|
||||
|
@ -82,3 +82,99 @@ class sendmail::client inherits sendmail::common {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
# Configure Sendmail server.
|
||||
#
|
||||
# $sendmail_domain:
|
||||
# SMTP domain name.
|
||||
class sendmail::server inherits sendmail::common {
|
||||
|
||||
case $operatingsystem {
|
||||
centos,redhat,ubuntu: {
|
||||
$sendmail_ostype = "linux"
|
||||
package { ["procmail"]:
|
||||
ensure => installed,
|
||||
}
|
||||
file { "/etc/mail/sendmail.mc":
|
||||
ensure => present,
|
||||
content => template("sendmail/sendmail.mc.erb"),
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 0644,
|
||||
notify => Exec["make sendmail.cf"],
|
||||
}
|
||||
file { "/etc/aliases":
|
||||
ensure => present,
|
||||
notify => Exec["newaliases"],
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 0644,
|
||||
}
|
||||
file { "/etc/sysconfig/sendmail":
|
||||
ensure => present,
|
||||
content => "DAEMON=yes\nQUEUE=1h\n",
|
||||
owner => "root",
|
||||
group => "root",
|
||||
mode => 0644,
|
||||
notify => Service["sendmail"],
|
||||
}
|
||||
} openbsd: {
|
||||
$sendmail_os_type = "openbsd"
|
||||
file { "/usr/share/sendmail/cf/sendmail.mc":
|
||||
ensure => present,
|
||||
content => template("sendmail/sendmail.mc.erb"),
|
||||
owner => "root",
|
||||
group => "bin",
|
||||
mode => 0444,
|
||||
notify => Exec["make sendmail.cf"],
|
||||
}
|
||||
file { "/etc/aliases":
|
||||
ensure => present,
|
||||
notify => Exec["newaliases"],
|
||||
owner => "root",
|
||||
group => "wheel",
|
||||
mode => 0644,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exec { "make sendmail.cf":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
cwd => $operatingsystem ? {
|
||||
openbsd => "/usr/share/sendmail/cf",
|
||||
default => "/etc/mail",
|
||||
},
|
||||
require => $operatingsystem ? {
|
||||
openbsd => undef,
|
||||
default => Package["sendmail-cf"],
|
||||
},
|
||||
refreshonly => true,
|
||||
}
|
||||
|
||||
file { "/etc/mail/sendmail.cf":
|
||||
ensure => present,
|
||||
owner => "root",
|
||||
group => $operatingsystem ? {
|
||||
openbsd => "wheel",
|
||||
default => "root",
|
||||
},
|
||||
mode => 0644,
|
||||
source => $operatingsystem ? {
|
||||
openbsd => "/usr/share/sendmail/cf/sendmail.cf",
|
||||
default => undef,
|
||||
},
|
||||
require => Exec["make sendmail.cf"],
|
||||
notify => Service["sendmail"],
|
||||
}
|
||||
|
||||
service { "sendmail":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
require => File["/etc/mail/sendmail.cf"],
|
||||
}
|
||||
|
||||
exec { "newaliases":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
refreshonly => true,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue