Re: [EXIM] Filter: Is this valid? Any better ways?

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Dan Birchall
CC: exim-users
Assumpte: Re: [EXIM] Filter: Is this valid? Any better ways?
On Wed, 17 Dec 1997, Dan Birchall wrote:

> In a filter file, I've just added the following ruleset. The
> program doesn't appear to be choking on it just yet, but I'm
> not sure whether it's really syntactically correct (not sure
> how Exim treats parentheses), or whether there's a simpler
> way of doing it.


If it doesn't complain, it's happy with the syntax. Parentheses are
allowed.

> if
> ($local_part is not "djb" or $domain is not "16straight.com")
> and
> ($local_part is not "djb" or $domain is not "scream.org")
> then finish endif
>
> I have a couple thoughts as to ways I might be able to do
> this more efficiently... either using or{{}{}} and and{{}{}}
> or using a lookup with an lsearch and merely adding addresses
> to the file if I want them to use the subsequent filters.


Neither would be much more efficient, as they are both just doing the
same thing, and the lsearch has to read from a file as well. If the
number of tests gets quite large, then maybe a DBM lookup would do
better, but I think you'd need quite a lot of entries for that to be
worth it.


-- 
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714



--
*** Exim information can be found at http://www.exim.org/ ***