Re: Searching files for host lists

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: John Henders
CC: exim-users
Subject: Re: Searching files for host lists
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@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714