From: Timo Sirainen Date: Tue, 23 Sep 2014 13:58:59 +0000 (+0300) Subject: imap: Don't send MODSEQ in untagged FETCH reply if IMAP client didn't enable CONDSTOR... X-Git-Tag: 2.2.14.rc1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45c763dbebee268eda4a1e8bcc1ff82606b5ed0d;p=thirdparty%2Fdovecot%2Fcore.git imap: Don't send MODSEQ in untagged FETCH reply if IMAP client didn't enable CONDSTORE/QRESYNC. We should have been checking client->enabled_features, not mailbox_get_enabled_features(). The former contains the features enabled by the IMAP client, while the latter contains also some automatically added features. --- diff --git a/src/imap/imap-sync.c b/src/imap/imap-sync.c index af77420cdc..f452170609 100644 --- a/src/imap/imap-sync.c +++ b/src/imap/imap-sync.c @@ -415,8 +415,7 @@ static int imap_sync_send_flags(struct imap_sync_context *ctx, string_t *str) str_printfa(str, "* %u FETCH (", ctx->seq); if (ctx->imap_flags & IMAP_SYNC_FLAG_SEND_UID) str_printfa(str, "UID %u ", ctx->mail->uid); - if ((mailbox_get_enabled_features(ctx->box) & - MAILBOX_FEATURE_CONDSTORE) != 0 && + if ((ctx->client->enabled_features & MAILBOX_FEATURE_CONDSTORE) != 0 && !ctx->client->nonpermanent_modseqs) { imap_sync_add_modseq(ctx, str); str_append_c(str, ' ');