[Exim] MySQL Authentication

Página Inicial
Delete this message
Reply to this message
Autor: Dan Egli
Data:  
Para: exim-users
Assunto: [Exim] MySQL Authentication
I'm having some problems here, tried emailing the list before and got no
responce. So I figured I'll try asking again.

I need a way to authenticate users against a MySQL user database. The format
of the database is rather simple (because I am still testing and getting it
to work before I add fields).
The fields are:

userID,
AuthMail,
Quota,
passwd

a sample user would look like:
-------------------------------------
| bitwize | Y | 25M | jk76asd523 |

--------------------------------------

the passwd is encrypted using the Encrypt() function in MySql. But I am
unable to get Exim to accept the password. When I try testing the SMTP AUTH
exim always returns authentication failure. Here is what I am trying to use
as my auth lookup line:

server_condition = "${if crypteq{$2} \
            {${lookup mysql{SELECT passwd \
                     FROM users \
                     WHERE AuthMail = "Y" and
userID='${local_part:$1}'}}}{1}{0}}"


MySQL: returns the data to Exim fine, but Exim is not treating the password
it recieved from the smtp auth and the password it recieved from the MySQL
query as the same password.

If anyone has any ideas I'd love to hear it.

Thanks!
Dan