[exim] combining authentication methods

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Raphael Reich
Date:  
À: exim-users
Sujet: [exim] combining authentication methods
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