[MlMt] An EXISTS response decreased the number of messages. This should never happen.

Benny Kjær Nielsen mailinglist at freron.com
Mon Oct 20 16:18:23 EDT 2014


On 20 Oct 2014, at 21:31, Kai Großjohann wrote:

> Sorry if I'm slow.  What happens if two clients connect as the same 
> user to the same server, one of the clients deletes messages and 
> expunges them, then the other client does `EXISTS`?

Let's assume 44 messages existed before the deletion. Then the other 
client is going to see something like this:

	* 44 EXISTS
	...
	* 17 EXPUNGE
	* 33 EXPUNGE

This implicitly decreases the EXISTS count to 42 and the client should 
keep track of that. Later the server might tell the client that a new 
message arrived like this:

	* 43 EXISTS

That's an increase from 42 to 43 messages. The client then knows that it 
should fetch message number 43.

> I guess in this day of smartphones, two clients connecting as the same 
> user to the same server is not that uncommon.

Yes, but many IMAP servers (and clients) are still very buggy when 
multiple email clients do things at the same time. The results are a bit 
dated, but [this resource 
shows](http://imapwiki.org/ImapTest/ServerStatus) the sad state of many 
IMAP servers and it doesn't even include Yahoo.

-- 
Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20141020/edc6a860/attachment.html>


More information about the mailmate mailing list