MBOX-Line: From fret at memecode.com  Thu Oct  1 21:26:54 2009
To: imap-protocol@u.washington.edu
From: Matthew Allen <fret@memecode.com>
Date: Fri Jun  8 12:34:42 2018
Subject: [Imap-protocol] List of UID's removed with expunge?
Message-ID: <XV827.6141YYD@memecode.com>

Hi,

Is there a reasonable way of getting the UID's of the messages removed with the expunge command?

It _seems_ from reading the RFC that I have to:
- Do a SEARCH to get all the sequence numbers of the \deleted messages
- Do a FETCH with that sequence set return from the search to get their UID's
- Then do the EXPUNGE and hope that nothing has changed in the mailbox between the various commands.

Sounds dubious at best. Alternatively instead of relying on the server to tell me whats going on I could just look though my local cache and remove all the "\deleted" message's metadata after I expunge, assuming that it's more or less the same.

I guess the best way would've been to have the server report the information in the untagged response ala:
* <sequence> EXPUNGE [UID <uid>]
or something, but that horse has bolted some decades ago.

Regards
--
Matthew Allen


