Mercurial > dovecot > core-2.2
changeset 19663:befd1785a11f
imapc: Remove X-Message-Flag filtering if imapc_features has rfc822.size
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Thu, 28 Jan 2016 17:15:20 +0200 |
parents | a1e05123f776 |
children | d6561d5a8fb4 |
files | src/lib-storage/index/imapc/imapc-mail-fetch.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/imapc/imapc-mail-fetch.c Thu Jan 28 17:03:15 2016 +0200 +++ b/src/lib-storage/index/imapc/imapc-mail-fetch.c Thu Jan 28 17:15:20 2016 +0200 @@ -504,6 +504,7 @@ { struct index_mail *imail = &mail->imail; struct mail *_mail = &imail->mail.mail; + struct imapc_mailbox *mbox = (struct imapc_mailbox *)_mail->box; struct istream *input; uoff_t size; int ret; @@ -512,7 +513,11 @@ t_strdup_printf("imapc mail uid=%u", _mail->uid)); index_mail_set_read_buffer_size(_mail, imail->data.stream); - imapc_stream_filter(&imail->data.stream); + if (!IMAPC_BOX_HAS_FEATURE(mbox, IMAPC_FEATURE_RFC822_SIZE)) { + /* enable filtering only when we're not passing through + RFC822.SIZE. otherwise we'll get size mismatches. */ + imapc_stream_filter(&imail->data.stream); + } if (imail->mail.v.istream_opened != NULL) { if (imail->mail.v.istream_opened(_mail, &imail->data.stream) < 0) {