diff --git a/sendmail/manifests/init.pp b/sendmail/manifests/init.pp index b76fb89..3d4a2d2 100644 --- a/sendmail/manifests/init.pp +++ b/sendmail/manifests/init.pp @@ -2,6 +2,10 @@ # class sendmail::common { + if !$mail_domain and $domain { + $mail_domain = $domain + } + case $operatingsystem { centos,fedora: { package { ["sendmail", "sendmail-cf"]: @@ -22,6 +26,10 @@ class sendmail::common { # class sendmail::client inherits sendmail::common { + if !$mail_server { + $mail_server = "127.0.0.1" + } + case $operatingsystem { openbsd: { file { "/usr/share/sendmail/cf/submit.mc": diff --git a/sendmail/templates/submit.mc.erb b/sendmail/templates/submit.mc.erb index 9a1ff31..c68df7b 100644 --- a/sendmail/templates/submit.mc.erb +++ b/sendmail/templates/submit.mc.erb @@ -25,6 +25,9 @@ define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet define(`confTIME_ZONE', `USE_TZ')dnl define(`confDONT_INIT_GROUPS', `True')dnl define(`confDIRECT_SUBMISSION_MODIFIERS',`C')dnl +<% if has_variable?('mail_domain') -%> +define(`confDOMAIN_NAME', `<%= mail_domain %>')dnl +<% end -%> <% if kernel == 'Linux' -%> define(`confPID_FILE', `/var/run/sm-client.pid')dnl <% end -%>