Postfix: sender_bcc_maps
For an email account for a group project, we needed the ability to see what was being sent via a specific email account. The reason was, that we're going to handle the account data very liberally and therefor to avoid misuse of the account, we needed an automatic forward of all emails that were sent from this account to some screening account.
I thought i would need to script some piping instructions but actually it was much easier: Using the command sender_bcc_maps i could simply define that any email sent by x@x.com would be bcced to the same account. Now, that account has an automatic forward to some aliases. So anytime someone sends an email from x@x.com all the aliases (outside emails) would get a notice.
To setup sender_bcc_maps, i needed to setup a hashtable that looked like this:
-
bcc_maps
-
x@x.com x@x.com
After "postmap bcc_maps" i had to include the command in main.cf, that looks like
-
sender_bcc_maps = hash:\etc\postfix\bcc_maps
That did the trick. Thanks to miniGeek, Linox.BE and of course the Postfix team.