From 6e9454f1d99a86c3f9659a66abff59ae97e5f029 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 28 Jan 2016 15:36:58 +0200 Subject: [PATCH] imap: Send all pending tagged command replies before APPEND is started. This probably doesn't matter a lot, but it's cleaner. One side effect of this change is that if multiple APPENDs are pipelined (without MULTIAPPEND) on the selected mailbox, this now performs a sync between each APPEND and sends the EXISTS replies. This may be slightly lower in performance, but it's also slightly more correct behavior. --- src/imap/imap-commands.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/imap/imap-commands.c b/src/imap/imap-commands.c index 613098aabc..397437510c 100644 --- a/src/imap/imap-commands.c +++ b/src/imap/imap-commands.c @@ -20,7 +20,11 @@ static const struct command imap4rev1_commands[] = { { "LOGOUT", cmd_logout, COMMAND_FLAG_BREAKS_MAILBOX }, { "NOOP", cmd_noop, COMMAND_FLAG_BREAKS_SEQS }, - { "APPEND", cmd_append, COMMAND_FLAG_BREAKS_SEQS }, + { "APPEND", cmd_append, COMMAND_FLAG_BREAKS_SEQS | + /* finish syncing and sending + all tagged commands before + we wait for APPEND input */ + COMMAND_FLAG_BREAKS_MAILBOX }, { "EXAMINE", cmd_examine, COMMAND_FLAG_BREAKS_MAILBOX }, { "CREATE", cmd_create, 0 }, { "DELETE", cmd_delete, COMMAND_FLAG_BREAKS_MAILBOX | -- 2.47.3