[Dovecot] cannot update mailbox - unable to lock for exclusive access

Stan Hoeppner stan at hardwarefreak.com
Thu Nov 22 13:26:58 EET 2012


On 11/10/2012 2:25 PM, Ben Morrow wrote:

> The usual meaning of 'lock contention' is 'two processes legitimately
> competing for the *same* lock'.

Sure, this is the textbook definition, and software designers will
discuss it as such in that context.  However, when systems users use the
term, in a production use context, they are using it in the context of
problems resulting from it, performance or otherwise.  I.e. if lock
contention isn't causing problems, systems users will not be discussing
it.  With many things, including software, context is critical.

> You appear to be advocating the LDA as the solution to all possible
> problems with mail delivery, and implying anyone not using it is doing
> something seriously wrong. 

I advocated no such thing, nor implied such a thing.  I stated that if
one is using Postfix/local(8) for mbox delivery and Dovecot for POP/IMAP
that s/he should switch to LDA (or LMTP) to eliminate any potential mbox
locking problems; that it doesn't make sense to use Postfix/local(8)
with Dovecot as there is no upside.  Again, the context is mbox.  Did
you see me state this in relation to maildir?

> I was pointing out that that is not always
> the case.

You seem to spend a lot of time pointing out exceptions.

> I believe the OP mentioned something about having run out of mboxes for
> 20 years? To me that suggests an old-fashioned Unix setup, which in turn
> suggests procmail as a likely possibility. I could, of course, be wrong.

Examination of his log entry indicates he's not using procmail, but
Postfix' local(8) delivery agent directly to the mailbox file:

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)

"unable to lock for exclusive access: Resource temporarily unavailable"
is a Postfix local(8) error message.

If procmail was configured, you'd likely see this instead:

...status=sent (delivered to command: /usr/bin/procmail...)

Then procmail would do the actual delivery to the mailbox (mbox) file,
and if a locking problem occurred, it would be logged by procmail, and
possibly a bounce sent to the sender.  I'm not sure what, if any, error
would be returned to local(8) as I've never used procmail.

> If I have offended you, I apologise. That was certainly not my
> intention.

I was not offended, just a bit annoyed.  When you attempted to correct
my intentional misuse of "light year" it reminded me of something
similar.  Almost daily I've wanted to stomp on Europeans for sticking
the indefinite article "an" in front of words beginning with consonants,
when they should be using "a" instead, butchering the English language
in the process:

"I need help with an Debian Linux install on an Dell server."  "I'm
installing an Dovecot cluster and need help configuring an Dovecot
Director."

Supremely irritating, but I've never stomped on them, bit my tongue
every time, as it's a waste of time.  Maybe you could follow suit.

-- 
Stan




More information about the dovecot mailing list