Added sendmail::client::msa for sending mail using submission port

This commit is contained in:
Ossi Salmi 2012-01-22 20:24:21 +02:00
parent 3f1bb7a278
commit ca0427624b
4 changed files with 32 additions and 25 deletions

View file

@ -47,28 +47,24 @@ class sendmail::client inherits sendmail::common {
$mail_server = "127.0.0.1" $mail_server = "127.0.0.1"
} }
case $operatingsystem { file { "/etc/mail/submit.mc":
"openbsd": { path => $operatingsystem ? {
file { "/usr/share/sendmail/cf/submit.mc": "openbsd" => "/usr/share/sendmail/cf/submit.mc",
ensure => present, default => "/etc/mail/submit.mc",
content => template("sendmail/submit.mc.erb"), },
owner => "root", ensure => present,
group => "bin", content => template("sendmail/submit.mc.erb", "sendmail/submit.mc.msp.erb"),
mode => 0444, owner => "root",
notify => Exec["make submit.cf"], group => $operatingsystem ? {
} "openbsd" => "bin",
} default => "root",
default: { },
file { "/etc/mail/submit.mc": mode => 0644,
ensure => present, notify => Exec["make submit.cf"],
content => template("sendmail/submit.mc.erb"), require => $operatingsystem ? {
owner => "root", "openbsd" => undef,
group => "root", default => Package["sendmail"],
mode => 0644, },
notify => Exec["make submit.cf"],
require => Package["sendmail"],
}
}
} }
exec { "make submit.cf": exec { "make submit.cf":
@ -102,6 +98,18 @@ class sendmail::client inherits sendmail::common {
} }
# Configure Sendmail submission using port 587.
#
class sendmail::client::msa inherits sendmail::client {
File["/etc/mail/submit.mc"] {
content => template("sendmail/submit.mc.erb", "sendmail/submit.mc.msa.erb"),
}
}
# Configure Sendmail server. # Configure Sendmail server.
# #
# $sendmail_domain: # $sendmail_domain:

View file

@ -35,6 +35,3 @@ define(`confDOMAIN_NAME', `<%= mail_domain %>')dnl
define(`confPID_FILE', `/var/run/sm-client.pid')dnl define(`confPID_FILE', `/var/run/sm-client.pid')dnl
<% end -%> <% end -%>
FEATURE(`use_ct_file')dnl FEATURE(`use_ct_file')dnl
dnl
dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
FEATURE(`msp', `[<%= mail_server %>]')dnl

View file

@ -0,0 +1 @@
FEATURE(`msp', `[<%= mail_server %>]', `MSA')dnl

View file

@ -0,0 +1 @@
FEATURE(`msp', `[<%= mail_server %>]')dnl