Every IP that sends mail to the internet needs a reverse DNS name that resolves back to the same address, and a HELO name that matches it. This guide covers what the large mailbox providers require, how to name sending hosts, who controls the reverse zone and how it is delegated, IPv6, and how to check the result with dig.
What receivers require
SMTP itself does not require reverse DNS. The receivers do, and the large ones now say so in writing.
| Source | Requirement |
|---|---|
| ”The public IP address of a sending SMTP server must have a corresponding PTR record that resolves to a hostname.” The hostname’s A or AAAA record must return the same IP. Applies to all senders. | |
| Yahoo | All senders must have “a valid forward and reverse DNS record for your sending IPs”. PTRs should be “valid, meaningful, non-generic” and not look dynamically assigned. |
| Microsoft (Outlook.com policies) | “Email servers must have valid reverse DNS records.” Connections from dynamic IP space may not be accepted. |
| M3AAWG Sender BCP | One reverse DNS name per IP, exactly matching the host’s primary forward name. |
| Spamhaus | Forward-confirmed reverse DNS for every sending IP, and a HELO name that resolves to the connecting IP and stays the same across connections. Both are among its minimum requirements. |
Gmail enforces this at the SMTP level. A missing or unconfirmed PTR draws 451 4.7.23 (temporary) or 550 5.7.25, whose text reads “Gmail requires that sending IP addresses have a PTR record.”
PTR records and forward confirmation
Give each sending IP exactly one PTR record. The name it points to must have an A record (AAAA for IPv6) that returns the same address. That round trip is forward-confirmed reverse DNS, often written FCrDNS.
; reverse zone 2.0.192.in-addr.arpa
25 IN PTR mta1.mail.example.com.
26 IN PTR mta2.mail.example.com.
; forward zone example.com
mta1.mail IN A 192.0.2.25
mta2.mail IN A 192.0.2.26
RFC 8601 defines this check as iprev: the receiver looks up the PTR names for the client’s address, resolves each name, and passes if the original address is among the results. Receivers often record it:
Authentication-Results: mx.example.net;
iprev=pass policy.iprev=192.0.2.25 (mta1.mail.example.com)
Three rules keep it simple:
- One PTR per IP. DNS allows several, but receivers may check any of them. M3AAWG’s BCP says there must be only one.
- No CNAME targets. The PTR must point to a name with its own address record, not an alias (RFC 1912).
- Exact match. The forward lookup must return the very address that connected, not just another address in the same range. Give each address its own hostname.
The HELO name
The sending server names itself in EHLO. RFC 5321 says the argument is the client’s fully qualified domain name, a primary host name that resolves to an address record. Set it to the PTR name, so that HELO, PTR and A record all agree:
S: 220 mx.example.net ESMTP
C: EHLO mta1.mail.example.com
M3AAWG is specific. On a dedicated IP, the HELO must exactly match the primary forward name. On a shared or NAT’d IP, it must match at least at the registered domain. An address literal such as [192.0.2.25] is not acceptable for mail to the internet.
RFC 5321 forbids a server from refusing mail only because the EHLO name does not match the client address. That does not make a mismatch harmless. Receivers record it and weigh it. Spamhaus’s guidance for both its XBL and CSS lists tells operators to make hostname, HELO and reverse DNS match, and its sender guidelines treat placeholder values, hosting-provider defaults and HELO names that vary between connections as signs of misconfiguration or compromise.
The HELO name also matters for SPF. RFC 7208 recommends that verifiers check the HELO identity, and for bounces with an empty return path SPF evaluates postmaster@ the HELO name. Publish an SPF record on every HELO name:
mta1.mail.example.com. IN TXT "v=spf1 a -all"
Naming: specific, stable, under your own domain
- Say what it is. M3AAWG contrasts a server name such as
server03.example.netwith a pool name such aspool-dhcp-456.example.net. Names containingdhcp,dyn,pool,dslorclient, and names that embed the address (192-0-2-25.example.net), look like access-network space to filters. Replace a provider’s default generic PTR before sending, and do not use random or meaningless words: the name should tell an abuse desk what the machine is. - Name the responsible party. Use a domain you control, not the hosting provider’s or the address holder’s, so that anyone investigating a message can see who operates the address. M3AAWG asks that sending hosts sit under one domain or a small number of them, separated by subdomains:
mta1.mail.example.comandmta2.mail.example.com, not a separately registered domain for each server. - Make the domain answer. M3AAWG recommends that the HELO and reverse DNS domain has an MX and accepts mail for
postmasterandabuse(RFC 2142). - Keep names stable. A rename changes PTR, HELO and the HELO SPF record together. Plan it as an infrastructure change.
Who controls reverse DNS: delegation
The reverse zone belongs to whoever holds the address space, not to the owner of the forward domain. You can publish a PTR only if the holder delegates the zone to your name servers, or publishes the records for you.
A /24 or larger
in-addr.arpa follows octet boundaries. In the RIPE region the holder registers a domain object for each /24 zone (or each /16, for /16 and larger), naming the name servers. A /22 needs four objects. The object is authorised by the maintainer named in mnt-domains: on the inetnum, and the RIPE Database runs technical checks against the listed servers before accepting it, so the zone must be served first (RIPE Database documentation).
domain: 2.0.192.in-addr.arpa
admin-c: EXA1-RIPE
tech-c: EXA1-RIPE
zone-c: EXA1-RIPE
nserver: ns1.example.net
nserver: ns2.example.net
mnt-by: EXAMPLE-MNT
source: RIPE
Smaller than a /24: RFC 2317
Registry delegation stops at the /24 zone, so a /26 sits inside the zone of whoever holds the covering /24. RFC 2317 (BCP 20) solves this with a CNAME per address in the parent zone, pointing into a subzone delegated to you.
; parent zone 2.0.192.in-addr.arpa, run by the /24 holder
64/26 IN NS ns1.example.com.
64/26 IN NS ns2.example.com.
65 IN CNAME 65.64/26.2.0.192.in-addr.arpa.
66 IN CNAME 66.64/26.2.0.192.in-addr.arpa.
; and so on: one CNAME for each address from 64 to 127
; your zone 64/26.2.0.192.in-addr.arpa
65 IN PTR mta1.mail.example.com.
66 IN PTR mta2.mail.example.com.
RFC 2317 notes that some software handles / in labels poorly and suggests a hyphen instead. For a handful of addresses, asking the holder to publish your PTRs directly is often simpler.
IPv6 reverse DNS
IPv6 reverse names sit under ip6.arpa, one label per hexadecimal digit, reversed. 2001:db8:10::25 becomes:
5.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.8.b.d.0.1.0.0.2.ip6.arpa
Delegation follows 4-bit boundaries. A prefix that does not fall on one is delegated as several zones at the next boundary.
The rules are the same as for IPv4: an explicit PTR for every sending address, a matching AAAA record and a matching HELO name. M3AAWG treats its IPv4 reverse DNS recommendations as the minimum for IPv6, and Spamhaus expects a sender’s IPv6 allocation to be a /64 or larger with valid reverse DNS. Gmail rejects non-compliant IPv6 mail with 550 5.7.1 “does not meet IPv6 sending guidelines regarding PTR records and authentication”. Synthesised PTRs generated for a whole prefix are generic by nature: give sending addresses explicit, meaningful names.
The common trap is accidental IPv6. Gmail’s MX hosts publish AAAA records, and a server with IPv6 connectivity may use it. If that address has no PTR, mail fails while the IPv4 setup is perfect. Either configure IPv6 fully (PTR, AAAA, HELO, SPF ip6:), or bind outbound SMTP to IPv4.
Checking it with dig
Check reverse, then forward, for every sending address:
$ dig +short -x 192.0.2.25
mta1.mail.example.com.
$ dig +short A mta1.mail.example.com
192.0.2.25
$ dig +short -x 2001:db8:10::25
mta1.mail.example.com.
$ dig +short AAAA mta1.mail.example.com
2001:db8:10::25
With RFC 2317 delegation, the CNAME appears in the answer:
$ dig +short -x 192.0.2.65
65.64/26.2.0.192.in-addr.arpa.
mta1.mail.example.com.
dig +trace -x 192.0.2.25 shows each delegation step, which locates a broken one quickly. Check the HELO SPF record with dig +short TXT mta1.mail.example.com. Finally, send a test message to a mailbox you control at each major provider and read the Received: and Authentication-Results: headers. They show the HELO name and the PTR name as the receiver saw them, and the iprev result where the receiver records it.