skip to content

For a bounce with an empty MAIL FROM, which identity does an SPF verifier check, and how does the separate HELO check relate to it?

level: seniorimportance: nice to knowfreq 12%

answer

  1. a bounce has no sender address
  2. RFC 7208 section 2.4 fallback
  3. postmaster at a host name
  4. HELO first, if both are checked

basics

~20 s

With a null reverse-path, RFC 7208 defines the MAIL FROM identity as postmaster@ the HELO name. The separate HELO check, RECOMMENDED and run first when both are done, evaluates that same host name, so its SPF record decides both.

solid answer

~50 s

RFC 7208 lets a verifier check two identities. The `HELO` identity is the name given in `HELO` or `EHLO`; checking it is RECOMMENDED, and when both are checked `HELO` goes first, because a host's own record is simple and a conclusive result can save the costlier `MAIL FROM` evaluation. The `MAIL FROM` identity MUST be checked whenever the `HELO` check was skipped or reached no definitive result. Bounces and other notifications are sent with the null reverse-path, `MAIL FROM:<>`, so there is no sender domain; RFC 7208 then defines the identity as `postmaster@` the HELO name. For the person running the mail, every sending host therefore needs a fully qualified HELO name with its own SPF record, or its bounces get `none`. A HELO that is an IP address literal or malformed cannot be checked at all.

code

pseudocode · 10 lines
pseudocode
helo = "mta1.example.com"            # from EHLO
mail_from = ""                       # null reverse-path of a bounce

if is_multi_label_domain(helo):
    r_helo = check_host(ip, helo, "postmaster@" + helo)
    if is_conclusive(r_helo):
        return r_helo                  # receiver may act on it

sender = mail_from if mail_from != "" else "postmaster@" + helo
return check_host(ip, domain_of(sender), sender)

go deeper

for a junior

Recall that bounces use an empty MAIL FROM and that SPF then checks postmaster at the name the sending host gave in HELO or EHLO.

for a middle

Explain the two identities, the RECOMMENDED HELO-first order, the MUST on MAIL FROM, and why an address literal or malformed HELO cannot be checked.

for a senior

Show the operational fix: real fully qualified HELO names, host records for each, Postfix's smtp_helo_name default, and reading identity= in Received-SPF to see which check ran.

for a principal

Treat HELO names as owned configuration across the estate: a naming standard, a record per sending host, and a review step whenever a new outbound host appears.

## Two identities, one function RFC 7208 (April 2014) evaluates SPF with a single function, `check_host()`, but it can apply that function to two different identities taken from the SMTP session: | Identity | Taken from | Strength in RFC 7208 | Limits | |---|---|---|---| | `HELO` | The name the client gives in `HELO` or `EHLO` | Checking it is RECOMMENDED; when both are checked, `HELO` comes first | Only possible when the name is a valid, multi-label domain name | | `MAIL FROM` | The domain of the reverse-path in `MAIL FROM` | MUST be checked if the `HELO` check was not performed or reached no definitive result | For a null reverse-path, becomes `postmaster@` the HELO name | The RFC uses "HELO" for both `HELO` and `EHLO`, since either introduces the client host. ## Why check HELO at all, and why first Section 2.3 gives three reasons. A record published for a HELO name describes a single host, so it is short and highly reliable. Checking it first can settle the question cheaply and avoid evaluating a large `MAIL FROM` record with many DNS lookups. And it makes results consistent across messages from the same host. The order a verifier follows is: 1. If the `HELO` name is a valid multi-label domain, evaluate it as the sender domain, with the sender address `postmaster@` that name. 2. If that gives a conclusive result, the receiver can act on it and skip further work. 3. Otherwise evaluate the `MAIL FROM` identity, which RFC 7208 makes mandatory in that case. A `HELO` argument that is an address literal such as `[192.0.2.10]`, or a malformed name, cannot be checked; section 2.3 says verifiers have to be prepared for both, because the requirements for that argument are not always clear to the sending party. In those cases the receiver simply moves on to the `MAIL FROM` identity. ## The null reverse-path RFC 5321 allows `MAIL FROM:<>`, the **null reverse-path**, for notifications generated by the mail system itself, most commonly delivery status notifications (bounces). Such a message has no sender mailbox to check. Section 2.4 fills the gap: the `MAIL FROM` identity becomes the mailbox made of the local-part `postmaster` and the `HELO` identity. Section 10.1.3 states the practical consequence: for a bounce, the HELO identity is the only thing available to check. So when `mta1.example.com` sends a bounce, both checks evaluate the same name: - the `HELO` check evaluates `mta1.example.com`; - the `MAIL FROM` check evaluates `[email protected]`, whose domain is again `mta1.example.com`. One host record answers both. RFC 7208 section 10.1.2 calls publishing records for individual hosts best practice; where such a record sits and how it is written is covered with SPF record syntax. ## Where this goes wrong in practice - **The HELO name has no SPF record.** The host's bounces get `none`, which is no information at all. RFC 7960 observes that operators have occasionally misunderstood this fallback, because bounces are an automatic feature of the MTA. - **The HELO name is not a real multi-label name.** A short internal name or an address literal makes the check impossible, so the bounce is judged on nothing. - **Notifications are not signed.** RFC 7960 adds that some MTA software cannot apply a DKIM signature to its own notifications, which leaves the HELO-based SPF result as the only authentication they carry. - **Confusing the checks with DMARC's input.** RFC 9989 (May 2026) section 4.4.2 says DMARC relies solely on SPF validation of the `MAIL FROM` identity, so a HELO result never feeds DMARC directly; how the null-sender case is aligned is covered with DMARC alignment. ## What the person running the mail configures and checks - Give every sending host a fully qualified name that it presents in `EHLO`. Postfix's `smtp_helo_name` defaults to `$myhostname`, the machine's host name, so that value must be a real public name, not an internal one. - Publish an SPF record for each such name that authorizes the host itself. - Read which identity a receiver evaluated: the `Received-SPF` field defined in RFC 7208 section 9.1 carries an `identity=` key whose values include `helo` and `mailfrom`. - On the receiving side, remember that RFC 7208 Appendix D lets a passing `HELO` test override a failed `MAIL FROM` test as a local policy choice, for example for a trusted forwarder.

  • What does a receiver get if a host's HELO name publishes no SPF record and the host sends a bounce?
    `none` for both identities, because the null sender makes the `MAIL FROM` identity `postmaster@` that same HELO name. The receiver has no SPF information at all about the bounce. The fix is on the sending side: a real, fully qualified HELO name with a record authorizing the host.
  • Does RFC 7208 require receivers to check the HELO identity?
    No. Checking `HELO` is RECOMMENDED, not required, and RECOMMENDED to happen before `MAIL FROM` when both are checked. The requirement runs the other way: the `MAIL FROM` identity MUST be checked if the `HELO` check was skipped or did not reach a definitive result.

  • A bounce with an empty MAIL FROM simply gets no SPF check.
  • The null-sender identity is postmaster at the recipient's domain.
  • RFC 7208 requires every receiver to check the HELO identity.
  • An IP address literal in EHLO can be checked like a host name.
  • A HELO check always makes the MAIL FROM check unnecessary.