Re: [Exim] regexp lookups from a file

Top Page
Delete this message
Reply to this message
Author: Nico Erfurth
Date:  
To: exim-users
Subject: Re: [Exim] regexp lookups from a file
Philip Hazel wrote:
> On Mon, 4 Nov 2002, Tony Finch wrote:
>
>
>>I should probably
>>turn it into a proper lookup, but I suspect Philip will get upset
>>if I send him another patch :-)
>
>
> Just at the moment, probably!
>
> In Exim-speak, however, this would be a new kind of lookup because it
> doesn't fit either of the patterns of the two existing kinds of lookup.
> It can't be a single-key lookup, because you can't convert the data into
> DBM/cdb/tdb/NIS, and it doesn't quite fit the query-style approach
> either. Though I guess one could invent syntax to make it so:
>
> ${lookup regexlist{subject=xxx file=/a/b/c}}


Hu?
Why not just ${lookup {subject} regexlist{/a/b/c}} and a lsearch-like
regexp file?

/regexp1/options: value1
/regexp2/options: value2

> Hmm. Perhaps it's really an extension of "matches"?
>
> ${if matchesfile{subject}{/file}{$value}....}
>
> No, I suppose a lookup is better because you could then say
>
> hosts = regexlist;subject=$sender_host_name file=/a/b/c


hosts = regexlist;/a/b/c

At least i don't see a problem with this syntax.

ciao