Re: [Exim] Using lists as OR expressions to make an effectiv…

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Marc Perkel
CC: exim-users
Subject: Re: [Exim] Using lists as OR expressions to make an effective spam filter
On Fri, 30 May 2003, Marc Perkel wrote:

> But I don't want to put the whole "http://" expression in each entry. I
> want to plug the list into the middle of a larger regular expression. If
> you notice my code - it does that.


Sorry, I didn't notice. Today has been far too busy and I'm going to be
away next week...

> What I need to be able to do is: regex(file contents as OR list)regex.


There isn't any other way to do that other than what you are already
doing - that is, building the inclusion out of the available expansion
features.

If your bracketing regex are always actually fixed, you could consider
pre-processing your file into one which has them included on every line.
Then you could use wildlsearch. The old technique of an additional layer
of indirection is often useful. (This is not so very different from
building a dbm or cdb file, for instance.)

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book