DMARC Alignment Explained: adkim, aspf, Strict vs Relaxed (RFC 7489 §3.1, §6.6.2)

Identifier alignment is THE differentiator between DMARC and bare SPF+DKIM. This guide walks the canonical alignment vocabulary (the SPF d-domain, the DKIM d= tag, the From: header), the adkim and aspf tags, strict vs relaxed modes, the organizational domain, the Public Suffix List, and the worked examples behind the most-frequently-asked operator question: "why did DMARC fail when SPF and DKIM both passed?".

This reference is provided in English. DMARC alignment is specified in English-language RFCs (RFC 7489 §3.1, §6.6.2) and the canonical vocabulary (d=, adkim=s, aspf=r, "organizational domain", "Public Suffix List") does not translate. We keep the body in the source language so technical terms remain consistent with the specifications.

TL;DR

  • DMARC alignment is the rule that the SPF- or DKIM-authenticated domain MUST match the From: header domain the user sees. Defined in RFC 7489 §3.1. Without alignment, SPF and DKIM authenticate SOME domain — but not necessarily the one shown to the recipient.
  • DMARC passes when at least one of SPF-aligned OR DKIM-aligned passes. Both failing produces a DMARC fail regardless of the underlying SPF and DKIM results.
  • Relaxed alignment (r, the default) requires the organizational domain to match — mail.example.com aligns with example.com. Strict alignment (s) requires an EXACT domain match — mail.example.com does NOT align with example.com under strict.
  • The adkim tag controls DKIM alignment; aspf controls SPF alignment. Both accept r or s and default to r.
  • SPF aligns the envelope sender (MAIL FROM); DKIM aligns the d= tag in the DKIM-Signature header. Both compare against the visible From: header domain.
  • The organizational domain is derived using the Public Suffix List (RFC 7489 §3.2). For example.co.uk the organizational domain is example.co.uk, NOT co.uk — the PSL prevents the latter wrong match.
  • SPF alignment breaks during forwarding (envelope rewrite); DKIM usually survives. That asymmetry is why every sending source should be DKIM-signed with custom-domain DKIM enabled.

1. What is DMARC identifier alignment?

DMARC identifier alignment is the rule that the authenticated domain identifier from SPF or DKIM MUST match the domain in the From: header that the recipient actually sees. The concept is defined in RFC 7489 §3.1, and the per-protocol alignment rules in §3.1.1 (DKIM) and §3.1.2 (SPF).

Before DMARC, SPF and DKIM each produced an authenticated result against their own identifier. SPF authenticates the SMTP envelope sender (MAIL FROM / bounce address); DKIM authenticates the signing domain (d= tag in the DKIM-Signature header). Neither of those identifiers is the same as the From: header that mail clients display to the user.

An attacker could pass SPF for bounce.attacker.example while displaying billing@yourbank.com in From:. Both authentication checks "passed" — but the recipient sees a forged sender. DMARC alignment closes that gap by requiring that the domain SPF or DKIM authenticated matches the From: header domain.

A DMARC evaluation produces a single pass or fail decision: pass if at least one of SPF-aligned or DKIM-aligned passes; fail if both fail. The underlying SPF and DKIM results matter, but only after alignment is applied. A message with spf=pass for a misaligned envelope domain and no DKIM signature produces a DMARC fail.

2. How a receiver evaluates alignment

  1. The receiver runs SPF on the MAIL FROM envelope sender and records the result (pass, fail, neutral, etc.) plus the SPF-authenticated domain (the d-domain).
  2. The receiver verifies every DKIM signature in the message and records each signature's d= tag plus its pass/fail result. Multiple signatures are common; any one signature that passes is sufficient for DKIM-aligned.
  3. The receiver extracts the From: header domain — the domain to the right of the @ in the displayed From: address. RFC 7489 §6.6.1 requires exactly ONE From: header; multiple From: headers cause DMARC to fail without further evaluation.
  4. The receiver computes the organizational domain for the From: header by walking the domain against the Public Suffix List per RFC 7489 §3.2 — for news.example.co.uk the organizational domain is example.co.uk.
  5. For each SPF / DKIM result, the receiver applies the alignment rule from the published DMARC record: under r (relaxed) the organizational domain of the authenticated identifier MUST match the organizational domain of the From: header; under s (strict) the FQDN of the authenticated identifier MUST exactly match the FQDN of the From: header.
  6. If at least one of SPF-aligned or DKIM-aligned passes, the message passes DMARC. If both fail, the message fails DMARC and the policy (p, sp, or np) is applied per RFC 7489 §6.6.

3. Where do SPF and DKIM identifiers come from?

Alignment compares an authenticated identifier against the From: header. Each protocol contributes a distinct identifier:

SPF — the d-domain (envelope sender)
SPF authenticates the SMTP envelope sender, also called the MAIL FROM address or the Return-Path. RFC 7489 §3.1.2 names the domain portion of that address the "SPF d-domain". For envelope bounce@mail.example.com the d-domain is mail.example.com. SPF alignment compares this against the From: header.
DKIM — the d= tag
Every DKIM signature includes a d= tag in its DKIM-Signature header declaring the signing domain. A signature with d=example.com attests that the holder of the selector._domainkey.example.com private key signed the message. DKIM alignment compares this d= value against the From: header. Per RFC 7489 §3.1.1, the i= tag (if present) is NOT used for alignment — only d=.
The From: header
The HTTP-style From: header in the message body — the address mail clients display to the user. RFC 5322 §3.6.2 defines the field; RFC 7489 §6.6.1 requires exactly ONE From: per message. DMARC alignment uses the domain portion of the From: address as the comparison target for both SPF and DKIM.

Crucially, SPF and DKIM produce independent identifiers. A typical SaaS deployment has SPF passing for bounce.sendgrid.net (the SaaS bounce domain) while DKIM passes for example.com (custom-domain DKIM enabled at the SaaS). The SaaS envelope misaligns with From: but the DKIM signature aligns, so DMARC passes via DKIM-aligned.

4. Strict vs relaxed alignment

Both adkim (DKIM alignment mode) and aspf (SPF alignment mode) accept two values: r (relaxed) and s (strict). Both default to r.

Mode Comparison rule Aligned example Misaligned example
r (relaxed, default) Organizational domains must match. Subdomain-level differences are ignored. Authenticated: mail.example.com
From: example.com
Both organizational = example.com ⇒ aligned.
Authenticated: example.net
From: example.com
Different organizational domains ⇒ misaligned.
s (strict) Full domain names (FQDN) must match exactly. Authenticated: example.com
From: example.com
Exact match ⇒ aligned.
Authenticated: mail.example.com
From: example.com
Different FQDN ⇒ misaligned under strict (aligned under relaxed).

Relaxed is the operationally safe default because most production mail flows DKIM-sign and SPF-authorise at a subdomain (mail.example.com, news.example.com) while the From: header carries the bare organizational domain. Relaxed alignment makes those flows align without per-subdomain configuration.

Strict is the high-security choice for non-sending domains and high-value brand domains. With adkim=s; aspf=s, only mail DKIM-signed AND SPF-authorised at exactly the organizational domain passes — closing the subdomain-spoofing surface where an attacker who controls one subdomain could otherwise produce relaxed-aligned mail for the parent.

The two alignment modes are evaluated independently. A record with adkim=s; aspf=r requires strict DKIM alignment but accepts relaxed SPF — useful when DKIM is signed by tightly-controlled infrastructure but SPF includes a third-party sender at a sibling subdomain. See the DMARC records deep dive §5 for the tag interactions.

5. The organizational domain & Public Suffix List

Relaxed alignment compares organizational domains, not full domain names. RFC 7489 §3.2 defines the organizational domain as the registered name plus its public suffix, where the public suffix is the longest entry from the Public Suffix List (PSL) that the domain ends with.

Domain Public suffix Organizational domain
news.example.com com example.com
mail.example.co.uk co.uk example.co.uk
example.github.io github.io example.github.io
foo.bar.s3.amazonaws.com s3.amazonaws.com bar.s3.amazonaws.com
example.com com example.com

The PSL is essential for safe relaxed alignment. Without it, a naive "strip the leftmost label" rule would consider example.co.uk and other.co.uk aligned (they share co.uk) — clearly wrong because co.uk is a public registry, not a private organization. The PSL's co.uk entry tells the receiver "this is a public suffix; do not strip past it".

Subdomains hosted on shared platforms — example.github.io, example.netlify.app, example.vercel.app — are listed as public suffixes themselves, so each example.-prefixed name is its OWN organizational domain. This is exactly the correct behaviour: GitHub-Pages users should not be considered the same organization as each other for DMARC alignment.

The PSL is maintained at publicsuffix.org by Mozilla and the wider community. Receiver software refreshes its local copy periodically; expect daily-cadence updates on major mail providers.

6. Alignment worked examples

6.1 Relaxed alignment, both pass (typical SaaS)

From:        billing@example.com
MAIL FROM:   bounce@mail.example.com
DKIM d=:     mail.example.com
SPF result:  pass (for mail.example.com)
DKIM result: pass (for mail.example.com)
DMARC:       v=DMARC1; p=reject; adkim=r; aspf=r

SPF aligned?  mail.example.com ↔ example.com (relaxed) ⇒ ALIGNED
DKIM aligned? mail.example.com ↔ example.com (relaxed) ⇒ ALIGNED
DMARC result: PASS

6.2 Strict alignment, DKIM fails alignment

From:        billing@example.com
DKIM d=:     mail.example.com
DKIM result: pass (for mail.example.com)
DMARC:       v=DMARC1; p=reject; adkim=s

DKIM aligned? mail.example.com ≠ example.com (strict) ⇒ MISALIGNED
SPF aligned?  (similar evaluation)
DMARC result: depends on SPF alignment alone

6.3 SPF fails alignment via forwarding

From:        billing@example.com (original sender)
MAIL FROM:   user@forwarder.example  (rewritten by forwarder)
DKIM d=:     example.com
SPF result:  pass (for forwarder.example — the rewritten domain)
DKIM result: pass (for example.com — body unmodified)
DMARC:       v=DMARC1; p=reject; adkim=r; aspf=r

SPF aligned?  forwarder.example ≠ example.com ⇒ MISALIGNED
DKIM aligned? example.com ↔ example.com ⇒ ALIGNED
DMARC result: PASS (via DKIM-aligned)

This is why DKIM signing matters: DKIM survives forwarding when SPF cannot. A message signed only by SPF fails DMARC the moment it is forwarded.

6.4 SaaS sender with custom-domain DKIM

From:        hello@example.com
MAIL FROM:   bounces+abc123@bounce.sendgrid.net
DKIM d=:     example.com (custom-domain DKIM enabled at SendGrid)
SPF result:  pass (for bounce.sendgrid.net)
DKIM result: pass (for example.com)
DMARC:       v=DMARC1; p=reject; adkim=r; aspf=r

SPF aligned?  bounce.sendgrid.net ≠ example.com ⇒ MISALIGNED
DKIM aligned? example.com ↔ example.com ⇒ ALIGNED
DMARC result: PASS (via DKIM-aligned)

The standard pattern for SaaS mail. SPF for your custom From: domain is almost never enabled by SaaS providers (their bounces go to THEIR domain); custom-domain DKIM is the universal escape hatch and must be enabled at every SaaS sender.

6.5 Mailing-list breaks DKIM body signature

From:        member@example.com
MAIL FROM:   list-bounces@list.example.org
DKIM d=:     example.com (original signature)
SPF result:  pass (for list.example.org)
DKIM result: fail (list re-wrote Subject and appended footer — body hash mismatch)
DMARC:       v=DMARC1; p=reject; adkim=r; aspf=r

SPF aligned?  list.example.org ≠ example.com ⇒ MISALIGNED
DKIM aligned? signature failed verification ⇒ N/A
DMARC result: FAIL

Mailing lists routinely rewrite Subject lines and append footers, invalidating the original DKIM body signature. The remediation patterns are RFC 8617 ARC (Authenticated Received Chain) where the list re-signs with its own ARC headers, or From: rewriting where the list changes From: to its own domain so DMARC does not trigger on the original domain.

6.6 Public-Suffix-List edge case — Github Pages

From:        notifications@example.github.io
DKIM d=:     example.github.io
DKIM result: pass
DMARC:       v=DMARC1; p=reject; adkim=r

DKIM aligned? example.github.io ↔ example.github.io
              (organizational domain = example.github.io because
              github.io is on the PSL) ⇒ ALIGNED
DMARC result: PASS

With github.io on the PSL, example.github.io is its own organizational domain. The naive "strip leftmost" rule would have considered it aligned with other.github.io — incorrectly granting alignment across unrelated GitHub Pages users.

6.7 Internal subdomain attack blocked by strict alignment

Scenario: attacker compromised mail.example.com infrastructure.
          They can sign mail with d=mail.example.com.

From:        billing@example.com
DKIM d=:     mail.example.com
DKIM result: pass (genuine signature from compromised host)
DMARC:       v=DMARC1; p=reject; adkim=s

DKIM aligned? mail.example.com ≠ example.com (strict) ⇒ MISALIGNED
DMARC result: FAIL — attack blocked

Under adkim=r (relaxed) the attacker's compromised mail.example.com host could sign mail for the parent example.com; under adkim=s (strict) the same mail fails DMARC. Strict alignment is therefore the canonical defense against subdomain-takeover spoofing — at the cost of legitimate subdomain-signed mail also failing (which is why strict is reserved for non-sending domains and brand-protection domains).

6.8 Multiple DKIM signatures — any aligned signature wins

From:        billing@example.com

DKIM signature 1:  d=mail.example.com  pass
DKIM signature 2:  d=example.com       pass
DKIM signature 3:  d=relay.example.net pass

DMARC:       v=DMARC1; p=reject; adkim=s

Signature 1 aligned? mail.example.com ≠ example.com (strict) ⇒ no
Signature 2 aligned? example.com ↔ example.com (strict) ⇒ YES
Signature 3 aligned? example.net ≠ example.com ⇒ no

DKIM-aligned overall: YES (any one passing signature is sufficient)
DMARC result: PASS

A message can carry multiple DKIM signatures. DMARC's DKIM-aligned check requires that at least ONE signature both passed AND aligned with From: — not all of them. Major SaaS senders often produce two signatures (one for their bounce domain, one for the custom domain) to maximise the chance of alignment.

7. Alignment best practices

  • Enable custom-domain DKIM at every sending platform. Marketing tools, transactional providers, helpdesks, CI/CD pipelines — every source that sends mail with your From: domain MUST sign with a d= that aligns with your From:. SPF alignment will routinely break (forwarding, SaaS bounce domains); DKIM alignment is the durable channel.
  • Default to adkim=r; aspf=r for active sending domains. Relaxed alignment makes the common cross-subdomain mail flows work without per-subdomain configuration. Move to strict only after a stable enforcement baseline is established.
  • Use adkim=s; aspf=s on non-sending domains and brand-protection portfolio domains. Strict alignment closes the subdomain-spoofing surface; non-sending domains have no operational cost from strict.
  • Audit your DKIM d= values regularly. SaaS providers sometimes change their default signing domain or revoke custom-domain DKIM during plan changes. A surprise mid-flight switch from d=example.com to d=mailing.sendgrid.net misaligns every subsequent message, whether adkim is relaxed or strict.
  • Watch organizational-domain edge cases. Domains under shared public suffixes (github.io, herokuapp.com, netlify.app, vercel.app, s3.amazonaws.com) are individual organizational domains; you cannot rely on relaxed alignment to make sibling subdomains align.
  • Read your aggregate reports for alignment-specific failures. The policy_evaluated block in every report's <record> shows dkim and spf pass/fail INCLUDING alignment — a "pass" there means authentication AND alignment both succeeded. The <auth_results> block shows authentication only. A consistent gap between the two columns flags an alignment problem, not an authentication problem.
  • Avoid mixing adkim=s with shared SaaS DKIM. If SendGrid signs with d=u123.example.com (their per-customer custom signature pattern) but you have adkim=s published, every SendGrid message fails alignment. Either use SendGrid's true-custom-domain DKIM (d=example.com) or relax adkim.
  • Test alignment via mail-tester.com or DMARC Analyzer's Email Header Analyzer before relying on production reports. The header analyzer decodes SPF and DKIM headers AND computes the alignment result against the From: domain for any message you paste.

8. Common alignment mistakes

  • Assuming "SPF passed" means DMARC will pass. SPF passes for the envelope domain — which is rarely your From: domain when a SaaS or forwarder is involved. Without alignment, SPF passing is operationally useless to DMARC.
  • Forgetting to enable custom-domain DKIM at SaaS senders. Default SaaS DKIM signs with the SaaS provider's domain (d=u123.smtp.example-saas.com), which never aligns. Every SaaS provider has a custom-domain DKIM setup procedure — run it for every sender.
  • Setting aspf=s while relying on SaaS senders. Strict SPF alignment requires the envelope domain to exactly match the From: domain — almost never the case with SaaS. Strict SPF is viable only for fully-controlled infrastructure.
  • Using i= in DKIM thinking it controls alignment. The DKIM i= tag identifies the "agent or user on whose behalf the message is signed" — RFC 6376 §3.5. RFC 7489 §3.1.1 explicitly says alignment uses d= only; i= is ignored.
  • Adding extra DKIM signatures to "fix" alignment without verifying the existing signature. A failing original signature plus a passing aligned signature still passes DMARC — but the underlying problem (the original signature failing) often points at a body-modification upstream that will cause other problems.
  • Relying on relaxed alignment across the Public Suffix List. example.github.io and other.github.io are SEPARATE organizational domains because github.io is on the PSL. Relaxed alignment does NOT merge them.
  • Confusing the SPF authenticated domain with the HELO/EHLO value. SPF can be evaluated against either MAIL FROM or the HELO identity. DMARC alignment uses the MAIL FROM result specifically (RFC 7489 §3.1.2). A HELO-only SPF pass does not contribute to DMARC alignment.
  • Two From: headers in the message body. RFC 5322 forbids multiple From: headers, but some bug-classes (mail merge tools, broken relays) produce them. RFC 7489 §6.6.1 says receivers MUST fail DMARC for messages with multiple From: headers — alignment is not even evaluated.

9. Alignment troubleshooting

Aggregate report shows spf=pass in <auth_results> but spf=fail in <policy_evaluated>
SPF authenticated successfully but the authenticated domain misaligns with the From: header. The <auth_results> block shows authentication only; <policy_evaluated> shows the alignment-applied result. The fix: either change the envelope sender to align with From:, or rely on DKIM alignment as the primary channel.
DKIM verifies but DMARC fails
The DKIM signature passed verification but its d= tag misaligns with the From: header. Common causes: a SaaS provider signing with their domain instead of yours (enable custom-domain DKIM); a wildcard subdomain signing with the subdomain instead of the apex (consider adding an apex signature too); strict adkim=s rejecting a subdomain-signed message that would have aligned under relaxed.
Mail from one specific subdomain fails DMARC under adkim=s
Expected behaviour. Strict alignment requires the DKIM d= to match the From: FQDN exactly. Either move that sender to DKIM-sign at the From: FQDN (typically the organizational apex), or relax adkim to r.
Mailing-list mail fails DMARC
The list rewrote the Subject or appended a footer, invalidating the original DKIM signature; SPF also misaligns because the list's envelope is its own bounce domain. Two fixes: (a) the list adopts ARC re-signing per RFC 8617; (b) the list rewrites From: to its own domain so DMARC is evaluated against the list, not the original sender.
The header analyzer says SPF aligned but my aggregate report shows otherwise
Receivers sometimes compute alignment against the Return-Path (final post-routing) rather than the original MAIL FROM. Forwarding can change this. Check the report timestamp range and look at the actual Received headers to determine the post-routing envelope.
Strict alignment broke my legitimate mail after a DNS change
Revert adkim or aspf to r immediately to restore delivery; the likely root cause is a sender signing or sending from a subdomain that no longer matches the From: FQDN. Investigate via the next aggregate-report cycle, then re-enable strict once the sender is fixed.
I see spf=none and dkim=none in <policy_evaluated>
Means neither SPF nor DKIM was attempted (or both produced inconclusive results), so alignment was not evaluated either. The message has effectively no authentication — usually because SPF was not published for the envelope domain AND no DKIM signatures were attached. Publish SPF and enable DKIM at the sending source.

10. Frequently Asked Questions

What is DMARC alignment?
DMARC alignment is the requirement that the authenticated domain identifier from SPF or DKIM matches the domain in the From: header that the recipient actually sees. Defined in RFC 7489 §3.1, alignment is what closes the gap between "SPF/DKIM passed for SOME domain" and "the message is genuinely from the From: domain". A message passes DMARC when at least one of SPF-aligned or DKIM-aligned passes; both failing produces a DMARC fail regardless of the underlying SPF and DKIM results.
What is the difference between strict and relaxed alignment?
Relaxed alignment (r, the default) requires the authenticated domain to match the From: header at the organizational-domain level — mail.example.com and example.com are aligned. Strict alignment (s) requires an exact domain match — mail.example.com and example.com are NOT aligned under strict. Strict alignment is the more secure choice; relaxed is more forgiving of cross-subdomain mail flows. The adkim tag controls DKIM alignment mode and aspf controls SPF alignment mode; both default to r.
What is the organizational domain?
The organizational domain is the registered name plus the public suffix immediately to the right of it — for example.co.uk the organizational domain is example.co.uk, NOT co.uk and NOT news.example.co.uk. RFC 7489 §3.2 defines this concept and references the Public Suffix List (PSL, maintained at publicsuffix.org) as the canonical source of public suffixes. Without the PSL, relaxed alignment would consider example.co.uk and other.co.uk "aligned" because they share the co.uk suffix — clearly wrong. The PSL prevents that.
How does SPF alignment work?
SPF alignment compares the SPF-authenticated envelope domain (the MAIL FROM / Return-Path domain, also called the SPF "d-domain") against the From: header domain. Under relaxed (aspf=r, default), the organizational domains must match. Under strict (aspf=s), an exact match is required. SPF alignment routinely breaks during forwarding because forwarders rewrite the envelope sender to their own domain — which is why DKIM alignment matters: it survives forwarding when SPF does not.
How does DKIM alignment work?
DKIM alignment compares the DKIM signing domain — the d= tag in the DKIM-Signature header — against the From: header domain. Under relaxed (adkim=r, default), the organizational domains must match. Under strict (adkim=s), an exact match is required. DKIM signatures typically survive forwarding because they cover the message body and selected headers; if the message body is not modified in transit, the signature remains valid and the d= identifier remains aligned regardless of envelope changes.
Why does my SPF pass but DMARC fail?
The most common cause is misaligned SPF: SPF authorised the IP, but the authorised envelope domain is not the From: header domain. Examples: (1) a SaaS sender (SendGrid, Mailgun) puts their own bounce domain in MAIL FROM, so SPF passes for the SaaS domain but does NOT align with your From:; (2) forwarding rewrites the envelope to the forwarder. The fix is to enable custom-domain DKIM at the SaaS sender — DKIM aligns regardless of envelope, so a successful DKIM signature in the From: domain saves the DMARC result.
Should I use strict or relaxed alignment?
Default to relaxed (r) for active sending domains because cross-subdomain mail flows (transactional mail signed by mail.example.com, marketing mail signed by news.example.com) all align with a From: of example.com. Use strict (s) for non-sending domains and high-value brand domains where any subdomain-level mismatch should fail DMARC. Strict alignment closes the subdomain-spoofing surface (an attacker who compromises mail.example.com cannot sign mail for example.com under strict), at the cost of operational flexibility.

12. Audit your DMARC alignment now

DMARC Analyzer's Email Header Analyzer (header_analyzer.php) parses any email's raw headers, runs SPF / DKIM / Authentication-Results decoding via includes/EmailHeaderParser.php, and reports the alignment outcome against the From: header. The Domain Security Checker (domain_checker.php) performs live DNS lookups and surfaces published adkim / aspf values alongside the SPF, DKIM, and DMARC records.

Analyze a real message Sign up — Free plan