RE: [Exim] SMTP AUTH concern

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Andy De Petter
日付:  
To: Phil Brutsche
CC: exim-users
題目: RE: [Exim] SMTP AUTH concern
Hello,

I've tried this now:

----------
plain:
    driver = plaintext
    public_name = PLAIN
    server_condition = "\
        ${if crypteq{$3}{${lookup mysql {QUERY_SMTP_AUTH_PLAIN} {$value}fail}}
{yes}
{no}}"
    server_set_id = $2


login:
    driver = plaintext
    public_name = LOGIN
    server_prompts = "Username:: : Password::"
    server_condition = "\
        ${if crypteq{$2}{${lookup mysql {QUERY_SMTP_AUTH_LOGIN} {$value}fail}}
{yes}
{no}}"
    server_set_id = $1
----------


with the following queries:

QUERY_SMTP_AUTH_PLAIN = SELECT DISTINCT password FROM MYSQL_AUTHTABLE WHERE
MYSQL_DOMAINFIELD LIKE '${domain:$2}' AND MYSQL_USERNAMEFIELD LIKE
'${local_part:$2}' AND MYSQL_ISALIASFIELD='no'

QUERY_SMTP_AUTH_LOGIN = SELECT DISTINCT password FROM MYSQL_AUTHTABLE WHERE
MYSQL_DOMAINFIELD LIKE '${domain:$1}' AND MYSQL_USERNAMEFIELD LIKE
'${local_part:$1}' AND MYSQL_ISALIASFIELD='no'

but now I can't authenticate at all... I get the error:

435 Unable to authenticate at presetn: "lookup" failed, and "fail"
requested: MYSQL: no data found

At first I'ld say, that the query doesn't give any results back, but when I
change the query to:

QUERY_SMTP_AUTH_PLAIN = SELECT DISTINCT password FROM MYSQL_AUTHTABLE WHERE
MYSQL_DOMAINFIELD LIKE 'krameria.net' AND MYSQL_USERNAMEFIELD LIKE
'test' AND MYSQL_ISALIASFIELD='no'

it still doesn't work (and I get results, when executing the query manually
on my mysql client)..

any ideas?

-Andy

--
......................................................................
:                                                                    :
:                           Andy De Petter <adepette@???>   :
:    Skynet   NV/SA                                System Engineer   :
:                                                                    :
: Kol. Bourgstraat 124          _,'|            _.-''``-...___..--'; :
:    1140  Brussels            /, \'.      _..-' ,      ,--...--'''  :
:                             < \   .`--'''      `     /|            :
:   IPv6 ADP17-6BONE           `-,;'              ;   ; ;            :
:    ICQ # 1548957        __...--''     __...--_..'  .;.'            :
:                        (,__....----'''      (,..--''               :
: http://www.skynet.be                                               :
......................................................................


The opinions expressed are personal.