Custom Rules

Jeff Graves jeff at IMAGE-SRC.COM
Mon Sep 26 21:30:18 IST 2005


Works great. Thanks!

Jeff Graves, MCSA
Image Source, Inc.
508.966.5200 x31=20

-----Original Message-----
From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK] On =
Behalf
Of Denis Beauchemin
Sent: Monday, September 26, 2005 4:01 PM
To: MAILSCANNER at JISCMAIL.AC.UK
Subject: Re: [MAILSCANNER] Custom Rules


Jeff Graves wrote:

>I'm getting a bunch of spamis spam slipping through and I'm running=20
>older versions of MailScanner and spamassasin (about a year old). I=20
>don't have time right now to update or patch MailScanner or spamassin=20
>or add new rules_du_jour or whatever. All I'd like to do for the time=20
>being, is add a quick custom rule to catch this phrase "[ S P A M I S =20
>NOTIFICATION ]:" but I have no Perl regex experience. Spamassasin=20
>--lint complains about this syntax to local.cf:
>
>body SPAMIS_CUSTOM_RULE \b\[ S P A M I S NOTIFICATION\] describe=20
>SPAMIS_CUSTOM_RULE Detects spam sent by spamis score SPAMIS_CUSTOM_RULE =

>12.0
>
> =20
>
Jeff,

You only forgot to put your RE (Regular Expression) between /.../:

body SPAMIS_CUSTOM_RULE /\[ S P A M I S NOTIFICATION\]/

While you're at it, append a trailing "i" to make it ignore case.

Further refinement: use "\s*" in place of optional whitespace. body
SPAMIS_CUSTOM_RULE /\[\s*S\s*P\s*A\s*M\s*I\s*S\s*NOTIFICATION\s*\]/i

Denis

--=20
   _
  =B0v=B0   Denis Beauchemin, analyste
 /(_)\  Universit=E9 de Sherbrooke, S.T.I.
  ^ ^   T: 819.821.8000x2252 F: 819.821.8045



------------------------ 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!

------------------------ 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