[Mailer] Reorder headers used to determine Sender#37888
Conversation
|
I noticed the failed Travis build, but the failing tests seem unrelated to the changes in this PR. I'm not sure how I can address that. Can anyone advise please? |
77f595f to
6648be4
Compare
Use the `Return-Path` header as the last candidate to determine the Envelope's sender address. The `Return-Path` is usually configured _in addition_ to the `Sender` and/or `From` header: it allows for email bounces and complaints to be sent to a dedicated email address. It should therefore not be used as the first candidate header to determine the sender.
6648be4 to
7e60a8f
Compare
|
Thank you @cvmiert. |
|
You wrote in the introductory comment: You are correct that the "return-path" is set in addition to the "sender" and/or "from". And it is used for bounces of emails. You are also right that "return-path" should not be used as the first header candidate to determine the sender. But please don't use "return-path" as the last candidate. The last one must be "from". "from" is alway set and thus is the last candidate. |
Use the
Return-Pathheader as the last candidate to determine the Envelope's sender address.The
Return-Pathis usually configured in addition to theSenderand/orFromheader: it allows for email bounces and complaints to be sent to a dedicated email address. It should therefor not be used as the first candidate header to determine the sender.