Visual RFC.
ALL RFCs / RFC 7208
Read the RFC ↗
RFC 7208 / MECHANISM GUIDE

Which identity SPF checks

01

SPF evaluates the connecting IP against an SMTP identity’s domain.

RFC 7208 · § 2.4EXAMPLE

FOLLOW ONE SMTP TRANSACTION

Is this server allowed to send email using example.org?

Step 4 of 4 — Compare and decide

The policy authorizes this IP to send using example.org.

Sending SMTP Server

Connecting IP192.0.2.10
SMTP →
MAIL FROM:<bounce@example.org>↓ domain to check
example.org

Receiving SMTP Server

Performs the SPF checkUses the connecting IP + SMTP domain
↓ Receiver asks DNS
TXT for example.org?
↑ DNS answers receiver
SPF policy below

DNS

Provides example.org’s SPF TXT recordv=spf1 ip4:192.0.2.10 -all
v=spf1
SPF policy
ip4:192.0.2.10
Authorize this IP
-all
Fail otherwise unmatched IPs
Fictional DNS record for this explanation.
Connecting IP192.0.2.10
=
Authorized by policy192.0.2.10
✓ SPF PASSSending IP authorized for example.org
Decision made at the receiving server using the DNS answer.
Try another sender IP

Same domain. Same policy. Only the connecting IP changes. Simplified example, not the entire SPF algorithm.

SPF authorizes sending servers for an SMTP domain. A pass does not prove safe content or guarantee delivery.

Envelope versus letter

Choose an identity to see what SPF actually checks.

The receiver checks example.org from MAIL FROM, using the connecting IP. This is not automatically the From address shown in an inbox.

What about HELO and empty MAIL FROM?

HELO / EHLO: a separate identity

EHLO mail.example.org

Sending server → declares mail.example.org → receiver may check that domain’s DNS SPF policy against the same connecting IP.

A separate HELO check is recommended; if both identities are checked, HELO first is recommended. The HELO string must be a valid, multi-label domain for this check.

Empty reverse-path

MAIL FROM:<>

With HELO mail.example.org:

↓ postmaster@mail.example.org

This becomes the defined MAIL FROM identity; its domain is mail.example.org, even if HELO was not checked separately.

A MAIL FROM check is required if HELO was not checked or did not reach a definitive policy result. A conclusive HELO determination can avoid a separate MAIL FROM lookup; both checks do not always happen.

SPF checks an SMTP identity, not automatically the visible From header.

3 / 3
03
Evaluate authorization

Check whether that IP is authorized by that domain’s SPF policy.

Which identity SPF checksSPF evaluates the connecting IP against an SMTP identity’s domain.Which identity SPF checkspeer IP: 192.0.2.10MAIL FROM: bounce@example.orgcheck example.org policyEnvelope domain ≠ automatically visible From

Key idea: MAIL FROM is an envelope identity, not necessarily the visible From header.

Terms

Look up a term in the glossary ↗

Rules & examples
  • MAIL FROM is an envelope identity, not necessarily the visible From header.
  • HELO checking has its own defined role, including null reverse-path handling.
  • SPF does not authenticate arbitrary message content.

Examples are illustrative. Consult the linked RFC and its errata for implementation details.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

The envelope and the letter do different jobs.

Mail transport moves a message between servers. The message format describes its contents. Authentication adds checks; it does not make every message safe.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

What changed
RFC 4408 experimental SPFRFC 7208 §3.1

SPF policies now use DNS TXT only; use of the dedicated SPF RR type 99 is removed.

Read the updated RFC section ↗

All chapters in RFC 7208

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗