RFC822 on Return-Path:
:
This field is added by the final transport system that delivers the message to its recipient. The field is intended to contain definitive information about the address and route back to the message's originator.
So how come some e-mails have two of them? (In my sample, usually one at the end and one at the start, from which I assume that client added it there.) Isn't there only one originator?
Is that a bad habit of some clients?
The Return-Path would normally be added at the top at the time the email is received. Specifically it would happen during the SMTP transmission of the "MAIL FROM" command. It may not be the same as the email address in the From:, Reply-To:, or Sender: headers. If there is a second Return-Path at the bottom, it would most likely be suspect, probably added after delivery is already complete.
You are 30 years behind. RFC 822 has been superseded twice over.
… and the supserseding documents, whilst still somewhat flawed, do attempt to explain what RFC 822 either allowed for that the world decided not to do or outright got wrong.
The
Return-Path:
andDelivered-To:
headers do not denote originator and recipient. They contain the message envelope after a message has left the SMTP environment and is thus no longer broken down into envelope and content — as it does when a local delivery agent writes message envelope and message content into a mailbox file at point of local delivery.It's a bad habit of the MUA or MTA that sent the message, or of some intermediate gateway out of the SMTP environment. The topmost trace fields will almost certainly have been added by your local delivery agent. Those further down were added by something else. Your LDA is free to remove existing envelope headers when prepending its own. But it is not required to and clearly it does not.
Further reading
It's either bad client habits, or spam.
You can determine if it is the latter by examining the contents and the rest of the headers.
Return-Path is one of the few headers the MTA will check for, and that the delivering MTA SHOULD remove and replace with its own.
Some emailing accounts can have the option to send email 'On-behalf-of...' which would use a different server to route the emails through. This would then involve multiple emails in reply. Otherwise a different example could be if a php application sends emails through a server - you can specify a return address or addresses (sometimes you can even spoof a reply address).
Obviously the best habit would be to have your clientele to post only one reply address for locating emailing transactions and other debugging tasks (if required).
Source: http://www.ietf.org/rfc/rfc2821.txt
Also: Standard for ARPA Internet Text Messages
Source: http://ietfreport.isoc.org/idref/rfc822/