On 2/6/2013 12:53 PM, Marcio Merlone wrote:
> Em 06-02-2013 14:54, Noel Jones escreveu:
>> On 2/6/2013 10:00 AM, Marcio Merlone wrote:
>>> Could anybody advice me how to achieve a sometimes_bcc, which should
>>> work as an always_bcc only when certain criteria is matched, based
>>> on subject and/or destination, like a sieve script?
>> If you need to base the decision on mail content such as Subject,
>> you'll need some sort of proxy or milter.
> Nice if it could be done with:
> - subject_bcc_maps with a pcre map or
> - header_bcc_maps with a pcre map or
> - header_checks with a BCC action...
>
header/body checks are too late in the processing to add a
recipient, so the BCC action is not available with those features.
And header/body checks cannot operate on multiple triggers, so even
if they could add a recipient it wouldn't fit your criteria of
{Subject + something else}.
> So close, yet so far...
>
> Will dig a little more about milter, seems it can be done also with
> some policy.
No, a postfix policy service does not have access to the email
content, so it can't see the Subject.
Your only hope of doing this inside postfix is a milter or a proxy,
and I'm not sure about a milter.
Probably your best option is to BCC everything and use a sieve
script on the recipient mailbox to throw out what you don't want.
-- Noel Jones
> If someone has some how-i-did to share I will be grateful.
>
> Thanks and regards.
>
> --
> Marcio Merlone