1st WebDesigns
2012-Nov-08 08:29 UTC
[Dovecot] cannot update mailbox - unable to lock for exclusive access
Hi there, We're using Dovecot version 1.0.7 and Postfix, and since upgrading our Linux box we're getting this in the maillog: Nov 8 07:49:11 server1 postfix/local[27901]: 04B8E7081DA: to=<xyz at xyz.com>, orig_to=<abc at abc.com>, relay=local, delay=19, delays=0.07/0/0/19, dsn=4.2.0, status=deferred (cannot update mailbox /var/spool/mail/abc for user abc. unable to lock for exclusive access: Resource temporarily unavailable) Postfix is currently set to: mailbox_delivery_lock = fcntl, dotlock Dovecot has this: mbox_read_locks = fcntl mbox_write_locks = fcntl dotlock I've scoured the web and tried all kinds of different locking mechanisms and combinations to no avail. The mail is eventually delivered but on a busy day this can take several hours. In the evening it generally doesn't happen, which leads me to believe it occurs during the day when people have their mail clients open. However, this particular issue doesn't affect every user that has their mail client open, only some! We currently have the mailboxes in mbox format - yes I know we should upgrade to maildir which we will eventually, however we've been using mbox for the last 10 years and this has only become an issue since upgrading. What I have discovered this morning is a Dovecot connection that is open for 6 minutes before disconnection. During this 6 minutes the above problem occurs (new mail cannot get an exclusive lock). The same user will have connected and disconnected several times before and after, with a connection taking no more than a few seconds. But it seems sometimes the connection is taking longer than it should and I suspect the problem lies here. Please can anyone help! Thank you, G
Stan Hoeppner
2012-Nov-08 09:23 UTC
[Dovecot] cannot update mailbox - unable to lock for exclusive access
On 11/8/2012 2:29 AM, 1st WebDesigns wrote:> Hi there, > > We're using Dovecot version 1.0.7 and Postfix, and since upgrading our > Linux box we're getting this in the maillog:1.0.7 is absolutely ancient and no longer officially supported. You need 1.2.x minimum, 2.x.x even better. And you say you just recently upgraded your Linux distro? What planet do you live on son? You're a few light years behind current stable software.> Nov 8 07:49:11 server1 postfix/local[27901]: 04B8E7081DA: > to=<xyz at xyz.com>, orig_to=<abc at abc.com>, relay=local, delay=19, > delays=0.07/0/0/19, dsn=4.2.0, status=deferred (cannot update mailbox > /var/spool/mail/abc for user abc. unable to lock for exclusive access: > Resource temporarily unavailable)The simple permanent fix to Postfix/Dovecot mbox locking issues is switching from Postfix LOCAL to Dovecot LDA for mailbox delivery. 1.0.7 is before my time. I do not know if LDA was available then. Upgrade and you'll have it, and you'll also fix other problems you're not even aware of yet.> Postfix is currently set to: > mailbox_delivery_lock = fcntl, dotlock > > Dovecot has this: > mbox_read_locks = fcntl > mbox_write_locks = fcntl dotlockLDA completely eliminates lock contention. http://wiki.dovecot.org/LDA/Postfix http://wiki2.dovecot.org/LDA/Postfix -- Stan
Stan Hoeppner
2012-Nov-08 21:55 UTC
[Dovecot] cannot update mailbox - unable to lock for exclusive access
Please always reply to the list, not individuals. On 11/8/2012 4:17 AM, 1st WebDesigns wrote:> On 08/11/2012 09:23, Stan Hoeppner wrote: >> On 11/8/2012 2:29 AM, 1st WebDesigns wrote: >>> Hi there, >>> >>> We're using Dovecot version 1.0.7 and Postfix, and since upgrading our >>> Linux box we're getting this in the maillog: >> >> 1.0.7 is absolutely ancient and no longer officially supported. You >> need 1.2.x minimum, 2.x.x even better. And you say you just recently >> upgraded your Linux distro? What planet do you live on son? You're a >> few light years behind current stable software. >> >>> Nov 8 07:49:11 server1 postfix/local[27901]: 04B8E7081DA: >>> to=<xyz at xyz.com>, orig_to=<abc at abc.com>, relay=local, delay=19, >>> delays=0.07/0/0/19, dsn=4.2.0, status=deferred (cannot update mailbox >>> /var/spool/mail/abc for user abc. unable to lock for exclusive access: >>> Resource temporarily unavailable) >> >> The simple permanent fix to Postfix/Dovecot mbox locking issues is >> switching from Postfix LOCAL to Dovecot LDA for mailbox delivery. 1.0.7 >> is before my time. I do not know if LDA was available then. Upgrade >> and you'll have it, and you'll also fix other problems you're not even >> aware of yet. >> >>> Postfix is currently set to: >>> mailbox_delivery_lock = fcntl, dotlock >>> >>> Dovecot has this: >>> mbox_read_locks = fcntl >>> mbox_write_locks = fcntl dotlock >> >> LDA completely eliminates lock contention. >> >> http://wiki.dovecot.org/LDA/Postfix >> http://wiki2.dovecot.org/LDA/Postfix >> > > Thanks for your reply. We have upgraded from RHEL4 to RHEL5, so 1.0.7 > is the "stable" version that they provideRHEL 5 is also ancient, released in March 2007, over 5 years ago. The current stable release is RHEL 6.3, released in June 2012. What is the valid reason preventing you from upgrading to the 6.x distribution? The packages in general in 6.x are 5 years newer than 5.x. And given the fact that RHEL runs miles behind the bleeding edge, you're way behind the curve even with a recent RHEL distribution. You can probably find a much newer version of Dovecot in an RPM somewhere, and Postfix for that matter. But it would be better for you if you simply upgraded to RHEL 6.3. -- Stan