DMARC
DMARC Alignment Explained: SPF and DKIM, Relaxed vs Strict
Alignment is what makes SPF and DKIM count for DMARC. Learn which domains are compared, relaxed vs strict mode, how to read alignment in headers and reports, how to fix third-party senders, and when strict alignment is worth it.
By MailConfig.pro TeamPublished 7 min read

On this page
DMARC alignment is the check that the domain authenticated by SPF or DKIM matches the domain in the message's visible From header. A message passes DMARC when at least one of the two passes and its domain is aligned with the From domain. With relaxed alignment, the default, the domains only need to share the same organizational domain, so mail.example.com aligns with example.com. With strict alignment they must be identical. Alignment is why mail can pass SPF and DKIM and still fail DMARC: both checks passed, but for someone else's domain.
The three domains DMARC compares
Every message carries several domains, and only some of them matter for DMARC (RFC 9989, section 4.4):
| Domain | Where it is | What checks it |
|---|---|---|
| Author domain | The From: header your recipients see |
DMARC uses it to find the policy and as the reference for alignment |
| SPF domain | The SMTP MAIL FROM address, also called the envelope sender, return path or bounce address |
SPF, against the IP address of the sending server |
| DKIM domain | The d= tag of a DKIM-Signature header |
DKIM, with the public key in that domain's DNS |
Recipients never see the SPF and DKIM domains in their mail app, which is exactly why DMARC needs alignment. Without it, an attacker could send mail with From: billing@example.com, a MAIL FROM at a domain they own with a valid SPF record, and a DKIM signature from that same domain. Both checks would pass. Alignment ties the authentication back to the domain the reader actually sees.
Two details from the specification:
- SPF alignment uses only the
MAIL FROMdomain, not theHELOname (section 4.4.2). For bounces and other messages with an emptyMAIL FROM, SPF checkspostmaster@theHELOname instead (RFC 7208, section 2.4). - Any aligned DKIM signature is enough. A message often carries two signatures, one from your domain and one from the email service. DMARC passes if any valid signature aligns (section 4.4.1).
Relaxed vs strict alignment
You choose the mode separately for each mechanism in your DMARC record: adkim for DKIM and aspf for SPF. Each takes r (relaxed, the default) or s (strict).
From domain |
Authenticated domain | Relaxed (r) |
Strict (s) |
|---|---|---|---|
example.com |
example.com |
Aligned | Aligned |
example.com |
bounce.example.com |
Aligned | Not aligned |
news.example.com |
example.com |
Aligned | Not aligned |
news.example.com |
news.example.com |
Aligned | Aligned |
example.com |
mailer.example.net |
Not aligned | Not aligned |
Relaxed alignment compares organizational domains: the top of the domain tree that belongs to the same owner, usually the domain you registered. Under RFC 9989, receivers find it with a DNS tree walk over _dmarc records instead of a public suffix list (section 4.10). For normal domains the result is the same, example.com for anything under example.com. The difference shows when a subdomain's own DMARC record contains psd=n: that subdomain is then treated as its own organizational domain, and it no longer aligns in relaxed mode with its parent.
Domain comparison is case-insensitive in both modes.
When strict alignment makes sense
Strict alignment stops a subdomain from authenticating mail for its parent, or the other way round. That is useful when different teams or vendors control different subdomains and you don't want, for example, a marketing platform that signs as news.example.com to be able to send as example.com.
The cost is that common, legitimate setups stop aligning:
- Most email services want their bounce address on a subdomain, such as
bounce.example.com. Withaspf=s, SPF for that mail can never align withFrom: example.com. - A service that signs with
d=example.comfor mail fromnews.example.comfailsadkim=s.
RFC 9989 notes that nearly all domain owners find relaxed alignment sufficient (section 4.4). Start with the default. Switch to strict only after your reports show that every legitimate source aligns exactly, and do it while still watching the reports.
How to see alignment in a message
Open the full headers of a message and find Authentication-Results, which the receiving server adds (RFC 8601). A simplified example:
Authentication-Results: mx.receiver.example;
spf=pass smtp.mailfrom=bounces.mailer.example;
dkim=pass header.d=example.com header.s=s1;
dmarc=pass header.from=example.com
Compare each domain with header.from:
smtp.mailfrom=bounces.mailer.exampleis the SPF domain. SPF passed, but for the email service's domain, so SPF is not aligned.header.d=example.comis the DKIM domain. It matches theFromdomain, so DKIM is aligned.- DMARC passes because one aligned mechanism is enough.
Receivers format this header slightly differently, but the property names smtp.mailfrom, header.d and header.from are standard. The email header analyzer at the top of this page pulls these results out of pasted headers.
How alignment shows up in DMARC reports
Aggregate reports show both sides of the check for every source (RFC 9990, section 3):
auth_resultsholds the raw SPF and DKIM results, with the domain each one checked.policy_evaluatedholds thedkimandspfresults after alignment. Apassthere means an aligned pass.
So a record with <spf><domain>bounces.mailer.example</domain><result>pass</result></spf> in auth_results and <spf>fail</spf> in policy_evaluated is the signature of a service that passes SPF for its own domain without aligning. The guide to identifying unknown senders in DMARC reports walks through these fields for each source.
policy_evaluated can also carry a reason, such as mailing_list, trusted_forwarder or local_policy, when the receiver applied its own judgment instead of your policy. These explain why failing mail was sometimes delivered anyway.
Fixing alignment for third-party senders
Almost every alignment failure comes from a service that sends mail as your domain: a newsletter tool, a CRM, a helpdesk, a billing system. Out of the box, many of them use their own bounce domain and sign with their own DKIM domain. The fix is to move one or both onto your domain.
1. Align DKIM first. Look for a setting called custom DKIM, domain authentication or sender authentication. The service gives you DKIM records to publish under your domain, often as CNAMEs, and then signs your mail with d=example.com or a subdomain of it. DKIM alignment is the more robust of the two because it survives forwarding.
2. Align SPF with a custom bounce domain. Many services also let you use a return-path or MAIL FROM subdomain of your own, such as bounce.example.com, with an SPF record or CNAME they provide. Amazon SES calls this a custom MAIL FROM domain, which must be a subdomain of your verified domain. SendGrid's domain authentication creates a CNAME such as em1234.example.com for the return path. In relaxed mode, these subdomains align with example.com.
3. If a service can do neither, send its mail from a subdomain you are willing to manage separately, or move that mail stream to a service that supports custom DKIM. Adding the service to your SPF record alone doesn't help: SPF checks the MAIL FROM domain, and if that is the service's own domain, your SPF record is never consulted.
After each change, send a test message, check Authentication-Results, and confirm that the source shows an aligned pass in the next day's reports before you move your policy toward quarantine or reject.
Forwarding and mailing lists
Alignment is checked where the message arrives, after any forwarding:
- Forwarding usually breaks SPF, because the forwarder's server is not in your SPF record. DKIM normally survives, as long as the forwarder doesn't change the signed headers or the body. This is the main reason to align DKIM for every source.
- Mailing lists often break both. Many add a subject tag or footer, which invalidates the DKIM signature, and resend with their own
MAIL FROM. Lists that rewrite theFromheader to their own address avoid DMARC failures, at the cost of showing the list's address as the sender.
Receivers know this and may use local policy for forwarded and list mail, which is what the mailing_list and trusted_forwarder reasons in aggregate reports record. Don't rely on it: a source that has only SPF alignment will lose it on forwarded copies.
Checking alignment with MailConfig.pro
MailConfig.pro's DMARC monitoring reads your aggregate reports and shows each SPF and DKIM result per source as aligned, or as "pass, not aligned" when a check passed for a domain that doesn't match yours. That second state is the list of services to fix before you enforce. For the rest of the DMARC record, including the adkim and aspf tags, see What is DMARC?.
Frequently asked questions
What is DMARC alignment?
It is the check that the domain SPF or DKIM authenticated matches the domain in the visible From header. DMARC passes when at least one of SPF or DKIM passes and its domain is aligned with the From domain.
Why does DMARC fail when SPF and DKIM pass?
Because they passed for a different domain. A service may send with its own bounce domain and sign with its own DKIM domain. Both checks pass, but neither domain matches your From domain, so DMARC fails.
Should I use relaxed or strict alignment?
Relaxed, the default, for almost every domain. Strict alignment requires an exact domain match, which breaks common setups such as a bounce subdomain or a service that signs with your parent domain. RFC 9989 notes that nearly all domain owners find relaxed alignment sufficient.
Do I need both SPF and DKIM to align?
No. One aligned pass is enough for DMARC. It is still worth aligning DKIM for every service, because DKIM survives forwarding and SPF usually does not.
References
- RFC 9989: DMARC (May 2026), sections 3.2.4 (SPF domain), 3.2.14 (Organizational Domain), 4.4 (identifier alignment), 4.7 (adkim and aspf tags) and 4.10.2 (alignment evaluation)
- RFC 9990: DMARC Aggregate Reporting (May 2026), section 3 (policy_evaluated, auth_results and policy override reasons)
- RFC 7208: Sender Policy Framework (SPF), section 2.4 (MAIL FROM identity)
- RFC 6376: DomainKeys Identified Mail (DKIM) Signatures, section 3.5 (the d= tag)
- RFC 8601: Message Header Field for Indicating Message Authentication Status
- Amazon SES Developer Guide: Using a custom MAIL FROM domain
- Twilio SendGrid: How to set up domain authentication
alignmentspfdkimadkimaspf
Related articles
DMARC
What Is DMARC? How Email Authentication Fits Together
DMARC is a DNS record that ties SPF and DKIM to the domain in the visible From address, states what receivers should do with mail that fails, and requests reports. This guide covers alignment, the record syntax, policies, reporting and what happens when a domain has no record.
· 10 min read
SPF
What Is SPF? Sender Policy Framework Explained
SPF is a DNS TXT record that lists which servers may send mail using your domain in the envelope sender. This guide covers how a receiver evaluates it, every mechanism and qualifier, the lookup limits, the difference between -all and ~all, and why SPF alone does not stop From spoofing.
· 6 min read
DKIM
What Is DKIM? DomainKeys Identified Mail Explained
DKIM adds a cryptographic signature to every message, and receivers verify it with a public key in your DNS. This guide covers the DKIM-Signature header, selectors and key records, key sizes and Ed25519, key rotation, forwarding and mailing lists, and how DKIM alignment makes DMARC work.
· 6 min read
DMARC
How to Identify Unknown Senders in DMARC Aggregate Reports
A step-by-step method for the unfamiliar IP addresses in your DMARC aggregate reports: which XML fields matter, how to map an IP to a service with PTR, RDAP and ASN, how to separate legitimate senders from spoofing, and how to fix SPF and DKIM alignment.
· 7 min read



