IPv6 is great, but sometimes it's troublesome. SMTP over IPv6 is particularly troublesome if you're talking to Google (and probably others as well)
If you for some reason don't have a correct PTR record, you'll end up with a lots of refused mail and logs pointing you to https://support.google.com/mail/answer/81126?p=ipv6_authentication_error&rd=1#authentication
One way to fix this is to fall back to IPv4 only for outgoing SMTP. Given a Debian installation with split-config exim, the simplest way to do this seems to be as follows:
- copy /etc/exim4/conf.d/router/200_exim4-config_primary to 200_exim4-config_primary.rul
- The second "dnslookup:" router is used for remote smtp-delivery, adding 0::0/0 to the ignore_target_hosts will make sure that no AAAA-records are used for later transport
change :
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16 :\
255.255.255.255
to :
ignore_target_hosts = 0.0.0.0 ; 127.0.0.0/8 ; 192.168.0.0/16 ;\
172.16.0.0/12 ; 10.0.0.0/8 ; 169.254.0.0/16 ;\
255.255.255.255 ; 0::0/0
What's the "<" for?