Make ruleset

Matt Kettler mkettler at EVI-INC.COM
Wed Nov 10 16:15:57 GMT 2004


    [ 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. ]

At 08:18 AM 11/10/2004, Joakim Cefalk wrote:
>This ruleset are setting points if there are any swedish signs but i want 
>it too set points if there are not any swedish signs becuse 99% of my 
>emails are swedish (execpt this list..).
>
>body SWEDISH_SIGN                  /\b(?:å|ä|ö)/i

You'll want to do it with hex codes, instead of the literal values, it 
works much better in SA rules.

My second suggestion is to character ranges if you're looking for 
characters instead of strings. MUCH more efficient regex code.

Here's a quick example, which should cover both upper and lower case.
body    SWEDISH_SIGN /[\xC5\xC4\xD6]/i

If it fails to catch lower case, as those are upper-case codes, then 
apparently /i doesn't work on high-ascii codes. You can use the table here:

http://www.math.harvard.edu/computing/html/chars.html

To build the rest, just convert the number to hex (windows calc can do this 
for you) and prefix them with \x.

------------------------ 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 MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).




More information about the MailScanner mailing list