Re: [exim] checking a local user against a list

Pàgina inicial
Delete this message
Reply to this message
Autor: Tony Finch
Data:  
A: Steev Hise
CC: exim-users
Assumpte: Re: [exim] checking a local user against a list
On Tue, 1 Feb 2005, Steev Hise wrote:

> on Tue, 1 Feb 2005 Tony Finch told me:
>
> ->  require
> ->    verify    = recipient
> ->    condition = ${lookup  {$address_data} \
> ->                  lsearch {/etc/mail/not-these-users} \
> ->                    {no} {yes} }

>
> ok this gets me almost there. but, sorry to be so dense, but i
> don't understand what the {no} and the {yes} are for. i can't
> find in the docs anywhere an explanation of that.


See the documentation for the ${lookup expansion item in the string
expansions chapter of the specification. ${lookup can work like a
conditional test, so if $address_data is found in the file, the result of
the expansion is no, otherwise it is yes. This then determines whether the
condition fails or succeeds.

> is this assuming the files looks like


It can be just a list of usernames. In this case the right-hand-side data
is ignored.

Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}