From: Julien Cristau Date: Tue, 4 Jul 2017 18:59:29 +0000 (+0200) Subject: exim: postgrey in stretch handles host to network address translation X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=commitdiff_plain;h=894b5f242ab0450042b38823681d96d6dd9fd82d exim: postgrey in stretch handles host to network address translation 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). --- diff --git a/modules/exim/templates/eximconf.erb b/modules/exim/templates/eximconf.erb index 828186784..7517c26b6 100644 --- a/modules/exim/templates/eximconf.erb +++ b/modules/exim/templates/eximconf.erb @@ -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