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

Top Page
Delete this message
Reply to this message
Author: Tore Anderson
Date:  
To: exim-users
Subject: [Exim] net-lsearch not available in expansion lookups?
Hi.

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}}


The problem that needs to be solved is that some clients who connect
from the networks with relay permission insist on authenticating. I
must let them use arbitrary usernames and passwords, while on the other
hand actually authenticate clients against the LDAP server if they're
connecting from a foreign network.

I was mightily surprised to see Exim tell me «unknown lookup type
"net-lsearch"» when I tried to do some expansion testing of the above.
I tried to specify "net-lsearch;/relayhosts" and also substituting
the file name with a host list, but no go. What's wrong - isn't
net-lsearch supposed to available as a expansion lookup at all?

If not, is there some other way to solve my problem short of making
the relayhosts file an atrociously long list of all the individual
addresses?

--
Tore Anderson