Hello, I am sending this message after searching for a solution on the Internet. Unfortunately I haven't been able to find a valid way to deal with my problem.
My question is about address rewriting in Postfix. I have a bunch of users using internal addresses (p.e. [email protected]). Some of them are allowed to send emails outwards, so they have external addresses (p.e. [email protected]). I set the smtpd_generic_maps parameter in main.cf: smtpd_generic_maps = hash:/etc/postfix/generic so that internal addresses are automatically converted into the corresponding ones when sending an email to an external recipient. It works fine. Also, I need to keep an internal copy of all outgoing emails, so I set the sender_bcc_maps parameter sender_bcc_maps = hash:/etc/postfix/sender and a sender file with lines like this one: [email protected] [email protected] and here comes the problem. No copy of outgoing emails is received in [email protected]. If I change the line into this one: [email protected] [email protected] then I get copy of all emails, both internal and outgoing ones. But I don't want to keep a copy of internal emails as there are too many of them, and I wouldn't want to have to set filters in the mail client program. As far as I know, it happens because address rewriting is performed after processing bcc maps. And here comes my question: Is there any way to get a copy of outgoing emails? Thanks in advance
