Share this insight:

An email can pass both SPF and DKIM and still fail DMARC. The cause is identifier alignment: the domains that passed authentication don't match the domain in the visible From address.

Say a message is sent as From: news@example.com. SPF passes for bounce.vendor.example.net, and DKIM passes with d=vendor.example.net. Both checks authenticate the sending service's domains, neither aligns with example.com, so DMARC fails.

To pass DMARC, you need at least one path that both passes and aligns: a DKIM signature with your domain in d=, or SPF for a Mail FROM domain under your own domain.

Quick check: Open the receiving server’s Authentication-Results header. Find header.from, smtp.mailfrom, and the d= domain of each passing DKIM signature. Check whether at least one passing SPF or DKIM identity aligns with the From domain under your DMARC policy.

Three Domains in One Message

For DMARC, three domains matter: a From domain, a Mail FROM domain, and a DKIM signature domain. These domains live in different places in the message and get checked by different mechanisms, but the point where they come together is DMARC.

Examine the table below to understand where each of the three domains appears and what RFCs, email headers, and DMARC reports call it.

DomainRFCHeaderDMARC Report (RFC 9990)Set by
From:RFC5322.From, Author DomainFrom:; header.from= in Authentication-Results<header_from> (required tag)Email sender
Mail FROM:RFC5321.MailFrom (envelope sender)Return-Path:; smtp.mailfrom=<envelope_from> (optional tag), <auth_results> Outbound server or ESP
DKIM signature domainDKIM Signing Domain, d= tagDKIM-Signature: d=; header.d= in Authentication-Results, if present<auth_results>DKIM signing server

Envelope Sender vs Header From

The Envelope Sender and the header From are two separate “sender” fields on the same message, set at different layers and used for different purposes.

According to the RFC5321 Standard, the Envelope Sender or Mail FROM domain is part of the SMTP transaction, not the message content. It is used by servers, not people. It’s where bounces and delivery failure notices (DSNs) go. This domain appears in the Return-Path header added by the server that finally delivers the message.

By RFC5322, the header From domain is part of the message itself. It’s what the recipient sees in the email From: address in their inbox. The header From domain can legitimately differ from the Envelope Sender one.

How DMARC Alignment Works

The server matches the authenticated domain to the visible header From domain to return a DMARC verdict: pass or fail.

The core rule is

SPF authentication pass + SPF alignment pass, and/or
DKIM authentication pass + DKIM alignment pass.

When a DMARC policy applies, and the DNS lookups complete without errors, DMARC passes if at least one mechanism authenticates and aligns: SPF passes for an aligned Mail FROM domain, or a valid DKIM signature has an aligned d= domain. Otherwise, DMARC fails, and the receiver weighs the domain's policy (p, or sp/np for subdomains) against its own local policy.

SPF Alignment

SPF alignment matches the Envelope From (Mail FROM) domain to the header From domain. If the domains don’t match according to the set mode (relaxed or strict per aspf), the SPF alignment test fails.

Important notes about SPF alignment:

  1. If SPF authentication doesn’t pass, SPF alignment automatically fails, too.

  2. For SPF alignment, only SPF authentication PASS results count. Results such as SPF softfail, neutral, or none with an aligned SPF domain mean failure.

  3. With an empty Envelope Sender (MAIL FROM:<>), SPF builds the MAIL FROM identity from the HELO/EHLO name: postmaster@. That identity can pass SPF, and it gives DMARC a pass if its domain aligns with the From domain. Usually it doesn’t, because the HELO name is typically the sending server’s hostname (e.g. mx1.mailhost.net) and not the domain in the visible From header. With SPF unaligned, DMARC can pass only through DKIM, provided there’s a valid DKIM signature whose d= domain aligns with the From domain.

DKIM Alignment

DKIM alignment matches the DKIM d= domain to the header From domain. If the domains don’t match according to the set mode (relaxed or strict per adkim), the DKIM alignment test fails.

Important notes about DKIM alignment:

  1. DKIM alignment automatically fails if DKIM authentication failed.

  2. If a message is signed by multiple DKIM signatures, at least one valid signature with an aligned domain is sufficient to pass DMARC.

  3. DKIM alignment uses only the d= domain.

The d= domain is the DKIM signature domain. It identifies where to look for the public key (selector._domainkey.<d=>) and is the identity that takes responsibility for the message. DMARC compares this to the header From domain for DKIM alignment.

To find it, look at header.d in Authentication-Results if the receiver shows it, or at d= in the matching DKIM-Signature header. Some receivers show header.i instead. It can hold a subdomain of d=, so judging alignment by it is easy to get wrong under strict alignment.

Relaxed vs Strict: aspf and adkim

aspf and adkim are optional DMARC tags that allow setting a mode for SPF and DKIM alignment.

Two values are allowed:

r - a relaxed mode where only the organizational domains must exactly match;

s - a strict mode where the whole evaluated domains must exactly match.

If the tags are absent in a DMARC record, the default relaxed mode (aspf=r, adkim=r) is applied.

The table below explains how the r and s modes determine SPF and DKIM alignment results, assuming that:

  • SPF/DKIM authentication passed;
  • the example.com and example.co.uk domains have DMARC records;
  • the psd=n/psd=y tags separating domains are not used.
Header FromSPF or DKIM DomainAlignment Result in Relaxed ModeAlignment Result in Strict ModeWhy It Passed/Failed
example.comDKIM d=example.comPASSPASSThe domains exactly match
example.comMAIL FROM bounce.example.comPASSFAILThe organizational domain is the same, but there is no exact match
news.example.comDKIM d=example.comPASSFAILThe organizational domain (example.com) is the same, but there is no exact match
news.example.comDKIM d=mail.example.comPASSFAILThe organizational domain (example.com) is the same, but there is no exact match
example.co.ukDKIM d=mail.example.co.ukPASSFAILThe organizational domain is example.co.uk instead of .co.uk; no exact match
example.comMAIL FROM bounces.esp-mail.netFAILFAILThe organizational domains differ
example.comDKIM d=example.netFAILFAILThe organizational domains differ: .com vs .net
example.comDKIM d=example.com.attacker.netFAILFAILThe organizational domains don’t match; the prefix match doesn’t matter

How the Organizational Domain is Found

Published in 2015, RFC 7489 determined an organizational domain through the Public Suffix List. In 2026, RFC 9989 replaced it and introduced important DMARC updates, including a DNS Tree Walk mechanism.

The receiver checks for a DMARC record on the From domain. If the From domain has no DMARC record of its own, the receiver walks up the DNS tree one label at a time (a name with more than eight labels is first cut to seven). The walk doesn't stop at the first record it finds. It stops at a record with psd=n or psd=y, or when it runs out of labels, and it never makes more than eight DNS queries.

A record with psd=n makes its own domain the Organizational Domain. For instance, without psd=, the organizational domain for _dmarc.mail.example.com is example.com. If we publish a separate DMARC record with psd=n on mail.example.com, this domain becomes an organizational domain.

A record with psd=y marks a public suffix, and the Organizational Domain is the name one label below it.

A record with psd=u means “unknown”, the domain owner makes no assertion about whether this domain is a Public Suffix Domain or an Organizational Domain. It’s the default value, so a record with no psd tag behaves as if it said psd=u. With no psd tag anywhere, the Organizational Domain is the name with the fewest labels that publishes a record. If there are no records, the domain is its own Organizational Domain.

Policy and alignment use this result differently. A record at the From domain itself is the policy for that message.

For relaxed alignment, the receiver works out the Organizational Domain separately for the From domain, the Mail FROM domain, and each DKIM d= domain, and compares them.

After the publication of RFC 9989, not all email receivers have implemented a DNS Tree Walk mechanism yet. Having a DMARC record only on a sending subdomain, without one at the apex, is common and can cause discrepancies during a transition period.

What Each Alignment Error Message Means

Per-mechanism alignment is not written to the headers; only the combined DMARC result is.

Below is a list of common messages that can be seen in different sources indicating DMARC alignment failure:

Error messageWhere it showsWhat it means
DKIM-Signature is not alignedMXToolbox email deliverability report > DKIM Alignmentthe d= domain is not aligned with the header From domain. In a relaxed mode, the organizational domains don’t match; in a strict mode, the domains in two places don’t exactly match
MAIL FROM record is not aligned.Virtual Deliverability Manager in Amazon SESthe Mail FROM domain (amazonses.com) is not aligned with the header From domain or Mail FROM uses a custom subdomain while a strict SPF alignment mode is set (aspf=s)
The From header
does not match the DKIM domain .
“Show Original” view in Gmailan observation, not a DMARC verdict: the DKIM d= domain differs from the From domain. Check dmarc= in Authentication-Results; if there is none, check whether a DMARC record applies to the From domain, including one inherited from a parent domain
dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=example.comAuthentication-Results: header in GmailNeither SPF nor DKIM gave a pass and alignment with header.from. Authentication may have failed, the domains (smtp.mailfrom, DKIM d=) may not align, or both
dmarc=fail action=none header.from=example.comAuthentication-Results: header in Microsoft 365/OutlookNeither SPF nor DKIM gave both a pass and alignment with header.from. Authentication may have failed, the domains (smtp.mailfrom, header.d) may not align, or both
<policy_evaluated>nonefail fail …<auth_results> pass passDMARC aggregate reportNeither Mail FROM domain nor DKIM signature domain is aligned with the header From domain. Read the two blocks together: <auth_results> has the raw SPF and DKIM results, and <policy_evaluated> has pass only for a mechanism that passed and aligned

The header.from in Authentication-Results does not indicate any error. This is just the domain that was evaluated for SPF and DKIM alignment.

In addition to dmarc=pass and dmarc=fail results, email receivers may return:

dmarc=temperror: means the receiver couldn’t finish the DMARC evaluation because of a temporary error, so it has no pass or fail result. It’s a processing problem, not a verdict on the message;

dmarc=permerror: means the receiver couldn’t evaluate DMARC because of a permanent error, usually a problem with the published record or the domain’s configuration. Unlike temperror, retrying won’t help, because the problem stays until someone fixes it.

dmarc=bestguesspass: added by Microsoft when alignment succeeds but a DMARC record doesn’t exist.

Why DMARC Alignment Fails: the Common Causes

The scenarios below explain different cases when an email fails a DMARC alignment test while passing SPF or DKIM authentication.

A. Default ESP or SaaS configuration

Many ESPs and SaaS providers provide default settings that pass authentication tests but not alignment. They sign emails with DKIM on behalf of their own domain and use an email address set up on their own domain in Mail FROM.

The Authentication-Results header shows:

spf=pass smtp.mailfrom=bounces., dkim=pass header.d=, dmarc=fail header.from=example.com.

Alignment failure cause: a domain passing SPF or DKIM authentication is not aligned with your header From domain.

How to fix: configure DKIM for your domain in the ESP or SaaS by generating DKIM keys and publishing CNAME records on your domain in DNS; set up a custom domain for Mail FROM in the ESP if it is supported.

B. HubSpot’s Return-Path Domain

Some email services, such as HubSpot, use a Return-Path on their own domain by default.

Alignment failure cause: HubSpot uses a Return-Path address on their domain, therefore, authentication by SPF passes, but alignment fails.

How to fix: With HubSpot’s default Return-Path, rely on aligned DKIM: it’s the only way to pass DMARC. Ensure the emails are signed and aligned by DKIM. Any DKIM failure leads to DMARC FAIL.

Important notes:

  1. a custom Return-Path configuration in HubSpot is available in beta mode for Marketing Hub Enterprise users;

  2. each dedicated IP can have a single Return-Path;

  3. a strict alignment mode is possible only if the From email address uses a subdomain.

C. Default MAIL FROM domain in Amazon SES

Amazon SES supports the use of a custom domain for MAIL FROM. However, this is not the default email configuration.

In this scenario, a Virtual Deliverability Manager in Amazon SES returns the “MAIL FROM record is not aligned” error.

Alignment failure cause: Amazon SES uses a MAIL FROM address on the amazonses.com domain by default.

How to fix: configure your custom MAIL FROM domain. Use a custom subdomain on the verified domain. A custom subdomain must not be used for sending and receiving email. You have to add two DNS records to your custom subdomain

Name: bounce.example.com

Type: MX

Value: 10 feedback-smtp..amazonses.com

Name: bounce.example.com

Type: TXT

Value: "v=spf1 include:amazonses.com ~all"

Behavior on MX Failure

If the MX record is missing or broken, Amazon SES will 1) use a subdomain of amazonses.com depending on the AWS Region that you use Amazon SES in or 2) return a MailFromDomainNotVerified error and reject the emails you attempt to send from the subdomain. You can choose the option yourself.

Important notes: With the standard Amazon SES custom Mail FROM setup, the Mail FROM domain is a dedicated subdomain of the verified identity, so SPF alignment requires aspf=r. AWS states this directly and advises against using the Mail FROM subdomain as the visible From domain.

D. Alignment strict mode

The mode for SPF and DKIM alignment in a DMARC record is set to “strict” (aspf=s or adkim=s), but a Return-Path email address uses a subdomain (e.g., bounce.example.com, em1234.example.com) or a subdomain is configured for DKIM signing.

How to fix: set the alignment mode to “relaxed” (aspf=r, adkim=r). Do not use a strict mode unless strict was chosen on purpose. A strict mode is justified if subdomains belong to different departments in the company and they should not pass DMARC for the main domain.

E. Different signing domain

DKIM alignment fails regardless of the adkim mode when an email is sent from an email address set up on one domain but is signed with DKIM on behalf of a different domain (d=parent-company.com, d=.onmicrosoft.com or a CRM’s domain). This happens after a company’s rebranding, switching ESPs, Microsoft 365 tenant migration, or gateway interception. If emails are not aligned by SPF either, they fail DMARC.

How to fix: reconfigure DKIM for each domain used in the header From field.

F. Email forwarding, mailing lists, gateways and filters

Forwarding. Email forwarding changes the connecting IP. Without SRS, SPF usually fails because the forwarder's IP is not authorized for the original Mail FROM domain. With SRS, SPF can pass, but for the forwarder's domain, which does not align with your From domain.

How to fix: ensure the email is aligned by DKIM. An aligned DKIM signature survives forwarding as long as the forwarder does not modify the signed headers or body, so DKIM is what keeps forwarded email passing DMARC.

Mailing lists. Mailing-list processing changes the email Subject line and body, which breaks DKIM authentication; DKIM alignment passes but is not counted.

As a rule, mailing list services also rewrite an Envelope From address and a header From address. DMARC is then checked against the mailing list’s domain.

Operators of forwarding tools or mailing lists can implement ARC sealing to help email receivers decide whether to deliver email.

Although ARC (Authenticated Received Chain) does not repair a broken DKIM signature or make a domain align, it lets an intermediary record the authentication results it saw, and a receiver that trusts that intermediary may deliver the message despite the DMARC failure. The sender has no control over this.

Gateways. Gateways and relays that intercept an outbound email often add their disclaimer at the end of the message, which alters the email content and breaks DKIM authentication. Also, they can rewrite the original Mail FROM email address, which breaks SPF alignment.

How to fix: set up DKIM signing at the last hop of the email route; add the IP address of the gateway to the SPF record on your Mail FROM domain.

Filters. Many organizations route inbound mail through a gateway before it reaches a mailbox, for example, a third-party secure email gateway, an on-premises Exchange server, or a mail-hygiene service. The provider’s filter, for example, the Microsoft 365 Exchange Online Protection (EOP) filter, then sees the gateway’s IP as the connecting source, not the original sender’s. That breaks or degrades several checks:

  • SPF is evaluated against the gateway’s IP, so it fails for the original sender’s domain;
  • DMARC can be affected because SPF alignment is lost.

How to fix: use Enhanced Filtering for Connectors. It lets Microsoft 365 determine the true original sender IP when an email reaches Exchange Online through a third-party service or other intermediate hop, rather than directly over the internet.

A misleading alignment warning when no DMARC policy applies

When a domain doesn’t have a published DMARC record, email providers can show false DMARC alignment failures.

For instance, if the Authentication-Results header doesn’t have dmarc=, Gmail returns DMARC FAIL even if the domains align. This is a false warning of Gmail’s interface, not a DMARC verdict.

Microsoft writes "dmarc=bestguesspass" if the email would have passed DMARC and a record would be present.

In DMARKOFF’s tests from 7 to 9 November 2026, Outlook.com rejected mail from domains with no DMARC record until Microsoft rolled the change back.

How to fix: first check which DMARC record applies to the From domain, including one on its parent domain. If there is none, publish a record with p=none to start monitoring and rua= to receive aggregate reports.

How to Confirm the Cause

Check the table below to determine which scenario your case falls under:

What you seeWhat is not alignedScenarioWhat to do
smtp.mailfrom and header.d have the ESP’s domain; dmarc=failSPF and DKIMAset up DKIM for your branded domain;set up a custom domain for Return-Path if applicable
header.d=example.com, smtp.mailfrom has the ESP’s domain; dmarc=passOnly SPFBEnsure DKIM alignment pass
SES: MAIL FROM record is not aligned.SPFCSet up a custom subdomain for MAIL FROM; ensure the aspf alignment mode is set to relaxed
Return-Path or d= use a subdomain;aspf=s or adkim=s in the DMARC recordSPF or DKIM or bothDChange the mode to relaxed or ensure the exact match of the domains
The header.d= domain is .onmicrosoft.com or other company domainDKIMESet up DKIM for each domain used in the email’s From field
dmarc=fail shows only for forwarded emails; the forwarder’s IP appears in the headersSPF, sometimes DKIMFEnsure DKIM alignment
No dmarc= in Authentication-Results in Gmail; dmarc=bestguesspass in MicrosoftA DMARC record is not publishedGCheck which record applies, including the parent domain’s; if none, publish one with p=none and rua=

You can use the following sources of information to investigate your DMARC alignment failures:

1. Look at the headers.

The Authentication-Results: header shows the DMARC result and allows you to quickly understand what is not aligned if DMARC fails. Example:

Authentication-Results: mx.microsoft.com 1; spf=pass (sender IP is 2607:f8b0:4864:20::a2e) smtp.mailfrom=gmail.com; dkim=pass (signature was verified) header.d=gmail.com;dmarc=fail action=none header.from=example.com;

What to look at:

smtp.mailfrom= is the Mail FROM or Envelope From domain; it is used to check SPF authentication and evaluate SPF alignment;

header.d= is the domain used in the d= tag in the signature; it is used to evaluate DKIM alignment;

header.from= is the domain used in the email’s From field; SPF and DKIM alignments are evaluated against this domain;

spf= is the result of passing or failing SPF authentication;

dkim= is the result of passing or failing DKIM authentication;

dmarc= is the DMARC evaluation result.

SPF and DKIM alignment results are not explicitly advertised in the headers. You can conclude them yourself by matching the domains in three tags.

2. Run a free email test.

A free GlockApps email spam test verifies SPF, DKIM and DMARC authentication of a sent email.

Go to the DKIM tab and notice your DKIM domain. Match it to the visible From domain to find out if your email is DKIM aligned.

GlockApps free email test: DKIM authentication

3. Check DMARC report XML files.

What to look at:

<auth_results> shows the DKIM authentication raw result;

<auth_results> shows the SPF authentication raw result;

<auth_results> shows the DKIM signature domain; it is matched to the header from domain to check DKIM alignment;

<auth_results> shows the Mail FROM domain; it is matched to the header from domain to check SPF alignment.

<header_from> shows the email’s From domain name; SPF and DKIM alignments are evaluated against this domain;

<policy_evaluated> shows pass for SPF or DKIM only when that mechanism passed and aligned; read it together with <auth_results>.

DMARC aggregate report: SPF/DKIM results

4. Check results in DMARKOFF.

DMARKOFF provides visibility into your email authentication and alignment results, displaying the domains used in three places: From, Return-Path, and DKIM signature. You can group the results by the email provider or sending IP to investigate which source is sending unauthenticated or unaligned emails.

DMARKOFF: Domain authentication and alignment results

How to fix DMARC Alignment Failure

If you see dmarc=fail when SPF and DKIM authentications pass, take these steps to fix it:

1. Ensure DKIM alignment.

Check DKIM signing configuration in all your email sources to ensure each source signs emails with DKIM on behalf of your branded domain. Since SPF alignment isn't always possible, most emails pass DMARC based on DKIM.

2. Set up your custom domain for Mail FROM.

Check it with your email service provider. If it supports the use of branded domains for Mail FROM, use a subdomain on your main domain for this configuration. This setting will help you pass SPF alignment and DMARC. If it is not supported by your ESP, focus on DKIM alignment.

3. Check the alignment mode.

Verify a DMARC record published for your domain and notice the aspf and adkim tags. If they exist, check the values used in the tags: r or s. If a tag uses “s” on purpose, set up an exact domain match for at least one passing mechanism. If subdomains are meant to align, switch only the tag you need, aspf or adkim, to “r”, or remove it to apply the default relaxed mode.

4. Monitor after changes.

Continue monitoring the results after making the changes. DMARKOFF groups the emails by authentication results, domains, and email sources, which helps you identify the configuration issues.

Two Fixes that Don’t work

#1. Changing the SPF record on the visible From domain.

SPF authentication is checked against the Mail FROM domain. If the ESP uses its own domain for Mail FROM, the ESP maintains SPF for that domain. Thus, adding one more include: to the SPF record published on the visible From domain has no effect. An additional “include” just adds one or more queries against the 10 DNS-lookup limit.

If the Mail FROM domain is your custom domain, the inclusion of the ESP in the SPF record on that domain is a must.

#2. Setting up the p=none policy.

Moving from p=quarantine or p=reject to p=none doesn't fix alignment. It stops enforcement, and Gmail still requires bulk mail to align with SPF or DKIM. Treat it as a short, monitored stopgap while you fix the sender.

Conclusion

If DMARC fails while SPF or DKIM passes, use this checklist to troubleshoot:

  • Find three domains: header From, Mail FROM (smtp.mailfrom) and DKIM d=.
  • Check which authentication actually passed.
  • Compare the passing domain with the From domain under your aspf/adkim mode.
  • Set up DKIM with your domain in your ESP, and a custom Mail FROM where it is supported.
  • Send a test message and confirm dmarc=pass in the headers; in aggregate reports, look for pass in policy_evaluated dkim or spf.

[CTA] Start Your 14-Day Free Trial

—-----

It means the DKIM signature may be valid, but the signing domain (d=) doesn’t match the domain in the visible From address. DMARC can still pass if SPF passes and aligns.

Yes. DMARC can pass either by SPF alignment or DKIM alignment. If an email fails SPF but passes DKIM authentication and alignment, it also passes DMARC.

Relaxed is right for most domains. Strict makes sense when some subdomains are run by a vendor or a separate team, and emails authenticated by those subdomains must not pass DMARC for the parent domain. It doesn't protect against outside spoofers, who can't pass relaxed alignment either. Under RFC 9989, publishing psd=n on a delegated subdomain is another way to draw that boundary.

Julia Gulevich
Julia Gulevich Head of Customer Success at GlockApps and DMARKOFF | Email Deliverability Expert | 16+ Years in Email Marketing

Author of numerous articles on email deliverability and email authentication. She is known for her practical, data-driven approach that helps teams get more emails into inboxes and keep sending practices healthy.

Julia works closely with senders every day, providing technical support, troubleshooting deliverability issues, and making complex topics such as email infrastructure, authentication, and sender reputation easier to understand and deal with.