-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 05 December 2003 08:35 am, Bart Schaefer wrote: > 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 ...") >
man this is so much easier. For those using maildrop here is how to do it. SPAMLEARN = 25 /^X-Spam-Status: Yes, hits=![:digit:]+\.?[:digit:]*/ if ($MATCH2>$SPAMLEARN) { xfilter "sa-learn --spam" to "/dev/null" } my whole filter does way more but I simplified it for others to see. I have the ability to either save it before deleteing and also to send an email with the salearn output to the mailbox. and a bunch of other stuff. anybody that would like to see my .mailfilter let me know. - -- -~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~- Brook Humphrey Mobile PC Medic, 420 1st, Cheney, WA 99004, 509-235-9107 http://www.webmedic.net, [EMAIL PROTECTED], [EMAIL PROTECTED] Holiness unto the Lord -~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~-~`'~- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQE/0LkGnT1TkA6FgPgRAgIZAJ4yBb4L8+DZwDvsOs0morbNheqpzACgkPDm zrhZXCmUJ7oaLTkMDS35g9E= =gP0G -----END PGP SIGNATURE----- ------------------------------------------------------- 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_id78&alloc_id371&op=click _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk