Re: regex - in a file?
"Peter Bowyer" <[email protected]> Thu, 9 Sep 2004 06:43:49 +0100
| Newsgroups | gmane.mail.exim.exiscan.user |
|---|---|
| Message-ID | <0a8001c4962f$fc115480$0a46a8c0@pbdesktop> |
Lawrence Ong <[email protected]> wrote: > Hi, > > We are thinking of having multiple regexes. Below is simlar to what > we currently have. > > # deny messages matching a particular regex not in our network > deny message = This message matches a blacklisted regular expression > ($regex_match_string) condition = ${if > <{$message_size}{20k}{1}{0}} regex = http.//4drugs123.com : etc > : etc2 > > The problem that we have now is that the regex string is getting very > long. Not only so, continually modifying the exim.conf file is not > feasible for us. > > Is it actually possible to have the 'regex' read from a file? We > tried using lsearch, and it seems that the regex line is not able > to understand that? Or did we make a syntax error somewhere? Have you tried Exim's $readfile expansion? regex = ${readfile {/path/to/file}{:}} should work for a newline-delimited file. http://www.exim.org/exim-html-4.40/doc/html/spec_11.html#IX831 Although I should poiunt out here that SpamAssassin is extremely good at this kind of processing, and there are URIBLs which collect spamvertised URIs which SA can test against - no updating needed from you at all. Peter