Reverse DNS for multiple IP address with same domain name

ptr-recordreverse-dns

We have a setup where our day-to-day email is sent via GSuite for Business and our bulk email (newsletters, etc) are sent through an Exchange server (to avoid Google's sending limits). Both are sent from the same domain name but with different IP addresses.

The web server is configured correctly for sending via GMail, however we're finding that mail sent via our Exchange server is getting marked as spam as there's no rDNS record pointing the Exchange server's IP address back to our domain.

How can I set a PTR record to resolve both IPs back to our domain?

Best Answer

The PTR record is, in most (default) cases, only important for the MX server's hostname (i.e. the host which is connecting to the destination SMTP server), not for the sender address/domain (i.e. From: field in the mail headers). Otherwise, multiple MXes for the same domain wouldn't be possible. Most MTAs' checks for domain and PTR records matching only take place for the hostname presented in the EHLO command of the sending e-mail server, which can naturally be totally different than the domain in the sender address. It's just important that the sending SMTP service "authenticates" itself to the remote SMTP service via stringent DNS/PTR records.

To do things clean, you may configure a subdomain of your domain (like exchange.yourdomain.com) with a DNS A record pointing to the IP address of the Exchange server. Then you configure the Exchange server's IP address's PTR record to exchange.yourdomain.com. Also, configure the Exchange server to present exchange.yourdomain.com when EHLOing the destination server (you may find hints on how to do so here). This should be sufficient with most destination hosts.

As far as I'm concerned, you shouldn't need to touch the GSuite configuration since everything is working fine with it.

Related Topic