The [brackets] are the problem, since they create a character class (that is, match anything with a b, or an r, or an a, or...
You need to make it /\[text to look for\]/i if your text has [] in it. There are also a few other special characters you'd have to escape if they came up; +*?()[]\/ are the ones that come to mind off the top of my head, though there may be others. On Thu, 8 Jan 2004, WA9ALS - John wrote: > > In your /etc/mail/spamassassin/local.cf, add this at the bottom: > > > > header MY_CUSTOM_RULE Subject =~ /texttolookfor/i > > describe MY_CUSTOM_RULE My custom subject rule > > score MY_CUSTOM_RULE -500 > > Hi Steve - I thought this was working, but it looks like I'm getting EVERY > email scored with -500 for starters! Here's what's in my .cf file: > > header MY_CUSTOM_RULE Subject =~ /texttolookfor/i (I used the text I > wanted, which included square brackets - Is that a problem? - e.g. [text to > look for]) > describe MY_CUSTOM_RULE My custom subject rule > score MY_CUSTOM_RULE -500 > > -and here's the header from a spam that made it through: (and it didn't > have the text I was looking for above) > > X-Spam-Status: No, hits=-480.6 required=2.4 tests=DATE_IN_FUTURE_12_24, > FORGED_JUNO_RCVD,FORGED_OUTLOOK_HTML,FORGED_OUTLOOK_TAGS,HTML_70_80, > HTML_FONTCOLOR_UNKNOWN,HTML_FONT_FACE_BAD,HTML_MESSAGE, > HTML_TABLE_THICK_BORD,HTTP_ESCAPED_HOST,HTTP_EXCESSIVE_ESCAPES, > MIME_HTML_NO_CHARSET,MIME_HTML_ONLY,MY_CUSTOM_RULE, > RCVD_FAKE_HELO_DOTCOM,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_NJABL, > RCVD_IN_NJABL_DIALUP,RCVD_IN_SORBS,USERPASS autolearn=ham version=2.60 > > You can see that this got a score of +19.4 based on the spam, but it started > at -500, so it ended up at -480.6 and got through. What am I missing? > THANKS! - John > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Perforce Software. > Perforce is the Fast Software Configuration Management System offering > advanced branching capabilities and atomic changes on 50+ platforms. > Free Eval! http://www.perforce.com/perforce/loadprog.html > _______________________________________________ > Spamassassin-talk mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/spamassassin-talk > -- Adam Lopresto http://cec.wustl.edu/~adam/ [MacGyver] is the Martha Stewart of action. --Patrick J. Mooney ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk