Topic · Authentication
SPF
Sender Policy Framework lists which sending systems may use a domain in the SMTP envelope.
How it works
Receivers check the connecting IP against the SPF TXT record for the MAIL FROM or HELO identity.
What can go wrong
SPF alone does not prove that the visible From address belongs to the authorized domain.
What to check or do
Inventory senders, stay within the ten DNS-lookup limit and align the envelope domain for DMARC.
Practical scenario
An organization adds several email vendors to a single SPF record. Each include expands into additional lookups. One day, a vendor changes its include chain, pushing the policy over the ten-querying-mechanism limit and causing permerror for some messages. The symptom is intermittent because receiving resolvers and sender paths vary.
Verification checklist
- Query the envelope sender domain rather than assuming the visible From domain.
- Expand include and redirect mechanisms recursively in the order evaluated.
- Count DNS-querying mechanisms, track void lookups and test real sending IPs.
- Remove unused vendors and avoid unmaintained, static SPF flattening.
How to investigate SPF
- Signal to investigate
- A sender may be authorized by SPF for bounce.example.net without authorizing the visible From domain.
- Evidence to collect
- Inspect a delivered Authentication-Results header and query the exact SMTP MAIL FROM domain's TXT records.
- Common wrong conclusion
- SPF evaluates envelope or HELO identities, not the display name or the visible From field by itself.
How to interpret the evidence
SPF evaluates whether the connecting IP may use a particular envelope sender or HELO domain. The visible From address is a separate identity. When a provider changes sending infrastructure, its nested include graph can expand without any edit to your root TXT record. The limit applies to DNS-querying mechanism evaluation and may depend on the evaluation path.
What to change and how to verify it
Record the MAIL FROM domain, sender IP and exact SPF result. Trace active includes and redirects and remove orphaned vendor permissions. Preserve vendor-managed dynamic ranges when appropriate; compare the outcome against DMARC alignment rather than declaring the mail safe because SPF passes.
dig +short TXT example.comEducational example; not validated against your live infrastructure.example.com TXT "v=spf1 include:_spf.example.net -all"Put this into practice
Run a focused check, then explore protection if your domain needs it.