[Dovecot] Big problems after upgrade from beta8 (FC5) to rc21
After upgrading a working system from FC5's beta8 to rc21, one vhost is failing with:
dovecot: Feb 05 09:54:30 Error: POP3(user@mydomain.com): open(/var/mail/vhosts/mydomain.com/david/user, O_CREAT) failed: Not a directory dovecot: Feb 05 09:54:30 Error: POP3(user@mydomain.com): mkdir_parents(/var/mail/vhosts/mydomain.com/user/.imap/INBOX) failed: Not a directory dovecot: Feb 05 09:54:30 Error: POP3(user@mydomain.com): Couldn't open INBOX: Internal error occurred. Refer to server log for more information. [2007-02-05 09:54:30] dovecot: Feb 05 09:54:30 Info: POP3(user@mydomain.com): No INBOX for user top=0/0, retr=0/0, del=0/0, size=0 dovecot: Feb 05 09:54:30 Info: pop3-login: Login: user=user@mydomain.com, method=PLAIN, rip=::ffff:4.242.120.235, lip=::ffff:216.75.55.45, TLS Here's the entire dovecot.conf:
protocols = pop3s ssl_cert_file = /etc/pki/dovecot/certs/popcert.pem ssl_key_file = /etc/pki/dovecot/private/popkey.pem ssl_ca_file = /etc/pki/tls/certs/ca-bundle.crt ssl_parameters_regenerate = 48 disable_plaintext_auth = yes log_path = /var/log/dovecot.log mail_extra_groups = mail mbox_read_locks = fcntl mbox_write_locks = fcntl dotlock protocol imap { } protocol pop3 { } auth_verbose = no auth_debug = no auth_debug_passwords = no auth default { mechanisms = plain passdb passwd-file { args = /etc/dovecot/%d.passwd } passdb pam { } userdb passwd { } userdb static { args = uid=502 gid=502 home=/var/mail/vhosts/%d mail=mbox:/var/mail/vhosts/%d/%n } user = root } plugin { }
Did something changed between beta8 and rc21 in the index format and/or mbox location? If so, how do I recover so users can retrieve mail again? Thx.
On 5.2.2007, at 20.09, Jim Garrison wrote:
dovecot: Feb 05 09:54:30 Error: POP3(user@mydomain.com): open(/var/mail/vhosts/mydomain.com/david/user, O_CREAT) failed: Not a directory .. args = uid=502 gid=502 home=/var/mail/vhosts/%d mail=mbox:/var/mail/vhosts/%d/%n
So, I'm assuming that "david" is an mbox file, and not a directory?
Yes, the mail setting changed a bit. It no longer tries to guess what
you meant by /var/mail/vhosts/%d/%n.
Umm.. Did the previous setup really actually work without constant
errors in the logs? Because it looks like the index files were
created for /var/mail/vhosts/%d/.imap/ directory, and if there were
multiple users for a domain they'd conflict with each others. This is
one reason why the change was made, to fix setups which appeared to
work but didn't really work all that great :)
So the mail= setting needs to be:
mail=<user-specific-directory>:INBOX=/var/mail/vhosts/%d/%n
If you really don't want a user-specific directory, see the bottom of
http://wiki.dovecot.org/MailLocation
Timo Sirainen wrote:
On 5.2.2007, at 20.09, Jim Garrison wrote:
dovecot: Feb 05 09:54:30 Error: POP3(user@mydomain.com): open(/var/mail/vhosts/mydomain.com/david/user, O_CREAT) failed: Not a directory . args = uid=502 gid=502 home=/var/mail/vhosts/%d mail=mbox:/var/mail/vhosts/%d/%n
So, I'm assuming that "david" is an mbox file, and not a directory? Yes, the mail setting changed a bit. It no longer tries to guess what you meant by /var/mail/vhosts/%d/%n.
Umm.. Did the previous setup really actually work without constant errors in the logs? Because it looks like the index files were created for /var/mail/vhosts/%d/.imap/ directory, and if there were multiple users for a domain they'd conflict with each others. This is one reason why the change was made, to fix setups which appeared to work but didn't really work all that great :)
So the mail= setting needs to be:
mail=<user-specific-directory>:INBOX=/var/mail/vhosts/%d/%n
If you really don't want a user-specific directory, see the bottom of http://wiki.dovecot.org/MailLocation
Ah, now I think I see.
userdb static { args = uid=502 gid=502 home=/var/mail/vhosts/%d/%n mail=mbox:/var/mail/vhosts/%d/%n/mail }
Am I correct in stating that the 'home' parameter will cause the indexes to be placed in /var/mail/vhosts/%d/%n/.imap/INBOX (one for each user) and the mail itself is in an mbox file named /var/mail/vhosts/%d/%n/mail?
The index conflict you describe also explains the problem I was having with duplicate emails (mbox sync: UID inserted in the middle of mailbox)
I finally settled on this, which appears to work:
args = uid=502 gid=502 home=/var/mail/vhosts/%d/%n mail=mbox:/var/mail/vhosts/%d/%n:INBOX=/var/mail/vhosts/%d/%n/mail
Will I have any problems from putting the inbox in the same directory mbox, or is this a legitimate setup?
On 5.2.2007, at 22.19, Jim Garrison wrote:
I finally settled on this, which appears to work:
args = uid=502 gid=502 home=/var/mail/vhosts/%d/%n mail=mbox:/var/mail/vhosts/%d/%n:INBOX=/var/mail/vhosts/%d/%n/mail
Will I have any problems from putting the inbox in the same directory mbox, or is this a legitimate setup?
Well, it probably lists the "mail" both as "mail" and "INBOX"
mailboxes. Would be better if the file was called "inbox" instead (in
which case you don't need to set :INBOX=.. at all).
participants (2)
-
Jim Garrison
-
Timo Sirainen