On our mailing application we are sending emails with the following header:
FROM: marketing@customer.com
TO: subscriber1@domain1.com
Return-PATH: bouncemgmt@ourcompany.com
The problem that we are facing is that some email servers will bounce back a message immediately and use the from or reverse path (marketing@customer.com) instead to our bounce mgmt server. We want to know if we modify in the header the reply-to to be the same as the return-path if we will be able to catch all bounces.
Any other ideas are welcome?
We are using the following documents as references: VERP RFC Bounce Messages
SMTP Log Parsing to get Bounces
EDIT 1: A few more bits of information to see if we can get this resolve.
We want to know at what point the email server relaying the message will choose to use the reply-to versus the return-path. We have notice that when the first smtp server relaying the message gets rejected it sends it to the reply-to, but when it happens after one hop it sends it to the return-path.
Another way to think about
Return-Path
vsReply-To
is to compare it to snail mail.When you send an envelope in the mail, you specify a return address. If the recipient does not exist or refuses your mail, the postmaster returns the envelope back to the return address. For email, the return address is the
Return-Path
.Inside of the envelope might be a letter and inside of the letter it may direct the recipient to "Send correspondence to example address". For email, the example address is the
Reply-To
.In essence, a Postage Return Address is comparable to SMTP's
Return-Path
header and SMTP'sReply-To
header is similar to the replying instructions contained in a letter.for those who got here because the title of the question:
I use
Reply-To:
address with webforms. when someone fills out the form, the webpage sends an automatic email to the page's owner. theFrom:
is the automatic mail sender's address, so the owner knows it is from the webform. but theReply-To:
address is the one filled in in the form by the user, so the owner can just hit reply to contact them.Let's start with a simple example. Let's say you have an email list, that is going to send out the following RFC2822 content.
Now, let's say you are going to send it from a mailing list, that implements VERP (or some other bounce tracking mechanism that uses a different return-path). Lets say it will have a return-path of coolstuff-you=yourcompany.com@mymailinglist.com. The SMTP session might look like:
Where {C} and {S} represent Client and Server commands, respectively.
The recipient's mail would look like:
Now, let's describe the different "FROM"s.
The Return-Path (sometimes called the Reverse-Path or Envelope-FROM -- all of these terms can be used interchangeably) is the value used during the SMTP session. As you can see, this does not need to be the same value that is actually found in the mail headers. Only the recipient's mail server is supposed to add a Return-Path header to the top of the email. This records the actual Return-Path sender during the SMTP session. If a Return-Path header is already exists in the email, then that header is to be removed, and replaced by the recipient's mail server.
All bounces that occur during the SMTP session should go back to the Return-Path value. Some servers may accept all email, and then queue it locally, until it has a free thread to deliver it to the recipient's mailbox. If the recipient doesn't exist, it should bounce it back to the recorded Return-Path value.
Note, not all mail servers obey this rule. Some mail servers will bounce it back to the FROM address.
The FROM address is the value actually found in the FROM header. This is supposed to be who the message is FROM. This is what you see as the "FROM" in most mail clients. If an email does not have a Reply-To header, then all human (mail client) replies should go back to the FROM address.
The Reply-To header is added by the sender (or the sender's software). It is where all human replies should be addressed too. Basically, when the user clicks "reply", the Reply-To value should be the value used as the recpient of the newly composed email. The Reply-To value should not be used by any server. It is meant for client side use.
However, as you can tell, not all mail servers obey the RFC standards or recommendations.
Hopefully this should help clear things up. However, if I missed anything, let me know, and I'll try to answer.
I had to add a Return-Path header in emails send by a Redmine instance. I agree with greatwolf only the sender can determine a correct (non default) Return-Path. The case is the following : E-mails are send with the default email address : admin@yourcompany.com But we want that the real user initiating the action receives the bounce emails, because he will be the one knowing how to fix wrong recipients emails (and not the application adminstrators that have other cats to whip :-) ). We use this and it works perfectly well with exim on the application server and zimbra as the final company mail server.