Hi,
Since my last email about RHEL4 problems on x86_64, I've kept trying to figure out what the problem might be, and just ran into a reply to an old email I sent to the list, which I had missed. It suggests that the issue might be in the MySQL authentication that I'm using.
Here is a more detailed log entry, with auto debugging on :
Apr 3 13:13:02 s1 dovecot: auth(default): client in: AUTH 1 PLAIN service=POP3 lip=::ffff:195.x.x.x rip=::ffff:195.x.x.x resp=AHBhcnRuZXJzQdNvbW1lcm3lZ2F0ZS5jb20Aa2F2YWthdmE= Apr 3 13:13:02 s1 dovecot: auth(default): client out: OK 1 user=x@domain.com Apr 3 13:13:02 s1 dovecot: auth(default): master in: REQUEST 70 22190 1 Apr 3 13:13:02 s1 dovecot: auth-worker(default): sql(x@domain.com,::ffff:195.x.x.x): SELECT maildir, 101 AS uid, 103 AS gid FROM mailbox WHERE username = 'x@domain.com' Apr 3 13:13:02 s1 dovecot: auth(default): master out: USER 70 x@domain.com maildir=domain.com/x/ uid=101 gid=103 Apr 3 13:13:02 s1 dovecot: pop3-login: Login: user=x@domain.com, method=PLAIN, rip=::ffff:195.x.x.x, lip=::ffff:195.x.x.x Apr 3 13:13:02 s1 dovecot: pop3(x@domain.com): ^GUnexpected eof found when reading file 'UNOPENED' (Errcode: 0) Apr 3 13:13:02 s1 last message repeated 2 times Apr 3 13:13:02 s1 dovecot: pop3(x@domain.com): Disconnected: Logged out top=0/0, retr=0/0, del=0/2, size=17174
Those "Unexpected eof found when reading file 'fileName'" messages are apparently from MySQL, as one can see here for instance : http://www.mysqlfreaks.com/errors/49.php
Here is my relevant configuration (all the rest is the default) :
login_greeting = Ready. verbose_proctitle = yes first_valid_uid = 101 default_mail_env = maildir:/home/vmail/%d/%n:INDEX=MEMORY
auth_cache_size = 512 auth_verbose = yes auth_debug = yes auth_debug_passwords = yes
auth default { mechanisms = plain passdb sql { args = /etc/dovecot-mysql.conf } userdb sql { args = /etc/dovecot-mysql.conf } }
The INDEX=MEMORY was added because of similar errors with the indexes :
Apr 3 12:56:44 s1 dovecot: pop3-login: Login: user=x@domain.com, method=PLAIN, rip=::ffff:195.x.x.x, lip=::ffff:195.x.x.x, TLS Apr 3 12:56:44 s1 dovecot: pop3(x@domaine.com): Corrupted transaction log file /home/vmail/domain.com/x/dovecot.index.log: unexpected end of file while reading header Apr 3 12:56:44 s1 dovecot: pop3(x@domain.com): Corrupted transaction log file /home/vmail/domain.com/x/dovecot.index.log: unexpected end of file while reading header Apr 3 12:56:44 s1 dovecot: pop3(x@domain.com): Disconnected: Logged out top=0/0, retr=0/0, del=0/0, size=0
(this was when the auth_debug wasn't enabled)
Here is my /etc/dovecot-mysql.conf file :
driver = mysql connect = host=/var/lib/mysql/mysql.sock dbname=postfix user=postfix password=xxx default_pass_scheme = PLAIN password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT maildir, 101 AS uid, 103 AS gid FROM mailbox WHERE username = '%u'
I'm using MySQL 4.1.12-3.RHEL4.1 (the original RHEL4 packages), with the server on the same machine (hence the socket access). I was seeing this also with 0.9, not just 1.0 betas. With x86_64 packages, any slight change to the main dovecot.conf file can prevent dovecot from starting (segfault with "Unexpected eof found when reading file 'UNOPENED' (Errcode: 0)" message), whereas i386 packages work somewhat better. This is on the same machine with an i386 compatibility layer.
Is anyone using MySQL auth successfully?
Any help or pointers would be more than welcome. Matthias
-- Clean custom Red Hat Linux rpm packages : http://freshrpms.net/ Fedora Core release 5 (Bordeaux) - Linux kernel 2.6.16-1.2080_FC5 Load : 0.38 0.33 0.34