From: Adam D. Barratt Date: Sun, 29 Sep 2019 14:11:20 +0000 (+0100) Subject: eximconf: fix IPv4-only sending X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=bf2f551aac2f30c2010f62b4efa53451c3c9a1f5;p=mirror%2Fdsa-puppet.git eximconf: fix IPv4-only sending Signed-off-by: Adam D. Barratt --- diff --git a/modules/exim/templates/eximconf.erb b/modules/exim/templates/eximconf.erb index ac91dbef6..d303ba14d 100644 --- a/modules/exim/templates/eximconf.erb +++ b/modules/exim/templates/eximconf.erb @@ -136,6 +136,7 @@ domainlist google_mxen = aspmx.l.google.com : gmail-smtp-in.l.google.com : \ *.aspmx.l.google.com : *.gmail-smtp-in.l.google.com domainlist single_domain_mx = +google_mxen +domainlist ipv4_only_domain_mx = +google_mxen <%- if @is_mailrelay -%> # Domains we relay for; that is domains that aren't considered local but we @@ -154,7 +155,6 @@ tls_crl = /etc/exim4/ssl/ca.crl # expensive, you can specify the networks for which a lookup is done, or # remove the setting entirely. host_lookup = * -dns_ipv4_lookup = +google_mxen # If this option is set, then any process that is running as one of the # listed users may pass a message to Exim and specify the sender's @@ -1129,7 +1129,11 @@ dnslookup: {match_domain{$item}{+single_domain_mx}}\ {remote_smtp_single_domain}{remote_smtp}\ } - ignore_target_hosts = +reservedaddrs + ignore_target_hosts = +reservedaddrs : \ + ${if forany{${lookup dnsdb{>: mxh=$domain}}}\ + {match_domain{$item}{+ipv4_only_domain_mx}}\ + {::::/0}{}\ + } no_more postmasterish: