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

Page principale
Supprimer ce message
Répondre à ce message
Auteur: John Burnham
Date:  
À: exim-users@exim.org
Sujet: Re: [exim] DB lookup for PLAIN authentication doesn't work
>
>
> 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?
>


In PLAIN, $auth2 is the username and $auth3 is the password . See

http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_plaintext_authenticator.html

so try:

plain:
  driver= plaintext
  public_name= PLAIN
  server_prompts= :
  server_condition = ${if crypteq{$auth3}{${lookup pgsql{SELECT passwd FROM
mail_box WHERE \
                                                local_part='${quote_pgsql:${local_part:$auth2}}'
AND \
                                                domain_name='${quote_pgsql:${domain:$auth2}}'}}\
                               }\
                     {yes}{no}}
  server_set_id= $auth2


(You can use $2 and $3 instead of $auth2 and $auth3 but that's for backwards compatibility).