Michael Büker
2018-Apr-24 07:33 UTC
dovecot vs. mutt: no full index sync on Maildir new/ mtime change
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
Sami Ketola
2018-Apr-24 08:15 UTC
dovecot vs. mutt: no full index sync on Maildir new/ mtime change
> On 24 Apr 2018, at 10.33, Michael B?ker <mb at michael-bueker.de> wrote: > > 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?While this is probably doable with some code changes I personally "solved" the problem just by switching to IMAP for mutt. Sami