How to allow incoming IPv6, disable only outgoing IPv6?

At the advice of vele to respond to recurring Spamhaus listings of my MIAB, I want to turn off outgoing IPv6 smtp connections. In the question Disable IPv6 on my MIAB-Configuration I found the instructions at Sending Email over IPv4 with Postfix - RamNode which say to change inet_protocols = all to inet_protocols = ipv4 in /etc/postfix/main.cf. However, when I do that, the status checks page of the web interface says that incoming ipv6 connections are disallowed as well. I’d rather not do that, because presumably MIAB dns is saying that my server is available at the IPv6 address. Does anyone know how to disable only outgoing IPv6 connections? Thanks.

Change back inet_protocols = all

You need to insert smtp_address_preference = ipv4

for outgoing mail to prefer ipv4

This is good for your mail not ending up in spam if you dont have rDNS for IPV6 or you fear that outgoing IPV6 ends up in spam, which is most frequently the case as they dont care about ipv6 sending servers.

You will still get incoming mail via IPV6 from IPV6 capable servers.

3 Likes

This has now become almost mandatory, since Gmail will block all incoming mail from MIAB because of the ipv6 issue.

Since main.cf will be overwritten by MIAB updates, is there some other way to achieve blocking ipv6 outgoing (while still allowing ipv6 incoming).

Please advise.

This is for people who are experiencing problems with gmail deliverability suffering from their overzealous filtering. Although you are not bulk senders they might have assessed you as “Erratic or Untrustworthy” senders (This I heard from their Moronic staff):

main.cf is not overwritten with updates. No worries! Just go ahead and enforce IPV4 only outbound and it will stay like that with updates.

However:

Watch gmail for domain-related bounces. Only then will they start linking your IPv 4 and 6 and they will start defaulting to IPV6. I am not sure how they do it but they seem to disregard postfix rule smtp_address_preference = ipv4 in that case. They will link both 4 and 6 to an unsolicited mail domain although your IPV4 is clean. This an internal list. Nothing to do with public lists.

Cure No.1 is to keep a contingency server for the domain and set smtp_fallback_relay= For which you need another SMTP server which is clean.
Cure No.2 is to stop sending for a while and start gradually. Responding to gmail messages and be ware if somebody has flagged you as spam. For this you register on their Postmaster Tool and check We’ve updated our compliance status https://postmaster.google.com/v2/sender_compliance
If you have User-reported spam rate in red Wait at least 2 weeks before starting gradually.