Mercurial > dovecot > core-2.2
diff src/lib-storage/index/dbox-multi/mdbox-storage.c @ 20522:2c0956060e6d
dbox: Initialize pop3-uidl header on INBOX creation.
This way we don't add any UIDLs to dovecot.index.cache on the first POP3
UIDL access. We'll assume that pop3-uidl header is updated whenever any
backend UIDLs are added, which should happen nowadays.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Wed, 13 Jul 2016 15:10:57 -0500 |
parents | 0f22db71df7a |
children | 271015c91be5 |
line wrap: on
line diff
--- a/src/lib-storage/index/dbox-multi/mdbox-storage.c Wed Jul 13 14:07:02 2016 -0500 +++ b/src/lib-storage/index/dbox-multi/mdbox-storage.c Wed Jul 13 15:10:57 2016 -0500 @@ -9,6 +9,7 @@ #include "mail-index-alloc-cache.h" #include "mailbox-log.h" #include "mailbox-list-private.h" +#include "index-pop3-uidl.h" #include "dbox-mail.h" #include "dbox-save.h" #include "mdbox-map.h" @@ -307,6 +308,9 @@ } mail_index_view_close(&view); + if (box->inbox_user) + index_pop3_uidl_set_max_uid(box, trans, 0); + mdbox_update_header(mbox, trans, update); if (new_trans != NULL) { if (mail_index_transaction_commit(&new_trans) < 0) {