Re: [exim] Re: query-style lookup for text files

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Marc Haber
Date:  
À: exim-users
Sujet: Re: [exim] Re: query-style lookup for text files
On Mon, 3 Oct 2005 16:41:14 +0100 (BST), Philip Hazel
<ph10@???> wrote:
>On Mon, 3 Oct 2005, Marc Haber wrote:
>> > ${lookup regex{/some/file regex}{found-string}{not-found-string}}
>>
>> Yes, that sounds nice. Would prefer an exim string expansion (which
>> could be a regexp), but a regexp directly is fine as well.
>
>I don't understand what you mean by "an exim string expansion" as a type
>of query, I'm afraid. Can you give an example?


|${lookup eximexp{/some/file eq{${extract{1}{:}{$line}fail}{some-string}}{found-string}{not-found-string}}

which will return found_string (expanded with the values from the
found line) if there was any line in /some/file for which the "eq"
expression (or whatever else it might be) was true.

Looks like I am not making myself clear.

Greetings
Marc

-- 
-------------------------------------- !! No courtesy copies, please !! -----
Marc Haber         |   " Questions are the         | Mailadresse im Header
Mannheim, Germany  |     Beginning of Wisdom "     | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 621 72739834