dovecot vs. mutt: no full index sync on Maildir new/ mtime change

Michael Büker mb at michael-bueker.de
Tue Apr 24 10:33:13 EEST 2018


Hi, everyone!

This is a follow-up to "Looks like a bug to me: Dovecot ignores 
Maildir/new timestamp" from Fredrik Roubert on 01.12.2015:
https://www.dovecot.org/list/dovecot/2015-December/102585.html

I've run into the same problem as Fredrik: When manipulating my Maildir 
locally with mutt, deleting a message from new/ doesn't cause a full 
update of the index. Therefore, IMAP clients still see the deleted 
message.

I've read and understood Timo's reply saying that dovecot only performs 
a "partial sync" of the index when the mtime of new/, but not of cur/, 
changes. This makes perfect sense for performance reasons for most 
users:
https://www.dovecot.org/list/dovecot/2015-December/102588.html

I, however, would be willing to take the performance hit of a full index 
sync whenever the mtime of new/ changes. Therefore, I looked at the code 
and tried to implement a config option 
(maildir_fullsync_on_new_mtime_change) for this behavior. However, my 
understanding of src/lib-storage/index/maildir/maildir-sync.c was not 
good enough – I probably put the 
ctx->mbox->storage->set->maildir_fullsync_on_new_mtime_change check in 
the wrong place, and all my patch did was ruin the index ;)

So, to summarize my question: I'd like dovecot to perform a full index 
sync when the mtime of a Maildir's new/ has changed. I'm willing to take 
the performance hit, because it would fix a problem I'm having with 
using mutt and dovecot together. Can this be done in principle by adding 
a config option check like 
ctx->mbox->storage->set->maildir_fullsync_on_new_mtime_change in the 
right place in src/lib-storage/index/maildir/maildir-sync.c? If so, 
where should it be put?

Thanks for your time,
Michael


More information about the dovecot mailing list