MBOX-Line: From petite_abeille at mac.com  Wed Dec  7 01:27:52 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?
Message-ID: <A891B744-87A2-42A5-9A02-81E212A9AB2E@mac.com>

Hello,

What's the proper way to notify a client of deleted/expunged message by another agent?

Went through RFC 2180 "IMAP4 Multi-Accessed Mailbox Practice", but I still have some doubts.

Background: in this scenario, all the mailboxes and messages are managed server-side. The client can only select/fetch things in a read-only fashion. The server itself actively manages all the mailboxes and their content, including deletion of messages.

Say one has an "inbox" which always shows the latest thousand messages. Messages flow constantly in the inbox, but only the latest 1,000 are shown in the inbox. 

How to properly notify the client when the message windows change?

For example:

c: abc select inbox
s: * 1000 exist
...
s: abc ok [read-only] select

c: abc fetch 1:*
s: * 1 fetch (uid 82542)
...
s: * 1000 fetch (uid 83541)
s: abc ok fetch

Now a new message arrives, shifting the content of the inbox by one from UID 82542-83541 to UID 82543-83542.

How should the server notify the client?

Would the following unilateral untagged notification be enough?

s: * 1 expunge 
s: * 1000 exists

Thanks in advance.

--



