For all the time I have worked in email, this seems to be one of the greatest mysteries to new postmasters. It can be confusing as the messages go to the SMTP MAIL FROM address, which can be different from, or the same as the from header. If you’re reading this article, I would first suggest reviewing the article, “How to check an SMTP connection with a manual telnet session” as it covers the basics of the SMTP dialog.
The key to understanding bounces (sometimes referred to as DSNs, Delivery Status Notifications or NDRs, Non-Delivery Reports) is that they should always be sent to the SMTP MAIL FROM address. Some mail platforms may not adhere to this rule, but most do, so I’ll focus on the majority of what you’re likely to see. From review of the above mentioned post, there is the following sample SMTP session:
telnet mail.port25.com 25
Connected to mail.port25.com (184.108.40.206).
Escape character is '^]'.
220 mail.port25.com (PowerMTA(TM) v4.0) ESMTP service ready
250-mail.port25.com says hello
MAIL FROM: <email@example.com>
250 2.1.0 MAIL ok
RCPT TO: <firstname.lastname@example.org>
250 2.1.5 <email@example.com> ok
354 send message
From: "John Smith" <firstname.lastname@example.org>
To: "Jane Doe" <email@example.com>
Subject: test message sent from manual telnet session
Date: Wed, 11 May 2011 16:19:57 -0400
This is a test message sent from a manual telnet session.
250 2.6.0 message received
221 2.0.0 mail.port25.com says goodbye
In the above example there are two from addresses:
MAIL FROM: <firstname.lastname@example.org>
From: “John Smith” <email@example.com>
It is the former, the MAIL FROM address, to which bounces are sent. The latter, the from: header, is part of the body of the message and is what shows in the email client as the sender of the message.
Of course, one might ask, how do I check the message to see where the bounces would be sent? This is easily done by checking the full headers of the message. Here are some examples of well known email clients and how to check the headers (assuming you are already viewing the given email in question:
- Yahoo – Click More -> View Full Header
- Gmail – Click the dropdown arrow next to the reply button -> Show original
- Hotmail – Click Actions -> View message source
- Outlook desktop client – Right click on the message and select Message Options
- Mac Mail – Command+Shift+H or View Menu -> Message -> All Headers
Once you have the headers in front of you, they should look something like the following:
From “Scott Habicht” Fri Nov 14 19:57:42 2014
Received: by mail.port25.com id hcpfbm11u8kk for <firstname.lastname@example.org>; Fri, 14 Nov 2014 14:57:47 -0500 (envelope-from <email@example.com>)
From: “Scott Habicht” <firstname.lastname@example.org>
Subject: testing headers
Date: Fri, 14 Nov 2014 14:57:42 -0500
In the above example, it is very easy to the see the From: header, but what happened to the SMTP MAIL FROM address? Well, it is now shown as the Return-Path header:
The top entry was added by Yahoo:
The Return-Path header represents the SMTP MAIL FROM address, where bounces would be sent. From section 4.4. “Trace Information” of RFC 5321:
When the delivery SMTP server makes the “final delivery” of a
message, it inserts a return-path line at the beginning of the mail
data. This use of return-path is required; mail systems MUST support
it. The return-path line preserves the information in the <reverse-
path> from the MAIL command. Here, final delivery means the message
has left the SMTP environment. Normally, this would mean it had been
delivered to the destination user or an associated mail drop, but in
some cases it may be further processed and transmitted by another
It is important to note that the Return-Path header should NOT be added by the application that creates the email as they would be ignored. The Return-Path header should only be added by a given SMTP server.
Additional reading: http://en.wikipedia.org/wiki/Bounce_address