[prev in list] [next in list] [prev in thread] [next in thread] 

List:       exim-users
Subject:    Re: Searching files for host lists
From:       Philip Hazel <ph10 () cus ! cam ! ac ! uk>
Date:       1997-08-18 9:23:28
[Download RAW message or body]

On Sat, 16 Aug 1997, John Henders wrote:

> I would like to be able to match a list of domains in the form
> 
> domain1.com
> domain2.com
> domain3.com
> 
> with a lsearch lookup. However, the sticky bit is that I also want to
> have any subdomain in the above domains also be matched. I've tried
> every combination of partial, partial0, etc that I can think of but all
> seem to be designed on the presumption that the domains will be in the
> form
> 
> *.domain1.com
> etc.
> 
> I'd like to be able to use the first form because I already have a file
> in that format, and I would prefer to use the same file as a
> relay_domains file, rather than having to convert the one file to
> another in a different format every time I update the first file. Am I
> out of luck or is there a search method I've missed?

I'm afraid you are out of luck. The partial searches all expect to 
search for keys of the form *.something. This has the property that you
can go right down to "*" on its own, and also that you can mix partial
and non-partial entries in the same file, which people certainly want to
do in some cases.

I guess what you really need is a "truncate" style of search, which 
chops domains off the front of the subject until it finds a match, or 
some kind of option for "partial" that makes Exim behave as if every 
entry in the file had "*." on the front of it. Noted for a possible 
future enhancement.

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic