Re: [exim] System Filter syntax

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Lukas
CC: Exim-users
Subject: Re: [exim] System Filter syntax
On Tue, 25 Jul 2006, Lukas wrote:

> I am trying to block some spam that uses typos to fool spamassassin.
> At the moment, I have this regex expression in the ACL control
> section of the configure file:
>
>              regex = [Vv] *[Ii] *[Aa] *[Gg] *[Rr] *[Aa]
> This regex, however, blocks every combination of upper/lowercase  
> characters. What I need is a regex, or a system filter expression  
> that match every combination of characters in the specified word. To  
> make an example: i would like to be able to block words like VIAsGRA,  
> VIAGGRA, VijAGRA and so on.
> How can I tell exim to consider the specified word and every possible  
> character between the very characters of the specified word?


(?i)\bv\S*i\S*a\S*g\S*r\S*a\b

(?i) gives you case independence. That pattern does not allow spaces,
otherwise it would match

Very indifferent ancient gorillas roam Africa.


-- 
Philip Hazel            University of Cambridge Computing Service
Get the Exim 4 book:    http://www.uit.co.uk/exim-book