]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/ferm/templates/me.conf.erb
restrict smtp
[dsa-puppet.git] / modules / ferm / templates / me.conf.erb
index 3aa52c21150ba1be3dbc71a67493341f16a84a08..690dc369cf4f1204195ed15000aff5c421f940fe 100644 (file)
@@ -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(' ')
+%>);