Regular copying/saving messages in mutt via a UID COPY first calls
imap_sync_message(). However that function is designed to sync all
flags (including deleted), and so isn't useful for the fast-trash
code.
As an easier solution, instead add a UID STORE to set \\Seen for the
same msgset as the trashed messages.
/* loop in case of TRYCREATE */
do
{
+ rc = imap_exec_msgset (idata, "UID STORE", "+FLAGS.SILENT (\\Seen)",
+ MUTT_TRASH, 0, 0);
+ if (rc < 0)
+ {
+ dprint (1, (debugfile, "imap_fast_trash: Unable to mark messages as seen\n"));
+ goto out;
+ }
+
rc = imap_exec_msgset (idata, "UID COPY", mmbox, MUTT_TRASH, 0, 0);
if (!rc)
{