This is an odd issue that I tend to see with Blackberry devices connecting via IMAP on some of my Sendmail+Dovecot mail deployments. For users of those devices, the Dovecot indexes tend to get locked. This prevents mail flow to the Blackberry device as well as the user's Outlook client. The corresponding messages in /var/log/maillog look like:
May 2 08:13 XXX imap(asmith): Timeout while waiting for release of exclusive fcntl() lock for index file /home/asmith/mail/.imap/INBOX/.imap.index
This is repeated for every mailbox synchronization attempt...
It's a strange error and is easily resolved by removing the offending index file. However, I'm curious about the root cause of the error and locked-state and if there's something I can modify on the configuration side to prevent it.
In other situations, I've only had a handful of BB devices to deal with. In this case, 80 new Blackberries were added, and this locking has an impact on system load and performance.
The mbox storage format keeps the entire folder in a single unindexed file, requiring Dovecot to use complicated locking even for read access. This causes problems with multiple clients, especially when they attempt to keep the folder selected in order to wait for IDLE notifications, used by most modern IMAP clients.
(Also, the
.imap.index
file is an addition by Dovecot to avoid some performance issues, and often gets out of sync if an external delivery agent updates the folder.)Consider switching to Maildir format, which has no such issues with locking. Dovecot has instructions (for v1.x).