]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
maildir: Fix checking vsize caching decision in "is this pop3 user?"
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 22 Feb 2017 18:05:16 +0000 (20:05 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 22 Feb 2017 18:26:07 +0000 (20:26 +0200)
If vsize extension is used, it's practically the same as if vsize's caching
decision was YES.

src/lib-storage/index/maildir/maildir-mail.c

index 02e56027d81f88161f4bf39c63a61b294c52f441..977e00402e54135e500da7176cddc46fb3b554db 100644 (file)
@@ -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;