Subject: concurrent EXAMINE/SELECT on unix format mailbox

From: Nick <[email-masked]>
Date: Mon, 16 Aug 2004 13:42:32 -0400

I originally ran across this on a vendor supplied build (redhat 7.2) and
verified it again using Fedora Core 2 and imap-2004a. I apologize if
this was previously covered; however, I am bringing it up since it
doesn't appear to be explicitly mentioned in docs/formats.txt

When using the unix format mailbox only one process can have read/write
(select) access. This is documented, and any previous connections are
dropped. However, my concern is when using examine (read only) on a
mailbox and another connection uses select. Examine appears to be
completely oblivious to any actions performed on the mailbox by the
other process. Specifically, an expunge really throws things out of
whack where subsequent text fetches on the "examined" view returns
incorrect data which seemingly correspond to the original view offsets
when first opened rather than the current updated mailbox (post-expunge).

Thanks,

-nick

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Mon, 16 Aug 2004 18:35:34 -0700 (Pacific Daylight Time)

On Mon, 16 Aug 2004, Nick wrote:
> However, my concern is when using examine (read only) on a

Your surmise is correct.

In traditional UNIX format, there is effectively only one lock: the 
readwrite lock.  Readonly access must either lock the readwrite lock 
(which would preclude other readonly access), or not lock at all and hope 
for the best.  c-client does the latter.

This is one of many reasons why traditional UNIX format is not suitable 
for IMAP (or other shared access).

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.