Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8259:4dc07239ddfa HEAD
pop3+maildir: Make sure virtual sizes always get written to dovecot-uidlist file.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 10 Oct 2008 21:21:52 +0300 |
parents | 7db59981c1a0 |
children | 110afc84fbb1 |
files | src/lib-storage/index/maildir/maildir-mail.c src/lib-storage/mail-storage.h src/pop3/client.c |
diffstat | 3 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/maildir/maildir-mail.c Thu Oct 09 13:52:42 2008 +0300 +++ b/src/lib-storage/index/maildir/maildir-mail.c Fri Oct 10 21:21:52 2008 +0300 @@ -219,7 +219,8 @@ if (!not_pop3_only) { /* either nothing is cached, or only vsize is cached. */ mail->pop3_state = 1; - } else if (vsize_dec != MAIL_CACHE_DECISION_YES) { + } else if (vsize_dec != MAIL_CACHE_DECISION_YES && + (mail->ibox->open_flags & MAILBOX_OPEN_POP3_SESSION) == 0) { /* if virtual size isn't cached permanently, POP3 isn't being used */ mail->pop3_state = -1;
--- a/src/lib-storage/mail-storage.h Thu Oct 09 13:52:42 2008 +0300 +++ b/src/lib-storage/mail-storage.h Fri Oct 10 21:21:52 2008 +0300 @@ -56,6 +56,9 @@ MAILBOX_OPEN_NO_INDEX_FILES = 0x10, /* Keep mailbox exclusively locked all the time while it's open */ MAILBOX_OPEN_KEEP_LOCKED = 0x20, + /* Enable if mailbox is used for serving POP3. This allows making + better caching decisions. */ + MAILBOX_OPEN_POP3_SESSION = 0x40 }; enum mailbox_feature {