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:
* Company with a global IT staff. We install several servers a week.
They are Debian or CentOS. On these systems, in /etc/aliases some
well-knows local addresses (mailer-daemon, postmaster, hostmaster,
abuse) are all aliased to root, which is not aliased. Therefore,
mail sent to these aliases end up in root's mailbox
* On most of these new servers, Postfix is only used to relay locally
generated notification/alert/warning e-mail messages (that end up in
the local root's mailbox) to a sysadmin-team mailing list, hosted on
the corporate e-mail servers. Postifx is only listening on the
loopback interface as these servers are not supposed to receive any
mail. Postfix's configuration is kept as much to it's defaults as
possible.
What I'm trying to accomplish is a Postfix configuration that I can
distribute to all new and existing servers that will:
* redirect mail sent to the local root account to another address on
our company's e-mail servers which is fetched by a mailing list
manager software
* rewrite the recipient's address from 'root' to the mailing list
address, as it's not under my control and it doesn't accept e-mail
if the list's address is not in the TO: header
* do this without touching /etc/aliases if possible
Obviously just adding an alias like
root sysadmin.t...@my.domain.com
...in /etc/aliases doesn't work because the recipient's address is not
re-written in the TO: header, and the mailing list manager reject the mail.
Also using something like
root sysadmin.t...@my.domain.com
... in /etc/postfix/recipient_canonical with 'recipient_canonical_maps =
hash:/etc/postfix/recipient_canonical' in main.cf doesn't work for
addresses aliased to root. IT DOES work for messages sent directly to
root, but not to any other address aliased to root in /etc/aliases.
I'm obviously missing something here. Can someone point me in the right
direction please? I've been using Postfix for a while now and I'm fairly
familiar with it's configuration, but for some reason I don't see the
solution to this problem. Than you in advance.