Postfix rewrites my return-path header

4.5k Views Asked by At

I have noticed that although I pass a custom return-path header in mails going through my postfix server, the header gets re-written. I would like to pass my own header or at least construct a header dynamically. This is cause I want to get bounced emails on a specific email address (hence I need to pass in the return-path).

Is this possible?

2

There are 2 best solutions below

4
AnFi On

Have you set envelope sender address?
[-fcommand line option for sendmail look alike provided by postfix]

Many MTAs copy envelope sender address into (overwritten) Return-Path: header.

2
Ben On

You have to override message_drop_headers to not include the return-path.

message_drop_headers = "bcc, content-length"

http://www.postfix.org/postconf.5.html#message_drop_headers