Auteur: David Snowden Datum: Aan: exim-users Onderwerp: [exim] MBX format and UW-IMAP
Hello,
I have been experimenting with implementing shared mailboxes using
MBX format, but I seem to have run into a tricky problem with file
locking and I was wondering if anyone else has seen this and can
advise on a fix.
Briefly, once the shared mailbox has been accessed via UW-IMAP (2004g),
the next time that Exim (4.60) delivers to that mailbox it leaves
behind a lockfile in /tmp. Whilst this does not prevent subsequent
deliveries to the mailbox, it seems to prevent the IMAP client from
seeing them. If I stop and re-start the IMAP client it then complains
that it cannot lock the mailbox, and so can no longer access it at all.
Having removed the lockfile from /tmp I experimented with using the
exim_lock command, which worked fine on the mailbox until I had viewed
it via IMAP, after which, when exiting from the shell launched by
exim_lock, I got the output:
exim_lock: fcntl() failed: Resource temporarily unavailable
exim_lock: /tmp/xxxxxxxx not unlinked - unable to get exclusive mailbox lock
exim_lock: /tmp/xxxxxxxx closed
exim_lock: mailbox closed
If I have read the documentation correctly, this implies that the
IMAP server is holding a lock on the mailbox file. I don't know whether
that lock is exclusive or shared, but perhaps that's irrelevant because
if Exim can't get an exclusive lock on it then it won't remove the
lockfile from /tmp, and I presume it is the presence of that which then
prevents IMAP from accessing the mailbox.
Am I overlooking something here or completely misunderstanding the way
that the locking is supposed to work whilst still supporting simultaneous
access to the mailbox?