On Fri, 5 Dec 2003, Satya wrote:

> On Dec 5, 2003 at 08:46, [EMAIL PROTECTED] wrote:
> 
> >Adding insult to injury, Procmail won't cope if the first character of
> >a regular expression is a backslash, so we have to add a set of parens
> >to protect +that+ as well.
> >
> >  * ^Subject: (\*\*\*\*\*SPAM\*\*\*\*\*)
> 
> * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*
>
> works for me.

That's because "first character of a regular expression is a backslash"
applies to the ENTIRE condition line, not to any sub-expression in it.
That is:

:0
* \*\*\*\*\*\*\*\*\*

might not work as expected, you'd need

:0
* (\*\*\*\*\*\*\*\*\*)

Or

:0
* ()\*\*\*\*\*\*\*\*\*

But you don't need to "protect" the backslash when it is already preceded
by "^Subject: " or "^X-Spam-Level: " or any other substring of the regex.  
Some people do so anyway, as a reminder in case they edit the expression
later and move the backslash to the beginning.

One note --

:0
* $ 1^1 B ?? ! \*\*\*\*\*\*\*\*\*

There, the backslash is still at the beginning of the regex, it's just 
that the regex is not at the beginning of the condition line.  So you
DO need to protect the backslash in that case:

:0
* $ 1^1 B ?? ! (\*\*\*\*\*\*\*\*\*)

(The above means "expand variables, score 1 point for each match, scan
the body [rather than the header], finding non-matches for ...")



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to