[Exim] multiple server_conditions

Top Page
Delete this message
Reply to this message
Author: Franz Georg Köhler
Date:  
To: Exim Users
Subject: [Exim] multiple server_conditions
On Do, Jul 01, 2004 at 01:08:24 +0100, Bruce Richardson <itsbruce@???> wrote:
> Do you want to check first in one authentication source and then, if
> that fails, in another?


Yes, I do.

Hello everyone,


as I recently postet on this list, I'm trying to set up multiple
server_conditions (auth sources) in one authenticator.


The following authenticator works fine:

plain:
  driver = plaintext
  public_name = PLAIN
  server_condition = "${if and { \
        {!eq {$2}{}} \
        {!eq {$3}{}} \
        {eq {${md5:$3}}{${lookup mysql { \
                        select password_hash from popbox \
                        where local_part='${extract {1}{@%!}{$2}}' \
                        and domain_name='${extract {2}{@%!}{$2}}' \
                }{$value}{*:*}}} \
        }}{1}{0}}"
  server_set_id = $2




Now, I'm trying to integrate two different auth sources but I'm not
really sure how to link those two sources.


The following authenticator fails:

plain:
  driver = plaintext
  public_name = PLAIN
  server_condition = "${if or {and { \
        {!eq {$2}{}} \
        {!eq {$3}{}} \
        {eq {${md5:$3}}{${lookup mysql { \
                        select password_hash from popbox \
                        where local_part='${extract {1}{@%!}{$2}}' \
                        and domain_name='${extract {2}{@%!}{$2}}' \
                }{$value}{*:*}}} \
        }}}\
        {if and {{eq{$2}{ph10}}{eq{$3}{secret}}}\
        {1}{0}}"
  server_set_id = $2



As I understand the exim documentation, the "or" statement is supportet
and should link the two sources?