I had a mail server lock up and die on me tonight. The data center replaced some hardware in order to get it to power back up. Everything started up fine, but I was unable to retrieve my own email. My mail client was complaining about timeouts on a single account. In looking at the log, I found some lines similar to these in the dovecot mail logs:
Jul 13 04:19:09 secure deliver([email protected]): msgid=<[email protected]>: save failed to INBOX: Timeout while waiting for lock Jul 13 04:19:09 secure deliver([email protected]): msgid=<[email protected]>: save failed to INBOX: Timeout while waiting for lock Jul 13 04:19:09 secure deliver([email protected]): msgid=<[email protected]>: save failed to INBOX: Timeout while waiting for lock Jul 13 04:19:09 secure deliver([email protected]): msgid=<[email protected]>: save failed to INBOX: Timeout while waiting for lock Jul 13 04:19:09 secure deliver([email protected]): msgid=<[email protected]>: save failed to INBOX: Timeout while waiting for lock
Googling the error message didn’t find any quick results, so I attempted a more brute-force method. Inside the user’s maildir, I just moved some dovecot files out of the way:
[root@host /vmail/domain/user/]# mv dovecot-uidlist.lock dovecot.index dovecot.index.cache dovecot.index.log /tmp/badfiles
After moving those files out of the way, I restarted dovecot with
/etc/init.d/dovecot restart
and my client was able to connect without problems.
Thanks alot, I was banging my head on the table because of this lock issue,
you made my day, dude!