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 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.


You should set receive_override_options in your master.cf as follows.

#/etc/postfix/master.cf inet n - n - - smtpd
   -o content_filter=
   -o receive_override_options=no_address_mappings
  • no_address_mappings - will disable canonical address mapping, virtual alias map expansion, address masquerading, and automatic BCC (blind carbon-copy) recipients. This is typically specified BEFORE an external content filter.

More info here. Hope that helps.

| improve this answer | |
  • thx this is exactly what i needed. – Ulli Dec 11 '14 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.