MBOX-Line: From MRC at CAC.Washington.EDU  Mon Mar 12 13:39:25 2007
To: imap-protocol@u.washington.edu
From: Mark Crispin <MRC@CAC.Washington.EDU>
Date: Fri Jun  8 12:34:38 2018
Subject: [Imap-protocol] EXPUNGE question?
In-Reply-To: <07Mar12.114420pst."57996"@synergy1.parc.xerox.com>
References: <07Mar12.114420pst."57996"@synergy1.parc.xerox.com>
Message-ID: <alpine.WNT.0.83.0703121334290.4472@Shimo-Tomobiki.Panda.COM>

On Mon, 12 Mar 2007, Bill Janssen wrote:
> 7.4.1.  EXPUNGE Response
>   Contents:   none
>      The EXPUNGE response reports that the specified message sequence
>      number has been permanently removed from the mailbox.
> I presume this means that "the message with the specified message
> sequence number has been..."?  Clearly some message with that sequence
> number may still be in the mailbox, due to the compaction of the message
> sequence numbers.

Yes; as per the next sentence after the text you quoted:
       [...]  The message
       sequence number for each successive message in the mailbox is
       immediately decremented by 1, and this decrement is reflected in
       message sequence numbers in subsequent responses (including other
       untagged EXPUNGE responses).

The idea being expressed here is that, in the case of
 	* 3 EXPUNGE
(a) message 3 vanishes
(b) if there was a message 4, message 4 becomes the new message 3; if
     there was a message 5, message 5 becomes the new message 4; and so
     on until the end of the mailbox.

Step (a) and (b) are part of one atomic operation, but it may help some 
people to think of them as discreet.

-- Mark --

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

