I need to configure postfix on a localhost as a relay to an smtp server.
This external smtp server requires
From: header to be consistent with the authenticated user name.
I want to fixup the
From: header for all the messages originating on this local machine to say
I tried the following:
sender_canonical_mapsThe problem is: it seems to be overwriting the
Reply-To:header as well, I don't need this, on the contrary, I want to use it extensively.
How I checked this:
sender_canonical_maps = regexp:/etc/postfix/sender_canonicalin main.cf
REPLYTO="email@example.com" mail firstname.lastname@example.org
- Actual results: received message has overwritten
REPLYTO="email@example.com" mail -r firstname.lastname@example.org email@example.com
- Actual results: received message has correct
The problem is this doesn't work without
header_checks: apparently doesn't work for
From:fields (http://www.postfix.org/header_checks.5.html see Bugs: section)
How can I simply force the
From: header on all outgoing mail, but leave
Reply-To: alone for local users to specify?