Audit the SPF lookup budget before adding another mail sender
A new email service may ask you to add an `include:` term to DNS. That request is not enough to approve a change: first identify the domain the receiver will evaluate, the senders already relying on it, and the path through the existing SPF record. The worksheet below turns that review into a handoff between the mail-service owner and DNS owner. It is a planning aid, not a deployable SPF value or an inbox-placement promise.
Boletolibre editorial team
Published
Updated
Start with the evaluated identity
SPF checks the SMTP `MAIL FROM` (envelope sender) domain and may separately check `HELO`; the visible From address is not by itself the SPF identity. Ask the new service which envelope domain its actual messages use, then inspect a representative message header or the provider's current setup instructions. If the service uses its own envelope domain, the SPF record you need to inspect may be under that domain, not your visible brand domain. Inventory the existing mailbox, transactional, form and campaign senders before touching DNS. At the evaluated name, locate the current `v=spf1` TXT record; publishing multiple selectable SPF records for the same name is an error. [RFC 7208, Sections 2.3–2.4 and 3.2][1]
Confirm the identity with evidence from the service that will actually transmit the message. Record its stated envelope domain, a controlled test message's `Return-Path` or trusted SMTP trace, the receiving header's checked SPF domain, and the client IP where a trusted source exposes it. A forwarded message can change the path and should not be your only specimen. If the reverse path is empty, RFC 7208 derives the MAIL FROM identity from HELO; a receiver can also perform a separate HELO check. The visible From domain, a provider's domain-verification screen, and a passing DKIM signature answer different questions. Compare the exact DNS name, including any subdomain, before assuming an include belongs in the brand's apex record.[1]
Count evaluation paths, not just visible includes
RFC 7208 limits lookup-causing terms to ten during one SPF evaluation. The counted terms are `include`, `a`, `mx`, `ptr`, `exists` and `redirect`; nested includes and redirects share the same budget. `ip4`, `ip6` and `all` do not consume this term budget. It is not simply a count of `include:` strings in the first TXT record, nor a promise that every path has the same count: mechanisms are evaluated in order and may stop on a match. Trace representative paths for each real sending source, including the proposed source; if an evaluation exceeds ten terms, the required result is `permerror`. Google likewise warns that nested lookups matter. Staying within ten terms is not complete validation: RFC 7208 also recommends a two-void-lookup limit and sets additional `mx`/`ptr` processing bounds. [RFC 7208, Sections 4.6.2–4.6.4; Google Workspace][1][2]
The ten-term limit is a limit on evaluated mechanisms and modifiers that cause DNS queries, not on network packets or every term printed in a record. Count a term when evaluation reaches it, then follow any nested policy with the same running count. A successful earlier match can end the path; an include whose child returns `fail`, `softfail`, or `neutral` is a nonmatch and evaluation resumes in the parent; `none` becomes `permerror`, and child errors propagate. Also record unresolved or empty DNS answers separately: RFC 7208 recommends, but does not universally mandate, a two-void-lookup ceiling. Its additional `mx` and `ptr` processing rules are separate checks. An offline count should therefore be marked modeled until tested against current DNS and representative sender IPs.[1]
| Evidence | Hold when |
|---|---|
| Envelope domain | The new service's actual identity is unknown |
| Sender inventory | A current mechanism has no owner or purpose |
| Path budget | An intended evaluation can exceed ten counted terms |
| After-change test | Any existing sender now fails or returns `permerror` |
Work a conditional path before approving the include
Consider a fictional policy at `mail.example`: `ip4:192.0.2.0/24`, then `include:a.example` through `include:d.example`, then proposed `include:new.example`, then `-all`. Each of a–d has one nested include. The new policy has two nested includes. These are reserved example names, not DNS values to publish. For an existing IP matched inside a's child, the parent `include:a.example` and its child are the only two counted terms: evaluation stops with pass. For a proposed sender IP that misses a–d and the first new child, the path is different. For this modeled path, assume each nonmatching included policy returns `fail`, `softfail` or `neutral`, rather than `none` or an error; otherwise evaluation could stop earlier.[1]
For that proposed IP, a–d and their children consume eight terms. Reaching `include:new.example` is term nine; its first nested include is ten. The second nested include would be term eleven, even if it contains the matching IP. RFC 7208 requires `permerror` when evaluation exceeds ten. Do not claim that every message on this record fails: the early matching sender still stops at two. Do not publish based on this sketch alone; expand the real provider records and run a standards-aware evaluation with current DNS, the actual checked domain, and each representative client IP.[1]
| Conditional path | Running counted terms | Interpretation |
|---|---|---|
| Existing sender matches in a's child | 2 | Stops on pass; later includes not reached |
| Proposed sender misses a–d and children | 8 | Continue at parent record |
| Proposed sender enters new and first child | 9, then 10 | Still within term limit, no match yet |
| Proposed sender reaches second new child | 11 | Required `permerror`; hold change |
Review the proposed change without losing an existing sender
Record the existing TXT value and the provider's requested change as separate evidence. Have each sender owner confirm whether its mechanism is still needed. Removing a stale include can free budget, but never remove one only because it appears old; an unseen sender may depend on it. Do not create a second `v=spf1` record, copy a static list of a provider's changing IPs, or assume SPF alone verifies the visible From domain. If the reviewed path remains over budget, hold the DNS change and ask the mail provider for a supported design. [RFC 7208, Sections 3.2 and 4.6.4; Google Workspace][1][2]
Make a record-level go/no-go decision
Review the candidate against the currently published TXT at the *evaluated* name, not against a copied draft. Keep one selectable SPF record there; multiple quoted strings inside one DNS TXT record are different from multiple SPF records. Preserve the exact current value by secure reference, document the proposed delta and identify the owner of every existing sender. A new service using its own envelope domain may need no change to this name; a service using yours may require its current, provider-supported instruction. A retired include can be removed only after its owner confirms that no active path depends on it. If a real path exceeds the limit, stop and ask the provider for a supported design; flattening or moving a sender to a subdomain is not a universal repair and may create maintenance or alignment work.[1][2]
| Finding | Decision | Evidence to retain |
|---|---|---|
| New service uses another envelope domain | Verify SPF at that name before changing yours | Provider setup and controlled message identity |
| Same evaluated name; all modeled paths within limits | Approve only after owner review and live evaluation | Current/proposed TXT, path traces, void checks |
| Obsolete mechanism confirmed unused | Remove only in a controlled, tested change | Sender owner's retirement approval |
| Any intended path reaches term 11 or a separate limit | Hold; request provider-supported redesign | Failing trace and provider response |
Verify the result and keep a rollback record
Before publication, have the mail and DNS owners sign off on the evaluated domain, every active sender, the proposed record, path trace, and a rollback reference. After the controlled DNS update, confirm the published TXT record and send controlled messages through each intended service. Inspect `Authentication-Results` or `Received-SPF` for the SPF result and checked identity; obtain the client IP from a trusted trace or header where available. A passing result from one service does not validate every other path. Record `pass`, `fail`, `permerror` or unresolved evidence separately, and pause expansion if a sender regresses. Keep DKIM and DMARC checks in their own review; this worksheet only addresses the SPF lookup budget. [RFC 7208, Sections 2.4, 4.6.4 and 9][1]
Before changing DNS, record the authoritative record name and exact old value in the approved change system, the proposed single-record value, change window, expected DNS caching interval, test owners, and the precise rollback trigger. After publication, compare authoritative and relevant recursive answers, then send controlled mail through the new service and every current sender that shares the evaluated name. Retain the tested envelope domain, IP evidence where available, SPF result, time, and header reference for each route. If a legitimate route returns `permerror` or regresses, stop rollout, restore the last approved value through the DNS owner, and repeat the same checks after caches have had time to refresh. Rollback is not instantly visible everywhere, and SPF pass alone neither proves DMARC alignment nor guarantees delivery.[1][2]
Sources and further reading
- SPF evaluation, record selection and DNS lookup limits (RFC 7208)IETF / RFC Editor · Accessed
- Troubleshoot SPF issuesGoogle Workspace Admin Help · Accessed