dfa4b048ec9a174a42d6668e94501db2fb70793a |
|
16-Feb-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-index: Fix updating mail_index_header.day_first_uid
If user received a mail every day, the day_first_uid wasn't being updated.
This caused wrong caching decisions to be made in dovecot.index.cache:
- Accessing >1 week old emails should have changed caching decision from
"tmp" to "yes". This might not have happened, although as long as
day_first_uid[7] pointed to an existing mail and email client accessed
all the mails, this wouldn't have changed anything.
- Cache compression is supposed to drop >1 week old mails when caching
decision is "tmp". Not enough mails were being dropped because
day_first_uid[7] pointed to a much older than 1 week old mails.
Also added a unit test to make sure this works.
Broken by d9ee2f9fb3ef7b9391bfeeff1b374aead51667aa |