Re: [Exim] Read a file containing regexp values in an Exim F…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jeremy C. Reed
Dátum:  
Címzett: Richard, WhidbeyNet NOC
CC: exim-users
Tárgy: Re: [Exim] Read a file containing regexp values in an Exim Filter?
On Tue, 2 Jul 2002, Richard, WhidbeyNet NOC wrote:

> However, we filter an ever-growing number of things. Over 4000 subjects,
> 2000 IP/blocks, and hundreds of message-body URL's. It would be


You can do the IP blocks with host_reject_connection (or host_reject in
Exim 3). The spec suggests chapter 37 to block instead at rcpt time with
an ACL.

> impractical to do this 4000 times:
>
> if $header_subject matches "get.+rich.+quick"
> then
>     finish
> endif

>
> How can we read a file containing a list of regexp values (subjects), to
> match against $header_subject? For example, read a file into an array
> and do:


Maybe you could have a text list of these thousands of regular expressions
and then have a simple shell script generate a new exim filter from that
list. (Maybe separate condition for each regexp or maybe several using
"or" sub-condition.)

Of course, your exim filter will be very long, but it may be more
manageable.

Does anyone have any examples of performance of using exim filter with
thousands of tests?

Also, what is the limit of sub-condition "or"? Does it improve
performance?

  Jeremy C. Reed
....................................................
     BSD software, documentation, resources, news...
     http://bsd.reedmedia.net/


p.s. I am one of your WhidbeyNet bandwidth customers, but I have never
used my WhidbeyNet email address.

p.p.s. By the way, I taught an Exim workshop a couple months ago close to
Whidbey Island. http://www.newsforge.com/article.pl?sid=02/03/05/0229219