diff --git a/sendmail/manifests/init.pp b/sendmail/manifests/init.pp index a8665ef..32e52e1 100644 --- a/sendmail/manifests/init.pp +++ b/sendmail/manifests/init.pp @@ -175,6 +175,9 @@ class sendmail::client::msa inherits sendmail::client { # $sendmail_ssl_chain: # Path to SSL certificate chain file. # +# $sendmail_datadir: +# Directory for mail spool. +# class sendmail::server inherits sendmail::common { include procmail @@ -202,6 +205,30 @@ class sendmail::server inherits sendmail::common { } } + if $sendmail_datadir { + file { $sendmail_datadir: + ensure => directory, + mode => "0775", + owner => "root", + group => "mail", + seltype => "mail_spool_t", + } + selinux::manage_fcontext { "${sendmail_datadir}(/.*)?": + type => "mail_spool_t", + before => File[$sendmail_datadir], + } + file { "/var/spool/mail": + ensure => link, + target => $sendmail_datadir, + owner => "root", + group => "mail", + purge => true, + force => true, + require => File[$sendmail_datadir], + before => Service["sendmail"], + } + } + if $sendmail_ssl_key and $sendmail_ssl_cert { $ssl_key = basename($sendmail_ssl_key) $ssl_cert = basename($sendmail_ssl_cert) @@ -235,6 +262,7 @@ class sendmail::server inherits sendmail::common { notify => Service["sendmail"], } } + } file { "sendmail.mc":