From: Timo Sirainen Date: Sat, 17 Feb 2018 22:53:12 +0000 (+0200) Subject: imap: Fix FETCH SNIPPET X-Git-Tag: 2.3.9~2255 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d26d7420190a29d2782a09ea20704fbf5c34e70c;p=thirdparty%2Fdovecot%2Fcore.git imap: Fix FETCH SNIPPET 1) _BUFFERED flag wasn't set, which caused a missing space before the "SNIPPET". 2) It caused \Seen flag to be added to the mail --- diff --git a/src/imap/imap-fetch-body.c b/src/imap/imap-fetch-body.c index 3c154d6878..54b76a29e2 100644 --- a/src/imap/imap-fetch-body.c +++ b/src/imap/imap-fetch-body.c @@ -668,7 +668,7 @@ bool imap_fetch_snippet_init(struct imap_fetch_init_context *ctx) } ctx->fetch_ctx->fetch_data |= MAIL_FETCH_BODY_SNIPPET; - ctx->fetch_ctx->flags_update_seen = TRUE; - imap_fetch_add_handler(ctx, 0, "NIL", fetch_snippet, (void *) lazy); + imap_fetch_add_handler(ctx, IMAP_FETCH_HANDLER_FLAG_BUFFERED, + "NIL", fetch_snippet, (void *) lazy); return TRUE; }