I have a problem to configure my postfix. My aim is to have a mail-server which filters spam and virus mails by using Spamassasin and ClamAV via amavis. Furthermore i want to archive a copy of each mail in an extra archive. For this i chose the way to use the recipient_bcc_maps and the sender_bcc_maps parameters in the /etc/postfix/main.cf to forward a copy of all incoming and outgoing mails to one archive e-mail-address. The filter with amavis works fine. And if i disable the filter the forwarding the mails also works fine.
The Problem I have is if I enable the filtering. In this case each mail I send is send three times to the archive e-mail-address mails which I receive is send two times to the archive.
I suggest that this is cause the mail is received again from amavis but I don't know how I can disable the sender_bcc_maps and recipient_bcc_maps for the re-received mails from amavis. I already tried to add the parameters to the /etc/postfix/master.cf
127.0.0.1:10027 inet n - n - - smtpd -o content_filter= -o recipient_bcc_maps= -o sender_bcc_maps= ...
But it does not changed anything. I am grateful for any Ideas.