Hello,
Recently, I configured my server (RHEL4, 2.6.9-22.0.1.ELsmp) to run postfix 2.1.5 and dovecot 1.0 alpha4. It connects to a MySQL database (mysql 4.1.12) to verify authentication. From 30 minutes to an hour after dovecot is started, authentication and mail access works perfectly. However, after those 30 minutes to an hour, further attempts to authenticate with dovecot result in "hangs" - no temporary authentication errors are reported to the client, and no errors are logged to the dovecot log. The dovecot is still running, and responds to connections, but once the password is sent, the server fails to respond. The following line is registered in the log with each authentication attempt after the "hang":
dovecot: Nov 17 22:44:41 Info: auth-worker(default): mysql: Connected to localhost (postfix)
along with an eventual disconnection notice (although no Login: line is registered):
dovecot: Nov 17 22:45:41 Info: imap-login: Disconnected: Inactivity: method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Killing and restarting dovecot immediately fixes the problem, although it reappears after 30 minutes to an hour.
Following is my dovecot-sql.conf:
driver = mysql connect = host=localhost dbname=postfix user=dovecot_read password=**obfuscated** default_pass_scheme = PLAIN-MD5 password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT 89 AS uid, 89 AS gid FROM mailbox WHERE username = '%u'
(dovecot_read has SELECT access on the postfix database, and 89 is the uid/gid of the owner of the maildirs.)
I searched through this list's archives over the last two months and couldn't find anything related to this. Does anyone have any idea what the problem could be?
Regards and many thanks in advance.