Table of Contents
Reverse DNS (PTR) for Email
In email delivery, Reverse DNS (rDNS)—configured via a PTR (Pointer) Record—maps a mail server's IP address back to its Fully Qualified Domain Name (FQDN).
While Forward DNS converts a name to an IP (`example.com` → `192.0.2.1`), Reverse DNS does the exact opposite (`192.0.2.1` → `mail.example.com`).
Nearly all major mailbox providers (Google, Microsoft, Yahoo, Apple) enforce strict Reverse DNS requirements. Missing or misconfigured rDNS records are one of the most common reasons outbound emails are rejected or sent straight to the spam folder.
Why Mail Servers Require Reverse DNS
Email is fundamentally built on top of SMTP, which traditionally lacked identity verification. Spam bots and compromised devices (botnets) often send bulk mail directly from dynamic residential IP addresses that do not have valid PTR records.
Requiring Reverse DNS allows receiving mail servers to verify that the sending IP address belongs to a legitimate, statically assigned mail server infrastructure.
Forward-Confirmed Reverse DNS (FCrDNS)
Most modern receiving mail servers perform a security check known as Forward-Confirmed Reverse DNS (FCrDNS):
# **Reverse Lookup:** The receiving server takes the sending server's IP (`192.0.2.1`) and queries DNS for its PTR record. Result: `mail.example.com`. # **Forward Lookup:** The receiving server then queries DNS for the `A` record of `mail.example.com`. Result: `192.0.2.1`. # **Confirmation:** If the IP from the forward lookup matches the originating IP, **FCrDNS passes**.
<note warning> If `mail.example.com` resolves to a different IP address, or if no PTR record exists, receiving mail servers will flag the connection as suspicious and reject the email with an SMTP 550 / 5.7.1 Error. </note>
Key Requirements for Email PTR Records
To ensure 100% deliverability for outbound mail, ensure your PTR configuration follows these best practices:
| Requirement | Rule | Example |
|---|---|---|
| 1:1 Alignment | The PTR record name must match the forward `A` record of the mail server. | IP `192.0.2.1` → `mail.telenegar.ir`<br> `mail.telenegar.ir` → `192.0.2.1` |
| HELO / EHLO Matching | Your SMTP server's configured hostname in `HELO`/`EHLO` commands must match the PTR record. | SMTP Greeting: `220 mail.telenegar.ir ESMTP` |
| No Generic Hostnames | Avoid ISP auto-generated PTR records. Mail servers treat generic names as spam sources. | Invalid: `1-2-3-4.ip.provider.com`<br> Valid: `mail.yourdomain.com` |
How to Set Up Reverse DNS for Your Mail Server
Unlike standard DNS records (`A`, `MX`, `TXT`) which you manage at your domain registrar (e.g., Cloudflare, ArvanCloud, Hetzner DNS), PTR records are owned by the provider that assigned your IP address.
# **Identify your IP Owner:** Determine whether your server IP is provided by a cloud provider (AWS, DigitalOcean, Hetzner), a VPS hosting company, or your ISP. # **Configure PTR via Portal:** * **Cloud / VPS Providers:** Navigate to your IP Management / Networking panel in your hosting dashboard and set the Reverse DNS field to your mail server FQDN (e.g., `mail.yourdomain.com`). * **Dedicated / ISP Lines:** Contact your ISP or datacenter support team and submit a request to update the PTR record for your static IP. # **Set Forward `A` Record:** Ensure an `A` record for `mail.yourdomain.com` pointing to that exact IP exists in your main DNS zone file.
Verification & Diagnostics with Telenegar
You can verify and test your mail server's Reverse DNS configuration using Telenegar Tools or terminal commands:
Using Telenegar Tools
- Mail Health Audit: Run a full check on your mail server IP, PTR record, and authentication with the Telenegar Mail Check Tool.
- Global DNS Resolution: Test A/AAAA record propagation for your mail hostname using the Telenegar DNS Check Tool.
Using Terminal Commands
Reverse Lookup (dig)
bash dig -x 192.0.2.1 +short # Expected output: mail.example.com.
Forward Confirmation (dig)
bash dig +short mail.example.com # Expected output: 192.0.2.1
Windows / Cross-platform (nslookup)
cmd nslookup -type=PTR 192.0.2.1
Related Documentation
- General Reverse DNS (Networking) — Overview of PTR record hierarchy and in-addr.arpa delegation.
- Telenegar Mail Check Tool — Test PTR alignment and SMTP handshake responses.
- Telenegar DNS Check Tool — Validate forward A/AAAA record lookups.
- SMTP Status Codes & Email Bounces — Troubleshoot 550 5.7.1 access denied errors caused by missing PTR records.
- Email Headers — Learn how receiving servers log PTR validation in `Received:` header traces.
