When an order confirmation or password reset email never reaches a customer, people usually check SPF and DKIM first. A factor that is often overlooked is the PTR record for the sending server's IP address. Receiving mail servers check it among the very first things. If it is missing or looks suspicious, the message goes to spam or is refused during the SMTP conversation.
Forward DNS versus reverse DNS
A normal lookup goes from name to address. A PTR record does the opposite and returns a name for an IP address, which is why it is called reverse DNS. PTR records live in the special in-addr.arpa zone, or ip6.arpa for IPv6.
The confusing part is that the PTR record is not in your domain's zone but in the zone of whoever owns the IP address. You can add A, MX and TXT records yourself, but a PTR has to be set by the party that assigned the IP: your hosting or VPS provider, or the ISP that owns the address block.
What the receiving server checks
The receiving server sees the connecting IP, looks up its PTR, then resolves that name forward and checks it leads back to the same IP. This is forward-confirmed reverse DNS. It also compares the name your server announces in HELO or EHLO; a server introducing itself as localhost looks like spam. Large mailbox providers list valid reverse DNS in their published sender guidelines, so check their official documentation for exact requirements.
Commands to check
dig -x 203.0.113.40 +short
host 203.0.113.40
dig mail.example.uz A +short
# Windows
nslookup 203.0.113.40
Ideally the first command returns a specific name such as mail.example.uz. and the forward lookup returns 203.0.113.40 again. An empty answer or a generic name like 203-0-113-40.provider.net can make the address look residential or dynamic.
A real case: a clinic on a VPS
A private clinic in Samarkand began sending appointment reminders from its own VPS. SPF and DKIM were fine, yet many messages went to spam and some providers refused them, with bounce texts hinting at missing reverse DNS. The PTR was the provider's generic name and the server announced itself as vps-default. The fix took three steps: an A record for mail.example.uz, a PTR change to that name through the provider, and the same hostname in the mail server configuration. Within days the reminders reached inboxes normally.
Setting the hostname in the mail server
For Postfix, edit /etc/postfix/main.cf:
myhostname = mail.example.uz
myorigin = example.uz
smtp_helo_name = $myhostname
sudo postfix check
sudo systemctl reload postfix
On Exim the equivalent option is primary_hostname. Whatever the software, the HELO name, the PTR result and that name's A record should all agree.
One IP, many domains
A single IP normally has a single PTR, and that is enough even if the server sends mail for several domains such as misol.uz. What matters more is that each domain's SPF allows the server IP and DKIM signatures are valid. On shared hosting this is handled by the provider; at sayt.uz, mail from your site goes through the provider's mail infrastructure. On a VPS or dedicated server, PTR and hostname are your responsibility.
Quick checklist
- The sending IP has a PTR that returns a specific name.
- That name's
AorAAAArecord points back to the same IP. - The mail server uses exactly this name in HELO or EHLO.
- If mail leaves over IPv6, the IPv6 address has its own PTR, or IPv6 sending is disabled.
- SPF, DKIM and DMARC are in place alongside the PTR.
IPv6 is the most commonly forgotten point. Mail software often prefers IPv6, so check the headers of a received message to see which address it really left from.