From 3db5ab226b01f938fa5c2e79f25461cd89c90f44 Mon Sep 17 00:00:00 2001 From: Ossi Herrala Date: Fri, 26 Jul 2013 14:20:24 +0000 Subject: [PATCH] sendmail: Add support for smart host. This setting also adds mail hub and relay server to really really make the mail move towards defined smart host. --- sendmail/manifests/init.pp | 4 ++++ sendmail/templates/sendmail.mc.erb | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/sendmail/manifests/init.pp b/sendmail/manifests/init.pp index 2ced03f..258e72c 100644 --- a/sendmail/manifests/init.pp +++ b/sendmail/manifests/init.pp @@ -158,6 +158,10 @@ class sendmail::client::msa inherits sendmail::client { # $mail_domain: # SMTP domain name. # +# $mail_smart_host: +# Deliver all mail to host defined. Add leading dot. +# $mail_smart_host = "mail.example.com." +# # $masquerade_exception: # Everything is masqueraded to $mail_domain except these hosts. # diff --git a/sendmail/templates/sendmail.mc.erb b/sendmail/templates/sendmail.mc.erb index 2c94075..e8437c3 100644 --- a/sendmail/templates/sendmail.mc.erb +++ b/sendmail/templates/sendmail.mc.erb @@ -10,6 +10,12 @@ include(`/usr/share/sendmail/cf/m4/cf.m4')dnl VERSIONID(`puppet sendmail::server')dnl OSTYPE(`<%= @ostype -%>')dnl dnl # +<% if @mail_smart_host -%> +define(`SMART_HOST', `<%= @mail_smart_host -%>')dnl +define(`MAIL_HUB', `<%= @mail_smart_host -%>')dnl +define(`LOCAL_RELAY', `<%= @mail_smart_host -%>')dnl +dnl # +<% end -%> define(`confDEF_USER_ID', ``8:12'')dnl define(`confTO_CONNECT', `1m')dnl define(`confTRY_NULL_MX_LIST', `True')dnl