Re: [Exim] Router condition lookup: line-delimited file cont…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Tony Finch
Υ/ο: sheldonh, exim-users
Αντικείμενο: Re: [Exim] Router condition lookup: line-delimited file contains
On Mon, 10 Nov 2003, Tony Finch wrote:

> >Is there some foo I can do in a router condition that resolves to true
> >if a line-delimited file contains some string? Something like
> >
> > condition = ${lookup{${local_part}@${domain}}XXX{/path/to/addrfile}{1}}
> >
> >where addrfile contains a line-delimited list of email addresses.
>
> Have you tried
>
>   condition = ${lookup {$local_part@$domain} lsearch{/path/to/file} \
>                   {yes} {no} }


Exactly what I was going to suggest, with the warning that this won't
work if the keys contain white space or colons, unless you quote them in
the file.


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