Outbound Wiki

Authentication alignment

How the domains used by SPF and DKIM relate to the visible From domain under DMARC.

Treat DMARC alignment as a comparison across the sender's fields. Start with the visible From address and trace the domain authenticated by each path. DMARC passes or fails based on how closely the visible From domain matches the sending domain from SPF or DKIM, a relationship called alignment.1 A message can pass SPF and still fail DMARC when the domains do not align with the visible From domain.2 DMARC passes when at least one SPF or DKIM check passes with alignment.3

Run the alignment check

Check the fields in the order a receiving system evaluates them. Keep SPF and DKIM as separate paths until you apply the DMARC result.

  • Record the visible From domain, the SPF-authenticated Return-Path domain, and the DKIM d= domain. DMARC compares the visible From domain with the domain authenticated by SPF or the domain in the DKIM d= tag.4
  • Check whether SPF authentication passed and whether DKIM authentication passed. Treat each result as a separate checkpoint before judging alignment.
  • For the SPF path, compare the domain in MAIL FROM with the domain in From. DMARC uses SPF to verify whether those domains are aligned.5
  • For the DKIM path, compare the signing domain in the d= value with the domain in From. DMARC uses the DKIM result to verify that this signing domain aligns with From.6
  • Apply the DMARC rule after both comparisons. One path with authentication and alignment can carry the message through DMARC, while two failed alignment paths leave a domain mismatch to fix.

Write down the result for each path as you inspect it. This separates an authentication failure from an alignment failure and gives you a specific field to hand to whoever manages the sending system.

Choose the alignment mode

The same pair of domains can produce a different result under a different alignment mode. Read that setting before treating a parent and child domain mismatch as a failure.

DMARC supports strict and relaxed alignment modes for SPF and DKIM. The aspf and adkim tags in the DMARC record set those modes.7 Under relaxed SPF alignment, a parent domain can align with a subdomain in the corresponding From or Envelope From field.8 If the policy contains aspf=s, the SPF check must use strict alignment.9 The adkim tag controls whether the DKIM alignment check is relaxed or strict.10

When the result looks surprising, inspect the mode before editing the sender's DNS records. A mismatch under strict settings needs a different fix from a parent and child relationship that the policy allows.

Fix the mismatch

Once you know which comparison failed, trace that field back to the system that produced it. The correction depends on the path and on how the message reached the recipient.

If SPF and DKIM pass individually while DMARC fails, treat the problem as alignment rather than authentication.11 Check whether a forwarding step changed the path. Messages forwarded automatically between domains or organizations can fail DMARC alignment even when the original sender is legitimate.12

Review third party sending arrangements too. A marketing sender may place its own domain in the MFrom field to manage bounce messages, leaving that domain different from the brand's Header From domain and causing SPF alignment to fail.13

For an SPF alignment failure, take the exact MAIL FROM and From values to the technology provider that manages the sending system. The provider may need to give system-specific instructions for correcting the mismatch.14 For DKIM, inspect the d= value and adjust the signing configuration so the DKIM path aligns with the visible From domain.

After a correction, run the same comparison again on a message from that sender. Move on when you can identify which path authenticates, which path aligns, and which policy mode produced the result.

What not to do

  • Do not require the DKIM signing domain to match the MAIL FROM or From domain as a general DKIM rule. The DKIM signing domain does not have to match either address.15
  • Do not treat a published DMARC record as proof that the message itself passes alignment. A message can still fail the alignment check.16
  • Do not tighten the DMARC policy while failed results still show an alignment problem that has not been fixed.17

Tool for this

Sending from your own mailboxes, safely paced

Intedat covers the basics here properly. It sends from the Gmail, Microsoft 365 or SMTP mailbox you already own, shows SPF, DKIM and DMARC checks for a custom domain and rechecks them, and the daily limit per mailbox tops out at 100 inside a sending window you set per workflow. It will not warm a mailbox up for you, so that part stays your job.

Open Intedat

Sources

  1. 1
    “DMARC passes or fails a message based on how closely the domain in the From: header matches the sending domain specified by either SPF or DKIM. This is called alignment.”
  2. 2
    “Alignment is the reason a message can pass SPF and still fail DMARC.”
  3. 3
    “A message passes DMARC if one or both of the described SPF or DKIM checks pass.”
  4. 4
    “DMARC compares the domain in the visible From: header against the domain that SPF authenticated (the Return-Path) or the domain in the DKIM d= tag.”
  5. 5
    “The domains in the MAIL FROM and From addresses in the message are aligned.”
  6. 6
    “DMARC uses the result from DKIM to verify the domain that signed the message (the d= value in a DKIM-Signature header field as validated by the s= selector value) aligns with the domain in the From address.”
  7. 7
    “You can choose from two alignment modes: strict or relaxed. You set the alignment mode for SPF and DKIM in the DMARC record using the aspf and adkim DMARC record tags.”
  8. 8
    “This means if you are using ‘example.co.uk’ or a subdomain like ‘mail.example.co.uk’ in the Header From address, and then using ‘example.co.uk’ in the Envelope From address, then SPF alignment checks are passed.”
  9. 9
    “If an organisation has added the term ‘aspf=s’ to their DMARC policy, then alignment checks need to be ‘strict’.”
  10. 10
    “The "adkim" tag specifies if the DKIM alignment check should be relaxed or strict.”
  11. 11
    “If DMARC shows FAIL while SPF and DKIM pass, you have an alignment problem, not an authentication problem.”
  12. 12
    “When messages are automatically forwarded between domains or organizations, DMARC alignment can fail even for legitimate service senders.”
  13. 13
    “Senders use a third party to send marketing emails and, in order for them to manage bounce messages, they use that third party domain in the MFrom field (which does not match the Header From domain of the brand, and will therefore not align for SPF).”
  14. 14
    “To fix any issues arising, you will have to consult your technology provider for specific instructions on how to address SPF alignment issues for your email sending system.”
  15. 15
    “The domain that's used to DKIM sign the message isn't required to match the domain in the MAIL FROM or From addresses in the message.”
  16. 16
    ““DMARC is published” while the message itself fails alignment.”
  17. 17
    ““Failed” results — the alignment you need to fix before tightening the policy.”