Re: [exim] combining authentication methods

Página Inicial
Delete this message
Reply to this message
Autor: Raphael Reich
Data:  
Para: Stephen Gran
CC: exim-users
Assunto: Re: [exim] combining authentication methods
Stephen Gran schrieb:
> On Sun, Jun 05, 2005 at 12:10:55PM +0200, Raphael Reich said:
>
>>I would like exim to perform a plaintext authentication like this:
>>
>>first exim should lookup a password file and if that fails, perform a
>>mysql lookup.
>>If both methods fail, the authentication should fail.
>
>
> Try this:
>
> server_condition = "${if or { \
> { crypteq{$3}{${extract{1}{:}{${lookup{$2}lsearch{CONFDIR/passwd}{$value}{*:*}}}}} } \
> { lookup mysql{SELECT '1' FROM users WHERE username = '${quote_mysql:$2}' AND clear = '${quote_mysql:$3}'} } \
> }{yes}{no}}"
>
> I have written them as long lines to show how the bracketing and
> conditioning works - feel free to actually make it readable.


I tried it, but unfortunately the result was:

435 Unable to authenticate at present (set_id=********): unknown
condition "lookup" inside "or{...}" condition

Perhaps it's because "lookup" is not a valid condition.

In this thread Philip Hazel wrote:
> After "or" you need a number of *conditions*, each
> in braces. Section 11.7 of the 4.50 manual describes all the available
> conditions.


If that's the case, how can I perfom the subsequent lookups?
Is that even possible?