On Tue, 1 Oct 2002, Keith Robinson wrote:
> So I fully understand what you are saying. EXPUNGE can only remove messages
> the client knows to have the \Deleted flag set?

NO!!!

If I said anything that implies that, I'm sorry, because that is certainly
not the case.

If it were, it would be impossible to issue an EXPUNGE without first
fetching flags for all messages.  Fortunately, that is not the case.

That is why there is an untagged EXPUNGE response; otherwise, the client
has no way of knowing for certain what messages are expunged.

> Therefore, as it doesn't
> know about message 2 it can't delete it, even though the mailbox does
> actually contain a message with the \Deleted flag set.

Since the premise is false, this is not a valid conclusion.

HOWEVER, what happens in this particular case (client issues an EXPUNGE
but doesn't yet know about a new message which is deleted) *is*
server-implementation dependent.  One of the following will happen:
 1) the server will announce the new message as existing, and then
     announce that it has expunged it.
 2) the server will not expunge the new message at this time, but may
     expunge other messages.  Perhaps after expunging the other messages
     (and announcing that fact) it will announce the existance of the
     new message but not expunge it.
 3) the server will silently expunge it without announcing either that
     it exists or has been expunged.

I do not think that a server should ever do (3), but the protocol does not
forbid such behavior.  (1) is the architectually better behavior, but I
suspect that users would prefer (2).

In any case, the example is a timing race, and should be seen as an
exceptional case rather than something normal.  Ideally, a client should
do something to check for new messages immediately before doing an EXPUNGE
to minimize the chance of this happening.

What MUST NOT happen is the server announcing that the new message was
expunged without first announcing that it exists.

-- Mark --

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

Reply via email to