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. user@mydomain.local). Some of them are allowed to send emails outwards, so they have external addresses (p.e. pep...@mydomain.com). 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: pep...@mydomain.com registry@mydomain.local and here comes the problem. No copy of outgoing emails is received in registry@mydomain.local. If I change the line into this one: user@mydomain.local registry@mydomain.local 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