TrekMail TrekMail
Deliverability & DNS

SPF Setup for Multiple Senders: Beat the 10-Lookup Limit

By Alexey Bulygin
SPF Setup for Multiple Senders: Beat the 10-Lookup Limit

Your SPF setup works fine with one sender. Then you add Google Workspace, Mailchimp, Zendesk, and a transactional API — and Microsoft starts bouncing mail with 550 5.7.515. The record that looked clean at launch just blew past the 10-lookup limit, and now every outbound message is failing authentication silently.

That's the trap. SPF has a hard ceiling baked into the protocol, and most teams hit it the moment a third or fourth sending service gets added. The usual fix — paste another include: — stops working right when you need it most. For the syntax basics, start with our SPF record for email guide. This article is about the architecture: how to design an SPF setup that handles multiple senders, survives vendor changes, and doesn't need rewriting every quarter.

Why SPF setup breaks with multiple senders

SPF setup breaks because RFC 7208 caps SPF evaluation at 10 DNS lookups per record. Every include, a, mx, exists, and redirect mechanism counts — and the count is recursive. If a vendor's include nests into three more includes inside their record, those all count against your budget. Hit 11 and receivers return PermError. Your mail gets rejected.

The failure pattern is always the same. You start with two includes and room to spare. Marketing adds HubSpot. Support adds Freshdesk. Engineering adds SendGrid for app alerts. Each vendor's include chain nests deeper than the docs suggest. Suddenly you're at 12 lookups and Google returns 550 5.7.26 on every message.

MechanismCosts a lookup?Operator note
include:Yes (plus nested)Standard for vendors, but nests unpredictably
ip4: / ip6:NoFree — use for any static sender you control
mxYesOften overused; replace with ip4 when possible
aYesInefficient for SPF; prefer ip4
ptrYesDeprecated. Don't use it
redirectYesTransfers evaluation to another domain's record
-all / ~allNoPolicy terminator — always include one

The math isn't complicated. It's just invisible until something breaks. That's why SPF setup for multiple senders has to start with architecture, not copy-paste.

Audit your SPF record before adding anything

The first step in any multi-sender SPF setup is removing what shouldn't be there. Most domains carry dead includes from services cancelled months or years ago, and every one of them wastes lookup budget. Prune first. Build second.

Check what's actually published:

dig txt yourdomain.com +short

Then trace each include to see how deep it goes:

dig txt _spf.google.com +short
dig txt spf.protection.outlook.com +short

Cross-reference against your DMARC aggregate reports. If no traffic is actually coming from a vendor's IPs, that include is dead weight. Delete it.

Three quick wins during an audit:

  1. Replace mx with the actual IP using ip4: — saves a lookup.
  2. Remove includes for services you no longer use.
  3. Check for duplicate SPF records — two TXT records starting with v=spf1 on the same domain cause an immediate PermError.

This alone often frees 2-3 lookups. For a detailed cleanup walkthrough, see our SPF record setup guide.

Subdomain segmentation: the only SPF setup that scales

The only SPF setup that reliably handles multiple senders without hitting the 10-lookup ceiling is subdomain segmentation. SPF is evaluated against the Return-Path domain — not the visible From header. Move non-corporate senders to subdomains and each stream gets its own fresh budget of 10 lookups.

Here's the pattern:

Root domain — human mail only

Keep the root domain clean. Only your primary mailbox provider goes here.

v=spf1 include:spf.trekmail.net -all

One include. One lookup. The CEO's email never breaks because marketing bolted on a new tool.

Marketing subdomain — campaigns and newsletters

; news.example.com
v=spf1 include:spf.hubspot.com include:servers.mcsv.net -all

HubSpot and Mailchimp burn lookups against news.example.com, not the root. If this subdomain gets rate-limited, corporate mail keeps flowing.

Support subdomain — ticketing systems

; help.example.com
v=spf1 include:mail.zendesk.com -all

Transactional subdomain — app alerts and receipts

; alerts.example.com
v=spf1 include:amazonses.com -all

When Zendesk sends as support@help.example.com, the receiver checks DNS for help.example.com. It never touches the root domain's SPF record. That's the whole point.

Old wayNew way
Every sender crammed into one root SPF recordRoot domain holds only primary mailbox provider
One vendor change can break all outbound mailFailures isolated to the affected subdomain
Lookup budget shared across everythingEach subdomain gets its own 10-lookup budget
SPF rewrites every time you add a toolArchitecture survives vendor churn

SPF flattening: the last resort

If business requirements force all mail to come from the bare domain — no subdomains allowed — SPF flattening is the escape hatch. Flattening resolves vendor includes into raw IP addresses and lists them as ip4: mechanisms, which cost zero lookups. It works, but it creates a maintenance problem.

The risk is staleness. SaaS providers rotate IPs regularly. If SendGrid adds a new IP range tomorrow and your flattened record still lists yesterday's addresses, outbound mail starts failing SPF. Don't flatten manually unless you're checking it daily. Use an automated dynamic-SPF service that monitors vendor IPs and updates your TXT record on a schedule.

Flattening is a workaround, not a design. Subdomain segmentation is the actual fix. Use flattening only when you've genuinely exhausted every other option.

Verify the SPF setup is working

After any SPF setup change, verify what public DNS actually returns. Don't rely on registrar dashboards, cached panels, or green checkmarks inside a vendor's UI. Query the domain directly and check for exactly one valid SPF record per hostname.

# Check the root record
dig txt example.com +short

# Check a subdomain
dig txt news.example.com +short

# Verify DMARC while you're at it
dig txt _dmarc.example.com +short

You want one TXT record starting with v=spf1 per hostname. Not two. Not one current plus a leftover from a migration two years ago.

Then send a test email to Gmail, open it, click the three-dot menu, select "Show Original," and look for:

SPF: PASS with IP [your sending IP]
DKIM: PASS
DMARC: PASS

Any FAIL or SOFTFAIL means the SPF setup has a problem. Fix it before sending at volume. If you're also troubleshooting reputation issues that go beyond SPF, email sender reputation signals covers the broader picture.

How TrekMail simplifies SPF setup across domains

SPF setup for one domain is annoying. SPF setup for 50 client domains — each with different vendors, different DNS providers, and varying levels of neglect — is where real time gets burned. TrekMail keeps the SPF footprint small and predictable so you have room for everything else.

The core include is include:spf.trekmail.net. One lookup. No nested redirects, no unpredictable expansion chains. Compare that to Microsoft 365, which often consumes 2-3 lookups through internal redirections, or Google Workspace, which varies by region.

For solo founders, that means your SPF setup stays simple even after adding a marketing tool. For teams, fewer DNS mistakes during onboarding. For agencies managing dozens or hundreds of client domains, it means a repeatable template: add the TrekMail include, segment other vendors into subdomains, and the lookup-limit problem disappears. If you manage email across many brands, multi-domain email hosting covers the broader architecture.

TrekMail's DNS status checker also flags SPF conflicts in your dashboard before they cause production failures. You see the problem before your clients do. For the full DNS setup, see Required DNS Records in the docs.

Conclusion: build the SPF setup once and stop touching it

Good SPF setup starts with architecture, not syntax. Audit dead includes. Split senders across subdomains so each stream gets its own 10-lookup budget. Keep the root domain clean: one mailbox provider, one include, one -all. Verify with dig, not dashboards.

If you want that pattern to hold across one domain or a hundred without per-seat billing, TrekMail gives you flat-rate multi-domain hosting, a single clean SPF include, pooled storage, and a DNS checker that catches misconfigurations early. The Nano plan covers 10 domains with BYO SMTP — no credit card, always free. Paid plans start at $3.50/month on Starter with managed SMTP and include a 14-day free trial (credit card required). See current plans at trekmail.net/pricing.

Share this article

We use cookies for essential functionality. No ads, no ad tracking.

or
or

Reset email sent

If an account exists for this email, we've sent password reset instructions.

By continuing, you agree to TrekMail's Terms and Privacy Policy.