Dovecot says “Couldn’t open INBOX: Mailbox doesn’t exist: INBOX”Posted: July 1, 2013
Suddenly you get a message:
Sending of password did not succeed. Mail server [yourservernamehere] responded: Couldn’t open INBOX: Mailbox doesn’t exist: INBOX
One possible reason is that the mailbox file has indeed disappeared.
This happened to me recently, when I was playing with Dovecot mail server settings and moved away some old mailbox files without much thinking about the effects.
The bright side is that the malfunction can be fixed extremely easy: just create a blank file with the name of the user it is for, in this example let’s assume the name of the user is lightbox.
So you just go to the /var/spool/mail and say
Voila! It should be working now.
If it doesn’t, check that the size of the file is zero! Say:
In my case I initially made a mistake by creating the “empty” file with echo “” > lightbox, but it actually produced for me a file of 1 byte size, and not a zero sized file. This resulted in error:
Sending of username did not succeed. Mail server [yourservernamehere] responded: Mailbox isn’t a valid mbox file
Also, to avoid receiving error message like “cannot update mailbox /var/mail/lightbox for user lightbox. cannot open file: Permission denied” and for the sake of good order, change ownership and permissions for the file:
chown lightbox:mail lightbox chmod 600 lightbox
Then check again with:
It should look something like this:
-rw——- 1 lightbox mail 0 Jun 25 14:29 lightbox
i.e. only the particular user shall be able to read and write the file.
P.S. Tested on Ubuntu 12.04