Postfix, amavis, *bcc double email problem
In our main.cf we have an always_bcc=pippo line.
The behaviour we’re seeing is that when a user sends a mail to a user the recipient in bcc get two responses.
Same stuff with recipient_bcc_maps
What is happening is that the ‘always_bcc=pippo’ is running twice.
The ‘always_bcc’ is handled through Postfix’s cleanup service.
The cleanup service is running twice on the same email, once with Postfix before amavisd, and once
again after amavisd.
What you might want to do is remove the ‘always_bcc’ (and or ‘recipient_bcc_maps’) from the ‘main.cf’ and setup a seperate cleanup service specifically for the ‘always_bcc’ parameter (and/or recipient_bcc_map).
This cleanup service will be used for the second postfix smtp server.
For example:
cleanupAF unix n - n - 0 cleanup
-o always_bcc=pippo
-o recipient_bcc_maps=hash:/etc/postfix/recipient_bcc
127.0.0.1:10025 inet n - n - - smtpd (after filter
smtp server)
-o cleanup_service_name=cleanupAF
Now only the reinjection after the filter will use the *bbc options.
NB We have also tested this scenario on postfix+clamsmtp: it works