From: Timo Sirainen Date: Wed, 22 Feb 2017 18:05:16 +0000 (+0200) Subject: maildir: Fix checking vsize caching decision in "is this pop3 user?" X-Git-Tag: 2.3.0.rc1~2005 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdb838ec8774e41004461b7f76ab409774af06c4;p=thirdparty%2Fdovecot%2Fcore.git maildir: Fix checking vsize caching decision in "is this pop3 user?" If vsize extension is used, it's practically the same as if vsize's caching decision was YES. --- diff --git a/src/lib-storage/index/maildir/maildir-mail.c b/src/lib-storage/index/maildir/maildir-mail.c index 836c410768..3ce3abaf0f 100644 --- a/src/lib-storage/index/maildir/maildir-mail.c +++ b/src/lib-storage/index/maildir/maildir-mail.c @@ -263,6 +263,12 @@ static int maildir_get_pop3_state(struct index_mail *mail) } } + if (index_mail_get_vsize_extension(&mail->mail.mail) != NULL) { + /* having a vsize extension in index is the same as having + vsize's caching decision YES */ + vsize_dec = MAIL_CACHE_DECISION_YES; + } + if (!not_pop3_only) { /* either nothing is cached, or only vsize is cached. */ mail->pop3_state = 1;