DMARC Alignment: Relaxed vs Strict Explained
DMARC alignment is the rule that connects authentication results to the domain the recipient actually sees. A message can pass SPF and pass DKIM and still fail DMARC - because the authenticated domains do not match the visible From domain. This page explains why that happens and what to change.
The three domains involved
Every email carries three domain identities that DMARC compares:
| Identity | Where it appears | What it controls |
|---|---|---|
| From domain | The visible From: header | What the recipient sees; the domain DMARC protects |
| SPF domain | The Return-Path (envelope from) | Which server is authorized to send |
| DKIM domain | The d= tag in the DKIM-Signature | Who cryptographically signed the message |
How DMARC uses these domains
DMARC checks whether the SPF-authenticated domain or the DKIM-authenticated domain aligns with the From domain. Only one needs to align - DMARC passes if either aligned SPF pass or aligned DKIM pass exists. It does not require both. This is defined in RFC 7489 §3.1.
Relaxed vs strict alignment
The alignment mode is controlled by the aspf (for SPF) and adkim (for DKIM) tags in your DMARC record. Both default to relaxed.
| Mode | SPF alignment rule | DKIM alignment rule |
|---|---|---|
| Relaxed (default) | The SPF domain and From domain must share the same organizational domain (e.g., mail.example.com aligns with example.com) | The DKIM d= domain and From domain must share the same organizational domain |
| Strict | The SPF domain must exactly match the From domain | The DKIM d= domain must exactly match the From domain |
Synthetic examples (labeled, not customer evidence)
All examples use reserved documentation domains (example.com, example.net, example.org) per RFC 2606. These are synthetic illustrations of the alignment rules, not output from any tool.
Example 1: SPF and DKIM pass, but DMARC fails (alignment failure)
From: marketing@example.com Return-Path: bounce@esp.example.net ← SPF evaluated against esp.example.net DKIM-Signature: d=esp.example.net ← DKIM signed by esp.example.net SPF result: pass (sender IP authorized by esp.example.net's SPF) DKIM result: pass (signature verifies against esp.example.net's key) DMARC result: fail (neither esp.example.net aligns with example.com)
Synthetic example. The ESP authenticates using its own domain for both Return-Path and DKIM. Authentication passed, but neither authenticated identity aligns with the visible From domain.
Example 2: SPF fails, but DMARC passes via aligned DKIM
From: newsletter@example.com Return-Path: bounce@other.example.net ← SPF fails (IP not authorized) DKIM-Signature: d=example.com ← DKIM signed by example.com SPF result: fail (IP not authorized by other.example.net's SPF) DKIM result: pass (signature verifies; d=example.com aligns with From: example.com) DMARC result: pass (one aligned DKIM pass is sufficient)
Synthetic example. DMARC passes because one aligned authentication (DKIM) succeeded. SPF failure alone does not cause DMARC failure when DKIM is aligned - DMARC requires only one passing, aligned mechanism.
Example 3: Forwarded mail with rewritten envelope
In this scenario, a forwarder receives a message from user@example.com and re-sends it. The forwarder rewrites the envelope (Return-Path) to its own bounce address, but does not modify the message body or headers.
From: user@example.com
Return-Path: bounce@forwarder.example.org ← Forwarder rewrote the envelope
DKIM-Signature: d=example.com ← Original signature intact
SPF check (at final recipient):
Connecting IP: forwarder.example.org's server
Return-Path domain: forwarder.example.org
→ SPF is evaluated against forwarder.example.org's own policy
→ Result depends on whether the forwarder's IP is authorized
by forwarder.example.org's SPF record (not example.com's)
DKIM check:
Signature d=example.com, body unmodified
→ DKIM pass (if the signature survives; modifications by
the forwarder can invalidate it)
DMARC check:
From domain: example.com
Aligned SPF? SPF was checked against forwarder.example.org,
which does not align with example.com → No aligned SPF pass.
Aligned DKIM? d=example.com aligns with From: example.com → Yes.
→ DMARC pass (one aligned DKIM pass is sufficient) Synthetic example. The forwarder rewrote the envelope, so SPF is evaluated against the forwarder's domain - not the original sender's. DKIM may survive if the forwarder does not modify the signed content; modifications (adding footers, re-encoding) can invalidate the signature.
Example 4: Forwarded mail with preserved envelope
Some forwarders preserve the original envelope. In this case, SPF is evaluated against the original sender's domain - but the connecting IP belongs to the forwarder, which is typically not authorized by the original sender's SPF record.
From: user@example.com Return-Path: user@example.com ← Original envelope preserved DKIM-Signature: d=example.com ← Original signature intact SPF check (at final recipient): Connecting IP: forwarder.example.org's server Return-Path domain: example.com → SPF evaluated against example.com's policy → Forwarder's IP is typically not in example.com's SPF → SPF result: fail DKIM check: Signature d=example.com, body unmodified → DKIM pass DMARC check: Aligned SPF? example.com's SPF failed (forwarder IP not authorized) → No Aligned DKIM? d=example.com aligns with From: example.com → Yes → DMARC pass
Synthetic example. In both forwarding scenarios (rewritten or preserved envelope), SPF typically fails at the final recipient. DKIM can provide the aligned pass - but only if the signature survives any modifications made during forwarding.
Fixing alignment failures
The fix depends on your sending setup and your email provider's capabilities. There is no single universal DNS change.
- Identify which sender is failing. Check your DMARC aggregate reports (or send test messages and read the
Authentication-Resultsheader) to see which service's mail is failing alignment. - Configure the ESP to use your domain. Many ESPs support custom Return-Path (bounce domain) and custom DKIM signing. Availability varies by provider and plan - check your provider's documentation to confirm what they offer and how to enable it. If supported, configure both so alignment passes. See our ESP setup directory for provider-specific guides.
- Verify with a test message. Send a test from the ESP and inspect the
Authentication-Resultsheader. At least one ofspf=passordkim=passshould appear with your domain - either aligned mechanism is sufficient for DMARC pass. - Check alignment mode. If you use subdomains for sending, relaxed alignment (the default) is usually sufficient. Strict alignment requires exact domain matching and may not be necessary for your use case.
What our DNS-based tools can and cannot determine
The DMARC Record Checker inspects your published DMARC record (policy, reporting, alignment mode tags). It cannot evaluate a specific message's alignment - that requires reading the Authentication-Results header on a received message. DNS-based tools verify that the policy is correctly published; message-level inspection verifies that the policy is being satisfied by your senders.
Related
- DMARC: the complete guide
- SPF records explained
- DKIM explained
- DMARC Record Checker (free tool)
- Email Header Analyzer (free tool)
Primary reference: RFC 7489 - Domain-based Message Authentication, Reporting & Conformance. Synthetic examples use reserved documentation domains and are for illustration only.
Frequently asked questions
What is the difference between relaxed and strict alignment?+
Relaxed (the default) compares organizational domains: mail.example.com aligns with example.com. Strict requires an exact match. Most domains should stay relaxed.
Why does my email fail alignment when SPF passes?+
SPF validates the envelope sender, and DMARC compares that domain with the visible From header. Forwarding and third-party senders change the envelope, breaking alignment while SPF itself passes.
Does DMARC require both SPF and DKIM to pass?+
No. DMARC passes when either SPF or DKIM passes AND the passing protocol aligns with the From header domain. Using both is redundancy, not a requirement.
Last verified: 2026-10-28