recipient_bcc_maps, sender_bcc_maps


i have a postfix set up with a bunch of virtual domains.
we've been using always_bcc to archive the mail, until one of the
paranoid users asked us not to include his mail in the archive.

so i'm trying to do the same with recipient/sender maps:
sender_bcc_maps = pcre:/etc/postfix/sender_bcc
/.*/ <a href="mailto: ... at my dot tld"> ... at my dot tld</a>
if i enable only the recipient line, it works, his mail gets delivered
to null and his mailbox.
if i enable only the sender line, it works, mail sent from him, gets
sent to null, and whoever.
BUT, if i enable both rules, both his sent and recieved emails get archived!

if i send mail to him it looks like this:
anyone could hit me with a clue-by-four? [=

thanks in advance,


Re: recipient_bcc_maps, sender_bcc_maps

By Noel Jones at 03/31/2009 - 10:57

Of course it's archived - unless he's both the sender and

You can use a policy server that checks {sender, recipient}
and returns "BCC ... at example dot com" if Mr. Paranoid isn't
found. This may be tricky since the policy protocol doesn't
report a full list of recipients, only the "current" recipient.

Better solution is to bcc everything and use a delivery filter
(procmail or whatever) to throw away mail this is neither to
nor from him.

But what about mail from him to someone who needs to be
archived? or vice versa? What about multi-recipient mail to
him plus someone that must be archived? Can't solve all these
problems in an MTA.

BTW, you can use "DUNNO" as the result in a pcre table to
pretend the string wasn't found. No need to use a "null" alias.

-- Noel Jones

Re: recipient_bcc_maps, sender_bcc_maps

By Victor Duchovni at 03/31/2009 - 11:06

No, this is wrong. DUNNO is an access(5) action, which has no special
meaning in address rewriting tables.

Re: recipient_bcc_maps, sender_bcc_maps

By csere matyas at 04/01/2009 - 09:14

thanks for the hints, i think ill go with always_bcc/procmail.

Re: recipient_bcc_maps, sender_bcc_maps

By Victor Duchovni at 03/31/2009 - 10:44

What happens to the "null" recipient after it goes through amavis?
Don't enable "bcc" rewriting on both sides of the content filter.