View Single Post
  #5 (permalink)  
Old 01-03-2008, 09:43 PM
mmorse mmorse is offline
Moderator
 
Posts: 6,237
Default

user@domain.com manager@domain.com
user1@domain.com manager@domain.com
user2@domain.com manager@domain.com

Postfix features on FC3 - LinuxQuestions.org:
Quote:
Postfix V2.1 supports a "sender_bcc_maps" function which is a lookup table of sender addresses. If the sender address matches, the right hand side of the lookup table will be added as a BCC to the e-mail. So effectively, you could add each user you wanted to log mail for, in the left hand side of the table. In the right hand side of the table you would list the admin e-mail address you want to send the BCC'ed mail to, so for example:

In /etc/postfix/main.cf add:

sender_bcc_maps = hash:/etc/postfix/sender_bcc

Then edit or create /etc/postfix/sender_bcc in the following format:

locuser1@vitdomain1.com admin@adminsdomain.com
locuser2@vitdomain2.com admin@adminsdomain.com

and run "postmap /etc/postfix/sender_bcc" and "posfix reload".

Basically any mail sent through postfix, with an sender address of locuser1@vitdomain1.com or locuser2@vitdomain2.com would also be BCC'ed to admin@adminsdomain.com.

Just FYI, you can do this based on recipient addresses to, with a similar format table using the "recipient_bcc_maps = hash:/etc/postfix/recipient_bcc" in /etc/postfix/main.cf

One thing that I think you should add is that for this to work (at least for me), I had to also run the commands: "postmap /etc/postfix/recipient_bcc" and "postfix reload".
You might want to use zmmta.conf instead of main.conf so it sticks better - don't forget to recheck functionality on upgrades.
Reply With Quote