summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2022-02-02 12:51:08 -0800
committerKevin McCarthy <kevin@8t8.us>2022-02-02 13:17:53 -0800
commitc2ed716b9ec32a19c7464e80122ce16e7d721fda (patch)
treed3a061b9afa3185d434769d37238ee8e1a8f8316
parent92686e5ded3a75c026a62a0247331b1437ffcb78 (diff)
Don't queue IMAP close commands.
Commit e7df4d5a changed the close commands to queue up, on the theory that it will always be followed by a SELECT or a LOGOUT. However, performing a <recall-message> while in the inbox will open a *new* connection. mutt_conn_find() prepends the new conection to the Connections list. The next mailbox opened will use that *new* connection. The effect will be the queued CLOSE won't occur before that mailbox is opened, and so "\Deleted" messages won't be expunged on the server right away. If the user had $move set and reopened their $spoolfile, they would find the read messages marked for delete but not yet expunged from the server.
-rw-r--r--imap/imap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/imap/imap.c b/imap/imap.c
index 412fe83a..5bc9cd11 100644
--- a/imap/imap.c
+++ b/imap/imap.c
@@ -1676,7 +1676,7 @@ int imap_sync_mailbox (CONTEXT* ctx, int expunge, int* index_hint)
if (expunge && ctx->closing)
{
- imap_exec (idata, "CLOSE", IMAP_CMD_QUEUE);
+ imap_exec (idata, "CLOSE", 0);
idata->state = IMAP_AUTHENTICATED;
}
@@ -1721,7 +1721,7 @@ int imap_close_mailbox (CONTEXT* ctx)
/* mx_close_mailbox won't sync if there are no deleted messages
* and the mailbox is unchanged, so we may have to close here */
if (!ctx->deleted)
- imap_exec (idata, "CLOSE", IMAP_CMD_QUEUE);
+ imap_exec (idata, "CLOSE", 0);
idata->state = IMAP_AUTHENTICATED;
}