eliminate lots of spam stuff for smarthosting machines
[mirror/dsa-puppet.git] / modules / exim / templates / eximconf.erb
index feecf86..0eaa935 100644 (file)
@@ -414,6 +414,10 @@ end
 out
 %>
 
+<%= 
+out = ""
+if nodeinfo['smarthost'].empty?
+  out = "
   # These are in HELO acl so that they are only run once.  They increment a counter,
   # so we don't want it to increment per rcpt to.
 
@@ -488,6 +492,9 @@ out
        condition       = ${if match {${lc:$sender_helo_name}}{\N.*[bcdfghjklmnpqrstvwxz]{7,}.*\.[a-z]+$\N}}
        log_message     = random HELO
        set acl_c_scr   = ${eval:$acl_c_scr+5}
+"
+out
+%>
 
   # Implicit, but simpler to just say it
   accept
@@ -981,8 +988,8 @@ out
 
   accept verify  = certificate
 
-  require verify    = header_syntax
-          condition = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
+  deny    condition = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
+          !verify   = header_syntax
           message   = Invalid syntax in the header
 
 # RFC 822 and 2822 say that headers must be ASCII.  This kinda emulates
@@ -1155,7 +1162,11 @@ smarthost:
   driver = manualroute
   domains = !+handled_domains
   transport = remote_smtp_smarthost
-  route_list = * ' + nodeinfo['smarthost'] + '
+  route_list = * ' + nodeinfo['smarthost']
+  if nodeinfo['smarthost'] == 'mailout.debian.org'
+    out += '/MX'
+  end
+  out += '
   host_find_failed = defer
   same_domain_copy_routing = yes
   no_more