[Dovecot] dovecot deadlock with procmail

Timo Sirainen tss at iki.fi
Tue Aug 23 18:51:42 EEST 2011

On 19.8.2011, at 13.37, kunal verma wrote:

> I m using dovecot 1.0.7. I m having problems in mail delivery to my mail
> server locally.
> When a user sends a mail few mails are in mail Q for longer period of time.
> The local delivery agent(*procmail*) is trying to deliver the mail at
> regular interval but it is unable to deliver.
> But as soon as I *restart* *dovecot* the mails in the Q are delivered
> immediately.
> I suspect it is because of locking of *mbox* file of users by dovecot.

Dovecot locks the mbox files only as long as it needs to. For IMAP commands it's locked only during those IMAP commands. For POP3 it's locked when the first message is read and kept until POP3 client disconnects (this is what POP3 clients are supposed to do). With v1.2 POP3 sessions also unlock the mbox after idling for 10 seconds.

There might have also been some bugs related to this.. You could try if upgrading Dovecot to v1.2 or newer helps.

> How to overcome this problem as mails are some mails are taking hours to be
> delivered??
> please let me know the solution.

The only guaranteed solution would be to not use mbox.

More information about the dovecot mailing list