Re: [exim] combining authentication methods

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Peter Bowyer
Dátum:  
Címzett: Exim Users Mailing List
Tárgy: Re: [exim] combining authentication methods
On 08/06/05, Raphael Reich <raphael@???> wrote:
> Sam Michaels schrieb:
> > http://www.exim.org/exim-html-4.50/doc/html/spec_11.html#IX971
> >
> > server_condition = "${if or {{firstonehere}{secondonehere}}{yes}{no}}"
> >
>
> Ok. The goal is "in clear words":
> "If the mysql-lookup OR the file-lookup succeeds, then the sever
> condition is true"
>
> Following the rule above (as good as I could) I setup the authenticator:
>
> server_condition = \
> "${if or {\
>         {lookup mysql{SELECT '1' FROM users \
>         WHERE username = '${quote_mysql:$2}' \
>         AND clear = '${quote_mysql:$3}'}} \
>         {crypteq{$3}{${extract{1}{:}{${lookup{$2}\
>         lsearch{CONFDIR/passwd}{$value}{*:*}}}}}}}\
>         {1}{0}}"

>
> and I get:
>
> 435 Unable to authenticate at present (set_id=**********): unknown
> condition "lookup" inside "or{...}" condition
>
> I'm "slightly" confused at this point.


$if { or {${lookup mysql {blah}{1}{0}} { something else } }


ie you need {} around each of the 'or'd conditions, and then the usual
syntax for ${lookup within the first condition.

Peter
--
Peter Bowyer
Email: peter@???
Tel: +44 1296 768003
VoIP: sip:peter@???