SPF is a DNS TXT policy that authorizes which servers may use a domain in the SMTP MAIL FROM or HELO identity. It doesn't prove who wrote the message or authenticate the visible From address, and one SPF check can use no more than 10 DNS lookups.
You've scheduled a campaign through a marketing platform, and the test message lands in spam. The platform says SPF passed, but the From line shows your brand. Those results can both be true: SPF checks the sending server against an envelope-domain policy, not whether the visible brand identity is legitimate.
Table of Contents
ToggleWhat SPF Email Authentication Actually Proves
When a message leaves your marketing platform, the receiving server checks the connection and the sending identity used during SMTP delivery. It doesn't begin by judging the subject line. It sees the connecting IP address and the domain in the SMTP MAIL FROM address, also called the envelope sender or 5321.MailFrom, and it may check the HELO or EHLO identity.
Think of an envelope as a package delivered to a building. An access list can show which contractors are allowed to bring packages through the loading dock. It doesn't tell you who wrote the letter inside. SPF email authentication is that access list for sending infrastructure: a domain owner publishes a DNS TXT policy, and the receiver checks whether the connecting server is authorized for the envelope domain.
The distinction is built into the standard. RFC 7208's history records that SPF became a formal Internet standards-track technology through RFC 4408 in April 2006, then RFC 7208 replaced it as a Proposed Standard in April 2014. RFC 7208 defines authorization for servers using a domain in the SMTP MAIL FROM address or HELO/EHLO identity.
A pass therefore has a specific meaning: this IP was authorized by the policy for this envelope domain. It doesn't prove who composed the message, sign the message body, or encrypt the contents. It also doesn't establish that the visible From: domain belongs to the same identity. Traditional SMTP lets sending hosts claim a MAIL FROM domain without an authorization layer, so SPF added a documented way for domain owners to publish which servers may make that claim.
Read the result precisely: “SPF pass” means the server is authorized for the checked envelope identity. It isn't a general trust score for the email or the brand shown in the inbox.
For a marketer, the practical payoff is a single, consolidated record that names legitimate sources without exceeding the lookup budget. It's a reliable starting point for sender authorization, not the whole authentication setup. The receiver's result only makes sense once you know which domain SPF checked.
How Receivers Read an SPF Record
An SPF record starts with v=spf1, lists mechanisms, and usually ends with an all mechanism that sets the result when no earlier term matches. The receiver evaluates the terms from left to right and stops at the first match.
Consider this example:
v=spf1 ip4:203.0.113.10 include:_spf.example.com -all
If the connecting IP is 203.0.113.10, the ip4 term matches and evaluation returns pass. The receiver doesn't need to check the later include. If the IP doesn't match, the receiver checks the included policy; if nothing matches, -all returns fail.
A mechanism's qualifier changes the result it returns. A bare mechanism means pass, as does +. The - qualifier means fail, ~ means softfail, and ? means neutral. The terms themselves describe what the domain authorizes and, in some cases, use DNS lookups:
| Term | What it authorizes | Lookups used |
|---|---|---|
ip4 |
One IPv4 address or CIDR range | 0 |
ip6 |
One IPv6 address or range | 0 |
a |
A or AAAA addresses of a hostname | 1 or more |
mx |
Hosts in that domain's MX records | 1 plus up to 10 A or AAAA queries per MX |
include |
Another domain's SPF policy, then return here | 1 plus every nested lookup |
exists |
Whether a constructed domain name resolves | 1 |
ptr |
Reverse DNS of the connecting IP, discouraged | 1 or more |
all |
Default result when nothing earlier matched | 0 |
redirect |
Abandon this record and evaluate another domain | 1 plus that domain's policy |
Use ip4 or ip6 when you control a dedicated server with stable addresses. They don't consume the DNS lookup budget. For Google Workspace, Microsoft 365, or an email service provider (ESP), use the provider's documented include term; it lets the provider maintain its own sending ranges. But an include can bring nested lookups along with it.
An a or mx term may look compact while still requiring address lookups. ptr is defined, but it's discouraged because reverse-DNS evaluation can be slow and unreliable. redirect is different from a mechanism that tries a match and then continues: it hands evaluation over to another domain's policy.
A domain needs one effective SPF record. Publishing two TXT records that both start with v=spf1 doesn't split vendors cleanly; it creates an error. Label each term in your own record, then test an authorized sending IP and one that shouldn't be authorized. That tells you whether the policy returns the results you intended.
SPF Beside DKIM and DMARC
SPF, DKIM, and DMARC answer different questions. Keeping those jobs separate helps explain why an SPF pass can coexist with a failed DMARC check.
| Check | What it binds | Usually survives forwarding | Gmail bulk senders since Feb 1 2024 |
|---|---|---|---|
| SPF | Connecting IP to MAIL FROM or HELO domain | No | Required, together with DKIM and DMARC |
| DKIM | Selected headers and body via a DNS public key | Yes, if the signature isn't broken | Required |
| DMARC | Visible From aligned with SPF or DKIM, plus a policy | Uses whichever aligned result still passes | Required |
| Alignment | Relaxed organizational match or strict exact domain | SPF alignment is often lost | One of SPF or DKIM must align |
SPF checks authorization for the envelope domain. DKIM checks whether a cryptographic signature over selected message headers and the body verifies using a public key published in DNS. DMARC checks whether SPF or DKIM authenticated a domain that aligns with the visible From: domain. It also lets a domain owner publish how receivers should handle messages that fail DMARC: none, quarantine, or reject.
Alignment can be relaxed, meaning the domains match at an organizational level, or strict, meaning they match exactly. A newsletter platform may pass SPF for its own bounce or envelope domain, but that result won't satisfy DMARC for the company's visible From domain unless it aligns. An aligned DKIM result can satisfy DMARC even when SPF doesn't align.
Google's rules for mail sent to Gmail accounts distinguish ordinary senders from bulk senders. The Gmail sender requirements became mandatory for messages to Gmail accounts on February 1, 2024: all senders must authenticate with SPF or DKIM, while bulk senders must use SPF, DKIM, and DMARC. For DMARC to pass, at least one of SPF or DKIM must align with the visible From domain. Google also requires valid forward and reverse DNS, including PTR records, so a correct TXT policy can't compensate for sending infrastructure with invalid DNS.
That distinction helps put adoption figures in context. In 2024, 66.2% of surveyed senders reported using both SPF and DKIM, while 4.8% reported using SPF alone, according to Sinch Mailjet's deliverability report. SPF is useful, but relying on it alone leaves the visible From identity and message signature unchecked.
A practical rollout is straightforward: authorize every system that uses your envelope domain, enable DKIM aligned with your From domain, and review DMARC reports before moving from p=none to a rejecting policy. Use a DMARC checker to review whether SPF or DKIM results align with the domain recipients see.
The Ten Lookup Budget and Permerror
One SPF check can spend at most 10 DNS lookups. Ten is a hard ceiling, not a safe target to exceed or approach without checking the full policy. Terms such as include, a, mx, exists, and redirect use lookup capacity; nested includes draw from the same pool, so a short-looking record may still exceed the limit. Microsoft's SPF configuration guidance explains that exceeding the ceiling produces a permanent error, commonly called permerror.
Here's a hypothetical record assembled from common vendor relationships. The top-level policy has four service includes, but each can expand into additional lookups.
| Term | Lookups spent | Running total |
|---|---|---|
| Marketing include plus three nested includes | 4 | 4 |
| CRM include plus two nested lookups | 3 | 7 |
| Support include plus one nested include | 2 | 9 |
| Transactional include | 1 | 10 |
| MX term plus MX host address lookup | 2 | 12 |
| Result against the limit of 10 | 12 | permerror |
The count reaches 12, two above the allowed maximum. The receiver returns permerror instead of treating the sender as successfully authorized, even if the message is legitimate. It's the expanded policy that matters, not how many terms fit on the visible line.
MX has an additional wrinkle. Each MX host can cause up to 10 A or AAAA address queries, and the RFC recommends keeping void lookups, DNS responses with no usable answer, to two; exceeding the applicable limits can also produce permerror. That's why v=spf1 mx -all is less predictable than it looks. The RFC 7208 specification details describe these MX-specific and void-lookup restrictions.
To bring a record back under control, work through the sending stack before changing policy:
- Inventory live senders: List the marketing, CRM, support, transactional, and other services that send using the domain.
- Remove retired vendors: Delete authorizations for systems that no longer send.
- Use static addresses selectively: Move stable, dedicated servers to
ip4orip6terms, which use no lookup units. - Reduce nested policies: Avoid stacking services whose own records pull in multiple other policies.
- Keep one record: Consolidate providers in the domain's single effective SPF TXT record.
Flattening includes into IP ranges can free lookup capacity, but there's a trade-off: vendors may change their ranges, leaving a manually copied list outdated. Review the complete policy whenever the sending stack changes.
Why Forwarding Breaks a Passing Record
A customer receives your newsletter at a university address and forwards it to Gmail. The original send passed SPF because the ESP's sending IP was authorized. On the forwarded delivery, the connecting IP belongs to the university's mail server. If your SPF record doesn't authorize that server, SPF fails by design.
The original sender usually can't repair this by editing its SPF record after the forward. The receiver sees the forwarder's IP, not the original ESP's IP, and adding every university, corporate mail server, alias, and mailing list would make an authorization policy unmanageable. It can also add DNS complexity without fixing the underlying identity mismatch. The forwarding and mailing-list explanation describes why a legitimate forwarded message can fail SPF even though the first delivery passed.
The fix belongs to the party that controls the relevant part of the route:
- Original sender: Publish DKIM for the message and keep it aligned with the visible From domain. DKIM can still verify after forwarding if the forwarder doesn't change signed headers or the signed body.
- Forwarding service: Implement the Sender Rewriting Scheme (SRS), which rewrites the envelope so the forwarded transmission can pass SPF for the forwarder's domain. SRS doesn't restore alignment with the visible From domain.
- Final receiver: Decide whether to trust an Authenticated Received Chain (ARC) that carries earlier authentication results. ARC can preserve that evidence, but the receiver makes the final trust decision.
The distinction to keep on the dashboard is SPF pass isn't the same as DMARC pass. SRS may make SPF pass for the forwarder while still leaving SPF unaligned with your From domain. If aligned DKIM survives, DMARC can pass through DKIM instead.
A short video offers another way to see the forwarding problem in context:
Don't stuff forwarding services into your SPF record. Keep aligned DKIM in place, leave DMARC reporting enabled, and treat forwarding failures as a routing and authentication-stack issue rather than assuming your TXT record needs another vendor.
Sample SPF Records for Real Sending Stacks
Use a sample as a pattern, not as a list of settings to copy blindly. Each policy applies to the envelope domain used by that sending system. Confirm that the service sends with that domain, then use the include or address range documented for your own account.
One service or a small sending stack
Company mail through Google Workspace only
v=spf1 include:_spf.google.com -all
This authorizes Google's documented sending infrastructure for the envelope domain. Mail from an authorized Google server can pass; a server that isn't authorized should fail.
Google Workspace plus one marketing platform
v=spf1 include:_spf.google.com include:_spf.esp.example -all
Keep both services in one TXT SPF record if both really send using this envelope domain. Replace the placeholder with the include documented by your ESP. If the platform uses its own bounce domain, its SPF pass may be for that domain, not your brand's From domain.
Dedicated app server with a stable address
v=spf1 ip4:203.0.113.10 -all
This authorizes the listed IPv4 address for the envelope domain and uses no DNS lookup units for the ip4 mechanism. Use this pattern only when the address is stable and you control the sending setup.
The record that looks tidy but fails
Suppose a domain authorizes marketing, CRM, support, and transactional platforms, and their nested policies exceed the lookup ceiling. The visible record might contain only a few includes and still return permerror for legitimate mail. Don't solve that by adding a second SPF record; inventory the senders and simplify the policy instead.
Once you've confirmed every live sender, -all sets an explicit fail for sources that aren't authorized. ~all can be a temporary softfail while you test a new vendor, but it isn't a substitute for finishing the sender inventory. A SPF and DKIM checker can help inspect the public record and the signing setup; then send from the actual platform to verify the result.
Run a Spam Test Before You Send
A DNS record can look right and still behave differently on a real message. Check the published policy, then test from the same ESP or CRM that will send the campaign.
- Publish one TXT record: Start with
v=spf1, list every live sender that uses the envelope domain, and use-allonce the inventory is complete. - Read back the public record: After DNS updates, query a public resolver so an old cached copy doesn't mislead you.
- Send a real test: Use the same ESP or CRM as the campaign, not a personal mailbox on a different domain.
- Check Authentication-Results: Confirm
spf=passand verify that thesmtp.mailfromdomain is the one you authorized. - Handle permerror first: Remove or simplify nested includes before changing DMARC.
- Separate SPF from alignment: If SPF passes but DMARC fails, check DKIM alignment instead of adding unrelated IP addresses.
For a real-message check, use an email spam test from the homepage. Send an email from an existing ESP or CRM, such as Mailchimp, ActiveCampaign, or Gmail, to the seed-list address shown on screen. The basic test is free and doesn't require an account; its report checks spam, broken code, and authentication issues, including SPF, DKIM, and DMARC, and guides you through fixes.
Run the test again after each change. A result from a different mailbox or platform doesn't confirm the configuration your campaign will use. For broader sending hygiene beyond authentication, Outbound Consulting's guide to an approach to preventing spam is a useful companion.
Once the message passes from the sending platform, keep SPF on your review list whenever you add or remove a vendor. Then check inbox placement as well as authentication, so the next campaign starts with evidence from the setup you'll use.
MailGenius checks SPF, DKIM, DMARC, and BIMI in one authentication scan and guides you through fixes. Run a free test on a real campaign message, then visit MailGenius to review the results before you send.


