[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
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
From: Tom Hendrikx <tom@whyscream.net> To: dovecot@dovecot.org Sent: Monday, October 24, 2011 3:24 PM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
First up, thanks for the links, Simon, but they didn't help :( I still need to chmod 666 /usr/local/var/run/dovecot/auth-userdb and I'm still getting the same error: Oct 24 13:40:57 myserver dovecot: auth-worker: Error: mysql(localhost): Connect failed to database (postfix): Access denied for user 'dovecot'@'localhost' (using password: YES) - waiting for 5 seconds before retry
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;
I can log in *just fine* as dovecot and show tables, etc.
# 2.0.15: /usr/local/etc/dovecot/dovecot.conf # OS: Linux 2.6.18-028stab094.3 x86_64 CentOS release 5.7 (Final) vzfs auth_mechanisms = plain login mail_location = maildir:/var/vmail/%d/%u passdb { args = /usr/local/etc/dovecot/sql.conf driver = sql } plugin { quota = maildir:storage=10240:messages=1000 trash = /usr/local/etc/dovecot/trash.conf } protocols = imap pop3 service auth { unix_listener auth-userdb { mode = 0660 } user = root } ssl_cert = </etc/pki/tls/certs/mail.mydomain.com.cert ssl_cipher_list = ALL:!LOW:!SSLv2 ssl_key = </etc/pki/tls/private/mail.mydomaincom.key ssl_key_password = Jw93Mx2 userdb { args = /usr/local/etc/dovecot/sql.conf driver = sql } protocol imap { mail_plugins = quota imap_quota } protocol pop3 { mail_plugins = quota pop3_client_workarounds = outlook-no-nuls oe-ns-eoh } protocol lda { hostname = mydomain.com info_log_path = /var/log/dovecot-deliver.log log_path = /var/log/dovecot-deliver.log mail_plugins = quota postmaster_address = postmaster@mydomain.com sendmail_path = /usr/sbin/sendmail.postfix }
On 24 October 2011 16:43, Jack Fredrikson <jackfredrikson@yahoo.com> wrote:
From: Tom Hendrikx <tom@whyscream.net> To: dovecot@dovecot.org Sent: Monday, October 24, 2011 3:24 PM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
First up, thanks for the links, Simon, but they didn't help :( I still need to chmod 666 /usr/local/var/run/dovecot/auth-userdb and I'm still getting the same error: Oct 24 13:40:57 myserver dovecot: auth-worker: Error: mysql(localhost): Connect failed to database (postfix): Access denied for user 'dovecot'@'localhost' (using password: YES) - waiting for 5 seconds before retry
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;
I can log in *just fine* as dovecot and show tables, etc.
# 2.0.15: /usr/local/etc/dovecot/dovecot.conf # OS: Linux 2.6.18-028stab094.3 x86_64 CentOS release 5.7 (Final) vzfs auth_mechanisms = plain login mail_location = maildir:/var/vmail/%d/%u
Who owns /var/vmail?
passdb { args = /usr/local/etc/dovecot/sql.conf driver = sql } plugin { quota = maildir:storage=10240:messages=1000 trash = /usr/local/etc/dovecot/trash.conf } protocols = imap pop3 service auth { unix_listener auth-userdb { mode = 0660 } user = root } ssl_cert = </etc/pki/tls/certs/mail.mydomain.com.cert ssl_cipher_list = ALL:!LOW:!SSLv2 ssl_key = </etc/pki/tls/private/mail.mydomaincom.key ssl_key_password = Jw93Mx2 userdb { args = /usr/local/etc/dovecot/sql.conf driver = sql } protocol imap { mail_plugins = quota imap_quota } protocol pop3 { mail_plugins = quota pop3_client_workarounds = outlook-no-nuls oe-ns-eoh } protocol lda { hostname = mydomain.com info_log_path = /var/log/dovecot-deliver.log log_path = /var/log/dovecot-deliver.log mail_plugins = quota postmaster_address = postmaster@mydomain.com sendmail_path = /usr/sbin/sendmail.postfix }
From: Simon Brereton <simon.brereton@buongiorno.com> To: dovecot@dovecot.org Sent: Monday, October 24, 2011 5:04 PM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
Who owns /var/vmail?
ls -al /var/vmail/ total 8 drwxrwx--- 2 vmail mail 4096 Oct 19 18:45 . drwxr-xr-x 26 root root 4096 Oct 23 08:35 .. /usr/sbin/usermod -a -G mail,postfix dovecot
And I'm still getting the same error: dovecot: auth-worker: Error: mysql(localhost): Connect failed to database (postfix): Access denied for user 'dovecot'@'localhost' (using password: YES)
TIA, Jack
On 24-10-11 23:47, Jack Fredrikson wrote:
From: Simon Brereton <simon.brereton@buongiorno.com> To: dovecot@dovecot.org Sent: Monday, October 24, 2011 5:04 PM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
Who owns /var/vmail?
ls -al /var/vmail/ total 8 drwxrwx--- 2 vmail mail 4096 Oct 19 18:45 . drwxr-xr-x 26 root root 4096 Oct 23 08:35 .. /usr/sbin/usermod -a -G mail,postfix dovecot
Adding dovecot to the postfix group would be considered a security issue by many. Don't so this unless you actually think it wil help you (it won't).
And I'm still getting the same error: dovecot: auth-worker: Error: mysql(localhost): Connect failed to database (postfix): Access denied for user 'dovecot'@'localhost' (using password: YES)
Please see http://dev.mysql.com/doc/refman/5.5/en/connecting.html, especially the part that starts with "On Unix, MySQL programs treat the host name localhost specially,"
Then show proof that this command works:
mysql -udovecot -pxxx -h 127.0.0.1 postfix
And see what happens if you set the hostname in dovecot config also to 127.0.0.1. Note that testing as root will likely give you access to the mysql socket, but dovecot might not have the same privileges. The above will test tcp connectivity for both.
-- Tom
From: Tom Hendrikx <tom@whyscream.net> To: dovecot@dovecot.org Sent: Monday, October 24, 2011 6:00 PM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
Adding dovecot to the postfix group would be considered a security issue by many. Don't so this unless you actually think it wil help you (it won't).
Thanks. I took it out.
Please see http://dev.mysql.com/doc/refman/5.5/en/connecting.html, especially the part that starts with "On Unix, MySQL programs treat the host name localhost specially,"
Then show proof that this command works:
mysql -udovecot -pxxx -h 127.0.0.1 postfix
My bad. I had the wrong p/w in sql.conf :-}
So now I'm connected to the database as dovecot, but I'm still getting these dad-blamed errors:
BC81A57901AD: to=<foo@bar.com>, relay=dovecot, delay=25695, delays=25695/0.02/0/0.28, dsn=4.3.0, status=deferred (temporary failure)
# 2.0.15: /usr/local/etc/dovecot/dovecot.conf # OS: Linux 2.6.18-028stab094.3 x86_64 CentOS release 5.7 (Final) vzfs auth_mechanisms = plain login mail_location = maildir:/var/vmail/%d/%u passdb { args = /usr/local/etc/dovecot/sql.conf driver = sql } plugin { quota = maildir:storage=10240:messages=1000 trash = /usr/local/etc/dovecot/trash.conf } protocols = imap pop3 service auth { unix_listener auth-userdb { group = postfix mode = 0660 user = postfix } user = root } ssl_cert = </etc/pki/tls/certs/mail.bar.com.cert ssl_cipher_list = ALL:!LOW:!SSLv2 ssl_key = </etc/pki/tls/private/mail.bar.com.key userdb { args = /usr/local/etc/dovecot/sql.conf driver = sql } protocol imap { mail_plugins = quota imap_quota } protocol pop3 { mail_plugins = quota pop3_client_workarounds = outlook-no-nuls oe-ns-eoh } protocol lda { hostname = 13gems.com info_log_path = /var/log/dovecot-deliver.log log_path = /var/log/dovecot-deliver.log mail_plugins = quota postmaster_address = postmaster@bar.com sendmail_path = /usr/sbin/sendmail.postfix }
TIA, Jack
On Mon, 24 Oct 2011 16:17:23 -0700 (PDT) Jack Fredrikson articulated:
protocol lda { hostname = 13gems.com info_log_path = /var/log/dovecot-deliver.log log_path = /var/log/dovecot-deliver.log mail_plugins = quota postmaster_address = postmaster@bar.com sendmail_path = /usr/sbin/sendmail.postfix
Are you sure about that "sendmail" path? It certainly isn't like that on my machine.
-- Jerry ✌ Dovecot.user@seibercom.net
Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header.
From: Jerry <dovecot.user@seibercom.net> To: dovecot@dovecot.org Sent: Monday, October 24, 2011 7:27 PM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
sendmail_path = /usr/sbin/sendmail.postfix
Are you sure about that "sendmail" path? It certainly isn't like that on my machine.
Well, I changed it to just "sendmail" (since I had that file, too) but with the same result. I remember creating that file earlier but I don't remember where and searching around my system I can't xargs grep it. What do you recommend? TIA, Jack
On 10/24/2011 7:14 PM, Jack Fredrikson wrote:
From: Jerry <dovecot.user@seibercom.net> To: dovecot@dovecot.org Sent: Monday, October 24, 2011 7:27 PM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
sendmail_path = /usr/sbin/sendmail.postfix
Are you sure about that "sendmail" path? It certainly isn't like that on my machine.
Well, I changed it to just "sendmail" (since I had that file, too) but with the same result. I remember creating that file earlier but I don't remember where and searching around my system I can't xargs grep it. What do you recommend?
I recommend the default: sendmail_path = /usr/sbin/sendmail
I also recommend you not fly by the seat of your pants when creating IT infrastructure for a client. Doing so is good for neither of you.
-- Stan
On 24 October 2011 19:17, Jack Fredrikson <jackfredrikson@yahoo.com> wrote:
From: Tom Hendrikx <tom@whyscream.net> To: dovecot@dovecot.org Sent: Monday, October 24, 2011 6:00 PM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
Adding dovecot to the postfix group would be considered a security issue by many. Don't so this unless you actually think it wil help you (it won't).
Thanks. I took it out.
Please see http://dev.mysql.com/doc/refman/5.5/en/connecting.html, especially the part that starts with "On Unix, MySQL programs treat the host name localhost specially,"
Then show proof that this command works:
mysql -udovecot -pxxx -h 127.0.0.1 postfix
My bad. I had the wrong p/w in sql.conf :-}
So now I'm connected to the database as dovecot, but I'm still getting these dad-blamed errors:
BC81A57901AD: to=<foo@bar.com>, relay=dovecot, delay=25695, delays=25695/0.02/0/0.28, dsn=4.3.0, status=deferred (temporary failure)
Turn up the logging in postfix (add -vv to the smtpd line in master.cf or google for log-level) - but I'm pretty sure that this means postfix wants to give it dovecot, but dovecot says I can't do anything with it. Either cos it doesn't know where to put it. Or doesn't have permission to put it there. You could turn up your dovecot logging too if the postfix logs aren't helpful.
My directory permissions (in no way security recommended - but working) for /var/vmail/ are:
drwxrwxS mailsystem mailsystem
Simon
# 2.0.15: /usr/local/etc/dovecot/dovecot.conf # OS: Linux 2.6.18-028stab094.3 x86_64 CentOS release 5.7 (Final) vzfs auth_mechanisms = plain login mail_location = maildir:/var/vmail/%d/%u passdb { args = /usr/local/etc/dovecot/sql.conf driver = sql } plugin { quota = maildir:storage=10240:messages=1000 trash = /usr/local/etc/dovecot/trash.conf } protocols = imap pop3 service auth { unix_listener auth-userdb { group = postfix mode = 0660 user = postfix } user = root } ssl_cert = </etc/pki/tls/certs/mail.bar.com.cert ssl_cipher_list = ALL:!LOW:!SSLv2 ssl_key = </etc/pki/tls/private/mail.bar.com.key userdb { args = /usr/local/etc/dovecot/sql.conf driver = sql } protocol imap { mail_plugins = quota imap_quota } protocol pop3 { mail_plugins = quota pop3_client_workarounds = outlook-no-nuls oe-ns-eoh } protocol lda { hostname = 13gems.com info_log_path = /var/log/dovecot-deliver.log log_path = /var/log/dovecot-deliver.log mail_plugins = quota postmaster_address = postmaster@bar.com sendmail_path = /usr/sbin/sendmail.postfix }
TIA, Jack
From: Simon Brereton <simon.brereton@buongiorno.com> To: Dovecot Mailing List <dovecot@dovecot.org> Sent: Tuesday, October 25, 2011 12:46 AM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
I think I've found the problem. How do I create this file?
/usr/local/libexec/dovecot/deliver-ldaTIA, Jack
From: Jack Fredrikson <jackfredrikson@yahoo.com> To: "simon.brereton@buongiorno.com" <simon.brereton@buongiorno.com>; Dovecot Mailing List <dovecot@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.
TIA, Jack
On Tue, October 25, 2011 15:51, Jack Fredrikson wrote:
From: Jack Fredrikson <jackfredrikson@yahoo.com> To: "simon.brereton@buongiorno.com" <simon.brereton@buongiorno.com>; Dovecot Mailing List <dovecot@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@gate ~]# rpm -qf /usr/libexec/dovecot/deliver dovecot-2.0.15-1.0.cf.rhel5 [root@gate ~]# rpm -qf /usr/libexec/dovecot/dovecot-lda dovecot-2.0.15-1.0.cf.rhel5 [root@gate ~]#
What dovecot do you have?
From: Giles Coochey <giles@coochey.net> To: Jack Fredrikson <jackfredrikson@yahoo.com> Cc: "simon.brereton@buongiorno.com" <simon.brereton@buongiorno.com>; Dovecot Mailing List <dovecot@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@gate ~]# rpm -qf /usr/libexec/dovecot/deliver dovecot-2.0.15-1.0.cf.rhel5 [root@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
From: Giles Coochey <giles@coochey.net> To: Jack Fredrikson <jackfredrikson@yahoo.com> Cc: "simon.brereton@buongiorno.com" <simon.brereton@buongiorno.com>; Dovecot Mailing List <dovecot@dovecot.org> Sent: Tuesday, October 25, 2011 10:02 AM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
I just discovered this: [root@myserver postfix]# ls -al /usr/libexec/dovecot/ total 8 drwxr-xr-x 2 root root 4096 Oct 22 08:59 . drwxr-xr-x 9 root root 4096 Oct 23 08:36 .. lrwxrwxrwx 1 root root 34 Oct 22 08:59 deliver -> /usr/local/libexec/dovecot/deliver [root@myserver postfix]# ls -al /usr/local/libexec/dovecot/deliver* lrwxrwxrwx 1 root root 11 Oct 20 17:14 /usr/local/libexec/dovecot/deliver -> dovecot-lda
Huh? So I made a softlink directly to /usr/local/libexec/dovecot/dovecot-lda (which is where it resides) But I'm still getting the same errors: Oct 25 07:58:47 lda(foo@bar.com): Fatal: setgid(12(mail) from userdb lookup) failed with euid=512(vmail), gid=512(vmail), egid=512(vmail): Operation not permitted (This binary should probably be called with process group set to 12(mail) instead of 512(vmail))
I need to change the gid because it's wrong. Now, rebuilding dovecot isn't going to do that because we don't set such things in the flags to rebuild. So where in tarnation do we??? TIA, Jack
On my Centos 5.x:
[root@gate ~]# rpm -qf /usr/libexec/dovecot/deliver dovecot-2.0.15-1.0.cf.rhel5 [root@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
From: Jack Fredrikson <jackfredrikson@yahoo.com> To: Jack Fredrikson <jackfredrikson@yahoo.com>; Giles Coochey <giles@coochey.net> Cc: "simon.brereton@buongiorno.com" <simon.brereton@buongiorno.com>; Dovecot Mailing List <dovecot@dovecot.org> Sent: Tuesday, October 25, 2011 11:01 AM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
I have solved at least another part of the problem that was causing the setuig error. I changed my postfix/master.cf file from this:
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/dovecot-lda -f ${sender} -d ${recipient}
to this:
dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/dovecot-lda -f ${sender} ${recipient}
taking out the d flag. Now dovecot doesn't complain. *However*, I've *still* got this devil plaguing me:
Oct 25 10:49:18 myserver postfix/pipe[3712]: 0423257901AB: to=<foo@bar.com>, relay=dovecot, delay=109318, delays=109318/0.14/0/0.1, dsn=4.3.0, status=deferred (temporary failure
Ya know, I know I'm not the sharpest tool in the shed when it comes to programming, but I have *never* worked *so hard* on an installation as this one with so little success! It took me a day to install qmail the first time around. I've been a week on this!! Please help me figure this mess out. For the record, I did rebuild dovecot but that obviously didn't help. I did change the posfix files to pump out a bunch of debugging info:
adding a -D flag to every smptd service in master.cf This in main.cf: debug_peer_level = 3 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 debug_peer_list = 127.0.0.1 #debug_peer_list =
and it doesn't give me any output like it did the first time, so I assume (perhaps incorrectly) there are no errors.
TIA, Jack
On 25 October 2011 06:47, Jack Fredrikson <jackfredrikson@yahoo.com> wrote:
From: Simon Brereton <simon.brereton@buongiorno.com> To: Dovecot Mailing List <dovecot@dovecot.org> Sent: Tuesday, October 25, 2011 12:46 AM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
I think I've found the problem. How do I create this file?
/usr/local/libexec/dovecot/deliver-lda
I can't speak to CentOS, but I'm not sure you need to be "creating" any files - especially not in libexec. Are you sure your dovecot installation isn't hosed somehow?
Simon
From: Simon Brereton <simon.brereton@buongiorno.com> To: Dovecot Mailing List <dovecot@dovecot.org> Sent: Tuesday, October 25, 2011 9:53 AM Subject: Re: [Dovecot] Marathon Day 6 of First Install: MySQL Connection Problem
I can't speak to CentOS, but I'm not sure you need to be "creating" any files - especially not in libexec. Are you sure your dovecot installation isn't hosed somehow?
Of course I'm not sure and rebuilding dovecot is what I'll do if all else fails. When I discovered the problem in my dovecot logs, I searched for the offending GID and discovered it in /usr/local/libexec/dovecot/deliver which, of course, is a binary. How did it get there? Certainly not when I did my ./configure make make install dance with dovecot's src distro. How did it get there?? How do I change it??`
TIA, Jack
On 24 October 2011 15:00, Jack Fredrikson <jackfredrikson@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@dovecot.org/msg32290.html
or this one?
http://www.mailinglistarchive.com/html/dovecot@dovecot.org/2010-08/msg01136....
Simon
Jack Fredrikson <jackfredrikson@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
participants (7)
-
Giles Coochey
-
Heiko Schlittermann
-
Jack Fredrikson
-
Jerry
-
Simon Brereton
-
Stan Hoeppner
-
Tom Hendrikx