Have name copied to longname if there is no longname
[mirror/dsa-puppet.git] / modules / exim / templates / eximconf.erb
index 53fad43..575ad0c 100644 (file)
@@ -289,6 +289,13 @@ acl_getprofile:
           hosts          = !+debianhosts
           set acl_m_rprf = localonly
 
+<%- if nodeinfo['mailrelay'] -%>
+  warn    local_parts    = +local_only_users
+          domains        = +mailhubdomains
+          hosts          = !+debianhosts
+          set acl_m_rprf = localonly
+
+<%- end -%>
   accept  condition      = ${if eq {$acl_m_rprf}{}{no}{yes}}
 
 <%- if nodeinfo['rtmaster'] -%>
@@ -621,13 +628,6 @@ check_recipient:
          hosts         = !+debianhosts
          message       = mail from <$sender_address> not allowed externally
 
-<%- if nodeinfo['mailrelay'] -%>
-  deny    local_parts   = +local_only_users
-          domains       = +mailhubdomains
-          !hosts        = +debianhosts
-          message       = mail for <$local_part@$domain> not allowed externally
-
-<%- end -%>
   deny    condition     = ${if match_domain{$sender_address_domain}{+virtual_domains}{1}{0}}
           condition     = ${if exists {${extract{directory}{VDOMAINDATA}{${value}/neversenders}}}{1}{0}}
           condition     = ${if match_local_part {$sender_address_local_part}{${extract{directory}{VDOMAINDATA}{${value}/neversenders}}}{1}{0}}
@@ -716,8 +716,8 @@ check_recipient:
 <%- end -%>
 <%- if nodeinfo['rtmaster'] -%>
   warn    condition     = ${if eq{$acl_m_prf}{RTMail}}
-          set acl_m12   = ${if def:acl_m12 {$acl_m12} {${if or{{match{$local_part}{\N[^+]+\+\d+\N}}{match{$local_part}{\N[^+]+\+new\N}}{match{$local_part}{3520}}} {RTMailRecipientHasSubaddress}}}}
-  # temporary hack because weasel screwed up and gave people an rt-3520@ address, which doesn't really work normally.
+          set acl_m12   = ${if def:acl_m12 {$acl_m12} {${if or{{match{$local_part}{\N[^+]+\+\d+\N}}{match{$local_part}{\N[^+]+\+new\N}}{match{$local_part}{3520}}{match{$local_part}{3645}}} {RTMailRecipientHasSubaddress}}}}
+  # temporary hack because weasel screwed up and gave people an rt-3520@ address, which doesn't really work normally.  and rt-3645
   #set acl_m12  = ${if def:acl_m12 {$acl_m12} {${if or{{match{$local_part}{\N[^+]+\+\d+\N}}{match{$local_part}{\N[^+]+\+new\N}}} {RTMailRecipientHasSubaddress}}}}