changeset 21680:f0a1e12fc57e

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.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 22 Feb 2017 20:05:16 +0200
parents d439e77f6b1f
children 9ef9988619b7
files src/lib-storage/index/maildir/maildir-mail.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-mail.c	Wed Feb 22 20:04:28 2017 +0200
+++ b/src/lib-storage/index/maildir/maildir-mail.c	Wed Feb 22 20:05:16 2017 +0200
@@ -263,6 +263,12 @@
 		}
 	}
 
+	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;