Im setting up postfix SMTP relay, that will be placed right after Exchange server.
Details: 1) postfix server name mail.server.com 2) we have several domains: a-domain.com, b-domain.com and etc..
I need to rewrite somehow emails headers. So recipient will not receive email like:
Received: from mail.server.com ([XX.XX.XX.X])
But will receive it from mail.a-domain.com ([XX.XX.XX.X]) if sender is [email protected] OR from mail.b-domain.com ([XX.XX.XX.X]) if sender is [email protected]
is this possible anyhow?
Postfix does not support directly this feature, but you can fiddle with transport maps in order to achieve your goal.
You can add many transports in
master.cf
, each for every domain, with a-o
directive that adds a remap ruleIn the
transport
file you set up the transport rule to use the transports specified inmaster.cf
accordinf to the domain nameThis blog post contains some examples and some links.