]> 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)
committerGitLab <gitlab@git.dovecot.net>
Wed, 22 Feb 2017 18:25:10 +0000 (20:25 +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 836c4107687ed09adb425363cc1d5167705b4a04..3ce3abaf0fc2028d279ecc451e74dfac291730aa 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;