Table of Contents
- When a Good Email Campaign Starts Going to Spam
- The first investigation sequence
- How Sender Policy Framework Works
- A receiver-side walkthrough
- Why the visible From address causes confusion
- How SPF Works With DKIM and DMARC
- Two message paths
- Building a Safe SPF Record
- Build the source inventory
- Use one authoritative policy
- Deploy in a controlled sequence
- Why SPF Needs Ongoing Oversight
- Count nested lookups, not visible entries
- Establish ownership and cadence
- Common SPF Mistakes to Avoid
- High-risk patterns and their corrections
- Match the symptom to the fix
- Testing SPF and Protecting Deliverability
- A repeatable review routine
- SPF Questions and Practical Answers
- Can a domain have multiple SPF records?
- Why can legitimate mail show SPF fail after a platform switch?
- Do nested includes count toward the lookup limit?
- Does SPF guarantee inbox placement?

Do not index
Do not index
A campaign can keep the same offer, audience, copy, and creative while inbox placement deteriorates overnight. The immediate symptoms may look like a marketing problem, but the cause is often buried in DNS, an authentication result, a newly introduced sending platform, or a sender reputation shift.
Sender Policy Framework, or SPF, is one of the first controls a deliverability specialist checks during that investigation. It tells receiving mail servers which sending hosts are authorized for a domain, but it doesn't guarantee inbox placement. A valid SPF result can support acceptance and reduce spoofing risk, while a broken record can create authentication failures that make legitimate mail harder for Gmail, Outlook, and Yahoo to evaluate.
Table of Contents
When a Good Email Campaign Starts Going to SpamThe first investigation sequenceHow Sender Policy Framework WorksA receiver-side walkthroughWhy the visible From address causes confusionHow SPF Works With DKIM and DMARCTwo message pathsBuilding a Safe SPF RecordBuild the source inventoryUse one authoritative policyDeploy in a controlled sequenceWhy SPF Needs Ongoing OversightCount nested lookups, not visible entriesEstablish ownership and cadenceCommon SPF Mistakes to AvoidHigh-risk patterns and their correctionsMatch the symptom to the fixTesting SPF and Protecting DeliverabilityA repeatable review routineSPF Questions and Practical AnswersCan a domain have multiple SPF records?Why can legitimate mail show SPF fail after a platform switch?Do nested includes count toward the lookup limit?Does SPF guarantee inbox placement?
When a Good Email Campaign Starts Going to Spam
Consider a marketing team that sends a routine campaign through its established platform. The content passes review, the recipient segment is unchanged, and the sending volume appears consistent. Yet opens fall, replies disappear, and more recipients report finding the message in spam.
The wrong first move is to rewrite the subject line. A technical triage should begin with the infrastructure that changed around the campaign. A new CRM integration, altered Return-Path domain, migrated mail provider, or incomplete SPF record can cause a previously authenticated stream to produce SPF failures.
The first investigation sequence
A practical review should follow the message path rather than guess at the creative:
- Check sending-platform changes. Confirm whether marketing, transactional, CRM, helpdesk, recruitment, or outbound systems were added, removed, or reconfigured.
- Read authentication results. Inspect the receiving message headers for SPF, DKIM, and DMARC outcomes. A visible From address can look correct while the SMTP envelope-from domain points somewhere unexpected.
- Review bounces and complaints. Separate hard bounces, soft bounces, spam complaints, and provider-specific rejection responses. Each points to a different failure mode.
- Compare domain and IP reputation. Look for reputation changes affecting the branded domain, dedicated infrastructure, or shared provider infrastructure.
- Validate recipient behavior. List quality, engagement, sudden volume changes, and complaint patterns can still push mail to spam after authentication passes.
SPF mainly authorizes a sending IP for the envelope domain. It doesn't verify the message content, prove that the visible From address belongs to the sender, or guarantee that a mailbox provider wants the message. A 2026 deliverability report found that emails with full SPF, DKIM, and DMARC still had spam placement rates above 30%, reinforcing the distinction between authentication and placement (2026 email deliverability report).
Authentication problems can reduce campaign conversions, interrupt password resets and receipts, expose the domain to impersonation, and delay diagnosis when teams focus only on content. Teams reviewing volume changes should also document email warm-up strategies explained, especially when a new platform or sending identity has entered production.
How Sender Policy Framework Works
A marketing platform can show
news@example.com to recipients while delivering through a different bounce domain. That difference determines which SPF policy the receiving server evaluates. Sender Policy Framework is a DNS-based authorization protocol that lets a domain owner publish approved sending mechanisms in a TXT record, then compare the connecting host's IP with that policy.SPF checks the SMTP envelope-from domain, not necessarily the address displayed in the recipient's From field. The envelope identity supports bounce processing and SMTP delivery, while the visible From address is handled separately. This distinction matters during provider migrations, because a new platform can send from an authorized IP while using an envelope domain the brand does not control.
A receiver-side walkthrough
The receiving server extracts the envelope domain, retrieves its SPF TXT record from DNS, and processes its mechanisms in order. A simplified record might look like this:
v=spf1 ip4:192.0.2.1 include:_spf.example-sender.com -allThe direct
ip4 mechanism authorizes the specified IPv4 address. The include mechanism directs the receiver to evaluate the referenced provider policy. Processing follows the record's sequence and stops at the first mechanism that matches the connecting IP, so both order and qualifiers affect the result.
The result describes authorization, not message quality:
- Pass: The connecting IP matches an authorized SPF mechanism.
- Fail: The IP does not match, and the policy explicitly marks the sender as unauthorized.
- Softfail: The IP does not match, but the policy signals a less forceful disposition.
- Neutral: The domain makes no assertion about the sending IP.
An SPF pass confirms that the envelope domain authorized the sending host. It does not confirm that the recipient requested the message, that the content is safe, that the visible From address is protected, or that the message will reach the inbox. Receiver-side enforcement can also apply local reputation and policy decisions after SPF evaluation.
Why the visible From address causes confusion
A common production failure occurs when a team verifies only the address recipients see. SPF may pass for a provider using an unrelated envelope domain, while the brand's visible identity remains unaligned. DMARC evaluates that relationship separately, which is why an authorized sending IP alone does not protect brand identity or guarantee inbox placement.
The practical troubleshooting question is: which envelope domain did the receiver evaluate, and does that domain's published policy authorize the sending IP? Answering those questions exposes stale vendor entries, missing mechanisms, and DNS changes that break authorization.
How SPF Works With DKIM and DMARC
SPF, DKIM, and DMARC solve different problems. Treating them as interchangeable creates gaps that often surface during forwarding, vendor migrations, and provider enforcement.
Protocol | Primary job | Main identity or evidence |
SPF | Authorizes the connecting sending host | SMTP envelope-from domain and sending IP |
DKIM | Verifies signed message content | Cryptographic signature and signing domain |
DMARC | Applies policy and alignment rules | Visible From domain, aligned SPF or DKIM |
SPF is the envelope-level authorization layer. DKIM attaches a cryptographic signature to the message, allowing the receiver to verify that signed content remains intact and that the signing domain vouches for it. DMARC evaluates whether SPF or DKIM authenticates in alignment with the visible From domain, then applies the domain's policy and reporting instructions.
Two message paths
Path one, SPF-led authentication: A marketing platform sends through an authorized host. The envelope-from domain publishes that host, SPF passes, and the authenticated envelope identity aligns with the visible From domain. DMARC can pass through SPF alignment.
Path two, DKIM-led authentication: A message is forwarded and the final receiving server sees the forwarder's IP. SPF may fail because the forwarder isn't authorized by the original envelope policy. If the DKIM signature survives and the signing domain aligns with the visible From domain, DMARC can still pass through DKIM alignment.
That difference matters because forwarding can alter the last-hop sending IP, while signed content can survive transit. A sender that relies only on SPF may misread forwarded-message failures as a complete authentication breakdown. A sender that relies only on DKIM may overlook envelope authorization, bounce handling, or a provider's specific requirements.
Teams managing the wider control set can use MailAdept's email authentication guidance to map each protocol to the correct identity and testing task. A dkim checker can verify the signature path separately from SPF.
Authentication remains only one input to placement. Mailbox providers also evaluate domain and IP reputation, recipient engagement, complaints, bounces, sending consistency, and content characteristics. Even strong alignment can't rescue a sender that repeatedly mails inactive recipients or generates complaints.
Operational details outside DNS matter as well. A consistent email signature management guide can help teams control branded identity across systems, but signatures themselves don't replace SPF, DKIM, or DMARC.

Building a Safe SPF Record
A safe SPF record begins with an inventory of actual sending systems, not a vendor's copied snippet. Marketing, IT, security, and operations should identify every service that sends mail for each relevant domain or subdomain. This authorization work directly affects whether receivers accept messages and whether legitimate traffic develops avoidable SPF failures.
Build the source inventory
For every source, document the exact envelope domain, sending purpose, provider, and authorization method:
- Marketing platform: Campaigns, newsletters, and automated journeys.
- Web application: Contact forms, account notices, and workflow messages.
- CRM: Sales alerts, lead assignments, and customer updates.
- Helpdesk: Ticket notifications and support replies.
- Recruitment system: Candidate communication and scheduling.
- Transactional provider: Password resets, invoices, receipts, and service events.
- Outbound system: Prospecting or sales sequences, if permitted by policy.
A legitimate platform can still fail SPF when the policy authorizes the wrong domain. Check production headers and confirm the envelope-from domain used by each provider. The branded From address shown in a dashboard may be different from the identity receivers evaluate for SPF.
Use one authoritative policy
For a small environment with one known sending host, a technically valid example is:
v=spf1 ip4:192.0.2.1 -allAn organization using a direct host, Google-managed mail, and a third-party sender might publish:
v=spf1 ip4:192.0.2.1 include:_spf.google.com include:mail.example-sender.com -allThe IP space and provider domains in these examples are for documentation only, not production authorization. A direct
ip4 or ip6 mechanism matches an address without the DNS lookup behavior of mechanisms such as include, a, mx, exists, and redirect. The SPF lookup mechanism guide explains how those mechanisms affect evaluation.Publish one SPF record for each domain. Separate TXT records are not combined by receivers and can produce a permanent SPF error. Merge approved sources into one policy, then remove obsolete entries only after the related sending stream has been retired and its traffic is no longer expected.

Deploy in a controlled sequence
- Inventory sources. Get written confirmation from every team that sends mail.
- Confirm the envelope domain. Inspect production headers from each provider.
- Draft one record. Merge direct IPs and provider includes without duplicating the SPF version tag.
- Check the published policy. Use the spf record checker to review syntax, authorization coverage, and lookup behavior.
- Send controlled tests. Confirm that receivers see the intended envelope domain and SPF result.
- Monitor before cleanup. Remove stale authorizations only after logs and test messages show that no legitimate stream depends on them.
The result should be a documented policy that authorizes current senders, excludes unknown infrastructure, and remains understandable when a provider changes its delivery architecture.
Why SPF Needs Ongoing Oversight
An SPF record can be accurate when published and incorrect after the next infrastructure change. A CRM migration, new helpdesk workflow, third-party automation, or dedicated subdomain may introduce a sender that the current policy does not authorize.
The reverse problem creates risk too. A retired platform can remain listed indefinitely, expanding the domain's authorized sending surface and complicating incident response. SPF is an operational authorization system, not a DNS task that ends after deployment.
Count nested lookups, not visible entries
Receivers enforce a 10 DNS lookup limit during SPF evaluation. A record may show only a few
include mechanisms, while each provider references further includes, a, mx, exists, or redirect mechanisms. Those nested evaluations use the same budget.A record with three vendor includes may look short, yet the vendors' policies can expand into several DNS-dependent mechanisms. The receiver may reach the limit before it evaluates the final authorization or
all mechanism. The result is an SPF evaluation error for legitimate mail.Flattening can replace provider lookups with the equivalent current IP mechanisms where appropriate:
v=spf1 ip4:192.0.2.1 ip4:198.51.100.7 -allThis lowers lookup consumption but creates maintenance work. Providers can change sending addresses, leaving a flattened record stale unless an automated update process keeps it current. Broad IP ranges also need careful validation because an overly permissive authorization reduces the policy's security value.
Establish ownership and cadence
Assign a named owner and maintain a source inventory.
- At each infrastructure change: Record the new envelope domain, provider include, and sending purpose.
- During regular reviews: Compare the DNS record with active platforms and decommissioned services.
- After provider changes: Send controlled messages and inspect SPF, DKIM, and DMARC results.
- During reputation incidents: Compare authentication failures with bounces, complaints, volume shifts, and placement changes.
- For new sending programs: Follow the email warmup guide alongside authentication testing.
Monitoring software can identify lookup errors and authentication failures. It cannot decide whether a vendor should remain authorized, whether a source belongs on a separate subdomain, or whether a sudden volume change is safe.
MailAdept is one option for SPF validation and deliverability oversight. The organization must retain responsibility for authorization decisions, DNS changes, and the review process.
Common SPF Mistakes to Avoid
The most damaging SPF failures are usually administrative rather than syntactical. Multiple teams edit DNS independently, vendors change their infrastructure, and no one maintains a complete source inventory.
High-risk patterns and their corrections
Mistake | Consequence | Corrective action |
Publishing multiple SPF records | Receivers may treat the policy as invalid, causing authentication failure for legitimate mail. | Merge every approved source into one authoritative record. |
Adding a second record instead of merging | A new platform may work in testing while an existing stream breaks in production. | Retrieve all current records, reconcile sources, then publish one combined policy. |
Ignoring a dedicated sending subdomain | The team may edit the root domain while the provider evaluates a separate envelope domain. | Verify the actual SMTP envelope-from domain in message headers. |
Leaving ~all indefinitely | Unauthorized sources are signaled but not strictly rejected by the SPF policy. | Use a testing posture during inventory, then choose enforcement only after coverage is verified. |
Copying a provider's sample record | The sample may omit internal infrastructure or collide with an existing provider authorization. | Treat vendor documentation as one input to a complete organization-wide record. |
Exceeding the lookup budget | Nested includes can produce an evaluation error even when the visible syntax looks valid. | Expand the policy, reduce DNS-dependent mechanisms, or use carefully maintained flattening. |
Leaving stale platforms authorized | Former vendors remain approved, increasing uncertainty during spoofing investigations. | Remove retired sources after confirming that no live stream uses them. |
A realistic nested failure might begin with a root record that includes a CRM, marketing platform, and transactional provider. The CRM includes another mail service, the marketing platform includes several regional policies, and the transactional provider adds an
mx mechanism. The visible record appears manageable, but the receiver evaluates the full chain and can exceed the lookup cap before finding a match.Match the symptom to the fix
- SPF syntax error: Inspect the record for malformed mechanisms, duplicate version declarations, or invalid delimiters. Correct the policy, publish it once, and retest.
- SPF fail from a legitimate platform: Confirm the envelope domain and add the provider's exact authorization, rather than authorizing the visible From domain by assumption.
- No policy found: Publish a valid SPF TXT record for the domain that appears in the envelope.
- Pass with continued spam placement: Investigate DKIM and DMARC alignment, reputation, complaints, bounces, engagement, and content. SPF authorization alone doesn't guarantee delivery.

Before changing DNS, verify the complete chain:
- Source coverage: Every active sending system is documented.
- Envelope identity: Each provider's actual SMTP envelope domain is known.
- Single policy: The domain has one SPF record, not several.
- Lookup evaluation: Nested mechanisms stay within the receiver's limit.
- Authentication alignment: SPF, DKIM, and DMARC are tested together.
- Reputation context: Bounces, complaints, and placement are reviewed separately from SPF.
Testing SPF and Protecting Deliverability
Testing should prove what a receiver evaluates, not merely confirm that a DNS record exists. Start with an SPF checker to inspect public visibility, syntax, authorization coverage, and the expanded lookup path.
A DNS lookup tool can retrieve the published TXT data for review. Controlled test messages then confirm the envelope domain, sending route, and receiver-visible
Authentication-Results header. The same test should record DKIM and DMARC outcomes so a team can distinguish an SPF problem from an alignment problem.A repeatable review routine
- Inspect the record: Check for one policy, valid syntax, current sources, and lookup safety.
- Test each stream: Send marketing, transactional, CRM, helpdesk, and outbound messages separately.
- Read receiver headers: Confirm the envelope domain and SPF result at external mailbox providers.
- Run companion checks: Use the dkim checker, dmarc checker, and blacklist checker.
- Prioritize by business risk: Fix authentication for password resets, receipts, support notices, and revenue-producing campaigns before lower-impact streams.
- Review the wider system: The email deliverability explanation helps teams separate authentication status from placement behavior.
Operational targets provide useful warning signals. A bounce rate below 2% is commonly used as an ideal reference, while spam complaints below 0.1% are a critical threshold for protecting sender reputation, as described in MailAdept's deliverability guidance. Typical open rates may range from 20% to 40% depending on context, so engagement comparisons should use the same audience, mailbox mix, campaign type, and measurement method.
An SPF pass supports acceptance and spoofing resistance. It doesn't override poor list hygiene, unstable volume, weak engagement, or complaint-heavy sending. The review process should therefore connect DNS evidence to the recipient and reputation signals that determine inbox placement.
SPF Questions and Practical Answers
Can a domain have multiple SPF records?
No. A domain should publish one authoritative SPF policy. Merge approved sources into that record instead of adding another.
Why can legitimate mail show SPF fail after a platform switch?
The new platform may use a different envelope-from domain or sending IP. Reconcile the new production path and authorize the correct source.
Do nested includes count toward the lookup limit?
Yes. The receiver evaluates nested DNS-dependent mechanisms, not only the visible
include entries. The total evaluation must remain within the SPF limit.Does SPF guarantee inbox placement?
No. SPF authorizes a sending host. Placement also depends on DKIM and DMARC alignment, reputation, complaints, bounces, engagement, list quality, content, and sending behavior.
MailAdept offers technical SPF, DKIM, and DMARC audits, source reconciliation, authentication monitoring, and deliverability support for marketing, transactional, and outbound systems. Visit MailAdept to request an assessment of the sender policy framework, alignment, reputation, and monitoring controls behind the organization's email program.
