Why the PTR record was never in your zone
mail.example.com and get back an A record (IPv4) or AAAA record (IPv6). Reverse DNS goes the other way: you start with an IP address and ask what name it belongs to. The answer comes from a PTR (pointer) record.
The key detail is where that PTR record lives. Reverse lookups for IPv4 are done under a special domain called in-addr.arpa, with the address written backwards. A lookup for 203.0.113.25 becomes a query for 25.113.0.203.in-addr.arpa. IPv6 uses ip6.arpa with each hex digit reversed. Those reverse zones are delegated along the chain of whoever was allocated the IP block: the regional registry, then the provider or network that owns the range.
So the authority for the PTR of your server's IP sits with the IP owner, which is your VPS, dedicated, or cloud provider. Not with your domain's nameservers. You can add a record called ptr or a PTR-type entry inside example.com and it will do nothing, because no resolver ever looks there for reverse DNS.
This is also why the old server worked. The previous provider had set a PTR for the old IP, either because you asked for it years ago or because their default happened to be acceptable. That setting belongs to the old IP. When you moved to a new IP, you got whatever reverse DNS the new provider assigned by default, which is often a generic hostname or nothing at all.
What Gmail checks when a new IP shows up
example.com. A server hosting fifty domains has one PTR per IP, usually pointing at the server's own hostname, and that is normal. What matters is that the PTR name exists, resolves back to the same IP, and ideally matches the name the server announces when it says hello.
Checking forward-confirmed reverse DNS in three lookups
dig, before cutting over mail. Replace the documentation addresses and names below with your own.
BASH
# 1. Reverse lookup: what name does the new IP claim?
dig +short -x 203.0.113.25
# 2. Forward lookup: does that name point back to the same IP?
dig +short A mail.example.com
# 3. Repeat for IPv6 if the server has a public IPv6 address
dig +short -x 2001:db8::25
dig +short AAAA mail.example.comTEXT
# Illustrative output format
$ dig +short -x 203.0.113.25
mail.example.com.
$ dig +short A mail.example.com
203.0.113.25BASH
# Postfix: hostname used in HELO/EHLO by default
postconf myhostname
# Exim: primary hostname (used for HELO unless overridden)
exim -bP primary_hostname
# List all addresses on the server, including any public IPv6
ip -br addrinet_protocols setting. In Exim there are options for this as well, but on cPanel servers change it through WHM's Exim configuration tools rather than editing files by hand, since the panel can regenerate the config.
Getting the PTR set by the IP owner
- Pick the hostname first, usually something like
mail.example.comor the server's own hostname. - Create the A record (and AAAA, if using IPv6) for that hostname in your domain's DNS, pointing to the new IP. Many providers check the forward record before accepting a PTR request.
- Request the PTR for each sending IP, giving the exact IP and hostname.
- Set the MTA's HELO name to the same hostname.
- Re-run the
digchecks from outside the server once the provider confirms.
The order that avoids the bounce window
dig -x on each sending address, IPv4 and IPv6, confirm the name points back, match it to the HELO name, and do it before the cutover rather than after the first bounce.