<div class="markdown">
<p dir="auto">On 20 Oct 2014, at 21:31, Kai Großjohann wrote:</p>

<blockquote>
<p dir="auto">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 <code>EXISTS</code>?</p>
</blockquote>

<p dir="auto">Let's assume 44 messages existed before the deletion. Then the other client is going to see something like this:</p>

<pre><code>* 44 EXISTS
...
* 17 EXPUNGE
* 33 EXPUNGE
</code></pre>

<p dir="auto">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:</p>

<pre><code>* 43 EXISTS
</code></pre>

<p dir="auto">That's an increase from 42 to 43 messages. The client then knows that it should fetch message number 43.</p>

<blockquote>
<p dir="auto">I guess in this day of smartphones, two clients connecting as the same user to the same server is not that uncommon.</p>
</blockquote>

<p dir="auto">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 <a href="http://imapwiki.org/ImapTest/ServerStatus">this resource shows</a> the sad state of many IMAP servers and it doesn't even include Yahoo.</p>

<p dir="auto">-- <br>
Benny</p>

</div>