[Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem

Tom Hendrikx tom at whyscream.net
Mon Oct 24 22:24:28 EEST 2011


On 24-10-11 21:00, Jack Fredrikson wrote:
> Hi; This is my 6th day installing my first Postfix/Dovecot
> installation. The Postfix mailing list indicates I've got the MTA
> under control so now I'm seeking your help with the MDA. I get these
> errors with legitimate email addresses: Oct 24 11:47:38 myserver
> dovecot: auth-worker: Error: mysql(localhost): Connect failed to
> database (postfix): Access denied for user 'dovecot'@'localhost'
> (using password: YES) - waiting for 25 seconds before retry
> 
> Now I've logged in myself: mysql -u dovecot -p Enter password: xxx 
> and succeeded. What am I doing wrong?
> 

The "(using password: YES)" part of the error indicates that your
connection to the server was established successfully. However, it seems
that user 'dovecot' has no access to database 'postfix', which you did
not test on the command line either.

What happens on the commandline when you enter (after logging in:
use postfix; show tables;

Fix that error in the mysql user administration, then try again.

> 
> I've noticed that every time I restart dovecot I get this error in
> the dovecot-deliver.log:
> 
> Oct 24 11:31:11 lda: Error: userdb lookup:
> connect(/usr/local/var/run/dovecot/auth-userdb) failed: Permission
> denied (euid=512(vmail) egid=512(vmail) missing +r perm:
> /usr/local/var/run/dovecot/auth-userdb, dir owned by 0:0 mode=0755) 
> Oct 24 11:31:11 lda: Fatal: Internal error occurred. Refer to server
> log for more information.
> 
> 
> Every time I go to chmod 666 on that file, restarting dovecot wipes
> those permissions. How fix? Even when I fix that, I still get the
> "temporary failure". Please advise.

You forgot to add doveconf -n output, so I'm guessing here, but in your
config, there should be a part defining something like:

service auth {
  unix_listener auth-userdb {
    # some commented stuff
  }
}

Uncomment as needed, and set the values a indicated by the error message
(probably something like user=vmail, group=vmail mode=0660).

> 
> TIA, Jack
> 



More information about the dovecot mailing list