creating rules

Matt Kettler mkettler at EVI-INC.COM
Thu Sep 29 00:19:27 IST 2005


    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Matt Kettler wrote:
> Jon Miller wrote:
> 
>>I need to create a rule where if the subject has Re[1]: or any number between the [] that it is picked up as spam.  How do I create the header so that it's a single entry yet works for any number from a blank [] to any character? 
>>Does the * works and means anything?
>>
>>ex:
>># 15 Subject: Re[1]:
>>header PROLO_GSPAM15 Subject =~ /Re[*]:/i
>>score PROLO_GSPAM15 8
>>describe PROLO_GSPAM15 Spam - custom rule set
> 
> 
> 1) * isn't a character wildcard in regex, it's a repeat-count wildcard. ie: d*
> will match any number of d's in a row (including 0).


One more thing I forgot to mention. You might want to get a perl regex
quick-reference. I keep this one printed out and stuck to my wall. It doesn't
cover everything, but covers all the common stuff.

http://www.erudil.com/preqr.pdf

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!



More information about the MailScanner mailing list