skip to content

In DMARC identifier alignment, how does relaxed mode differ from strict mode, and what do the adkim and aspf tags each govern?

level: middleimportance: should knowfreq 40%

answer

  1. same family versus same name
  2. organizational domain, not suffix matching
  3. two tags, two paths
  4. default r for both

basics

~20 s

Relaxed alignment, the default, accepts an authenticated domain with the same organizational domain as the From domain; strict requires the identical name. adkim sets the mode for DKIM's d= domain and aspf for SPF's MAIL FROM domain, independently.

solid answer

~40 s

RFC 9989 defines two alignment states. In **relaxed** mode an authenticated identifier aligns when it has the same **organizational domain** as the From domain, so `bounce.example.com` in `MAIL FROM` aligns with `From: [email protected]`, and `d=example.com` aligns with `From: [email protected]`. In **strict** mode only the identical name aligns, compared case-insensitively. The policy record chooses the mode per mechanism: `adkim` governs the DKIM `d=` comparison and `aspf` the SPF `MAIL FROM` comparison, each `r` by default. Setting one to `s` leaves the other relaxed. Relaxed is not suffix matching: `example.com.example.net` does not align with `example.com`, because it belongs to a different organizational domain. RFC 9989 notes that nearly all domain owners find relaxed alignment sufficient.

code

pseudocode · 13 lines
pseudocode
function aligned(identifier, authorDomain, mode):
    a = lowercase(identifier)
    b = lowercase(authorDomain)
    if mode == "s":                     # adkim=s or aspf=s
        return a == b
    # mode "r", the default
    return orgDomain(a) == orgDomain(b)  # RFC 9989 Tree Walk

# SPF path uses aspf, DKIM path uses adkim
spfOk  = spf.result == "pass" and aligned(spf.mailFromDomain, author, aspf)
dkimOk = any(sig.result == "pass" and aligned(sig.d, author, adkim)
             for sig in dkimSignatures)
dmarcPass = spfOk or dkimOk

go deeper

for a junior

Remember the two words: relaxed means same organizational domain, strict means the exact same name, and relaxed is the default.

for a middle

Walk through examples on both paths and show that adkim and aspf are separate switches, each defaulting to r, with a subdomain aligning only under relaxed.

for a senior

Predict which of your real streams would stop aligning if one path went strict, using the envelope and d= domains each sender actually uses.

for a principal

Treat the mode as a per-path decision tied to who controls your subdomains, not a hardening checkbox; the default exists because most estates need it.

## Two modes, one comparison DMARC passes a message when an SPF or DKIM pass is for a domain **aligned** with the **Author Domain**, the domain of the RFC 5322 `From:` header. RFC 9989 (May 2026) section 3.2.10 defines exactly two ways to be aligned: - **Relaxed alignment**: the Author Domain and the authenticated identifier have the **same organizational domain**. Parent, child and sibling names under one organizational domain all qualify. - **Strict alignment**: the Author Domain and the authenticated identifier are **identical**. Section 4.4 adds that domain name comparisons here are case-insensitive, so `Mail.Example.COM` and `mail.example.com` are the same name. The **organizational domain** is the top of the part of the DNS tree that one administration controls, typically the registered domain such as `example.com`. RFC 9989 finds it with a DNS Tree Walk over published DMARC records rather than the Public Suffix List that RFC 7489 used; how that walk works is covered with DMARC policy enforcement. For alignment, what matters is that two names either share it or do not. ## Which tag sets which mode The DMARC policy record carries two independent tags (RFC 9989 section 4.7): | Tag | Governs | Values | Default | |---|---|---|---| | `adkim` | alignment of the DKIM `d=` domain with the Author Domain | `r` relaxed, `s` strict | `r` | | `aspf` | alignment of the SPF-validated `MAIL FROM` domain with the Author Domain | `r` relaxed, `s` strict | `r` | Because they are separate, a record can demand strict DKIM alignment while leaving SPF relaxed, or the reverse. A record that sets neither is relaxed on both paths. The record's other tags and its syntax are covered with the DMARC record itself. ## Worked comparisons Each row assumes the SPF or DKIM check already passed; alignment never rescues a failed check. | Authenticated identifier | Author Domain | Relaxed | Strict | |---|---|---|---| | `example.com` | `example.com` | aligned | aligned | | `bounce.example.com` (SPF) | `example.com` | aligned | not aligned | | `example.com` (DKIM `d=`) | `shop.example.com` | aligned | not aligned | | `news.example.com` | `shop.example.com` | aligned | not aligned | | `MAIL.EXAMPLE.COM` | `mail.example.com` | aligned | aligned | | `example.net` | `example.com` | not aligned | not aligned | | `example.com.example.net` | `example.com` | not aligned | not aligned | The last row is the trap: a name that *contains* the From domain as a string, but sits under a different organizational domain, never aligns in either mode. ## How a receiver evaluates it RFC 9989 section 4.10.2 notes a practical difference in cost: 1. Under **strict** mode a receiver needs only a string comparison between the Author Domain and the identifier. 2. Under **relaxed** mode it may need to find the organizational domain of the Author Domain and of each passing identifier, which can mean extra DNS queries. 3. When the Author Domain and every identifier are already the same name and that name publishes a DMARC record, no further work is needed. The receiver repeats the comparison for every passing identifier, the SPF one and each verified DKIM signature, and one aligned result is enough for a DMARC pass. ## Common surprises - **One `s` does not mean strict everywhere.** `adkim=s` alone leaves SPF relaxed; mail can still pass on a relaxed SPF match. - **Relaxed runs both directions.** A child identifier aligns with a parent From domain and a parent identifier with a child From domain. - **Strict breaks the usual third-party fix.** A sending service that uses a dedicated envelope subdomain such as `bounce.example.com` aligns only under relaxed SPF. - **Relaxed depends on the organizational domain being found correctly.** If a receiver picks the wrong one, relaxed alignment can accept a name the owner never meant to cover; strict avoids that question entirely. - **Alignment mode is not a policy.** `adkim` and `aspf` say how to compare domains; `p=` decides what a receiver may do with a failure. ## What it means for the domain you run Start from the default: relaxed on both paths is what RFC 9989 says nearly all owners find sufficient, and it lets subdomains and envelope subdomains work without extra records. Reach for `s` only on a path where you can name every identifier you send with, and confirm in your aggregate reports that each stream still aligns on at least one path after the change.

  • Under relaxed alignment, does d=example.com align with a From domain of a.b.example.com?
    Yes, provided both resolve to the same organizational domain, here `example.com`. Relaxed alignment is defined by a shared organizational domain, not by depth, so a parent `d=` aligns with a deep child From domain. It would fail if a DMARC record lower in the tree made a subdomain its own organizational domain, for example with `psd=n`.
  • Why might a domain owner choose adkim=s but leave aspf relaxed?
    To insist that signatures carry exactly the From domain while still letting outside services use an envelope subdomain for bounces. Strict DKIM alignment refuses a parent or sibling `d=`, but the relaxed SPF path keeps `bounce.example.com` aligned with `example.com`. It only makes sense if every legitimate stream signs with the exact From domain.

  • Relaxed alignment matches any name that contains the From domain.
  • Setting adkim=s makes SPF alignment strict as well.
  • Strict alignment compares names case-sensitively.
  • Relaxed alignment only accepts subdomains, never a parent domain.
  • Strict mode needs the receiver to find the organizational domain first.