Outgoing mail fails to be received by Gmail. Rejected because PTR record does not mach forward lookup

domain-name-systememaileximgmailptr-record

My mail server has been sending mail with no rejections from gmail until recently. No changes have been made that I am aware of.

Recently my outgoing messages are failing with an error about a "missing PTR record". I do have a PTR record setup. However, the forward lookup for the IP address and the PTR record are not the same. I saw that Gmail wants the forward and reverse lookup to be the same. That was not the case for my mail server. I changed the PTR record to be the same as the forward lookup's IP address but I still have the same problem with Gmail rejecting that server's mail.

I don't believe waiting for TTL is part of the problem. I've come to realize popular providers such as Gmail do not necessarily respect TTL. My PTR has been setup for a long time the way it is, and it always worked. So unless Gmail has implemented a new policy in this regard, TTL should not be the issue.

I've setup some domain names to use this particular IP in /etc/mailips. While those domain names are hosted on a different IP on the subnet, they are sending mail from the one mail server IP Address. I have CentOS and Exim as the MTA.

Why would Gmail reject my email suddenly when nothing has changed? Why would Gmail be rejecting my emails as not having proper forward and reverse DNS records when they do?

Best Answer

There were several stages of grief that had to be worked through in this question. Let's take a look at each. There will be some ups. There will be some downs. With enough hugs, I think we can get through it safely.

Recently my outgoing messages are failing with an error about a "missing PTR record". I do have a PTR record setup. However, the forward lookup for the IP address and the PTR record are not the same. I saw that Gmail wants the forward and reverse lookup to be the same. That was not the case for my mail server. I changed the PTR record to be the same as the forward lookup's IP address but I still have the same problem with Gmail rejecting that server's mail.

First off, many if not most major mail providers will reject email sent from a host that does not have forward and reverse lookups that resolve to the same host/IP address. Or if they don't outright reject it, it is a serious weight in the overall process of determining if the system will accept the email or not.

Once you've changed it, you need to wait between 24 and 72 hours, as a broad recommendation, before doing anything else and firmly stating "This has not worked." I would be surprised if the error is still seen in Gmail's reject messages after 3 days.

I don't believe waiting for TTL is part of the problem. I've come to realize popular providers such as Gmail do not necessarily respect TTL.

It's precisely because many providers appear to not honor TTL that you should wait three days. Many do honor it, however there's still an air of suspicion about exactly when and how that honoring is done.

Wait. Three. Days.

My PTR has been setup for a long time the way it is, and it always worked. So unless Gmail has implemented a new policy in this regard, TTL should not be the issue.

Doesn't matter. Any service provider can, at their discretion, change their behavior without notice. I've worked in and around cloud service providers and know all too well the tomfoolery that can go on inside that ubiquitous mist. TTL is most likely your issue.

WAIT.

THREE.

DAYS.

This is a very simple problem. Google has told you what they want to see. You've changed it, and now need to wait the generally accepted amount of time. Once you do, I'm 98% sure that it'll be fixed. The other 2% is willing to charge standard consulting fees to figure it out for you.

Related Topic