On 21/04/2021 16:17, Alex wrote:
I have postfix configured in a multi-instance setup in conjunction
with amavisd. I'm using always_bcc to create a copy of each email sent
or received.
The problem is that, while postfix appears to deliver the bcc-user
email separately from the other recipients, amavis somehow delivers to
all the recipients, including the bcc-user, as one email.
How do I configure always_bcc to bypass amavisd altogether so it isn't
processed at all?
# postconf -c /etc/postfix-116 always_bcc
always_bcc = bcc-user
I'm unsure what postconf details I can provide, so I'll instead just
provide the log entries.
Apr 21 10:58:24 xavier postfix-out/local[2682940]: 19D63305F4A09:
to=<bcc-u...@example.com>, relay=local, delay=0.01, delays=0.01/0/0/0,
dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail)
...
If you are running amavis as a content filter, you need the initial
postfix instance (which feeds into amavis) to have
receive_override_options = no_address_mappings
and then permit mappings (which include always_bcc) to occur in the 2nd
instance (for the mail that is returned by amavis), for example this
might be in master.cf by:
127.0.0.1:10025 inet n - n - - smtpd
# note: absence of no_address_mappings means that address mapping
*will* occur here, including always_bcc
-o receive_override_options=no_unknown_recipient_checks,no_milters
...