
How can SPF pass and DMARC fail on the same email? Surely if the server was authorised, the email's legitimate?
Here's what's happening when you see SPF pass but DMARC fail: SPF checked a domain, and that domain passed. It just wasn't your domain. It was almost certainly the hidden bounce domain your email platform uses behind the scenes.
Your customer saw your business name. SPF verified your supplier's bounce address. DMARC noticed the two don't match.
This guide shows you how to spot the mismatch in 30 seconds, why it happens, and the two clean ways to fix it, plus why one of them protects you against a problem the other doesn't.
Both Results Are True at the Same Time
Picture an email showing billing@yourbusiness.co.uk in the From line. Behind the scenes, the sending platform uses bounce.vendor.example as its envelope sender (also called MAIL FROM or Return-Path).
The vendor's server connects to the recipient. The recipient checks SPF against bounce.vendor.example. The vendor's server is on that domain's list. SPF passes. Correctly.
But SPF never looked at yourbusiness.co.uk.
RFC 7208 defines SPF around the MAIL FROM and, sometimes, HELO identities. Not the visible From address.
DMARC does look at the visible From address. It asks whether a passing SPF or DKIM result aligns with it. RFC 9989 defines this.
So "spf=pass" and "dmarc=fail" aren't contradictory. One authenticated the vendor's bounce domain. The other noticed that's not the domain your reader saw.
The DMARC alignment guide explains the full comparison.
What It Looks Like in a Header
Here's a simplified example:
From: Your Business <billing@yourbusiness.co.uk>
Return-Path: <bounce-12345@bounce.vendor.example>
Authentication-Results: mx.receiver.example;
spf=pass smtp.mailfrom=bounce.vendor.example;
dkim=pass header.d=vendor.example;
dmarc=fail header.from=yourbusiness.co.ukRead it like this:
- header.from = yourbusiness.co.uk (what the customer sees)
- smtp.mailfrom = bounce.vendor.example (what SPF checked)
- header.d = vendor.example (what DKIM checked)
Neither SPF nor DKIM passed for anything in the yourbusiness.co.uk family. DMARC fails.
Get the Receiver's Trusted Result
Use a delivered email from the affected tool, sent to a mailbox you control. Open the raw original and find the Authentication-Results line added by your receiving service. RFC 8601 defines this field.
Copy:
- The SPF result and the smtp.mailfrom domain
- The DMARC result and header.from domain
- The DKIM results too, because an aligned DKIM pass could rescue DMARC even if SPF can't
Record which service received it, the UTC time, the message ID and which feature sent it.
Don't trust a lower Authentication-Results line just because it says pass. Use the one your receiver added.
Keep the full header private. Share only redacted lines and the domains needed.
If no email gets delivered, use the full bounce and ask the provider for the envelope domain and authentication evidence for that event.
Reading the receiver's results in headers walks through this.
Write the Three Identities Down
Make a short note:
- Visible From domain
- SPF-authenticated domain (MAIL FROM or HELO)
- DKIM d= domain, if present
Keep subdomains exactly. Don't shorten bounce.eu.vendor.example to "vendor" or swap it for the address customers see.
Remember what an SPF pass actually means: the connecting IP matched the policy for that envelope domain. It doesn't identify who wrote the email, prove the content wasn't changed or show your From address was authorised.
Relaxed vs strict SPF alignment
- Relaxed (the default): domains only need to share the same organisational domain. So bounce.yourbusiness.co.uk aligns with yourbusiness.co.uk.
- Strict (aspf=s in your DMARC record): domains must match exactly. So even bounce.yourbusiness.co.uk wouldn't align with yourbusiness.co.uk.
RFC 9989 defines both.
An unrelated vendor domain won't align in either mode. And if you've set strict mode, even your own subdomain can fail. Check your record before assuming.
Find Out Which System Chose the Envelope Sender
Name the application and feature that sent the email. A finance platform, marketing tool, help desk and website can each choose a different return path while showing the same visible address.
Look in that service's settings for:
- Custom return path
- Custom bounce domain
- Custom MAIL FROM
- Branded sending domain
Then look up SPF for the exact domain the receiver recorded. Confirm there's one valid policy and the observed IP is authorised as the provider documents. That explains why SPF passed. It doesn't fix alignment.
If the authenticated domain belongs to the supplier, you probably don't control its SPF record, and you shouldn't try to copy it under your root domain.
Two Ways to Fix It (and Why You Might Want Both)
Fix 1: A custom return path on your own subdomain
Many platforms let you set the envelope sender to a subdomain you own, like bounce.yourbusiness.co.uk. Usually you publish a CNAME (or sometimes TXT) record pointing that subdomain at the platform, then verify it in the platform's settings.
Once active:
- SPF checks bounce.yourbusiness.co.uk
- That aligns with yourbusiness.co.uk under relaxed alignment
- DMARC can pass through SPF
Check the exact hostname, account and region in the provider's current instructions.
Fix 2: Aligned DKIM
If the platform signs with your domain (or an aligned subdomain) and the signature passes, DMARC can pass through DKIM, even if SPF only passes for the vendor's domain.
That usually means enabling "custom DKIM" or "domain authentication" in the platform. See why DKIM can pass while DMARC fails for the details.
Why both is better
Here's the trade-off nobody explains clearly.
- Aligned SPF survives content changes (footers, rewritten links), but breaks when an email is forwarded, because the forwarder's IP isn't authorised
- Aligned DKIM survives ordinary forwarding, but breaks if the message content is changed after signing
So if you only fix SPF alignment, every customer who auto-forwards your emails to another account will see DMARC fail. Fix DKIM too, and forwarding stops being a problem.
Many platforms support both. Set up both where you can.
What not to do:
- Don't change your visible From to a supplier domain just to get alignment, unless that address genuinely suits your recipients
- Don't weaken your DMARC policy to hide one route's mismatch
Publish Without Breaking Anything That Works
Take a DNS snapshot first. Check the requested names for existing records.
- If the provider needs an SPF policy at a custom return path subdomain, publish it at that exact name
- Don't automatically add the provider's include to your root SPF record, unless your root domain really is the MAIL FROM identity for that route
- Never create a second v=spf1 record at the same name
RFC 7208 allows only one SPF policy per name and limits DNS lookups. Avoid copying raw shared IP addresses unless the provider explicitly supports that.
For custom DKIM, publish the account-specific selector without overwriting another sender's. Then go back to the platform to complete verification and switch signing on. DNS alone may not activate it.
Record the old and new values, TTL, approver, activation status and rollback plan. The smallest supported change is safer than restructuring authentication for every sender at once.
The SPF repair guide covers record changes safely.
Prove It on a New Email
Once DNS is public and the platform shows the custom domain as active, send a plain, harmless test through the same application, account, From address and feature, to the same receiving service.
Open the raw original. Record:
- SPF result and smtp.mailfrom
- DKIM result and header.d
- DMARC result and header.from
The fix is proven when at least one passing identity aligns (under your configured mode) and the receiver reports DMARC pass. An SPF pass alone isn't the goal.
Also check:
- Bounce processing still works (a custom return path that aligns but stops the platform handling bounces isn't a complete fix)
- Replies still reach the right place
- An important existing route still passes, so nothing else broke
Still failing? Compare the new identities with the old. Did the provider activate a different account? Is strict alignment set? Was DNS published at the wrong name? Did the test use a different feature?
A Worked Example: Fixing a Help Desk That Fails DMARC
Let's follow a fictional Nottingham IT support company, Fernleigh Tech, whose help desk replies keep landing in customers' spam folders.
A customer forwards a spam-folder copy's headers:
From: Fernleigh Support <support@fernleightech.co.uk>
spf=pass smtp.mailfrom=bounces.helpdesk.example
dkim=pass header.d=helpdesk.example
dmarc=fail header.from=fernleightech.co.ukClassic. Both checks passed for the help desk vendor's domains. Neither aligned.
Fernleigh's admin logs into the help desk settings and finds an "email authentication" page offering:
- A custom bounce domain: point bounces.fernleightech.co.uk at the vendor with a CNAME
- Custom DKIM: two CNAME records for selectors
He checks his DNS snapshot. Neither name is in use. He publishes both, waits for them to appear publicly, then clicks "Verify" in the help desk.
Next ticket reply, the headers read:
spf=pass smtp.mailfrom=bounces.fernleightech.co.uk
dkim=pass header.d=fernleightech.co.uk
dmarc=pass header.from=fernleightech.co.ukBoth aligned. He sends a test reply to an address that auto-forwards to Gmail: SPF fails at the forwarder, but DKIM carries DMARC. He checks a normal staff email still passes. Done.
The fix took fifteen minutes once the evidence pointed at the right system.
Where This Typically Happens in a Small Business
SPF pass, DMARC fail almost always involves a third-party tool sending as you. The usual suspects:
- Help desk and ticketing tools
- Email marketing and newsletter platforms
- CRMs and sales sequence tools
- Invoicing and accounting software
- Booking and appointment systems
- E-commerce platforms
Most of these support custom return paths, custom DKIM or both. The settings are usually under something like "domain authentication", "sending domain" or "email settings".
Go through your sender inventory and check each tool once. It's often an afternoon's work that fixes alignment across your whole business.
When to Escalate
Escalate to the provider if its dashboard says "authenticated" but the receiver still shows its own envelope domain and no aligned DKIM. Give them:
- UTC event time
- Redacted receiver results
- Visible From domain
- SPF identity seen
- DKIM signer and selector
- Your DMARC alignment mode
- Relevant public DNS answers
Ask them to check that exact event in their logs and confirm which custom MAIL FROM the account should be using. If they claim alignment through SPF, ask for the exact envelope domain. If through DKIM, ask for the expected signing domain and selector. Then compare their answer with your next test, rather than accepting a settings screenshot.
Escalate internally if a DNS request would overwrite an unknown record, several critical senders share the domain or strict alignment was switched on without a compatibility review.
Don't Chase a Cosmetic Pass
It's tempting to make DMARC go green by lowering the policy, switching to a misleading From address or adding every IP you've seen. Those changes widen your risk and leave the route's ownership unclear.
The real fix connects the identities: a custom return path, aligned DKIM or both. Then same-route evidence proves the connection.
How DMARC Reports Show This Problem
If you're getting DMARC aggregate reports, SPF pass with DMARC fail has a recognisable fingerprint. Look for rows where:
- The raw SPF result is pass, but for a domain that isn't yours (like bounces.vendor.example)
- The policy_evaluated SPF value is fail (because it didn't align)
- DKIM is either missing, failing or passing for the vendor's domain
Group those rows by source and SPF domain. Each group usually points to one third-party tool. That's your fix list, ready-made.
How to read DMARC reports walks through the fields in detail.
Strict Alignment: When Your Own Subdomain Isn't Enough
There's one version of this problem that confuses even experienced admins.
You've set up a custom return path on bounce.yourbusiness.co.uk. SPF passes for it. And DMARC still fails.
Check your DMARC record for aspf=s. Strict SPF alignment requires the envelope domain to match the From domain exactly. bounce.yourbusiness.co.uk isn't exactly yourbusiness.co.uk, so it fails.
You have two choices:
- Switch to relaxed alignment (the default) by removing aspf=s, if nothing in your design genuinely needs strict mode
- Rely on aligned DKIM signed with exactly your From domain
For most small businesses, relaxed alignment is the sensible choice.
The Takeaway
SPF pass with DMARC fail means SPF verified your supplier's bounce domain instead of yours. Fix it at the source: set a custom return path on your own subdomain, enable aligned DKIM, or ideally both. Then prove it with a fresh email through the same route. Never chase a green DMARC result by weakening your policy or authorising addresses you can't explain.
Frequently Asked Questions
Why does SPF pass but DMARC fail?
Because SPF passed for the envelope (Return-Path) domain, which doesn't match your visible From domain. DMARC requires alignment.
How do I make SPF align for DMARC?
Use a custom return path (envelope sender) on a subdomain of your From domain, if your sending platform supports it.
Is it better to fix SPF alignment or DKIM alignment?
Ideally both. Aligned DKIM survives forwarding, which aligned SPF doesn't. If you can only do one, aligned DKIM is usually more robust.
What is smtp.mailfrom in email headers?
It's the envelope sender domain that SPF checked, shown in the Authentication-Results line.
Does strict SPF alignment cause this?
It can. With aspf=s, even your own subdomain used as a return path won't align. Check your DMARC record.
Can I just add the vendor's domain to my SPF record?
That won't help. The vendor's bounce domain is checked against its own SPF record, not yours, and it still won't match your From domain for DMARC.
How do I know which tool is sending the failing emails?
Look at the smtp.mailfrom and DKIM header.d domains in the failing email's headers. They usually name the vendor. DMARC reports can show which source IPs and domains are involved.
Will fixing this affect my bounce handling?
It shouldn't, as long as the custom return path points to your provider as instructed. After the change, send a test to a safe invalid address (where your provider allows) and confirm bounces are still processed.
Sources and further reading
- RFC 7208: Sender Policy Framework
- RFC 9989: Domain-based Message Authentication, Reporting, and Conformance
- RFC 8601: Message Header Field for Indicating Message Authentication Status