Most DMARC failures happen when SPF and DKIM both pass for the wrong domain. Here is how alignment works, how the SPF 10-lookup limit breaks quietly, and what RFC 9989 changed about the record you publish.
Most DMARC failures are not SPF or DKIM failures. They are alignment failures: both checks pass, but for a domain that is not the one in the visible From address, so DMARC still says fail. And since May 2026, when RFC 9989 replaced the original DMARC document, the record you should publish has changed as well. pct is gone, a new t tag takes its place, and receivers find your organizational domain by walking the DNS tree instead of looking it up in the Public Suffix List.
This post goes through what each of the three protocols checks, why "SPF: pass" in a header can sit next to "DMARC: fail", how the 10-lookup limit silently breaks SPF, and what RFC 9989 means for the record in your DNS today.
The three are often listed together as if they were layers of the same thing. They check different identifiers, live in different places in DNS, and fail in different ways.
| SPF | DKIM | DMARC | |
|---|---|---|---|
| Spec | RFC 7208 | RFC 6376 | RFC 9989 (obsoletes RFC 7489) |
| What it authenticates | The connecting IP is allowed to send for the envelope sender domain | The message headers and body were signed by a domain's private key | The visible From domain is backed by an aligned SPF or DKIM pass |
| Domain it checks | MAIL FROM (the Return-Path / bounce address) | The d= value in the DKIM-Signature header | The RFC5322.From domain the reader sees |
| Where the record lives | TXT at the domain itself | TXT at <selector>._domainkey.<domain> | TXT at _dmarc.<domain> |
| Survives forwarding? | Usually not: the forwarder's IP is not in your record | Usually, unless a mailing list modifies the body or subject | Passes if either aligned check survives |
The key row is "domain it checks". SPF never looks at the From header. DKIM signs on behalf of whatever domain the signer puts in d=, which can be anything. Neither one, on its own, stops someone from sending mail that claims to be from your domain. That is the gap DMARC closes.
DMARC passes when at least one of SPF or DKIM passes for a domain that is aligned with the From domain. Here is a header set you will see constantly from marketing and billing platforms:
Return-Path: <bounce-8812@em.sendvendor.example>
DKIM-Signature: v=1; a=rsa-sha256; d=sendvendor.example; s=s1; ...
From: Billing <billing@example.com>
Authentication-Results: mx.receiver.example;
spf=pass smtp.mailfrom=em.sendvendor.example;
dkim=pass header.d=sendvendor.example;
dmarc=fail header.from=example.com
Both underlying checks passed. SPF proved the vendor's IP may send for em.sendvendor.example, and DKIM proved the vendor signed the message. But neither authenticated example.com, so DMARC fails, and with p=reject this invoice never arrives.
The diagram shows the fix in action. There are two ways to get alignment, and you want both where the vendor supports them:
s1._domainkey.example.com) so it signs with d=example.com. This is the one that matters most, because DKIM usually survives forwarding and SPF does not.bounce.example.com at the vendor so the envelope sender is inside your organizational domain. Under relaxed alignment, bounce.example.com aligns with example.com.The adkim and aspf tags choose the mode, and both default to relaxed (r). Relaxed means the two domains share an organizational domain, so bounce.example.com aligns with example.com. Strict (s) means an exact match. RFC 9989 notes that nearly every domain owner finds relaxed enough. Strict is worth it mainly when different teams or tenants control different subdomains and you do not want one subdomain's mail to vouch for another.
SPF has a limit that is easy to break without noticing. RFC 7208 caps an evaluation at 10 terms that need a DNS query: include, a, mx, ptr, exists and the redirect modifier, counted across every nested include. Past 10, the receiver returns permerror, which DMARC treats as an SPF failure for every message you send. The ip4, ip6 and all terms cost nothing.
Take this record from a company that has added vendors one at a time:
v=spf1 include:_spf.crm.example include:mail.helpdesk.example
include:spf.esp.example mx a:relay.example.com -all
Each include pulls in the vendor's own record, which can contain more includes. With realistic (illustrative) nesting:
| Term | Its own lookup | Lookups nested inside | Running total |
|---|---|---|---|
include:_spf.crm.example | 1 | 3 | 4 |
include:mail.helpdesk.example | 1 | 1 | 6 |
include:spf.esp.example | 1 | 2 | 9 |
mx | 1 | 0 | 10 |
a:relay.example.com | 1 | 0 | 11: permerror |
Nothing in the record looks wrong, and it worked last month, before the ESP added one nested include to its own record. That last point is the real danger: your lookup count depends on DNS records you do not control. Two more limits apply. Each mx may resolve to at most 10 hosts, and RFC 7208 recommends that receivers fail after more than two "void lookups" (queries that return no records), which catches includes pointing at domains that have dropped their SPF record.
The usual fixes, roughly in order of preference:
mx and a with ip4:/ip6: ranges when your own servers rarely change.news.example.com does not need to fit in the root record's budget.~all or -all?DMARC decides what happens to failing mail, so most domains end SPF with ~all (softfail) and let p= do the enforcing. RFC 9989 adds a practical warning about -all: some receivers check SPF early in the SMTP session, and a hard fail can get a message rejected before DMARC ever runs. That includes a message that would have passed DMARC through an aligned DKIM signature. Those rejections also never show up in your aggregate reports, because the receiver never got as far as reading the From header.
The original DMARC spec, RFC 7489 (2015), was an Informational RFC published through the Independent Submissions stream. RFC 9989 is the IETF Standards Track version (the "DMARCbis" drafts), published in May 2026. Aggregate reporting moved to RFC 9990 and failure reporting to RFC 9991. The changes that affect the record you publish:
| RFC 7489 | RFC 9989 | |
|---|---|---|
pct | Apply the policy to 0 to 100 percent of failing mail | Removed. Unknown tags must be ignored, so updated receivers ignore it |
t | Did not exist | t=y asks receivers to apply one level below p (reject acts as quarantine, quarantine as none) |
np | Only in experimental RFC 9091 | Standard: policy for non-existent subdomains |
psd | Did not exist | y, n or u: marks public suffix domains, or pins your organizational domain |
rf, ri | Failure report format, report interval | Removed |
| Organizational domain | Public Suffix List lookup | DNS tree walk over _dmarc records |
| Status | Informational | Standards Track |
The reason for dropping pct is in Appendix A.6 of the RFC. Operational experience showed receivers only applied it consistently at 0 and 100. Values in between were implemented inconsistently, while pct=0 had become a signal that mailing lists and intermediaries used to rewrite the From header. The t tag keeps exactly that useful behavior with two clear values.
Under RFC 7489, a receiver found your organizational domain (the thing relaxed alignment compares) by matching the domain against a copy of the Public Suffix List. Different receivers used different copies, refreshed at different times. RFC 9989 replaces this with queries for _dmarc records up the tree, capped at eight queries so a long hostname cannot be used for a denial-of-service attack. Simplified:
// Simplified RFC 9989 section 4.10 org-domain discovery.
// lookupDmarc returns the single valid DMARC record at _dmarc.<name>, or null.
type Rec = { psd?: 'y' | 'n' | 'u' }
async function orgDomain(domain: string, lookupDmarc: (name: string) => Promise<Rec | null>) {
const all = domain.toLowerCase().split('.')
let labels = all
let fewest: string | null = null
let first = true
while (labels.length > 0) {
const name = labels.join('.')
const rec = await lookupDmarc(name)
if (rec?.psd === 'n') return name // explicitly an org domain
if (rec?.psd === 'y' && !first) {
return all.slice(-(labels.length + 1)).join('.') // one label below the PSD
}
if (rec) fewest = name // keep walking: the shortest name with a record wins
// 8-query cap: a long name jumps straight to its last 7 labels.
labels = first && labels.length >= 8 ? labels.slice(-7) : labels.slice(1)
first = false
}
return fewest ?? domain
}
For almost every domain the answer is the same as before: example.com publishes _dmarc.example.com, and that is the organizational domain. The differences show up at the edges. A company running team.example.com as an independent unit can publish psd=n there to make it a separate organizational domain. A domain under a multi-label suffix that the PSL lists but that publishes no DMARC record can resolve differently. The RFC's own advice for avoiding any disagreement between old and new receivers is to publish an explicit DMARC record for every domain you send From, and to use strict alignment if the difference matters to you.
Receivers will not all update at once. An RFC 7489 receiver ignores t as an unknown tag and an RFC 9989 receiver ignores pct, so plan around both:
v=DMARC1; p=none; rua=mailto:dmarc@example.com. Monitoring mode. Read the aggregate reports for a few weeks and find every source sending as your domain.p=quarantine; t=y. Updated receivers treat failures as none while you watch. An old receiver ignores t and quarantines for real, so only take this step once the reports look clean. If you want testing behavior from old receivers too, adding pct=0 covers them, at the cost of a tag that checkers following RFC 9989 will flag as obsolete.p=quarantine, then p=reject; t=y, then p=reject.Add np=reject early in this process. Subdomains that do not exist never send legitimate mail, and spoofing them (secure-login.example.com) is a cheap phishing trick. Without np, they inherit sp if you set one, which is often looser than p.
This is no longer optional for bulk senders. Since February 2024, Gmail and Yahoo's sender requirements require anyone sending large volumes to their users to publish DMARC (p=none is the minimum) and to have From domains that align with SPF or DKIM.
You can check SPF and DMARC from a domain name alone. You cannot do that for DKIM, because the key lives at <selector>._domainkey.<domain> and each sending service chooses its own selector name. Nothing in DNS lists them. To check DKIM you need a real message: its DKIM-Signature header names the selector and domain, and the receiver's Authentication-Results header tells you whether it verified and for which d=. Pasting the headers of a message you received into an email header analyzer is the quickest way to see whether header.d actually matches your From domain.
The selector design is also what makes key rotation painless, for the same reason kid values make JWKS key rotation safe. Publish the new key under a new selector, switch the signer over, and leave the old selector in DNS until messages signed with it are no longer in transit or being verified. Use 2048-bit RSA keys. 1024-bit keys still verify at most receivers, but they are well past their safe lifetime. If you have built webhook signature verification, DKIM will look familiar: canonicalize the signed headers and body, hash them, verify the signature against a published key. The difference is that the key is asymmetric and found through DNS rather than shared in advance.
When DMARC fails, check alignment first. Find the smtp.mailfrom and header.d values in Authentication-Results and compare them with the From domain. Then count your SPF lookups including nested includes, because a vendor can push you past 10 without you changing anything. Finally, update the record itself for RFC 9989: drop pct in favor of t=y for staged rollouts, add np=reject, and publish explicit _dmarc records for every domain you send From, so the move from the Public Suffix List to the tree walk changes nothing for you. An SPF and DMARC checker will list every include with its lookup count and flag the obsolete tags before a receiver rejects your mail.
Free, in your browser, no sign-up.
One email when a new post goes up. No other mail; unsubscribe in one click.
We store your email only to send new posts. See the privacy policy.