SiteTidy
HomeGuidesTroubleshooting DMARC Failures (Part 2): SPF, Alignment and Forwarding
DNS

Troubleshooting DMARC Failures (Part 2): SPF, Alignment and Forwarding

Diagnose SPF-related DMARC failures, including envelope-domain alignment, DNS lookup limits, forwarding, third-party senders and safe SPF design.

Published on August 15, 2026Updated August 31, 2026
Troubleshooting DMARC Failures (Part 2): SPF, Alignment and Forwarding

SPF is simple right up until a domain has six SaaS platforms, two marketing systems, a support desk, an old application server and somebody forwarding mail through another mailbox.

Then the usual advice — “just add the sender to SPF” — becomes dangerous.

For DMARC troubleshooting, the most important thing to remember is this:

SPF can pass and DMARC can still fail. SPF can fail and DMARC can still pass.

That is not contradictory. DMARC cares about aligned authentication, and DKIM gives it another path.

What SPF actually authenticates

SPF authorises hosts to send using an SMTP identity associated with a domain.

It does not directly authenticate the human-visible From header.

A message might contain:

From: alerts@example.com
Return-Path: bounce-93821@vendor-mail.example

The provider may have immaculate SPF for vendor-mail.example.

That proves the sending IP is authorised for the provider’s envelope domain. It does not, by itself, prove anything about example.com.

For DMARC to use SPF successfully, the SPF-authenticated domain needs to align with the RFC5322.From domain according to the domain’s alignment mode.

Why custom return-path domains matter

Many email platforms solve SPF alignment by letting you configure a custom MAIL FROM, bounce or return-path domain such as:

bounce.example.com

The message can then look conceptually like:

From: news@example.com
Return-Path: campaign-123@bounce.example.com

If SPF passes for bounce.example.com, relaxed alignment can give DMARC an aligned SPF path with example.com.

This is usually better than trying to make a third-party vendor’s shared envelope domain somehow represent your organisation.

The exact terminology varies by platform:

  • custom return path
  • custom MAIL FROM
  • bounce domain
  • envelope sender domain
  • branded sending domain

When diagnosing a vendor, find out which identity the product actually lets you delegate.

Read SPF from the receiver’s result

A useful header might say:

Authentication-Results: mx.receiver.example;
    spf=pass smtp.mailfrom=bounce.example.com;
    dkim=pass header.d=vendor.example;
    dmarc=pass header.from=example.com

SPF is doing the aligned work here.

Now compare:

spf=pass smtp.mailfrom=vendor.example;
dkim=pass header.d=vendor.example;
dmarc=fail header.from=example.com

Both mechanisms authenticate successfully, but neither domain aligns with the visible From domain.

That is not an SPF syntax problem. It is a sender configuration/alignment problem.

Do not build SPF by copying every IP you see

An SPF record is an authorisation policy, not a historical list of sending IPs.

If a vendor documents:

include:_spf.vendor.example

and supports that integration, use its documented mechanism rather than scraping today’s IP addresses from message headers.

The provider may change infrastructure. Hard-coded IPs can silently become stale.

Equally, do not add an include: simply because a vendor’s name appears somewhere in a report. Establish whether that vendor is legitimately sending mail using your domain first.

An unknown source in DMARC reporting may be:

  • a forgotten legitimate service
  • a forwarding intermediary
  • a security gateway
  • an unauthorised SaaS account
  • spoofed mail
  • a service sending with the wrong domain

Authorising all unknown sources would defeat much of the point of DMARC.

The DNS lookup limit is a real engineering constraint

SPF evaluation has a limit on DNS-querying mechanisms and modifiers. Large organisations often hit trouble after years of adding provider includes.

A record such as:

v=spf1 include:_spf.google.com include:mail.vendor-a.example include:vendor-b.example include:vendor-c.example include:vendor-d.example -all

may look reasonable while hiding a deep tree of nested includes, a, mx, redirects and other DNS work.

The visible number of include: entries is therefore not the whole count.

If SPF evaluation exceeds the protocol’s permitted DNS lookup budget, receivers can return a permanent error rather than the pass you expected.

Do not “fix” this by flattening blindly

SPF flattening replaces dynamic provider mechanisms with IP addresses.

It can reduce DNS lookups, but it transfers responsibility for keeping those IP ranges current to you. If a provider changes its network and your flattened record does not update, legitimate mail can fail.

Before flattening, reduce the problem structurally:

  • remove dead senders
  • separate distinct mail streams onto sensible subdomains
  • use vendor-supported delegated domains
  • eliminate redundant mechanisms
  • understand nested includes

Flattening can be an operational technique. It is not free complexity removal.

Multiple SPF records are not redundancy

Do not publish two independent SPF TXT records for the same identity, for example:

v=spf1 include:_spf.google.com -all

and separately:

v=spf1 include:mailer.example -all

That does not mean “allow either”.

Build one valid SPF policy for the domain.

This mistake often appears after different teams independently configure services through the DNS provider’s UI.

-all, ~all and the false comfort of softfail

At the end of an SPF record you commonly see:

-all

or:

~all

These communicate different SPF results for non-authorised senders, but do not confuse that with DMARC enforcement.

DMARC has its own policy layer.

A domain can have a strict-looking SPF -all and a DMARC p=none, or a more permissive SPF result while DKIM provides the aligned DMARC pass.

Design each mechanism for what it actually controls.

Forwarding is where SPF’s topology shows

Classic forwarding can break SPF because the forwarding server becomes the machine delivering the message to the final receiver.

Imagine:

original sender -> mailbox A -> forwarding service -> Gmail

The final receiver sees the forwarding service’s IP trying to use the original envelope identity. That IP may not be authorised by the original sender’s SPF policy.

So SPF can fail even though the original submission was legitimate.

This is one reason DKIM is so valuable: a valid DKIM signature can survive forwarding if the message is not modified in a way that breaks the signature.

DMARC can therefore still pass through aligned DKIM even when SPF no longer does.

SRS helps forwarding SPF, but does not replace DKIM

Forwarders can use Sender Rewriting Scheme (SRS) to rewrite the envelope sender into a domain the forwarder is authorised to use.

That can repair SPF evaluation for the forwarded hop.

But from a DMARC perspective, a rewritten envelope domain may no longer align with the original visible From domain.

So SRS is useful mail-forwarding infrastructure, not a universal DMARC alignment solution.

For indirect mail flows, DKIM and technologies such as ARC become important parts of the broader picture. We cover those later in the series.

Third-party senders: choose an alignment strategy deliberately

For each SaaS sender, work out which of these models you are using.

Model A: aligned DKIM

From: example.com
DKIM d=: example.com
Envelope: vendor.example

SPF may be unaligned, but aligned DKIM can pass DMARC.

Model B: aligned SPF

From: example.com
Envelope: bounce.example.com
DKIM d=: vendor.example

SPF can provide the aligned pass.

Model C: both aligned

From: example.com
Envelope: bounce.example.com
DKIM d=: example.com

This is operationally attractive because one mechanism can survive a problem with the other.

Model D: neither aligned

From: example.com
Envelope: vendor.example
DKIM d=: vendor.example

The provider may truthfully say SPF and DKIM both pass. DMARC still fails.

DNS tells you the policy. Headers tell you what happened.

Use SiteTidy to inspect the public domain configuration, then confirm the real authentication path from a received message.

Run Free Audit →

Gmail’s current sender requirements reinforce the architecture

For direct mail from bulk senders, Gmail requires SPF and DKIM to be configured and requires the visible From domain to align with at least one of them for DMARC. Yahoo’s bulk-sender requirements follow the same practical principle: SPF, DKIM, DMARC and alignment matter together.

This is a good reason not to engineer a fragile system that “technically passes” through one accidental path.

Where your provider supports it, aim for well-managed SPF and aligned DKIM, with a clear inventory of every service authorised to use your domain.

How to investigate spf=fail

When a legitimate message has an SPF failure, ask these questions in order.

Is the failing domain actually yours?

If the envelope domain is the vendor’s domain, their SPF is their responsibility. Your DMARC problem may instead be that DKIM alignment is missing.

What IP did the receiver evaluate?

Use the receiver’s authentication result, not the IP your application server thinks it used.

There may be relays, gateways or provider infrastructure in between.

Does the published record authorise that route?

Trace mechanisms and nested includes.

Is there a permanent or temporary evaluation error?

A syntax problem, DNS failure or lookup-limit problem is different from a simple unauthorised-IP result.

Was the message forwarded?

If yes, SPF failure at the final receiver may be expected. Check aligned DKIM and the indirect-mail path before changing SPF.

SPF design for a growing organisation

A maintainable SPF programme is mostly an inventory problem.

Keep a table like:

Service Purpose From domain Envelope domain DKIM domain Owner Still active?
Workspace Staff mail example.com example.com example.com IT Yes
CRM Sales sequences example.com bounce.example.com example.com Sales Ops Yes
Old newsletter Marketing example.com vendor.example vendor.example ? Investigate

The last row is exactly the sort of thing DMARC reports are meant to expose.

Common SPF troubleshooting mistakes

Adding every observed IP to SPF. You can authorise spoofers and create an unmaintainable record.

Assuming SPF pass means DMARC pass. Alignment still matters.

Assuming SPF fail means DMARC fail. Aligned DKIM may pass.

Ignoring forwarding. SPF is sensitive to the delivery path.

Publishing multiple SPF records. Combine the policy correctly.

Flattening and forgetting. Provider ranges change.

Using SPF as a user-visible From control. It authenticates the SMTP identity; DMARC supplies the alignment relationship to visible From.

The principle to keep

SPF is best understood as route authorisation for an SMTP identity, not as a complete anti-spoofing system.

For DMARC, the question is not merely “did SPF pass?” It is:

Which domain passed SPF, and does that domain align with the From address the recipient sees?

Part 3 moves to DKIM — selectors, key lookup, signing domains, broken signatures, message modification and why DKIM is often the most robust DMARC path for third-party senders.

Ready to audit your site?

Put this guide into practice immediately using our free tools.

Browse 180+ Free Tools