Glossary

SPF

Updated

SPF, or Sender Policy Framework, is an email authentication standard that lets a domain owner publish a DNS policy showing which mail servers and IP addresses are allowed to send email for that domain.

Also known as: Sender Policy Framework, SPF record, SPF authentication

Key takeaways

  • SPF is a DNS-based email authentication policy: It tells receiving servers which systems are allowed to send mail for a domain.
  • Publish one SPF TXT record: Multiple SPF records for the same domain can cause evaluation problems and authentication failures.
  • Keep SPF lean: Too many includes or lookup-heavy terms can push SPF over the DNS lookup limit.
  • SPF is strongest with DKIM and DMARC: SPF helps authorize sending infrastructure, but it is not a complete deliverability or anti-spoofing strategy by itself.

Understanding SPF

SPF is a DNS-based policy that tells receiving mail servers which systems are allowed to send email for a domain. The policy is usually published as a DNS TXT record that starts with v=spf1 and lists authorized senders using mechanisms such as ip4, ip6, include, a, mx, and all.

When a receiving server gets a message, it evaluates the SPF policy for the sending identity and checks whether the connecting IP address is authorized. In practice, SPF usually evaluates the envelope sender domain (often called the return-path or MAIL FROM domain) and may also evaluate the HELO or EHLO domain used during the SMTP session.

SPF helps reduce unauthorized use of a domain in email infrastructure, but it does not solve every authentication problem by itself. It is especially useful for defining which systems may send on your behalf, but it is still important to monitor alignment, keep records clean, and pair SPF with DKIM and DMARC for a stronger overall setup.

One of the most common SPF mistakes is publishing multiple SPF records for the same domain. Another is allowing the policy to grow too complex with too many included services or lookup-heavy terms. A clean SPF record is usually shorter, easier to debug, and less likely to fail at evaluation time.

Example

A simplified SPF record might look like v=spf1 ip4:203.0.113.10 include:_spf.example.net ~all. That tells receivers one IP address and one included sender policy are allowed, while everything else should be treated as a soft fail.

Common SPF issues and failure causes

SPF problems usually come from record design, DNS publishing mistakes, or missing sender inventory. Most authentication failures are caused by a small set of repeatable configuration issues.

Missing or incomplete sender coverage

If a real sending platform is not included in your SPF policy, mail from that source may fail SPF checks.

Multiple SPF records

Publishing more than one SPF record for the same domain can create a permanent evaluation problem for receivers.

Too many DNS lookups

Long include chains and lookup-heavy mechanisms can push SPF past its lookup limit and break validation.

Note: SPF can also become unreliable in forwarding scenarios because the forwarding server’s IP may not be authorized by the original sender’s SPF policy.

Decision tree: what to do with SPF setup or failure issues

Authentication task

SPF

Do you publish exactly one SPF TXT record for the sending domain?

Next steps: Review how DKIM and DMARC work alongside SPF.

Key implications

SPF helps authorize sending infrastructure

It gives receiving servers a machine-readable policy for which systems may send mail for a domain.

Bad SPF can break valid mail

Missing vendors, record conflicts, or DNS lookup excess can cause legitimate mail to fail authentication.

SPF is necessary but not complete

It supports email authentication, but strongest results usually come when SPF is combined with DKIM and DMARC.

Common challenges

Exceeding the lookup limit

Every extra include or DNS-dependent mechanism adds evaluation cost and may push the record past what receivers allow.

Publishing duplicate records

Teams often create SPF conflicts when different tools or admins add separate TXT records instead of maintaining one shared policy.

Forgetting sender changes

New platforms, retired tools, and vendor migrations can leave SPF outdated if DNS is not reviewed regularly.

SPF vs DKIM vs DMARC

TypeWhat it doesCommon risk
SPFAuthorizes which servers can send for a domainCan fail from forwarding, duplicate records, or too many DNS lookups
DKIMUses a cryptographic signature to help verify message authenticityKey, selector, or alignment issues can reduce trust or break validation
DMARCApplies policy and alignment using SPF and/or DKIM resultsPoor alignment or no reporting strategy can delay enforcement improvements

FAQs

What is SPF?

SPF stands for Sender Policy Framework. It is an email authentication standard that lets a domain owner publish which mail servers and IP addresses are allowed to send email for that domain.

How does SPF work?

SPF works by publishing a DNS TXT record that starts with v=spf1. When a receiving server gets a message, it checks whether the sending IP is authorized by the SPF policy for the sending domain.

What does an SPF record look like?

A common SPF record looks like: v=spf1 ip4:203.0.113.10 include:_spf.example.net ~all. It authorizes one IP address and one included sender policy, then applies a soft fail to everything else.

Can I have more than one SPF record?

No. You should publish one SPF policy record for the domain. Multiple SPF records can cause evaluation errors and unpredictable authentication results.

Does SPF check the visible From address?

Not by itself. SPF typically evaluates the MAIL FROM (return-path) domain and sometimes the HELO domain, not the visible From header that users see in the inbox.

What happens if SPF exceeds 10 DNS lookups?

Many receivers treat that as a permanent SPF evaluation error. Too many includes, redirects, or lookup-heavy mechanisms can break SPF checks even when your senders are legitimate.

Do I still need DKIM and DMARC if I publish SPF?

Usually yes. SPF is helpful, but it works best as part of a broader authentication setup with DKIM and DMARC.