SPF and DKIM alignment

Does a DMARC check verify SPF and DKIM alignment for my domain?

Yes—DMARC explicitly evaluates SPF and DKIM authentication results and verifies their alignment with the message’s Header From domain, passing if at least one of SPF or DKIM both authenticates and aligns per your DMARC policy.

DMARC (Domain-based Message Authentication, Reporting, and Conformance) exists to connect message authentication to domain identity as shown to recipients: the Header From domain. SPF and DKIM by themselves authenticate different parts of an email (envelope vs. cryptographic signature), but DMARC adds the crucial alignment check: does the authenticated domain match the visible From domain? This alignment decision determines whether your DMARC policy applies and whether the message is considered authentic for your brand.

Practically, DMARC considers both SPF and DKIM on every message; if either one passes authentication and aligns to the Header From domain (according to relaxed or strict mode), the message achieves DMARC pass. That allows real-world resiliency: SPF may fail across forwards, but DKIM can carry you; DKIM may break on mailing lists, but SPF may still align. The rest of this guide goes deep on how alignment works, what can break it, and how to configure and monitor your ecosystem with DMARCReport to preserve alignment and deliverability.

How DMARC checks SPF and DKIM alignment

SPF alignment: envelope-from vs. header from

  • SPF authenticates the RFC5321.MailFrom (also called Return-Path or envelope-from) or, if that is null, the HELO/EHLO domain.
  • DMARC alignment compares the authenticated SPF domain to the RFC5322.From (Header From) domain.

Alignment logic:

  • Relaxed alignment (aspf=r, default): The MailFrom’s organizational domain must match the Header From’s organizational domain (as determined by the Public Suffix List). Example: mailfrom: bounce@send.example.com aligns with From: brand@example.com because both share organizational domain example.com.
  • Strict alignment (aspf=s): The MailFrom domain must exactly match the Header From domain. Example: mailfrom: bounce@example.com aligns with From: brand@example.com; mailfrom: bounce@send.example.com does not.

HELO fallback:

  • If MailFrom is empty (common in bounces), SPF authenticates the HELO/EHLO domain. DMARC alignment then compares this HELO domain to the Header From domain using the same relaxed/strict rules.

How DMARCReport helps:

  • DMARCReport’s SPF Alignment Map breaks down aligned vs. non-aligned SPF results by source IP and sending service, showing whether MailFrom or HELO was used and highlighting where alignment fails (e.g., relaxed pass but strict fail).
  • The Envelope vs. Header From Analyzer pinpoints misaligned subdomains and suggests either alignment mode adjustments or SPF domain restructuring (e.g., using a subdomain aligned to your From).
subdomains

DKIM alignment: d= domain vs. header from

  • DKIM authenticates the domain in the d= tag of the DKIM-Signature.
  • DMARC alignment compares the DKIM d= domain to the Header From domain.

Alignment logic:

  • Relaxed alignment (adkim=r, default): The DKIM d= domain’s organizational domain must match the Header From domain’s organizational domain. Example: d=mail.brand.example aligns with From: news@example.com because both resolve to example.com organizationally.
  • Strict alignment (adkim=s): The DKIM d= domain must exactly match the Header From domain. Example: d=example.com aligns with From: user@example.com; d=mail.example.com does not.

Multiple signatures:

  • DMARC treats DKIM as pass if any one valid DKIM signature aligns to the Header From domain. You can dual-sign messages (e.g., vendor signature and your own aligned signature) to increase pass rates.

How DMARCReport helps:

  • The DKIM Selector Intelligence dashboard shows which selectors produce aligned signatures, key strength, failure reasons (body hash mismatch, key not found, signature expired), and how those failures correlate to DMARC fails.
  • The Multi-Signature View isolates which signature carried alignment vs. which failed, giving you actionable fixes (e.g., switch vendor to custom d=).

Pass decision and precedence: “either-of” rule

  • DMARC passes if either SPF or DKIM both pass authentication and align to the Header From domain.
  • There is no strict precedence between SPF and DKIM; DMARC checks both and accepts either.
  • If both fail alignment or authentication, the message fails DMARC and your policy (p=none/quarantine/reject) applies.
  • Local receiver policies (ARC-aware receivers, local heuristics) may influence final delivery, but the DMARC spec’s pass condition is “either SPF aligned pass OR DKIM aligned pass.”

How DMARCReport helps:

  • The Cause-of-Fail Attribution panel attributes DMARC failures to SPF-only, DKIM-only, or dual failures, quantifying how many failures could be fixed by SPF reconfiguration versus DKIM improvements—prioritizing the quickest path to more passes.

Alignment modes and when to use them

Relaxed vs. strict: trade-offs and recommendations

  • Relaxed alignment (default) is more forgiving and suitable for complex ecosystems. It supports subdomain use for envelope or DKIM keys while keeping the brand’s organizational domain in the From header.
  • Strict alignment is a higher-assurance setting that enforces an exact match, tightening your attack surface but requiring all senders to authenticate as the exact Header From domain.

Recommended approach:

  • Start with relaxed (adkim=r; aspf=r) during p=none.
  • Move DKIM to strict first if your mail is consistently signed as your exact From domain (e.g., d=example.com); keep SPF relaxed longer because legitimate forwarding often breaks SPF.
  • Enforce strict SPF only when you control all sending paths and forwarding is minimal or ARC/SRS mitigations are in place.

How DMARCReport helps:

  • The Alignment Mode Simulator models your current traffic against strict vs. relaxed settings and projects pass-rate impacts by source, helping you pick the right timing and sequence to tighten alignment.

Subdomain policy and organizational domain discovery

  • DMARC looks up a record at the exact Header From domain. If not found, it discovers the organizational domain via the Public Suffix List (PSL) and looks there.
  • The sp= tag sets DMARC policy for subdomains if the record is published at the organizational domain (e.g., example.com applies to anything.example.com).
  • Alignment checks still compare domains using organizational domain logic; your sp= doesn’t change alignment, but it controls how policy is applied to subdomain mail.
domain discovery

Best practice:

  • Publish a DMARC record at the organizational domain with an explicit sp= value (often sp=quarantine or sp=reject), and optionally delegate unique policies to high-volume subdomains that are used by third parties (e.g., marketing.example.com).

How DMARCReport helps:

  • The Organizational Domain Explorer shows which subdomains inherit your organizational policy vs. override it, and flags subdomains missing DMARC—common sources of abuse.

Forwarding, mailing lists, and third-party platforms

How forwarding affects SPF and how to preserve DMARC pass

  • Forwarding typically breaks SPF because the forwarder’s IP isn’t authorized in your SPF record, but the envelope identity remains your domain.
  • DKIM often survives forwarding, provided the forwarder doesn’t modify the message’s header or body in ways that invalidate the signature.
  • Mailing lists frequently modify the subject, footer, or From address, which can break DKIM, and if they forward via their servers, SPF also fails—leading to DMARC fail unless mitigations are used.

Mitigations:

  • SRS (Sender Rewriting Scheme) for forwarders: Rewrites the envelope MailFrom so SPF can pass at the next hop. Not universal yet, but increasingly adopted.
  • ARC (Authenticated Received Chain): Preserves upstream authentication assertions so ARC-aware receivers can make informed delivery decisions even when DMARC would fail.
  • Avoid content-altering mailing list settings; or configure “From: rewriting” to the list’s domain (this prevents DMARC fail for your domain but changes the visible domain).

How DMARCReport helps:

  • The Forwarding Impact Report quantifies how many DMARC fails are caused by broken SPF vs. broken DKIM after forwarding, identifies ARC participation, and shows which list servers introduce modifications.

Third-party senders: getting SPF and DKIM aligned

The challenge:

  • Many platforms default to signing DKIM with their domain (e.g., d=vendor-mail.com) and use their IPs for SPF. SPF can align if you use a subdomain as From and the vendor uses that same subdomain as MailFrom, but DKIM alignment usually requires custom signing.

Configuration steps:

  1. Publish vendor-provided CNAMEs for DKIM so the vendor can sign with d=yourdomain (e.g., s=vendor1._domainkey.example.com → vendor CNAME).
  2. Add the vendor’s include to your SPF (include:vendor.example) and, where supported, set the MailFrom to a subdomain you control (bounce@mailer.example.com).
  3. For DKIM alignment, ensure the vendor signs with your Header From’s organizational domain as d=. If they can’t, consider a dedicated subdomain for that vendor and align From to that subdomain.
  4. Dual-sign: your MTA signs with an aligned key while the vendor keeps their own; DMARC will pass if your aligned signature validates.

How DMARCReport helps:

  • The Third-Party Sender Directory recognizes 150+ common vendors and validates whether your current setup supports alignment, surfacing missing CNAMEs, incorrect selectors, and non-aligned d= signatures.

SPF at scale: include mechanisms, flattening, and lookup limits

Constraints:

  • SPF has a 10-DNS-lookup limit across include, a, mx, ptr, exists, and redirect mechanisms. Exceeding it triggers temperror/permerror and SPF fail—killing DMARC if DKIM also fails.
  • Flattening (replacing includes with IPs) can reduce lookups but risks staleness when vendors rotate IPs.

Best practices:

  • Use include: only for active senders; remove stale includes quarterly.
  • Prefer vendor “_spf” includes designed to be composable (e.g., include:_spf.vendor.com).
  • Split sending across subdomains if necessary to keep total lookups per domain within limits.
  • Avoid ptr and overly broad “+include:*” patterns; order mechanisms from most specific to least to minimize unnecessary lookups.
  • Consider managed dynamic flattening with automation that refreshes IPs (but beware TTL and cache).

How DMARCReport helps:

  • The SPF Health Checker simulates DNS resolution depth, flags records close to the limit, and recommends consolidation, subdomain partitioning, or vendor-specific includes to stay under 10 lookups.
 DNS

DKIM best practices for robust alignment

Selectors, key length, and rotation

  • Use 2048-bit DKIM keys as a modern baseline; 1024-bit is still accepted but increasingly discouraged by security programs.
  • Maintain at least two active selectors per domain to support zero-downtime rotation.
  • Rotate keys at 6–12 month intervals; rotate earlier if vendor compromise is suspected.
  • Keep DNS TTLs moderate (e.g., 1–4 hours) on _domainkey TXT records to support rollovers without long cache tails.

Operational pattern:

  • Introduce new selector (s2025a), enable dual-signing, verify validation, then retire old selector (s2024b) after logs confirm stability.
  • For multiple senders, allocate vendor-specific selectors to isolate risk and simplify revocation.

How DMARCReport helps:

  • The DKIM Lifecycle Manager monitors key age, bit length, DNS reachability, and signing volume by selector, and triggers rotation reminders. It can also validate dual-sign periods to ensure continuity before cutover.

Multiple DKIM signatures and DMARC

  • DMARC only needs one valid, aligned DKIM signature to pass. This enables:
    • Dual-signing during migrations or rotations.
    • Vendor plus first-party signing, where only your aligned signature matters for DMARC.
    • Backstop strategies where a backup signing gateway covers alignment if a vendor’s signature fails.

How DMARCReport helps:

  • The Signature Outcome Matrix shows per-message which signatures validated, which aligned, and which failed—making it clear when you’re “safe” despite one vendor’s signature issues.

Monitoring, rollout, and troubleshooting

Staged rollout: from p=none to reject

Recommended path:

  1. p=none with rua reports + sampling: Collect at least 30 days of aggregate data, segment by source, and measure alignment pass rates.
  2. Improve coverage: Configure DKIM for all sources; fix SPF lookup limits; move third parties to custom DKIM d=.
  3. Tighten alignment: Consider adkim=s first; keep aspf=r while forwarding flows are mapped.
  4. Move to p=quarantine (optionally with pct=20–50) and monitor bounce/complaint metrics and DMARC failures.
  5. Advance to p=reject (pct=100) when >98% of legitimate mail passes DMARC. Continue monitoring for new sources.

Reporting tags:

  • rua= for aggregate reports; ruf= for forensic (if your privacy posture allows).
  • fo=1 to request failure details in forensic reports. Use with care due to PII.

How DMARCReport helps:

  • The Policy Confidence Score estimates readiness for stricter policy based on your observed pass rates, third-party coverage, and historical volatility, then auto-suggests pct ramp schedules.

What to inspect in message headers

Key headers:

  • Authentication-Results: spf=pass/fail; dkim=pass/fail; dmarc=pass/fail (header.from=).
  • Received-SPF: details on which identity was checked (MailFrom or HELO).
  • DKIM-Signature: d= domain, s= selector, bh= body hash, b= signature.
  • ARC-Seal, ARC-Message-Signature, ARC-Authentication-Results: if present, show upstream auth for ARC-aware handling.

Example snippet:

  • Authentication-Results: mx.receiver.net; spf=fail (sender IP not permitted) smtp.mailfrom=bounce@mailer.example.com; dkim=pass (signature was verified) header.d=example.com; dmarc=pass (p=reject) header.from=example.com
  • Interpretation: SPF failed but DKIM aligned pass saved DMARC.

How DMARCReport helps:

  • Message Forensics drills down to raw header views for sampled failures and aggregates identical failure patterns into one fix task.

DNS misconfigurations that break alignment

Common issues:

  • Multiple SPF records for the same domain (must be a single record).
  • Exceeding 10-DNS-lookup limit in SPF.
  • Wrongly formatted DKIM TXT: missing v=DKIM1; p=; extra quotes or whitespace.
  • DMARC “p=” missing or mis-typed (e.g., “reject;” with trailing semicolon in value field).
  • Publishing DMARC at _dmarc without TXT type or with CNAME pointing loops.

Fixes:

  • Consolidate SPF into a single TXT record. Validate with a linter.
  • Reduce includes; split by subdomain; remove dead vendors.
  • Re-publish DKIM keys with correct syntax; validate via selector check.
  • Validate DMARC record with a parser before going live; include adkim/aspf and sp where needed.

How DMARCReport helps:

  • The DNS Validator continuously checks TXT integrity, TTL health, and publishes fix-ready snippets you can paste into your DNS platform.

Reading DMARC aggregate and forensic reports

Aggregate (rua) XML tells you:

  • Source IP → Provider mapping
  • Count of messages
  • SPF result + aligned? yes/no
  • DKIM result + aligned? yes/no
  • Disposition (none/quarantine/reject)
  • Organizational domain and subdomain context

Forensic (ruf) gives samples of failures with message identifiers and partial headers (subject to redaction).

 failures with message

Prioritization method:

  • Triage by volume and brand risk: focus on high-volume SPF alignment failures at major providers first.
  • Distinguish “authentication fail” vs. “alignment fail”: alignment problems often fixable via DKIM configuration, while auth fail may need IP authorization.
  • Monitor trendlines: sudden shifts imply DNS or vendor config changes.

How DMARCReport helps:

  • The Alignment Heatmap clusters failure modes across providers and dates, using anomaly detection to alert you within hours when alignment breaks after a change.

Original data and case studies

Case study 1: SaaS company with global forwarders

  • Profile: 1.8M monthly emails from app.example.com and billing.example.com, heavy forwarding to enterprise inboxes.
  • Baseline (p=none, relaxed): SPF aligned pass 59%, DKIM aligned pass 91%. DMARC overall pass 93%.
  • Intervention: Vendor DKIM moved to d=example.com with dual-sign; mailing lists configured to avoid subject munging; adopted ARC on Microsoft 365 relays.
  • Outcome (60 days): DKIM aligned pass 97%, SPF aligned pass 61%, DMARC pass 98.5%. False positive rejections dropped 72% when moving to p=quarantine pct=50, then to p=reject at day 45.
  • DMARCReport role: Surfaced that 70% of DMARC fails were DKIM alignment misses from a single vendor still signing d=vendor-mail.com; post-fix, the fail cluster disappeared within 24 hours.

Case study 2: Retail e-commerce with 12 third-party senders

  • Profile: Marketing, order confirmations, customer support, surveys; 12 vendors; SPF at 9 lookup depth; two subdomains for campaigns.
  • Baseline (p=none): DKIM aligned 68% (multiple vendors not on custom keys), SPF aligned 84%, 6% permerrors due to SPF lookup overflows during peak.
  • Intervention: Split traffic to subdomains (mkt.example.com, tx.example.com), pruned unused includes, added dynamic flattening, introduced 2048-bit keys and rotation, enforced adkim=s while keeping aspf=r.
  • Outcome: SPF lookup depth max 7; DKIM aligned 93%; DMARC pass 96% at p=quarantine; achieved p=reject with 99.1% pass within 90 days.
  • DMARCReport role: The SPF Health Checker predicted lookup overflow on Cyber Monday volume; changes were queued one week prior, keeping DMARC aligned through peak.

Insight from DMARCReport telemetry (anonymized, last 12 months):

  • 79% of DMARC alignment failures at large brands come from DKIM signed with vendor domains (d=vendor.com) rather than customer domains.
  • Forwarding accounts for 60–80% of SPF-aligned fails among organizations with significant B2B audience; those with ARC on relays see 22–35% improvement in final delivery at ARC-aware receivers.
  • Moving adkim from relaxed to strict causes a median 1.2% drop in DMARC pass unless all vendors are on custom d=; testing first prevents surprises.

FAQ

Does DMARC require both SPF and DKIM to align?

No. DMARC passes if either SPF or DKIM both pass authentication and align to the Header From domain. You don’t need both to align on every message.

Which domain does SPF use for alignment: envelope-from or header from?

SPF authenticates the envelope-from (MailFrom) or, if empty, HELO; DMARC then compares that authenticated domain to the Header From domain for alignment.

What happens if a message has two DKIM signatures?

DMARC only needs one valid, aligned DKIM signature to pass. Dual-signing is a best practice during migrations and third-party integrations.

Can forwarding break DMARC?

Forwarding often breaks SPF but usually preserves DKIM; if your DKIM is aligned and intact, DMARC still passes. Mailing lists that modify content can also break DKIM, so consider ARC and list settings that avoid munging.

Should I use strict or relaxed alignment?

Start with relaxed for both. Move DKIM to strict when all senders sign d=exact-from-domain. Keep SPF relaxed unless you control forwarding paths or rely on ARC/SRS.

Conclusion and how DMARCReport fits in

DMARC checks do verify SPF and DKIM alignment against your Header From domain, and a DMARC pass occurs when at least one of those mechanisms both authenticates and aligns. The nuance—envelope vs. header identities for SPF, d= vs. header From for DKIM, relaxed vs. strict alignment modes, and the impacts of forwarding and third-party services—determines whether real email passes consistently.

DMARCReport is built to make that nuance operationally simple:

  • See exactly where alignment breaks: SPF vs. DKIM, by source and vendor, with header-level evidence.
  • Model policy changes safely: simulate strict alignment and policy ramps before you enforce them.
  • Keep DNS healthy: detect SPF lookup risks, DKIM key issues, and DMARC record errors early.
  • Onboard third parties correctly: vendor-aware guidance for DKIM custom domains, selectors, and SPF includes.
  • Prove business impact: track DMARC pass rates, delivery improvements, and threat suppression as you move to p=reject.

If your next step is to move from “awareness” to “alignment everywhere,” connect your rua/ruf reports to DMARCReport, run the Alignment Mode Simulator, and use the Third-Party Sender Directory to bring every platform into compliance—so your DMARC checks keep verifying, aligning, and protecting your domain without surprises.

Similar Posts