SPF ptr Mechanism: Deprecated but Still Works
The SPF ptr mechanism authorizes a sending server by its reverse DNS name: the receiver looks up the name behind the connecting IP address, checks that the name resolves back to the same address, and counts a match if the name is your domain, or the domain written after ptr:, or a subdomain of it. RFC 7208 §5.5 says ptr SHOULD NOT be published, but it also requires every receiver to keep supporting it, so a record that uses it can go on working for years.
In our test of 21 mailbox providers, a record with nothing but ptr in it was accepted by every one of them when we sent it through Mailgun, under DMARC p=reject, and every DMARC report that covered it, from Google, Yahoo and Microsoft to La Poste and Zoho, said pass. The one receiver that recorded a different verdict was ukr.net: its headers say spf=fail, and it filed the message in spam in every run. Here's how to replace ptr, followed by what each receiver did.
TL;DR
- What it matches.
ptr:example.compasses an IP whose reverse DNS name isexample.comor ends in.example.comand resolves back to that IP. A bareptruses the domain being checked. - Deprecated, not removed. RFC 7208 says not to publish it, because it's slow, unreliable when DNS fails and a load on the reverse DNS servers. Receivers must still support it (§5.5).
- Pass in every report, fail at ukr.net. Sent through Mailgun, the
ptrrecord was accepted everywhere, and every DMARC report on it, Google's, Yahoo's and Microsoft's among them, recordedpass. ukr.net accepted it too, but wrotespf=failinto its headers on both sending paths, while the same servers listed withip4:or an include reached its inbox. For receivers that sent no report, acceptance is all we can confirm. - Replace it with what it matches. List your own servers with
ip4:orip6:and a provider's servers with its include. Check your DMARC reports first to find the senders that depend on it. Your PTR records, the reverse DNS itself, stay as they are.
How the ptr mechanism works
Like every SPF mechanism, ptr is checked against the IP address that connected and the domain in the envelope sender. Here's how SPF works if you need the basics. For each message, a receiver evaluating ptr:mailgun.net does three things (§5.5):
- It looks up the PTR record of the sending IP, the IP's reverse DNS name.
- It looks up the addresses of each name it gets back and keeps only the names that resolve to the sending IP. This is called forward-confirmed reverse DNS.
- It checks whether a kept name is
mailgun.netor ends in.mailgun.net. If one is, the mechanism matches and its qualifier gives the result,passby default.
Here's that chain for one of the Mailgun servers that sent our test mail:
dig +short -x 159.135.228.37
v537.v524e8ec4.use4.send.mailgun.net.
dig +short A v537.v524e8ec4.use4.send.mailgun.net
159.135.228.37
The name ends in mailgun.net and points back to the same address, so ptr:mailgun.net matches mail from it. Written without a domain, ptr uses the domain being checked: in example.com's record, it matches any server whose confirmed reverse name is example.com or ends in .example.com.
A ptr that doesn't match is not an error. If no name qualifies, evaluation moves on to the next term, and the result comes from a later mechanism or from all. The same happens when the reverse lookup itself fails with a DNS error: the standard says the mechanism then "fails to match" (§5.5). So a timeout at the reverse DNS servers for your IP doesn't give a temporary error. Evaluation moves on, and if no later term lists the sender, it ends at your all: fail for -all, softfail for ~all. With DMARC, that only matters for mail without an aligned DKIM signature: a message that passes DKIM on your domain still passes DMARC.
Reverse DNS sits outside your domain's zone. PTR records belong to the reverse zone of the IP address, which its holder controls, as §4.6.4 points out, and you usually change them through your hosting or IP provider. With ptr, your SPF result depends on that zone too.
It costs a lookup and can cost a void lookup. ptr is one of the terms that count toward the limit of 10 DNS-querying terms per evaluation (§4.6.4), and behind that one term the receiver sends a reverse lookup, then a forward lookup for each name it returns, so the number of actual queries varies. For a sender with no reverse DNS at all, the PTR query comes back empty, which also counts as a void lookup, one of the two the standard recommends allowing. Our SPF Checker reports it that way for our test domain: "1 of 2: ptr:mailpath.io, for a sender without reverse DNS". Here's what the void-lookup limit does.
Why RFC 7208 deprecates ptr
The note at the end of §5.5 gives three reasons: the mechanism is slow, it's less reliable than the others when DNS fails, and it puts a heavy load on the .arpa name servers that answer reverse lookups. After years of deployment, the authors concluded it isn't needed and that more reliable alternatives exist.
It wasn't removed. The same section says compliant receivers MUST support it, and Appendix B explains that ptr stayed in the protocol because records were found to use it, adding that they "ought to be updated" to avoid it. The %{p} macro, which expands to the same validated reverse name, has the same status (§7.3).
None of this is new. The first SPF specification, RFC 4408, published as Experimental in 2006, already called the use of ptr discouraged, for the same reasons. RFC 7208 replaced it in 2014 and turned that into SHOULD NOT. A record with ptr is still valid syntax, so checkers flag it as a warning rather than an error. If you can't replace it right away, the standard asks that it be one of the last mechanisms, just before all, so that senders matched by cheaper terms never trigger the lookups.
The ptr mechanism is not your PTR record
The two names are easy to mix up. The ptr mechanism is a term in your SPF record. A PTR record is the reverse DNS entry of an IP address, set by whoever holds that address.
Removing ptr from SPF doesn't touch reverse DNS, and you should keep reverse DNS in place: receivers check it on their own, outside SPF. Google's sender guidelines ask for valid forward and reverse DNS on sending IPs. In our test, freenet's headers carried no SPF result at all, but they did record iprev=pass with the reverse name of Mailgun's server, a reverse DNS check that has nothing to do with the SPF record.
How to find ptr in your SPF record
Query the record from outside your DNS panel:
dig +short TXT example.com
Look for a term that reads ptr or starts with ptr:, with or without a qualifier in front (?ptr, ~ptr), and for %{p} inside a macro. Then check the records your includes pull in, because a ptr can sit in a provider's record rather than yours. In that case only the provider can remove it; our checker comparison shows such a case, where an OVH include brings in two ptr terms.
DMARKOFF's free SPF Checker resolves every include and flags ptr wherever it sits. For one of our test domains, whose record is v=spf1 ptr:mailpath.io -all, it answers:
Checker output: Warning, No "ptr" mechanism check. There is a "ptr" mechanism in the SPF record or in a record it includes. RFC 7208 §5.5 says the ptr mechanism should not be used: it is slow and unreliable, and it counts against the 10-lookup limit. List your senders with ip4:/ip6: or include: instead.

The SPF Checker on one of our test domains. The warning is about the mechanism itself, and the void lookup is what ptr costs a sender without reverse DNS.
Other checkers flag it too. MxToolbox's SPF lookup has a line called "SPF Type PTR Check", and for the same domain it reads "Type PTR is discouraged". Despite the name, that line is about the ptr mechanism in your SPF record, not about your reverse DNS. It only looks at your own record, though: when we compared free checkers, it reported "No type PTR found" for a domain whose include carried two ptr terms.
How to replace ptr
- Find the senders it matches. Your DMARC aggregate reports list the IP addresses that send as your domain, each with an SPF result and the domain that result is for. Take the addresses that pass SPF for the domain whose record you're editing and that no other term in it lists. Reports don't say which term matched, so check each address the way a receiver does:
dig -xgives its reverse name, which must be theptrdomain or a subdomain of it, and a forward lookup of that name must return the same address. An address that passes both checks depends onptr. Make sure it's a sender you recognize before you list it; whoever runs your mail servers can confirm. - Replace it with terms that list them. Use the table below.
- Count the lookups. Swapping
ptrforip4:saves one. Swapping it for a provider's include can add several, so count the full path for a sender your record doesn't list. Here's how to count them. - Publish, then check. Make it one edit. After the record's TTL has passed, check the record again, and watch the next days of DMARC reports for the addresses from step 1.
The table assumes a plain ptr (or +ptr). A ?ptr, ~ptr or -ptr gives neutral, softfail or fail when it matches, so replacing it with a passing ip4: would change your policy: work out what the term was meant to do first.
Before and after
Say example.com sends from Google Workspace and from two servers of its own, mail1.example.com (192.0.2.25) and mail2.example.com (192.0.2.26), whose reverse names are under example.com:
Before v=spf1 ptr include:_spf.google.com ~all After v=spf1 ip4:192.0.2.25 ip4:192.0.2.26 include:_spf.google.com ~all
The bare ptr matched both servers, and also any other host whose confirmed reverse name is under example.com, such as an old web server you forgot about. The new record lists the two servers by address. That's narrower, which is the point, and it's also why step 1 matters: a sender that only ptr covered, and that you didn't list, now falls through to ~all and gets softfail. For a sender the record doesn't list, the lookups drop from two to one, and senders without reverse DNS no longer cost a void lookup.
Our test domains made the same kind of change. Through Mailgun, the ptr case and its control differed in that one term:
ptr case v=spf1 ptr:mailgun.net -all Control v=spf1 include:_spf.mailgun.org -all
Both passed at every receiver that sent a DMARC report, and at ukr.net only the control did. Mind the cost, though: at the time of writing, Mailgun's include takes two lookups to reach the server in our example and three for a sender it doesn't list, against one for ptr.
Before you publish, you can paste the new record into the checker as a draft and see its lookup count.
What mailbox providers did with ptr
We published ptr on two test subdomains in October 2026, with nothing in the record but ptr and -all, so the mechanism alone decided SPF:
ptr:mailgun.net, sent through Mailgun's shared servers, whose reverse names end insend.mailgun.net.ptr:mailpath.io, sent from our own server, whose address has the forward-confirmed reverse namemta.mailpath.io.
Each domain had DMARC p=reject and no aligned DKIM signature, so SPF decided DMARC. Each path also had a control that listed the same servers with include: or ip4:. The recipients were seed mailboxes, test accounts at real providers that show where a message landed, from GlockApps, which is made by the same team as DMARKOFF.
Through Mailgun, on 23 October 2026:
Every message in both cases was accepted during the SMTP session: Mailgun logged no refusal. Control: v=spf1 include:_spf.mailgun.org -all. Folders come from the seed mailboxes, where a new domain's reputation decides much of the placement, so compare within a row. Delivered: filter seeds show no folder. Their report: the raw SPF result (auth_results/spf/result) in the receiver's own DMARC aggregate report, whose message count matched the messages we sent it at every reporter. ukr.net's spf=fail is from its own header. WorkMail is Amazon WorkMail. A SpamAssassin filter seed, which only scores messages, isn't shown.
¹ A Microsoft 365 seed, an EOP filter seed and a Proofpoint filter seed, all receiving through Microsoft 365.
Every aggregate reporter recorded SPF pass for both records. Every receiver accepted the ptr message, and each report put DMARC pass next to the SPF result. The messages had no aligned DKIM signature, so that SPF pass is what gave DMARC its aligned authentication. Several receivers in the lower rows sent no reports but refused the broken records of the same run, and accepted this one: Apple, Yandex, Onet, mailo and the Barracuda filter refused both mistyped includes, and Onet and Barracuda also the record with three void lookups. For receivers that accept nearly everything, such as T-Online and Vodafone, acceptance says nothing about SPF. In the seed mailboxes, the ptr message landed where the control did, except at ukr.net and one Outlook.com mailbox, which put it in spam where the control had reached the inbox.
No receiver refused it, so there's no bounce to show. Where a ptr fails to match and nothing else authorizes the sender, the result is the record's all, and a receiver that enforces p=reject answers with its usual DMARC refusal. Here's what each provider's refusal says.
ukr.net: the one fail
ukr.net accepted every ptr message, wrote fail into its headers and filed it in spam. This is the Mailgun copy:
Received-SPF: fail (frv72.fwdcdn.com: domain of m10.mailpath.io does not designate 159.135.228.37 as permitted sender) … Authentication-Results: ukr.net; spf=fail (domain of m10.mailpath.io does not designate 159.135.228.37 as permitted sender) smtp.mailfrom=m10.mailpath.io; dmarc=fail header.from=…@m10.mailpath.io
The address in that header is the one from the dig example above, and its reverse name resolved back to it when we checked again on 9 November. Both of our sending paths had forward-confirmed reverse names, so with working reverse lookups, both records pass by the standard. The controls, which listed the same servers with ip4: and an include, reached ukr.net's inbox.
From the outside, we can't tell whether ukr.net skips ptr or its reverse lookups failed, which the standard treats as no match. Either way, the mechanism didn't match and -all gave fail. ukr.net isn't strict across the board: it passed our record with 11 includes, which Microsoft, Apple and most others refused, and it filed a record with three void lookups in spam with an accurate permerror.
From our own server
On 22 and 23 October, v=spf1 ptr:mailpath.io -all went to about 110 seeds per run from our own server. More than half of the seeds refused it with replies that cited the server's IP address, through Spamhaus's PBL or the receiver's own blocklist, in every case of the test alike, so those replies say nothing about ptr. Microsoft, Yahoo, Apple and GMX were among them.
The rest accepted it in both runs: Gmail and Google Workspace, Mail.ru, La Poste, Yandex, Onet, Interia, mailo, Naver, Seznam, Libero, Virgilio, Proton, ukr.net and the Barracuda filter. Google, Interia and Seznam reported pass in both runs, and Mail.ru in the first; it sent no report for this case in the second. ukr.net filed all four of its messages in spam with fail again, while the control, v=spf1 ip4:<our IP> -all, reached its inbox.
What it means for you: Gmail, Yahoo and Microsoft reported pass for our ptr record in October. Where a receiver doesn't match it, as ukr.net didn't, it fails exactly the senders that rely on it, and you may not hear about it: ukr.net sent no DMARC reports during the test, so its verdict showed up only in its headers and spam folder.
What DMARC reports show for ptr
An aggregate report gives the SPF result per sending IP and domain, not the term that matched. A pass through ptr looks the same as a pass through ip4:, so reports won't tell you that a sender depends on ptr. You find that by reading the record and checking the IPs, as in step 1 above.
In the reports we received, ptr got one label. The broken records in the same test got up to four different ones, depending on the reporter: the ipv4: typo, for example, came back as fail, none, permerror and pass. For ptr, every reporter on both paths wrote pass in the raw SPF field, auth_results/spf/result, and every one counted the same number of messages that we sent it through Mailgun. That field is the one to read. policy_evaluated/spf only says whether SPF passed with alignment for DMARC.
The flip side is ukr.net. A receiver that fails ptr and sends no reports leaves no trace in them. If a sender covered only by ptr loses mail at one provider, seed tests and that provider's headers are where you'll see it.
How many domains still use ptr
In our October 2026 scan of the Tranco top 100,000, 512 of the 70,338 domains with a single SPF record had ptr among their own terms, 0.7%. That's more domains than had a record with a syntax error (355). The counts are on GitHub.
Only the terms of the domain's own record count: a ptr inside a provider's include, like the OVH case above, isn't in these numbers. Domains with two or more SPF records are left out, and 35 +all records are too few for a share. Scanned on 27 October 2026.
Records ending in ?all carry ptr about four times as often as the rest. The 182 that end in -all are the ones where a receiver that doesn't match ptr returns fail, if ptr is the only term listing a sender. The scan doesn't show which of these records depend on ptr for real mail and which carry it as a leftover.
What this test doesn't show
- One shape of record. We tested
ptralone, ending in-all, from servers with one forward-confirmed reverse name each. We didn't test a bareptr, a sender without reverse DNS, several reverse names per address, IPv6, reverse DNS that times out, orptrnext to other terms. - Why ukr.net fails it. Its headers say
failand name our IP. They don't say whether it skipped the mechanism or its lookups failed. - Small samples. Through Mailgun, one or two seeds per mailbox type, 45 messages in all; ukr.net got five
ptrmessages over three runs. Folders follow reputation as much as authentication, so we read SPF from reports and headers. - A snapshot. These results describe 22 and 23 October 2026, and receivers change their filtering without notice. The study has the full method.
The SMTP and Mailgun logs, seed results, report extracts, header excerpts and DNS snapshots are in dmarcoff/articles on GitHub. The ptr cases are s10 on the direct path and m10 through Mailgun.
FAQ
A term that authorizes a sending server by its reverse DNS name. The receiver looks up the name of the sending IP, checks that the name resolves back to the same IP, and matches if the name is the domain given after ptr: or a subdomain of it. A bare ptr uses the domain being checked.
Yes. RFC 7208, the SPF standard since 2014, says it SHOULD NOT be published, and RFC 4408 already discouraged it in 2006. It wasn't removed: receivers must still support it, so records that use it stay valid.
In our October 2026 test, mostly yes. Sent through Mailgun, a record with only ptr in it was accepted at all 21 providers under DMARC p=reject, and every DMARC report on it, from Google, Yahoo, Microsoft and others, said pass. ukr.net accepted it but wrote fail into its headers and filed it in spam on both sending paths.
No. The ptr mechanism is a term in your SPF record. A PTR record is the reverse DNS entry of an IP address, run by whoever holds the address. Remove the mechanism, but keep your reverse DNS: receivers check it separately, and Google asks for it.
It's MxToolbox's warning that your SPF record contains the ptr mechanism. It isn't about your reverse DNS. Replace the ptr term with the addresses or include it stands for, and keep your PTR records.
Yes, as one term, like include or mx. For a sender without reverse DNS it also counts as a void lookup, and the standard recommends allowing only two of those.
ip4: or ip6: for servers with fixed addresses, a: for a host whose address changes, and the provider's documented include for a provider's servers. Check your DMARC reports first to see which senders depend on ptr, then recount your lookups.
Not by itself. A ptr that doesn't match just moves evaluation to the next term. It can add to a permerror, though: it counts toward the 10-lookup limit, and for senders without reverse DNS it uses one of the two void lookups.
Co-founder & CTO at DMARKOFF and GlockApps, email security specialist with 20+ years of experience, Golang & ClickHouse expert. A happy father of two teenagers.


