Re: [Exim] net-lsearch not available in expansion lookups?

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Tore Anderson
CC: exim-users
Assumpte: Re: [Exim] net-lsearch not available in expansion lookups?
On Sat, 17 Apr 2004, Tore Anderson wrote:

> I need to do something like this in an authenticator:
>
>   condition = ${if or { {eq{${lookup {$sender_host_address} net-lsearch \
>                               {/relayhosts} {allowed}{denied}}}{allowed}} \
>                         {ldapauth [...]} \
>                       }  {yes}{no}}


> I was mightily surprised to see Exim tell me «unknown lookup type
> "net-lsearch"


net-lsearch is a fudge for host lists where the key that is to be looked
up is implicit. It says "use the IP address as the implicit key instead
of the host name". This is for use in constructions such as

hosts = net-lsearch;/some/file

What you are doing here is a normal lookup, where the key is explicit -
namely, $sender_host_address. So just use "lsearch".

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book