Closed Bug 396273 Opened 17 years ago Closed 16 years ago

Return-path overrides from header


(Thunderbird :: Message Compose Window, defect)

Not set


(Not tracked)



(Reporter: elharo, Unassigned)




User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv: Gecko/20070725 Firefox/
Build Identifier: (20070728)

When replying to an e-mail that includes a From address and a Return-path header, but not a Reply-to header, the response goes to the Return-path address. It should go to the From header address.

Reproducible: Always

Steps to Reproduce:
1. Send an e-mail with From and no Reply-to using an SMTP server such as GMail that adds a Return-path header. Your GMail address should be different from the From address.
2. Receive the mail
3. Reply to the message. Look where it's going.
Actual Results:  
Sends to Return-path address

Expected Results:  
Sends to From address

I missed a couple of important e-mails while I was in Norway this past week. Although I was checking my e-mail at least once a day, several important responses somehow went to my GMail address instead, which I was not checking. I found them when I got home and opened my Gmail account yesterday.

At first I was perplexed, because I do not usually set my return address to GMail. Then I remembered that on the road I was using the GMail SMTP server to send, because the Speakeasy server I normally use only works from my local area network behind my router. Could GMail be rewriting my headers? So I did some experiments.

I sent e-mail to my UNC address from my laptop using the GMail SMTP server. I verified that the return address I was sending out was The message came through quickly and I received it on my desktop. It indeed seemed to come from as it should. Then I hit “Reply”. The reply that opened was addressed to “”. Weird. Had a Google inserted a reply-to header before forwarding my mail?

In fact, it had added a Return-Path header:


The From header appeared untouched, and there was no Reply-to header. Checking RFC 2821, I see that:

    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 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 mail system.

So it seems like Google is indeed following the spec by setting the Return-Path header. However, reading further on in the RFC we find:

    The primary purpose of the Return-path is to designate the address to which messages indicating non-delivery or other mail system failures are to be sent. For this to be unambiguous, exactly one return path SHOULD be present when the message is delivered. Systems using RFC 822 syntax with non-SMTP transports SHOULD designate an unambiguous address, associated with the transport envelope, to which error reports (e.g., non-delivery messages) should be sent.

RFC 2822 also clearly states:

    In the absence of the “Reply-To:” field, replies SHOULD by default be sent to the mailbox(es) specified in the “From:” field unless otherwise specified by the person composing the reply.

In other words, the return path is only for automatic responses, such as “No such recipient”. It is not for deliberate replies composed by a human being. It is, in other words, not the reply-to address. If the Reply-to header is not set, the response should be sent to the From address, not to the Return-path. There is a bug here but it is in Thunderbird, and presumably other e-mail clients my correspondents were using.
You don't happen to have both those addresses set up as identities? See bug 377998, we special case it when you reply to one of your own identities, so you can do follow-ups to mail you sent out already.
I believe they are set up as identities, so that may be part of the problem.

However, I'm not convinced this is the same thing, nor am I convinced that this doesn't happen when the addresses  ar enot set up as identities. 

If that is the only problem here, it is still a bug. 
Well, it's easy to test - just change the other identity address temporarily. Then try replying to that same mail.
I actually went ahead and deleted the GMail account as an identity (Wasn't using it via TB anyway) and the problem still occurs as described. Replies are going to the Return-path address, not the From address, when no Reply-to header is supplied.  
I tried those steps to reproduce. What happened when I sent a mail using thunderbird and the gmail smtp server was the gmail server changed the From-header to my gmail address. 

Even if I manually changed the message source after that, the Return-Path doesn't make a difference.
I just tested this in Thunderbird, and replies seem to correctly go to From, not Return-Path.

I added the following simple file to my IMAP server:

  Return-Path: <>
  Message-ID: <>
  Date: Wed Nov 19 14:18:41 2008 +0100
  From: My From Address <>
  To: My destination <>
  Subject: Test replies with return-path
  Content-Type: text/plain; charset=UTF-8
  Content-Transfer-Encoding: 8bit

  Where do replies go?

Started Thunderbird and hit "reply". The To address was the correct "".

Note that there is no Reply-To in this minimal email.
->WFM based on my own testing and M's test.
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.