Change Envelope From to match From header in Postfix

Posted by lid on Server Fault See other posts from Server Fault or by lid
Published on 2012-03-13T12:28:13Z Indexed on 2012/03/22 23:31 UTC
Read the original article Hit count: 314

Filed under:
|
|

I am using Postfix as a gateway for my domain and need it to change or rewrite the Envelope From address to match the From header. For example, the From: header is "[email protected]" and the Envelope From is "[email protected]". I want Postfix to make the Envelope From "[email protected]" before relaying it on. I took a look at the Postfix Address Rewriting document but couldn't find anything that matched my use case.

(In case you're curious why I need to do this: Gmail uses the same Envelope From when sending from a particular account, no matter which From: address you choose to use. I would prefer not to disclose the account being used to send the email. Also, it messes with SPF/DMARC domain alignment - see 4.2.2 of the DMARC draft spec.)

© Server Fault or respective owner

Related posts about email

Related posts about postfix