Re: [exim] A query re loopups

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Peter Bowyer
Date:  
À: Exim Users
Sujet: Re: [exim] A query re loopups
On Tue, 9 Nov 2004 17:42:23 +1000, russell-exim@???
<russell-exim@???> wrote:
> I am using Exim from Debian's Sarge, version 4.34-6.
> I had a lookup of the form:
>
> ${lookup {$local_part@$domain} partial1-lsearch*@ {somefile}}
>
> Lets say the email address way "user@???". Then
> I was expecting it to do a sequence of searches like this:
>
> user@???
> *@company.com
> user@*.company.com
> *@*.company.com
> user@*.com
> *@*.com
> *
>
> Instead, it did a series of searches like this:
>
> user@???
> *.user@???
> *.com
> *@company.com
> *
>
> Is this the correct behaviour? It didn't seem like a
> very useful way to combine the two searches.


partial-lsearch is not clever about the format of the keys in the way
you've hoped - it doesn't know about email addresses, for example - it
just works on dot-separated elements. 'user@company' is one element.

I'd expect exactly what you've found apart from the final case - with
a partial1 search, it shouldn't look for a zero-element wildcard such
as a single *

Perhaps you could use the lsearch*@ syntax to do what you want?

Peter