[Imap-protocol] Concurrent Mailbox Changes.

Philip Guenther guenther+imap at sendmail.com
Thu Jun 7 16:02:55 PDT 2007


On Thu, 7 Jun 2007, Mark Crispin wrote:
...

> Here is what that other client will see:

> a001 FETCH ...

> * n FETCH ...

> a001 OK FETCH completed

> a002 FETCH ...

> * n FETCH ...

> * 8 EXISTS

> * 3 RECENT

> a002 OK FETCH completed

> a003 NOOP

> * 2 EXPUNGE

> * 3 EXPUNGE

> * 6 EXISTS

> * 3 RECENT

> a003 OK NOOP completed


Note that the final EXISTS response is not required here: the previous
EXISTS said eight and there have been exactly two EXPUNGE responses, so
the client already knows that exactly six messages remain. RFC 3501,
section 7.4.1, p2:
The EXPUNGE response also decrements the number of messages in the
mailbox; it is not necessary to send an EXISTS response with the
new value.

The RECENT response clearly needs to be sent whenever the number messages
with the \recent flag has changed. It's probably technically legal to
suppress it when that count hasn't changed (say, if new messages have
arrived that aren't \recent or if an equal number of \recent messages have
been expunged as have arrived), but it may not be wise for a server to do
that.


Philip GUenther



More information about the Imap-protocol mailing list