X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fferm%2Ftemplates%2Fme.conf.erb;h=8ed108462262a00ae590b07875e9036cd75226a0;hb=75786fffb824d4fe6c78b0ae5f19685c6ce077cf;hp=3aa52c21150ba1be3dbc71a67493341f16a84a08;hpb=7b547dbd7eda9f353b5f91db2d47e2e5fd011192;p=mirror%2Fdsa-puppet.git diff --git a/modules/ferm/templates/me.conf.erb b/modules/ferm/templates/me.conf.erb index 3aa52c211..8ed108462 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', '$HOST_NAGIOS_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', '$HOST_NAGIOS_V6' ] +end + +if smtpallowed.length == 0 + smtpallowed = [ '::' ] +end + +smtpallowed.join(' ') +%>);