skip to content

What is SMTP backscatter, and how should a receiving mail server be configured so that it never sends backscatter itself?

level: seniorimportance: should knowfreq 24%

answer

  1. accept first, discover later
  2. the reverse-path was forged
  3. decide before the 250
  4. no notices about hostile content
  5. from=<> floods in your own log

basics

~20 s

Backscatter is bounces, auto-replies and filter notices sent to innocent addresses forged as spam's envelope sender. A receiver avoids causing it by refusing during the SMTP session, validating recipients at RCPT, and not notifying senders about spam or malware.

solid answer

~50 s

Once a server answers `250` to the end of data it owns the message, and RFC 5321 section 6.1 says that if delivery then fails it MUST notify the envelope reverse-path. Spam and worms forge that `MAIL FROM`, so the notification lands on a third party who sent nothing: backscatter. The cure is to decide before accepting. Reject unknown recipients at `RCPT` (Postfix's `smtpd_reject_unlisted_recipient` defaults to `yes`, and every gateway or backup MX needs the real recipient list too); run spam and malware checks in the session, so a refusal is a `5yz` the *sending* MTA reports to its own user; and follow RFC 5321 section 6.2, which says notices for hostile content SHOULD NOT be sent unless the site is confident they will be usefully delivered. Autoresponders follow RFC 3834: never answer a null reverse-path. Being the victim shows as floods of `from=<>` mail about messages you never sent.

go deeper

for a junior

Recall that backscatter is bounces and auto-replies sent to a forged sender address, and that it comes from servers that accept mail first and fail it later.

for a middle

Explain why acceptance creates the duty to notify the reverse-path, and why rejecting during the session moves the bounce to the sending MTA instead.

for a senior

Show the controls you would check on a server you run: recipient validation on every MX, in-session filtering, no notices for hostile content, careful autoresponders, and how you spot being the victim in the logs.

for a principal

Own the tradeoff between rejecting early and losing nothing: in-session filtering adds latency and complexity, silent dropping risks real mail, and bouncing after acceptance harms third parties.

## How a server ends up bouncing mail to the wrong person Every SMTP message carries an **envelope reverse-path**, the address in `MAIL FROM`. It is where any later notification about the message must go. Nothing in SMTP verifies it: a spam run or a worm can put any address there, including one in a domain that never sent anything. The trouble starts with responsibility. RFC 5321 section 6.1 says that when a receiver answers `250` to the end of data it is **accepting responsibility** for delivering the message, and that if delivery fails afterwards it **MUST** send a notification to the reverse-path. A server that accepts first and checks later therefore turns every forged message it cannot deliver into a bounce aimed at an innocent mailbox. Postfix's documentation describes the result: when forged mail carries a sender address in your domain, "innocent sites are flooded with undeliverable mail notifications. This is called **backscatter** mail." The same thing happens with anything automatic that answers the sender: - non-delivery notices for unknown users, full mailboxes or expired queues, - "virus found" or "message quarantined" notices from content filters, - vacation and out-of-office replies, - challenge messages asking the sender to confirm they are human. ## Decide before you accept The fix is structural: make every refusal happen **inside the SMTP session**, while the sending MTA still holds the message. A `5yz` there costs nobody anything; the sending MTA writes the bounce to its own user, whose address it knows. 1. **Validate recipients at `RCPT`.** Postfix's `smtpd_reject_unlisted_recipient` defaults to `yes`, which the documentation says "prevents the Postfix queue from filling up with undeliverable MAILER-DAEMON messages". 2. **Give every MX the recipient list.** A backup MX or other relay host that relays for a domain without knowing its users accepts everything. Postfix's `relay_recipient_maps` (default empty) warns that a domain without a valid recipient list becomes "a source of backscatter mail". 3. **Filter content in the session**, before the reply to the end of data, so spam and malware are refused rather than bounced. 4. **Do not notify about hostile content.** RFC 5321 section 6.2 says rejection messages for hostile content **SHOULD NOT** be sent unless the receiving site is confident they will be usefully delivered; its stated default is to send none. 5. **Make autoresponders careful.** RFC 3834 says responders **MUST NOT** answer when the destination would be a null address, **SHOULD NOT** answer a message carrying an `Auto-Submitted` field with any value other than `no`, and should send at most one absence notice per sender in several days, seven by default. | Approach | Where the bounce goes | Backscatter risk | |---|---|---| | reject at `RCPT` or after data, in session | sending MTA's own user | none from you | | accept, then bounce | whatever `MAIL FROM` said | high | | accept, then drop silently | nowhere | none, but real mail can vanish | The last row is not the escape it looks like. RFC 5321 section 6.2 calls dropping mail without notification "extremely dangerous" and reserves it for cases of very high confidence that the messages are fraudulent. ## Recognising that you are the victim If your domain is the one being forged, your inbound log fills with notifications addressed to your domain from `<>`. Postfix's backscatter guide shows the signature: your own server logging rejects such as `550 5.1.1 ... User unknown; from=<>`, which are other servers' MAILER-DAEMONs trying to return mail sent with a false sender in your domain. Two kinds of defence apply: - **Reject what you can at the door.** Random recipient addresses in your own domain are refused at `RCPT` like any unknown user. - **Recognise forged returns.** Many notifications attach the headers of the original. Postfix's guide uses them: if a returned message's `Received` header shows a HELO name or a `Message-ID` your servers never produce, the "bounce" is about forged mail and can be refused by header checks. Publishing SPF, DKIM and an enforcing DMARC policy lets careful receivers refuse forgeries of your domain in the session instead of accepting and bouncing them; how those checks work is covered with sender authentication. They reduce the flood; they do not stop a careless server elsewhere from accepting and bouncing. ## The judgement under the rules Backscatter is the clearest case where being helpful to senders, by accepting everything and explaining later, harms third parties. The working rule for any server you run is short: - refuse in the session whatever you would refuse later, - never generate a notice to an address you have reason to think is forged, - treat every automatic sender of mail, filters and responders included, as part of the mail system.

  • Why is a backup MX a common source of backscatter?
    A backup MX often relays for the primary's domain without knowing which users exist, so it accepts mail for any address. When it forwards to the primary and the primary refuses unknown users, the backup holds the message and must bounce it to the forged sender. Giving it the recipient list, as Postfix's `relay_recipient_maps` does, moves the refusal into the session.
  • Does publishing an enforcing DMARC policy stop your domain receiving backscatter?
    It reduces it. Receivers that check DMARC can refuse forgeries of your domain during the session, so they never accept and bounce them. But a server that does not check, or accepts before checking, still sends notices to your forged addresses, so you also need to recognise and refuse those notices yourself.

  • Accepting everything and bouncing later is kinder to senders than rejecting at RCPT.
  • Only spam filters cause backscatter; vacation auto-replies never do.
  • Telling the sender that their message contained a virus is always good practice.
  • RFC 5321 recommends silently dropping spam once it has been accepted.
  • A flood of bounces for mail we never sent proves our MX is an open relay.