Reverse DNS problem. Any way to force-use IPV4?


Recently, emails I send from my virtualmin-managed website (debian squeeze, webmin, virtualmin, default settings as in postfix) to gmail users have been rejected by Google, with this message:
(I edited away true IPs and domains)

host[2a00:1450:400c:c09::1b] said: 550-5.7.1 [x:x:x:x::1b] The IP address sending this message does not 550-5.7.1 have a PTR record setup. As a policy, Gmail does not accept messages 550-5.7.1 from IPs with missing PTR records

I checked with my DNS settings (I’m with cloudflare, so it’s with them that I edit my DNS records rather than with the web host for my dedicated server) and, indeed, I only had this:

TXT recording named:
v=spf1 a mx ip4:a.b.c.d ip4:e.f.g.h ~all

Thing is: it’s been three years I’ve had the very same configuration and, until very recently, I didn’t have problems sending emails to gmail addresses.
It’s as if, suddenly, Google reverse-DNS-reads my domain’s IPV6 instead of my domain’s IPV4.

So, what I did, was changing the DNS records I have at cloudflare, in which I added my domain’s IPV6 address, as mentioned by Virtualmin when I choose my domain:
TXT recording named:
v=spf1 a mx ip4:a.b.c.d ip4:e.f.g.h ip6:x:x:x:x::1b ~all

But sadly, I’m still getting the same rejection emails from Google, my addition of my website’s IPV6 address didn’t do anything.

Please, would you know if there’s a way to FORCE the usage of IPV4 rather than IPV6 in the whole process?
Or else, how I may have a slim hope of fixing it?
I’m all ears, really, if you can help, THANK YOU!!

If you aren’t using IPv6 and are unlikely to, you can disable it by adding the following to /etc/sysctl.conf

# Disable IPV6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

I would suggest a reboot to make sure all the networking sees the change properly.

Otherwise, this sounds like something that can likely be done in postfix, but I haven’t had to do it yet. Possibly Google or another forum poster can help.

1 Like