[Exim] Can't get AUTH LOGIN to work with MySQL!

Top Pagina
Delete this message
Reply to this message
Auteur: Yves Goergen
Datum:  
Aan: exim
Onderwerp: [Exim] Can't get AUTH LOGIN to work with MySQL!
Hey all!
I've got some kind of serious problem now. We moved over to our own
mailserver, but I haven't tested mail relay for my users with Outlook
Express. Now I wanted to configure it for a LOGIN authenticator, but I
just won't get it to work like it should!

The traffic logger shows the AUTH LOGIN going on as normal, but being
replied with a "535 Incorrect authentication data" by Exim 4.32.

Here's my configure snippet:
> MYSQL_Q_AUTH_CR1 = SELECT clearpass FROM users WHERE CONCAT(local, '@', domain)='${quote_mysql:$1}' LIMIT 1


> login:
>     driver = plaintext
>     public_name = LOGIN
>     server_prompts = Username:: : Password::
>     server_condition = ${if \
>         eq {$2}{lookup mysql{MYSQL_Q_AUTH_CR1}{$value}fail} \
>         {yes}{no}}
>     server_debug_print = $1 $2 ${lookup mysql{MYSQL_Q_AUTH_CR1}{$value}fail}
> #   server_condition = ${if \
> #       crypteq {$2}{lookup mysql{MYSQL_Q_AUTH_CR1}{$value}fail} \
> #       {yes}{no}}
>     server_set_id = $1


The commented part was for crypted password comparison, the active
condition compares against cleartext passwords. I have found, there are
no MySQL queries in normal operation -- that is, anything in this
configuration prevents exim from performing the actual database lookup.
BUT: it DOES look up when I run 'exim -bd -d-all+auth'. And I can see
some debug output then, which tells, everything should be OK. The
server_debug_print output is like expected, including the cleartext
password read from my database. I can see the query in the MySQL log in
this situation.

So my questions:

1) What is wrong with my configuration that it does not perform the
mysql lookup?

2) What is wrong with my configuration that it does lookup with 'exim
-bd -d-all+auth' but not accept the correct password?

3) Has someone a working MySQL AUTH LOGIN example, preferrably with
crypted passwords, that I could use?

I hope you can help me soon, since some of my users cannot send mail
with Outlook Express until then. CRAM-MD5 authentication works fine, so
I have no problem myself.

// Yeah, it's OK as long as it works for the admin ;-)

--
Yves Goergen <nospam.list@???>

BlackBoard Internet Newsboard System --> blackboard.unclassified.de
Free (GPL), easy to use and install, secure, innovative! (PHP+MySQL)