exim: postgrey in stretch handles host to network address translation
[mirror/dsa-puppet.git] / modules / exim / templates / eximconf.erb
index 1c8dcf0..7517c26 100644 (file)
@@ -782,7 +782,11 @@ check_recipient:
                      protocol_name=${uc:$received_protocol}\n\
                      instance=${acl_m_grey}\n\
                      helo_name=${sender_helo_name}\n\
+<%- if scope.call_function('versioncmp', [@lsbmajdistrelease, '8']) <= 0 -%>
                      client_address=${substr_-3:${mask:$sender_host_address/24}}\n\
+<%- else -%>
+                     client_address=${sender_host_address}\n\
+<%- end -%>
                      client_name=${sender_host_name}\n\
                      sender=${sender_address}\n\
                      recipient=$local_part@$domain\n\n
@@ -958,18 +962,24 @@ check_message:
 
 <%- if has_variable?("clamd") && @clamd -%>
   discard condition       = ${if eq {$acl_m_prf}{blackhole}}
+  <%- if scope.call_function('versioncmp', [@lsbmajdistrelease, '8']) <= 0 -%>
           demime          = *
+  <%- end -%>
           malware         = */defer_ok
           log_message     = discarded malware message for $recipients
 
   deny    condition       = ${if eq {$acl_m_prf}{markup}{no}{yes}}
           condition       = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}}
+  <%- if scope.call_function('versioncmp', [@lsbmajdistrelease, '8']) <= 0 -%>
          demime          = *
+  <%- end -%>
           malware         = */defer_ok
           message         = malware detected: $malware_name: message rejected
 
   warn    condition       = ${if eq {$acl_m_prf}{markup}}
+  <%- if scope.call_function('versioncmp', [@lsbmajdistrelease, '8']) <= 0 -%>
          demime          = *
+  <%- end -%>
           malware         = */defer_ok
           message         = X-malware detected: $malware_name
 
@@ -1471,12 +1481,12 @@ bugs:
   transport = bugs_pipe
   domains = ' + domain + '
   cannot_route_message = Unknown or archived bug
-  require_files = /org/bugs.debian.org/mail/run-procmail
+  require_files = /srv/bugs.debian.org/mail/run-procmail
   no_more
   local_parts = ${if match\
                   {$local_part}\
                   {\N^(\d+)(\d{2})(?:-(?:(?:submit|maintonly|quiet|forwarded|done|close|request|submitter)|(?:unsubscribe|ignore|help|(?:sub(?:scribe|help|yes|approve|reject))|unsubyes|bounce|probe|approve|reject|setlistyes|setlistsilentyes).*))?$\N}\
-               {${if exists{/org/bugs.debian.org/spool/db-h/$2/$1$2.summary}\
+               {${if exists{/srv/bugs.debian.org/spool/db-h/$2/$1$2.summary}\
               {$local_part}fail}}fail}
 '
 end
@@ -1615,7 +1625,7 @@ bsmtp:
 <%- if @is_bugsmaster or @is_bugsmx -%>
 bugs_pipe:
   driver = pipe
-  command = /org/bugs.debian.org/mail/run-procmail
+  command = /srv/bugs.debian.org/mail/run-procmail
   environment = "EXTENSION=${substr_1:${local_part_suffix}}:\
                  EXT=${substr_1:${local_part_suffix}}:\
                  LOCAL=${local_part}${local_part_suffix}:\