Mariusz Kruk a écrit :
> On wto, 2008-10-21 at 05:38 -0700, mathiasadsl wrote:
>> Ok, it's getting better now but all my emails are forwared to
>> [EMAIL PROTECTED]
>> Even those which are not tagged as  [SPAM]
>> I guess i have some troubles with the regular expression.
>> Can you help me in the syntax issue?
> 
> Well... strange. Because the pattern you specified should match only those 
> positively scored. (or having hit some rule with YES in name (I dunno if 
> there are any such rules)).
> 

BAYES_00
BAYES_05
BAYES_20
BAYES_40
BAYES_50
BAYES_60
BAYES_80
BAYES_95
BAYES_99

> /^X-Spam-Status:[.*](Yes|YES)/ REDIRECT [EMAIL PROTECTED]
> 

There is no need for the "[.*]" (SA puts the Yes at start), and there is
no need for the (YES|Yes) (by default, header_checks are not case
sensitive).

Use either

/^X-Spam-Flag: Yes/     ...

or

/^X-Spam-Status: Yes/

Note that there is no need for (YES|Yes). read postfix documentation to
see why (look for "case").


WARNING. with REDIRECT, you lose the original recipients (you could
retrieve them by parsing the logs, but that's a bit too much).

it is better to use your MDA to do what you want:
- sieve (dovecot, cyrus)
- maildrop
- procmail
...

Alternatively, if you are using amavisd-new (it is the recommended
method to call SA for postfix users), you can configure amavisd-new to
add an extension (+spam for example), then you can simple deliver all
[EMAIL PROTECTED] to a single mailbox.

> But it seems you're using pcre but declare it as "normal" regexp. (I
> think pcre introduce the alternative notation with parentheses).
> 

Reply via email to