Topic · Authentication

SPF

Sender Policy Framework lists which sending systems may use a domain in the SMTP envelope.

Email Security Glossary·Practical guidance
Share this definition LinkedIn X WhatsApp Email
01 / How it works

How it works

Receivers check the connecting IP against the SPF TXT record for the MAIL FROM or HELO identity.

02 / What can go wrong

What can go wrong

SPF alone does not prove that the visible From address belongs to the authorized domain.

03 / What to check or do

What to check or do

Inventory senders, stay within the ten DNS-lookup limit and align the envelope domain for DMARC.

Practical scenario

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

  1. Query the envelope sender domain rather than assuming the visible From domain.
  2. Expand include and redirect mechanisms recursively in the order evaluated.
  3. Count DNS-querying mechanisms, track void lookups and test real sending IPs.
  4. Remove unused vendors and avoid unmaintained, static SPF flattening.
Practical diagnosis

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.

Illustrative diagnostic — substitute your authorized domain or host
dig +short TXT example.com
Educational example; not validated against your live infrastructure.
Illustrative example — do not copy directly to production
example.com TXT "v=spf1 include:_spf.example.net -all"
NEXT STEP

Put this into practice

Run a focused check, then explore protection if your domain needs it.

Authoritative reference ↗