[exim] combining authentication methods

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Raphael Reich
Data:  
Para: exim-users
Assunto: [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