atom feed5 messages in net.sourceforge.lists.courier-imapRe: [Courier-imap] Unable to connect ...
FromSent OnAttachments
james cookeFeb 19, 2006 6:33 pm 
Keith MatthewsFeb 19, 2006 11:20 pm 
Brian CandlerFeb 20, 2006 5:08 am 
james cookeFeb 20, 2006 8:04 am 
Brian CandlerFeb 22, 2006 5:45 am 
Subject:Re: [Courier-imap] Unable to connect to mysql after running awhile
From:Brian Candler (
Date:Feb 22, 2006 5:45:00 am

On Mon, Feb 20, 2006 at 10:04:50AM -0600, james cooke wrote:

On Sun, Feb 19, 2006 at 08:33:37PM -0600, james cooke wrote: > After running for awhile(it seem to vary) I'm getting this error: > Feb 20 03:05:47 akm authdaemond: vmysql: sql error[3]: MySQL server > has gone away > If I restart authlib I'm able to connect again for awhile, then same > thing occurs. > This is only with imap connections, pop3 works fine(using qmails > pop3). > Any guidance would be extremely helpful. > This is on FreeBSD 5.4 "vmysql"? Is this some modified authentication module, or is that just a typo?

part of vpopmail/vchkpw I guess, it has no problems with pop3 though, only imap after however long.

I think you already said you were using a different pop3 daemon, not courier's (which would use the same authdaemond pool).

I suppose the problem could be with vpopmail or whatever? but I would assume I'd get the same issue with pop3d if that were the case, since I believe they both authenticate the same way. I'm a bit out of my element here though so I could(and probably will) be completely off course.

Ah, if you are using vpopmail, then it is almost certainly at fault. See at the bottom:

" I get intermittent authentication problems with vpopmail

This is a known problem with vpopmail 5.2.1 and earlier. You need to upgrade to 5.2.2 or later, and then recompile courier-authlib."

courier's authdaemond uses vpopmail in an efficient way, holding open the connection and re-using it many times. Unfortunately, this tends to show up bugs in vpopmail. Your pop3 client is probably fork()ing and exec()ing a new vpopmail client for each authentication request, which means it makes a fresh mysql connection every time.

However, the 'intermittent problem' referred to there is different (a username buffer was not being initialised properly, rather than a mysql connection not reconnecting), so this may well be a different bug.

Suggest you: 1. Remove vpopmail and install the very latest version 2. Recompile courier-authlib *after* reinstalling vpopmail 3. If the bug is still there, take this to the vpopmail mailing list.