exim: postgrey in stretch handles host to network address translation
authorJulien Cristau <jcristau@debian.org>
Tue, 4 Jul 2017 18:59:29 +0000 (20:59 +0200)
committerJulien Cristau <jcristau@debian.org>
Tue, 4 Jul 2017 19:07:59 +0000 (21:07 +0200)
Rather than using ${mask:...} in the exim config, we can let postgrey do
this on its own.  Otherwise, it gets confused with ipv6 addresses using
dots instead of colons as separators, and crashes
(https://bugs.debian.org/867201).

modules/exim/templates/eximconf.erb

index 8281867..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