Subject: Re: Expunge Nightmares (was Re: More on /SEEN and /DELETED...)

From: Adam Treister <[email-masked]>
Date: Wed, 20 Oct 93 16:48:46 -0800

Mark,

>        I am afraid it is too late to change the way
>   expunge works.  If you write your code the right way,
>   using elt pointers (and elt locks) instead of message
>   numbers, you shouldn't have a problem.  That is why the
>   msgno is stored in the elt in the first place!

Thanks for the locking info.  That'll help. 

Aren't there also some race conditions:

A00123 STORE 4 +Flags \DELETED
* EXPUNGE 3
* 4 Store (FLAGS (\Seen \Deleted))
A00123 OK

Do I know that the Delete preceded the expunge?  Or could the server have
already done the expunge and just be waiting to tell me?  Do I have to handle
the Store notification before the Expunge notification?

Or will the server return:

* 3 Store (FLAGS (\Seen \Deleted))

in which case I have to handle the Expunge first.

Adam

---

From: Mark Crispin <[email-masked]>
Date: Wed, 20 Oct 1993 17:14:12 -0700 (PDT)

Adam:

     The IMAP2bis draft clarifies that an unsolicited EXPUNGE response must
not be sent in response to a FETCH, STORE, or SEARCH request, because of this
race condition.

     Unsolicited EXPUNGE responses may be sent in response to other requests.

-- Mark --