]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: Fix FETCH SNIPPET
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sat, 17 Feb 2018 22:53:12 +0000 (00:53 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 19 Feb 2018 11:37:53 +0000 (13:37 +0200)
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

src/imap/imap-fetch-body.c

index ce29d376985cb48ccd7534a4d71cc493bf5e4d04..6cfe28d8cf44e569b59e6dcb2dc1e360bfcc9cbe 100644 (file)
@@ -667,7 +667,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;
 }