Envelope From and Header From: why every email has two sender addresses
Mark AvrilovPublished updated
Every email carries two sender addresses. Sometimes they match, sometimes they have nothing in common. Neither case means forgery. SMTP has kept the envelope apart from the message itself since its first version.
Envelope From (MAIL FROM)
Envelope From is the technical sender address passed in the SMTP MAIL FROM command when one server hands a message to another. RFC 5321 calls the argument of that command the reverse-path.
MAIL FROM:<bounce-abc123@bounces.esp.com>
Recipients don't see this address in normal view. It exists so that bounces have somewhere to go. If a message can't be delivered, whichever server finds that out sends a Delivery Status Notification (DSN) to the MAIL FROM address. After delivery the address stays in the message as the Return-Path header.
You will also see it called the bounce address, the envelope sender, or simply the Return-Path.
Header From
Header From is the address a recipient sees in the "From" field of their mail client. It lives in the From header inside the message:
From: "Company Name" <newsletter@yourcompany.com>
This is the brand the reader recognizes, and it decides whether the message gets opened. RFC 5322 defines From as the author of the message. There can also be a Sender field naming whoever actually transmitted it; the standard's own example is a secretary sending mail for someone else. Sender is a header too, unrelated to the envelope, so a single message can carry three sender addresses.
The paper mail analogy
A paper envelope has a return address, which is where the letter comes back if it can't be delivered. The letter inside is signed by its author. Those two can differ: a director's letters may go out in envelopes printed with the address of the company mailroom.
Return-Path: the envelope written into the headers
Return-Path is added at final delivery. The receiving server takes the reverse-path from MAIL FROM and inserts a Return-Path line at the very top of the message, and RFC 5321 makes that mandatory for every mail system. Open the raw source of any message in your inbox (Gmail calls it "Show original") and the first line will look something like this:
Return-Path: <bounce-id-4782@tracking.example.com>
Senders don't write this header themselves. The standard says an originating system SHOULD NOT send a message that already has one, and the server making final delivery MAY strip existing Return-Path fields before adding its own. A delivered message should end up with exactly one. If you find two, something along the way ignored that rule.
RFC 5322 groups Return-Path with Received as trace fields and treats them as purely informational. The angle brackets can also be empty, which is covered below.
Why they differ in practice
Several common sending scenarios produce mismatched addresses:
- Sending through an ESP. Your Header From shows
newsletter@yourcompany.com, but the ESP sets its own Envelope From (e.g.bounce-xyz@esp-bounces.com) so that bounces land in its processing system. - Forwarding. A forwarder or a mailing list may keep the original Envelope From or put its own address there.
- VERP. To tell which subscriber bounced, an ESP gives every recipient a unique Envelope From. The mechanics are explained below.
- Transactional mail via relay. An application sends through a relay service. The Header From carries the brand address and the Envelope From belongs to the relay.
Forwarding causes the most confusion. A plain alias leaves the envelope alone under RFC 5321. The message moves on with the original MAIL FROM, and at the next hop SPF fails for the original domain because the forwarder's IP isn't in that record. That is why some forwarders rewrite the address to one of their own, which is what the SRS scheme does. Mailing lists, per the same RFC, replace it with the list administrator's address.
VERP: a separate Return-Path for each recipient
For one person sending one message the split hardly matters, since any bounce comes straight back to them. A sending platform has a different problem. Every bounce has to be tied to a specific recipient and campaign, or the dead address never leaves the list. VERP (Variable Envelope Return Path) handles this by encoding the recipient in the MAIL FROM address itself.
MAIL FROM:<bounce+user=recipient.com@tracking.example.com>
When a bounce reaches that address, the local part alone says it was user@recipient.com who failed. Without VERP the system would have to parse the bounce text, and RFC 5321 only recommends the standard DSN format, so not every server sends it.
Null Return-Path
A MAIL FROM with empty brackets is the null reverse-path. RFC 5321 lists the messages that must use it: non-delivery reports, other DSNs, and read receipts (MDNs). RFC 3834 allows auto-responders to use it as well, without requiring them to.
MAIL FROM:<>
The point is to stop loops. When a message with a null return path fails, the server is forbidden to send a notification about it. Otherwise a bounce about a bounce would trigger yet another one, with no end.
SPF has a special rule here. With no domain in the envelope, RFC 7208 checks postmaster at the HELO domain instead, and under RFC 9989 that same domain is what DMARC uses for SPF alignment.
Effect on email authentication
SPF, DKIM and DMARC each look at a different address, and most alignment failures trace back to that gap:
- SPF checks the domain in the Envelope From. If it is
bounce@bounces.esp.com, the receiver looks up the SPF record ofbounces.esp.comand compares it with the sending IP. Your own domain plays no part in that check. - DKIM validates a signature against the domain in the
d=tag of theDKIM-Signatureheader. That domain can be yours or the ESP's. - DMARC starts from the Header From domain and needs SPF or DKIM to pass for a domain aligned with it. Strict alignment means the domains are identical; relaxed means they share an organizational domain, and relaxed is the default in RFC 9989 (
aspf=r,adkim=r). So tracking.example.com and newsletter.example.com align, because both belong to example.com. If nothing aligns, DMARC fails even when SPF and DKIM each pass on their own.
How to set up alignment
For SPF alignment, move the Envelope From onto a subdomain of your own domain. ESPs usually call this a custom MAIL FROM or custom Return-Path domain:
Envelope From: bounce@mail.yourcompany.com
Header From: newsletter@yourcompany.com
Both share the organizational domain yourcompany.com, so relaxed SPF alignment passes. Your provider tells you which DNS records the subdomain needs. Amazon SES, for instance, asks for an MX record so the subdomain can receive bounces and complaints, plus an SPF record authorizing its servers. Other services get by with a single CNAME and host the rest themselves.
DKIM alignment follows the same idea, except that here the ESP signs outbound mail with a key for your domain (d=yourcompany.com), usually after you publish a CNAME or TXT record for the selector.
Common Return-Path mistakes
- The MAIL FROM domain doesn't exist in DNS. The receiver can refuse the message at the envelope stage. Postfix with
reject_unknown_sender_domainanswers with a temporary 450 by default when the sender domain has neither an MX nor an A record. - No SPF record for the Return-Path domain. SPF is evaluated against the envelope, so the result is "none". If DKIM isn't aligned either, the message fails DMARC, and under a reject policy the receiver may refuse it.
- The bounce mailbox doesn't accept mail. Bounces vanish, the ESP never learns which addresses are dead, and you keep mailing them. Outside of system notifications, RFC 5321 says messages SHOULD carry a valid, non-null return path.
- A third-party Return-Path domain. If you send through an outside SMTP service without setting up your own MAIL FROM subdomain, the envelope keeps the service's domain and SPF won't align with your From. DMARC then rests on DKIM alone.
Spoofing and security
Anyone can type any Header From, and that is where email spoofing comes from. A spammer writes From: ceo@bank.com and the recipient sees exactly that. SPF, DKIM and DMARC were built for this case: they let the receiving server check whether the sender had the right to use the domain.
Without authentication records in DNS, any server can send mail with your domain in the Header From. With p=reject in your DMARC record, receivers that follow DMARC will refuse messages that have neither aligned SPF nor aligned DKIM.
Return-Path and address verification
A service that verifies addresses over SMTP, uChecker included, acts as a sender itself. It introduces itself with HELO, gives its own address in MAIL FROM and asks the recipient's server about RCPT TO, but never sends the message itself (DATA). Whether the server answers RCPT TO depends partly on the MAIL FROM domain and the IP the check comes from. Some servers refuse at MAIL FROM already, and then nothing can be learned about the mailbox.
Sources
- RFC 5321, section 4.4: Return-Path and trace information
- RFC 5321, section 4.5.5: messages with a null reverse-path
- RFC 5321, section 3.9: aliases and mailing lists
- RFC 5322, section 3.6.2: From and Sender fields
- RFC 5322, section 3.6.7: trace fields
- RFC 7208, section 2.4: the SPF MAIL FROM identity
- RFC 9989, section 4.4: DMARC identifier alignment
- RFC 3834, section 3.3: envelope of automatic responses
- Amazon SES: using a custom MAIL FROM domain
- Postfix: reject_unknown_sender_domain
uChecker verifies recipient addresses before you send. The fewer dead mailboxes on your list, the fewer bounces come back to your Return-Path.
Mark Avrilov · Author
Published Updated
