Sub topic 3
How receivers decide a message is really from you
This chapter assumes you know how SMTP delivery works, can read a TXT record in DNS, and can open the raw headers of a message. It builds the working model that the next chapters (SPF, DKIM, alignment, DMARC) fill in.
The problem: SMTP does not check the sender
SMTP lets any server claim any sender address. A message has two sender identities, and neither is verified by the protocol itself:
- The envelope sender (also called the MAIL FROM, Return-Path, or bounce address) is given during the SMTP conversation. Receivers use it to send bounces.
- The From header is the address a person sees in their mail client.
Because both can be set freely, anyone could send mail that appears to come from your domain. Receivers therefore ask a question for every message: is this sender allowed to use this domain?
Three checks, three different questions
Receivers answer that question with three standards. Each one looks at a different piece of the message.
| Check | What it verifies | Where the proof lives |
|---|---|---|
| SPF | The connecting server's IP address is allowed to send for the envelope domain | A TXT record on the envelope domain |
| DKIM | The message was signed by a domain and was not changed after signing | A signature header plus a public key in a TXT record |
| DMARC | The SPF or DKIM domain matches the visible From domain, and what to do if not | A TXT record at `_dmarc` on the From domain |
SPF and DKIM each prove something about a domain. Neither one, alone, proves anything about the From domain a reader sees. DMARC closes that gap by requiring that at least one passing check uses a domain that aligns with the From domain. Alignment gets its own chapter.
Where the results appear
The receiver records its verdicts in an Authentication-Results header. This is the first place to look when you debug a message.
Authentication-Results: mx.example.net;
spf=pass smtp.mailfrom=bounce.example.com;
dkim=pass header.d=example.com header.s=mail1;
dmarc=pass (p=NONE) header.from=example.comRead it line by line:
spf=pass smtp.mailfrom=bounce.example.commeans the sending IP was authorized forbounce.example.com, the envelope domain.dkim=pass header.d=example.com header.s=mail1means a signature fromexample.comusing selectormail1verified.dmarc=pass header.from=example.commeans at least one passing check matched the From domain.
Here SPF passed for a different domain than the From domain, so SPF did not align. DKIM passed for example.com, which does align, and that is enough for DMARC to pass.
Authentication is a gate, not a guarantee
Passing authentication proves who sent the message. It does not prove the message is wanted. After authentication, receivers weigh reputation, complaint rates, and content to choose between inbox, junk folder, and rejection. Gmail, Yahoo, and Microsoft now treat missing authentication as a reason to reject or defer bulk mail outright, which is why the rest of this tutorial starts here.
Common errors at this stage
- Reading
spf=passas proof the message is compliant. SPF can pass for a domain unrelated to your From domain. - Looking only at the envelope sender. The From header is what DMARC and the reader care about.
- Assuming DKIM is optional because SPF passes. Forwarding often breaks SPF but usually preserves a DKIM signature.
Exercise
A message shows spf=pass smtp.mailfrom=bounce.esp.example, dkim=none, and dmarc=fail header.from=example.com. Why does DMARC fail even though SPF passed?
Show answer
SPF passed for bounce.esp.example, which is not the From domain example.com, so SPF is not aligned. With no DKIM signature, no passing check matches the From domain, and DMARC fails.