On 2020-11-21 at 14:31 +0000, Stuart Henderson via mailop wrote:
> On 2020/11/21 13:59, Thomas Walter via mailop wrote:
> > On 21.11.20 12:54, Jaroslaw Rafa via mailop wrote:
> > > You can configure your MTA to disable IPv6 only for delivery to Google - 
> > > at
> > > least with Postfix it should be possible.
> > 
> > how would one do that?
> 
> https://marc.info/?l=postfix-users&m=149964217524463&w=2
> 
> (and for Exim there's dns_ipv4_lookup).

For Exim:

You can disable based on the IPv6 of the destination host so that it
works for all domains.

----------------------------8< host lists >8----------------------------
# Google IPv6 blocks from <https://ipinfo.io/AS15169>
# cidrmerge is your friend
hostlist   google_ipv6 = <; 2001:4860::/32 ; 2401:fa00::/32 ; 2404:6800::/32 ; 
2404:f340::/32 ; 2600:1900::/28 ; 2605:ef80::/32 ; 2607:f8b0::/32 ; 
2620:0:1000::/40 ; 2620:120:e000::/40 ; 2620:15c::/36 ; 2620:33:c000::/48 ; 
2800:3f0::/32 ; 2a00:1450::/32 ; 2a00:79e0::/32 ; 2a00:79e1:805::/48 ; 
2a03:ace0::/32 ; 2c0f:fb50::/32

# Disable IPv6 based on recipient domain
hostlist   conditionally_disable_ipv6 = <; 
${extract{disableipv6}{$address_data}{::0/0}{}} ; +google_ipv6
----------------------------8< host lists >8----------------------------

The first is just "all of Google" and the second says "if the
address_data option has set tags and `disableipv6` is in those tags,
then include ::0/0 to disable all IPv6 addresses; then include Google's
IPv6 too".

and then in the Routers which set up remote delivery, you would use:

  ignore_target_hosts = whatever : +conditionally_disable_ipv6

where "whatever" is whatever other rules you already have (eg, disabling
RFC1918 for any domains, so that only special routers for limited
domains would be willing to route internally).

Ideally I'd keep a separate file with all IPv6 ranges needed, but to
date it's been "just Google", everyone else is fine, and those blocks
change rarely enough that I've stuck to an exim.conf deploy to update
them, rather than a datafile deploy.

-Phil
_______________________________________________
mailop mailing list
mailop@mailop.org
https://list.mailop.org/listinfo/mailop

Reply via email to