This could happen if dovecot sends an empty domain to the vpopmail/mysql authentication query, there my be other reasons that I'm not aware of yet. The function call to vpopmail is 'vauth_getpw(vpop_user, vpop_domain)'. I'm not sure HOW this would happen.

Can you send me the surrounding entries in the log?


On 11/7/2017 6:08 AM, Eric Broch wrote:
Here's the explanation in the code as a result of the 'mysql_query' and 'mysql_error' call:

    if (mysql_query(&mysql_read,SqlBufRead)) {
        fprintf(stderr, "vmysql: sql error[3]: %s\n", mysql_error(&mysql_read));         /*  - May 29, 2006 - With newer versions of MySQL, there is such a thing         as a connection timeout regardless of activity.  By default under MySQL 5, this         timeout is 28800 seconds (8 hours).  If your vpopmail system runs fine for the         first 8 hours, then stops authenticating, this timeout is your problem (especially
        under authdaemond).

        What this code does is when an error is encountered, it first tries to drop and         rebuild a connection to the SQL server and tries again. If this second attempt         fails, then something other than the connection timeout is the problem.  This fix         need to be implemented in other places but in my setup (Slackware 10.2, netqmail,         vpopmail, courier-authdaemond, courier-imapd and a few others), this is always where
        the auth attempt died with a "SQL server has gone away" error.

        fprintf(stderr, "Attempting to rebuild connection to SQL server\n");
        verrori = 0;
        if ( (err=vauth_open_read()) != 0 ) {
          verrori = err;
        if (mysql_query(&mysql_read, SqlBufRead)) {
          fprintf (stderr, "vmysql: connection rebuild failed: %s\n", mysql_error(&mysql_read));

Not sure why mysql (mariadb) would return this error.


On 11/7/2017 5:47 AM, Eric Broch wrote:
That's a good question, Chris. I'll have to delve into the code.

On 11/6/2017 9:57 PM, Chris wrote:
Given that the new DB structure for vpopmail involves having a separate table for each domain, I thought seeing this in my dovecot.log was a little weird:

Nov 06 20:53:43 auth-worker: Error: vmysql: sql error[3]: Table 'vpopmail.users' doesn't exist Nov 06 20:53:43 auth-worker: Error: Attempting to rebuild connection to SQL server Nov 06 20:53:43 auth-worker: Error: vmysql: connection rebuild failed: Table 'vpopmail.users' doesn't exist

Any idea why vmysql is trying to access the users table in the vpopmail db, given that it doesn't exist?


Eric Broch
White Horse Technical Consulting (WHTC)

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to