Re: [exim] combining authentication methods

Top Pagina
Delete this message
Reply to this message
Auteur: Raphael Reich
Datum:  
Aan: exim-users
Onderwerp: Re: [exim] combining authentication methods
Raphael Reich schrieb:

>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.
>
>I know how to setup the seperate authenticators:
>
>plain_server:
> driver = plaintext
> public_name = PLAIN
> server_condition = "${if
>crypteq{$3}{${extract{1}{:}{${lookup{$2}lsearch{CONFDIR/passwd}{$value}{*:*}}}}}{1}{0}}"
> server_set_id = $2
> server_prompts = :
>
>plain_server:
>  driver = plaintext
>  public_name = PLAIN
>  server_condition = ${lookup mysql{SELECT '1' FROM users \
>                                WHERE username = '${quote_mysql:$2}' \
>                                AND clear = '${quote_mysql:$3}'} {yes}{no}}
>  server_set_id = $2

>
>
>but how can I merge them?
>
>can I do it by just using "or"?
>
>plain_server:
> driver = plaintext
> public_name = PLAIN
> server_condition = "${if
>crypteq{$3}{${extract{1}{:}{${lookup{$2}lsearch{CONFDIR/passwd}{$value}{*:*}}}}}{1}{0}}\
>                               or ${lookup mysql{SELECT '1' FROM users \
>                               WHERE username = '${quote_mysql:$2}' \
>                               AND clear = '${quote_mysql:$3}'} {yes}{no}}"
>server_set_id = $2

>
>thanks for any suggestion
>
>
>

I tried various combinations to get this "merged" authenticator running, but
unfortunately I have not succeeded yet.

Whatever I try, Exim only accepts method.

Please, can anyone give me a hint to solve this problem?