MBOX-Line: From petite_abeille at mac.com  Thu Dec  8 13:09:21 2011
To: imap-protocol@u.washington.edu
From: Petite Abeille <petite_abeille@mac.com>
Date: Fri Jun  8 12:34:47 2018
Subject: [Imap-protocol] [noob] notification of deleted/expunged messages?
In-Reply-To: <alpine.OSX.2.00.1112081243101.931@hsinghsing.panda.com>
References: <A891B744-87A2-42A5-9A02-81E212A9AB2E@mac.com>
	<80779123-5707-46B5-80E9-F90412A013BD@iki.fi>
	<1323259286.1981.140661008567313@webmail.messagingengine.com>
	<alpine.OSX.2.00.1112070846440.931@hsinghsing.panda.com>
	<8A9E65D1-7495-41F8-9067-4E07D89C3192@mac.com>
	<alpine.OSX.2.00.1112081243101.931@hsinghsing.panda.com>
Message-ID: <A2012C57-738A-4D4C-9AEE-5A1F641857BD@mac.com>


On Dec 8, 2011, at 9:52 PM, Mark Crispin wrote:

> I assume that this is something in an IMAP server? That is, the server
> always shows 1000 messages, but from time to time messages vanish in the
> existing sequence space, and new messages take their place at the top of
> the space?

Exactly.

> So, if the bottommost three messages vanish, and are replaced by three new
> messages, the server sequence on the EXPUNGE-valid point will be:
> 	* 1 EXPUNGE
> 	* 1 EXPUNGE
> 	* 1 EXPUNGE
> 	* 1000 EXISTS
> 
> Remember that the EXPUNGE response has immediate effect on the sequence
> space. If your server transmits:
> 	* 1 EXPUNGE
> 	* 2 EXPUNGE
> 	* 3 EXPUNGE
> that would remove original messages 1,3,5, not 1:3.
> 
> However, note that:
> 	* 3 EXPUNGE
> 	* 2 EXPUNGE
> 	* 1 EXPUNGE
> is exactly equivalent to:
> 	* 1 EXPUNGE
> 	* 1 EXPUNGE
> 	* 1 EXPUNGE

Good point. So exactly as, say, array/list manipulation: either remove the first element and shift the rest one position down, or remove it from the top.

> If you understand why this is the case, then you can be confident that you
> understand how sequence numbers work.

I think I got the gist of it. Thanks for the explanation.


