IMAP Error (inbox.lock)

To troubleshoot the IMAP error(Inbox lock errors) while accessing mailbox via any webmail clients(Horde, SquirrelMail, NeoMail, Round Cube etc.):

The error will be shown as below,

Connection dropped by IMAP server ERROR: Connection dropped by IMAP server. Query: SELECT "INBOX" Reason Given: Unable to open this mailbox.

The error usually occurs when there is inbox.lock file in the mailbox. Here the inbox gets locked and hence the mailbox can’t be accessed and you will get the above said error.

Cause :

Exim has a exim_lock function which creates an inbox.lock file when the mails are checked once a minute or more.

Solution :


1. Remove the "inbox.lock" file from the particular mailbox. 


Eventhough the “inbox.lock” file is deleted, it will be created when the mailbox is accessed again. Hence after removing the file, we need to copy the inbox to a new file name so as to fix the issue which can be done as follows,


2. cat inbox > 3. rm inbox 4. mv inbox 5. Then fix ownership and permissions.


This fixes the issue.


Both comments and pings are currently closed.

Comments are closed.