Skip to content
  • There are no suggestions because the search field is empty.

Third-party mail fails alignment

When a vendor's mail fails DMARC alignment, the vendor has authenticated the message with its own domains instead of yours. SPF passed for the vendor's bounce (Return-Path) domain, DKIM passed for the vendor's d= domain, and neither one matches your From domain. DMARC needs one of them to be aligned. The fix is to have the vendor sign DKIM with your domain, and if it offers one, set a custom Return-Path under your domain.

The vendor isn't doing anything wrong by passing SPF and DKIM for itself. DMARC simply asks a narrower question: did SPF or DKIM pass for a domain aligned with the From address?. If neither did, the message fails DMARC for your domain, even though both checks show "pass."

What it looks like

Here's a clean example from a marketing platform:

Authentication-Results: spf=pass smtp.mailfrom=sender.example;
 dkim=pass header.d=sender.example;
 dmarc=fail (no aligned pass) header.from=example.com

Microsoft's explanation: "SPF and DKIM both pass for the service domain, but neither aligns with the From address domain."

Gmail has a specific message for the same condition. It includes 4.7.32 (rate limited) and 5.7.32 (blocked), both saying the From header isn't aligned with either the authenticated SPF or DKIM organizational domain. Both appear under reply code 421.

How to confirm which side isn't aligned

Take a real message from the vendor, sent to a mailbox you control, and open the full headers. In Authentication-Results, compare three values:

Field What it is Aligned when
header.from Your visible From domain It's the reference
smtp.mailfrom The envelope sender SPF checked SPF passed and it shares your organizational domain (relaxed) or matches exactly (strict)
header.d The DKIM signing domain The signature verified and the domain shares your organizational domain (relaxed) or matches exactly (strict)

If smtp.mailfrom is the vendor's domain, the vendor's tool may say "SPF alignment failed." If header.d is the vendor's domain, it may say "DKIM alignment failed." Either alone is fine as long as the other side aligns. Both together is the failure.

Relaxed alignment is the default, so d=mail.example.com or a Return-Path of bounce.example.com aligns with From: news@example.com. With adkim=s or aspf=s, they'd have to match exactly (Relaxed vs strict alignment). The concept and more worked examples are in Identifier alignment for SPF and DKIM, and the envelope-versus-From difference is in Envelope From vs Header From.

Across all your mail, the same comparison shows up in aggregate reports: each row lists the From domain alongside the SPF and DKIM domains that were evaluated (walk-through in A field-by-field walk-through of a DMARC aggregate report). A vendor's dashboard showing "SPF: pass, DKIM: pass" isn't proof. Dashboards can report the raw result without alignment.

How to fix it

In order of preference:

  1. Custom DKIM at the vendor. The vendor signs with d= your domain or a subdomain, using CNAME or TXT records it gives you to publish. In Microsoft 365 this is the preferred fix: configure the service to DKIM-sign with your domain. It's also the one that holds up when mail is forwarded, because SPF usually breaks on forwarding while an unmodified DKIM signature survives (Forwarded mail fails DMARC).
  2. A custom Return-Path under your domain, such as bounce.example.com pointing to the vendor. SPF then passes for a domain that aligns under relaxed alignment. Publish the records the vendor specifies for that subdomain; your main SPF record doesn't need to change.
  3. A dedicated subdomain for the vendor, such as news.example.com, with SPF and DKIM set up for that subdomain at the vendor. For email services that aren't under your direct control, a subdomain keeps problems there from affecting your main domain's reputation.

Mail from a subdomain still falls under your DMARC policy. Without its own record, it gets the parent's sp value, or p if there's no sp (Subdomain policy is not doing what we expected). It doesn't inherit SPF or DKIM. Set up SPF on names used in MAIL FROM and DKIM on names used as d= (Shared domains and multi-service setups).

The vendor's own DNS names and steps change, so take them from the vendor's current documentation (Email sending platforms: SPF, DKIM and DMARC setup). The full procedure for adding a sender is in How to add a third-party sender without breaking DMARC, and the trade-off between an SPF include and vendor DKIM is in SPF include vs DKIM from the vendor.

The SPF include trap

Microsoft's same example lists another fix: "Add the service's SPF include to your domain's SPF record (provides aligned SPF pass)." That's only true if the vendor sends with a Return-Path on your domain. If it bounces to its own domain, receivers check the vendor's SPF record, not yours, and the include in your record is never consulted for that mail. It just spends lookups toward your limit of 10.

So before adding a vendor's include, check smtp.mailfrom in a real message. If it's the vendor's domain, the include won't help DMARC. And add it to your existing record, never as a second SPF record (Two SPF records).

If the vendor can't align

Some services can't sign with your domain or use your Return-Path. There's no way to pre-approve a third party in your DMARC record. Your realistic options:

  • Switch to a service that supports custom DKIM.
  • Send that stream from a subdomain with its own setup, and decide that subdomain's policy on its own terms. Microsoft's fallback is "use a subdomain for that service with a separate DMARC record."
  • Accept that its mail fails DMARC and will be handled as your policy asks (What happens to failing mail under each policy).

Be careful with an example record such as v=DMARC1; p=quarantine; sp=none;.... An sp=none on your organizational domain applies to every subdomain that doesn't publish its own record, not only the marketing one. A separate record on the vendor's subdomain is narrower. Either way, treat a relaxed policy as a dated exception with an owner, not the permanent state: enforcement means the organizational domain and all subdomains below it are not at p=none.

Don't keep the whole domain at p=none because of one vendor. And remember that at p=reject, domains must not rely solely on SPF to secure a DMARC pass and must apply valid DKIM signatures, which makes custom DKIM the fix to aim for (When you are ready for p=reject).

Mistakes worth avoiding

  • Finishing the vendor's domain verification and assuming that turned on custom DKIM. Check a real header for your d= domain.
  • Trusting the vendor dashboard's "pass" instead of reading a real header.
  • Setting adkim=s while the vendor signs with a subdomain like mail.example.com.
  • Adding the vendor's include as a second SPF record.
  • Moving the vendor to a subdomain without SPF on its MAIL FROM name and DKIM on its d= name.

The main-site article on alignment issues has a short summary of the same fixes. For mail that broke right after a policy change, start with Mail started failing after we published DMARC.

Free DMARC account

Not sure which sender is failing?

Connect your domain's DMARC reports and see every service that sends as your domain, and whether each one passes SPF, DKIM and DMARC.

  • Every sending source in one dashboard
  • SPF, DKIM and alignment results per sender
  • No XML files to read

Create a free DMARC accountTalk to an expert

FAQ

Is adding the vendor's SPF include enough?

Only if the vendor's Return-Path uses your domain. Otherwise SPF passes for the vendor's domain, which doesn't align. Custom DKIM is the more reliable fix.

Can I approve a vendor in my DMARC record?

No. DMARC has no allow list. The vendor's mail has to carry an aligned SPF or DKIM pass.

Do I need both SPF and DKIM aligned?

No. One aligned pass is enough. Aligned DKIM is the better one to have: it survives forwarding, and domains at p=reject must apply valid DKIM signatures.

Will moving the vendor to a subdomain fix it?

It isolates the vendor's mail. You still need SPF on the name used in MAIL FROM and DKIM on the name used as d=, and the subdomain falls under your DMARC policy unless it has its own record.