From: Timo Sirainen Date: Thu, 28 Jan 2016 13:36:58 +0000 (+0200) Subject: imap: Send all pending tagged command replies before APPEND is started. X-Git-Tag: 2.2.22.rc1~262 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6e9454f;p=thirdparty%2Fdovecot%2Fcore.git 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. --- 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 |