Andy Wolfenstein:
> Greetings and thanks for reading,
>
> My question pertains to re-writing headers for addressed that are
> aliased to other addresses in /etc/aliases. Background information:
Postfix is an MTA, not a content-management system, therefore it
does not directly support header rewriting that depends on envelope
content.
You may be able to kludge this together with custom message delivery
transports with custom header rules, one transport for each mailing
list that requires To: header damage.
/etc/postfix/main.cf:
transport_maps = hash:/etc/postfix/transport
/etc/postfix/transport:
[email protected] list1-kludge:
[email protected] list2-kludge:
[email protected] list3-kludge:
/etc/postfix/master.cf:
list1-kludge unix - - n - - smtp
-o smtp_header_checks=pcre:/etc/postfix/list1-kludge.pcre
/etc/postfix/list1-kludge.pcre:
/^To:.*/ REPLACE To: [email protected]
This kludge obviously breaks for email without To: message header,
and that is just one of many limitations.
Wietse