[Dovecot] Dovecot and MySQL auth - initial setup issues

Andrew Hearn andrew at aa.nu
Tue Jul 11 14:57:11 EEST 2006


Hello,

I'm just setting up a new server and wanting to use MySQL for user
authentication.

Here is what I have:

Fedora Core 5: 2.6.17-1.2145_FC5
Dovecot v1.0.rc2 (RPM install from atrpms.net)
MySQL v5.0.22
SquirrelMail v 1.4.6-7.fc5
...Running on a Dual XEON machine

I've added the following to dovecot.conf:

auth default {


               passdb sql {
        args = /etc/dovecot-mysql.conf
    }
    userdb sql {
        args = /etc/dovecot-mysql.conf
    }

The rest of dovecot.conf is standard.

/etc/dovecot-mysql.conf has:

 driver=mysql
 connect = host=127.0.0.1 port=3306 dbname=maildb user=root client_flags=0
 password_query = SELECT password FROM users WHERE id = '%u'
 user_query = SELECT maildir FROM users WHERE id = '%u'

(I've run the SQL queries within mysql and they give the right results)

When I start Dovecot the log shows:
dovecot: Jul 11 12:47:25 Info: Dovecot v1.0.rc2 starting up
dovecot: Jul 11 12:47:27 Info: auth-worker(default): mysql: Connected to
127.0.0.1 (maildb)


When I try to log in using SquirrelMail, it takes about 3 seconds, then
I get

dovecot: Jul 11 12:48:00 Info: imap-login: Aborted login:
user=<andrew at mail-test.aaisp.net.uk>, method=PLAIN,
rip=::ffff:127.0.0.1, lip=::ffff:127.0.0.1, secured

...So, no log of it trying MySQL...

And SquirrelMail then says:
 Unknown user or password incorrect

Any ideas of what I'm missing?

Thanks!

Andrew.


-- 
Andrew Hearn, Senior Support Engineer
Andrews & Arnold Ltd     01344 400999

For efficient support, please email:
support at aaisp.net.uk


More information about the dovecot mailing list