[exim] DB lookup for PLAIN authentication doesn't work

Page principale
Supprimer ce message
Répondre à ce message
Auteur: ml
Date:  
À: exim-users
Sujet: [exim] DB lookup for PLAIN authentication doesn't work
Hi,

I have the authentication data for my mail users in a postgresql database
and use a DB lookup to verify them on authentication. This works well for
the LOGIN authenticator, but not for the PLAIN authenticator.

I am not sure what I am doing wrong.

Here are the authenticator code snippets:

LOGIN (works):
---------------------/-----------------------
login:
  driver= plaintext
  public_name= LOGIN
  server_prompts= Username:: : Password::
  server_condition= ${if crypteq{$2}{${lookup pgsql{SELECT passwd FROM
mail_box WHERE \
                                                local_part='${quote_pgsql:${local_part:$1}}'
AND \
                                                domain_name='${quote_pgsql:${domain:$1}}'}}\
                               }\
                     {yes}{no}}
  server_set_id= $1
---------------------/-----------------------



PLAIN (doesn't work)
---------------------/-----------------------
plain:
  driver= plaintext
  public_name= PLAIN
  server_prompts= :
  server_condition = ${if crypteq{$3}{${lookup pgsql{SELECT passwd FROM
mail_box WHERE \
                                                local_part='${quote_pgsql:${local_part:$1}}'
AND \
                                                domain_name='${quote_pgsql:${domain:$1}}'}}\
                               }\
                     {yes}{no}}
  server_set_id= $2
---------------------/-----------------------


The query is exactly the same. So, what is going wrong here?

Regards
Marco