Why Your Mail Passes SPF and DKIM but Fails DMARC
DMARC alignment is the step after SPF and DKIM. Your mail can pass SPF and DKIM and still fail DMARC, because the domain that authenticated is not the domain in the From: header.
You published SPF and DKIM. Your mail passes both. Then a DMARC report shows failures, and the reason is usually one thing: DMARC alignment. A DMARC pass needs more than an SPF or DKIM pass. The domain that did the authenticating has to match the domain in your From: header. When it does not, the mail fails DMARC even though every other check went green. If you are new to the three records, start with how SPF, DKIM and DMARC fit together before reading on.
What DMARC alignment means
DMARC's standard says a message needs alignment between the Author Domain and an Authenticated Identifier to achieve a DMARC pass. The Author Domain is the domain name of the apparent author as extracted from the RFC5322.From header field. In plain terms, it is the domain after the @ sign in the address your reader sees.
SPF and DKIM each produce an Authenticated Identifier. For SPF it is the domain in the MAIL FROM command, the envelope sender. For DKIM it is the signing domain in the d= tag of the signature. DMARC's standard says SPF and DKIM provide domain-level authentication but are not directly associated with the Author Domain. Alignment is the bridge. It ties the domain that authenticated to the domain the reader sees.
Gmail's guidelines say the same thing in fewer words. To pass DMARC, mail must pass SPF or DKIM, or both. The domain that authenticates must match the From: header domain.
Why passing SPF and DKIM is not enough
Each check answers a different question. SPF asks whether your server was allowed to send the mail. DKIM asks whether the message was signed and arrived intact. Neither asks who the mail claims to be from. That is the question DMARC adds.
The gap is not theoretical. DMARC requires Identifier Alignment for a DKIM-Authenticated Identifier, because a message can carry a valid signature from any domain. A vendor could sign your mail with its own domain, and the signature would verify fine. Without alignment, that pass would count for a From: header it has nothing to do with.
SPF has the same hole. DMARC requires Identifier Alignment for the SPF-Authenticated Identifier, because any domain owner can publish an SPF record and get a pass. DMARC's standard says SPF for DMARC needs an RFC5321.MailFrom domain that aligns with the Author Domain. DKIM needs a DKIM Signing Domain that aligns with it too.
The result is simple. DMARC's standard says a message passes the DMARC check if one or more Authenticated Identifiers align with the Author Domain. It fails if no Authenticated Identifiers exist or none align. One aligned pass is enough. Two unaligned passes are worth nothing.
Relaxed vs strict alignment
There are two modes, and they apply to SPF and DKIM separately.
DMARC's standard says domains are in relaxed alignment when they share the same Organizational Domain. The Organizational Domain is the domain at the top of the namespace hierarchy with the same administrative authority as the domain. So mail.example.com and example.com are in relaxed alignment, because both sit under example.com. DMARC's standard says domains are in strict alignment only when they are identical. Under strict, mail.example.com and example.com do not match. Comparisons are case-insensitive either way.
Does a subdomain count as aligned? Under relaxed, yes. Under strict, no. That single difference is the whole choice.
For DKIM, Google Workspace Help says strict alignment needs the sender domain to exactly match the d= domain in the DKIM headers. Relaxed alignment accepts any valid subdomain of the d= domain. For SPF, strict alignment needs the From header to exactly match the domain in the SMTP MAIL FROM command. Relaxed alignment accepts any valid subdomain of that domain.
The aspf and adkim tags
You set the mode in your DMARC record. DMARC's adkim tag says whether the domain owner requires strict or relaxed DKIM alignment. The aspf tag does the same for SPF. DMARC's standard says the Domain Owner publishing the DMARC Policy Record chooses which alignment mode is required.
Google Workspace Help says relaxed DKIM alignment is the default and relaxed SPF alignment is the default. If your record says nothing about alignment, you are running relaxed for both. The other tags in the record are covered in the guide to DMARC tags.
Why mail can pass both and still fail DMARC
Here is the failure that sends people searching. Your newsletter goes out from an address at yourbrand.com. Your email tool signs it with d=sendtool.net, because that is the domain the tool set up. SPF passes, because the tool's servers are in the tool's own SPF record. DKIM passes, because the signature is valid. DMARC fails, because neither authenticated domain shares an Organizational Domain with yourbrand.com.
The fix is to make one of them align. Sign with a key for yourbrand.com, or send with an envelope sender under yourbrand.com. Then the same mail that failed will pass. The mechanics of the signature are in how DKIM works in email, and the envelope side is in the SPF record guide.
Forwarded mail is a second cause. Gmail's FAQ says DMARC alignment is not required for forwarded or mailing list messages. So a forward that breaks alignment may still land fine. But your own report will show the failure, and you should read it as expected rather than as a problem to fix.
When to consider strict alignment
Most senders should stay relaxed. DMARC's standard says that in practice nearly all Domain Owners have found relaxed alignment sufficient to meet their needs. Google Workspace Help says relaxed alignment typically provides sufficient spoofing protection, while strict alignment can send messages from associated subdomains to spam.
There is one case Google Workspace Help names for strict: consider it when mail is sent for your domain from a subdomain outside your control. If a subdomain you do not run can send as you, strict closes that door. Everyone else pays a price for nothing.
Subdomains raise this often enough that there is a separate page on DMARC and subdomains. Read it before you flip any tag to strict.
How alignment shows up in reports, and what to do
DMARC's standard says aggregate reports can reveal mail streams using the Author Domain that do not pass DMARC validation checks.
DMARC's standard says failing mail streams may be illegitimate uses like spoofing or legitimate uses that lack aligned Authenticated Identifiers. Your first job is to tell them apart. Spoofed mail is not yours to fix. Legitimate mail is.
For your own mail, fix the alignment before you tighten policy. DMARC's standard says shortcomings in legitimate mail streams must be fixed before the Domain Owner publishes an Enforcement policy for the Author Domain. If you move to enforcement with broken alignment, receivers may quarantine or reject your own campaigns. The policy levels are laid out in DMARC policy options, and the report itself is covered in how to read a DMARC report.
Two provider details are worth knowing. Gmail's FAQ says bulk senders must set up both SPF and DKIM. Only one needs to align with the From: header domain, either the SPF or the DKIM organizational domain. It also recommends all senders fully align DMARC to both SPF and DKIM. Yahoo's FAQ says Yahoo evaluates all DKIM signatures and uses the results to determine DMARC alignment. A message with multiple DMARC-aligned signatures that do not all pass is not guaranteed to pass DMARC.
One last thing to keep in proportion. DMARC's standard says DMARC can only be used to combat specific forms of exact-domain spoofing directly. A DMARC pass does not by itself guarantee that delivery to the recipient's inbox would be safe or desirable. Alignment makes your mail honest about who it is from. It does not make it wanted.
Sources
Filed