Jack Fredrikson
2011-Oct-24 19:00 UTC
[Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
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? 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. TIA, Jack
Tom Hendrikx
2011-Oct-24 19:24 UTC
[Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
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 >
Simon Brereton
2011-Oct-24 19:38 UTC
[Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
On 24 October 2011 15:00, Jack Fredrikson <jackfredrikson at yahoo.com> 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? > > > 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.what user are you running dovecot as? Does this thread help? http://www.mail-archive.com/dovecot at dovecot.org/msg32290.html or this one? http://www.mailinglistarchive.com/html/dovecot at dovecot.org/2010-08/msg01136.html Simon
Heiko Schlittermann
2011-Oct-24 20:32 UTC
[Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
Jack Fredrikson <jackfredrikson at yahoo.com> (Mon Oct 24 21:00:54 2011):> 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?You should test: mysql -udovecot -pxxx -hlocalhost postfix to simulate the dovecot attemts.> 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.This file is not a file, it is a socket and gets recreated every time you restart dovecot. There is, if I remember well, some config option "mode" near the name of the name of the socket. -- Heiko :: dresden : linux : SCHLITTERMANN.de GPG Key 48D0359B : 3061 CFBF 2D88 F034 E8D2 7E92 EE4E AC98 48D0 359B -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20111024/e4d7027d/attachment-0004.bin>
Giles Coochey
2011-Oct-25 14:02 UTC
[Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
On Tue, October 25, 2011 15:51, Jack Fredrikson wrote:> > ________________________________ > From: Jack Fredrikson <jackfredrikson at yahoo.com> > To: "simon.brereton at buongiorno.com" <simon.brereton at buongiorno.com>; > Dovecot Mailing List <dovecot at dovecot.org> > Sent: Tuesday, October 25, 2011 6:47 AM > Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection > Problem > > > Or, conversely, how do I create this file: > > /usr/local/libexec/dovecot/deliver > > The problem is the first_valid_uid and first_valid_gid need to be reset. > What file is called to create "deliver"? Please help. >On my Centos 5.x: [root at gate ~]# rpm -qf /usr/libexec/dovecot/deliver dovecot-2.0.15-1.0.cf.rhel5 [root at gate ~]# rpm -qf /usr/libexec/dovecot/dovecot-lda dovecot-2.0.15-1.0.cf.rhel5 [root at gate ~]# What dovecot do you have?
Jack Fredrikson
2011-Oct-25 14:10 UTC
[Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
________________________________ From: Giles Coochey <giles at coochey.net> To: Jack Fredrikson <jackfredrikson at yahoo.com> Cc: "simon.brereton at buongiorno.com" <simon.brereton at buongiorno.com>; Dovecot Mailing List <dovecot at dovecot.org> Sent: Tuesday, October 25, 2011 10:02 AM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem> On my Centos 5.x: > > [root at gate ~]# rpm -qf /usr/libexec/dovecot/deliver > dovecot-2.0.15-1.0.cf.rhel5 > [root at gate ~]# rpm -qf /usr/libexec/dovecot/dovecot-lda > dovecot-2.0.15-1.0.cf.rhel5 > > What dovecot do you have?2.0.15 I built mine the old way: ./configure --with-mysql make make install So how would I rebuild just this one file? From where does it get its data? I need to change the first_valid_gid. TIA, Jack