I have a VPS through Vultr, which I use as a web server. Many of the websites hosted on the server need to send emails, so a simple MTA (Mail Transfer Agent) is required. I’ve configured the server to use Exim for all outgoing email from the websites.
One day when I was browsing the Exim log files, I came across an error like the one below.
2016-02-01 19:21:05 1aOugb-0004kR-6W == email@example.com R=dnslookup T=remote_smtp defer (0): SMTP error from remote mail server after initial connection: host mx.targetmailserver.com [target.mailserver.ip.address]: 450 4.7.1 Client host rejected: cannot find your reverse hostname, [source.mailserver.ip.address]
It seemed obvious that the error had something to do with the reverse hostname of my server, but I wasn’t sure why it occurred for some emails and not others. I suspected that the mail server for the target email account was trying to validate my email. The target mail server seemed to be checking to see if the IP address of my mail server resolved to a hostname. It was performing what’s known as a reverse DNS lookup. The task is performed by some email servers, in the hope of identifying malicious or other unwanted emails.
A bit of searching the web revealed that this error relates the reverse DNS record, otherwise known as a PTR (Pointer Record).
You can perform a reverse DNS lookup at the trusty MXToolBox website.