I had some problems with a mail server today and had to reboot it. After booting it back up all the services started, but any attempts to access a mailbox via IMAP generated an error that said “Unable to open this mailbox”. Testing it through telnet looked like this:
[root@ny ~]# telnet localhost 143 >> Trying 127.0.0.1 >> Connected to mail.somedomain.com (127.0.0.1). >> Escape character is '^]'. >> * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT >> THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright >> 1998-2004 Double Precision, Inc. See COPYING for distribution information. << 01 LOGIN firstname.lastname@example.org mypassword >> 01 OK LOGIN Ok. << 02 LIST "" * >> * LIST (HasNoChildren) "." "INBOX.Junk" >> * LIST (HasNoChildren) "." "INBOX.Drafts" >> * LIST (HasNoChildren) "." "INBOX.Trash" >> * LIST (HasNoChildren) "." "INBOX.Sent" >> * LIST (Marked HasChildren) "." "INBOX" >> 02 OK LIST completed << 03 SELECT INBOX >> 03 NO Unable to open this mailbox.
After digging into file permissions, restarting courier-imap, and anything else I could think of, I was getting puzzled. Then a fellow sysadmin noticed that time time on the box was way off:
mail:~# date Wed Jan 7 04:09:17 MST 1925
I corrected that and it imap suddenly started working again. I wish that courier-imap would have given a little more descriptive error message, but glad that it was nothing difficult to fix.