X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=modules%2Fferm%2Ftemplates%2Fme.conf.erb;h=690dc369cf4f1204195ed15000aff5c421f940fe;hb=f906c34e9fb767be1c89efa8c2e5396fe210f30c;hp=3aa52c21150ba1be3dbc71a67493341f16a84a08;hpb=7b547dbd7eda9f353b5f91db2d47e2e5fd011192;p=dsa-puppet.git diff --git a/modules/ferm/templates/me.conf.erb b/modules/ferm/templates/me.conf.erb index 3aa52c21..690dc369 100644 --- a/modules/ferm/templates/me.conf.erb +++ b/modules/ferm/templates/me.conf.erb @@ -41,3 +41,33 @@ end sshallowed.join(' ') %>); + +def $SMTP_SOURCES =(<%= + +smtpallowed = [] + +if not nodeinfo['smarthost'].empty? + smtpallowed = [ '$HOST_MAILRELAY_V4' ] +end + +if smtpallowed.length == 0 + smtpallowed = [ '0.0.0.0/0' ] +end + +smtpallowed.join(' ') +%>); + +def $SMTP_V6_SOURCES =(<%= + +smtpallowed = [] + +if not nodeinfo['smarthost'].empty? + smtpallowed = [ '$HOST_MAILRELAY_V6' ] +end + +if smtpallowed.length == 0 + smtpallowed = [ '::' ] +end + +smtpallowed.join(' ') +%>);