Virtual mailboxes, index update issues
Teemu Huovila
teemu.huovila at dovecot.fi
Tue Aug 8 11:47:33 EEST 2017
On 07.08.2017 20:28, Stefan Hagen wrote:
> Hello,
>
> I noticed a strange behavor, where I would like to ask for help.
>
> I have set up a few virtual mailboxes using the Virtual plugin.
> These mailboxes are:
> - Unread (all undread in all mailboxes)
> - LastDay (last 24h of all mailboxes)
> - LastWeek (last 7 days of all mailboxes)
> ...
>
> The virtual mailboxes in general are working great. However, there is one annoying behavior I would like to fix.
>
> If I define my virtual mailboxes like this:
>
> namespace inbox {
> inbox = yes
> prefix = "Virtual/"
> separator = /
> location = "virtual:~/.emails_virtual:LAYOUT=fs"
> list = yes
> subscriptions = yes
> }
>
> All programs can work with this mailbox. However, the index are not kept in sync. Let's say I mark some emails as "read" in the "Unread" mailbox, then they will still be in "unread"-state in the LastDay and LastWeek mailboxes.
>
> This is annoying. And there is a fix for it...
>
> location = "virtual:~/.emails_virtual:LAYOUT=fs:INDEX=MEMORY"
>
> Once I set INDEX=MEMORY, the mailbox refresh happens instantly. Marking an email as "read" in the "Unread" mailbox will instantly set it as "read" in the other mailboxes as well.
>
> However, many mail programs (mainly clients on OSX and iOS) have trouble and freak out with a refresh loop once I open these mailboxes. One client specifically complained about UID validity issues, which leads me to believe that UIDs are generated on the fly and are not stable when INDEX is set to MEMORY?
>
> How can I keep my virtual mailboxes in sync? Shouldn't they stay in sync even when INDEX=MEMORY is *not* set? I tried to set INDEX to a directory - it didn't help.
>
> Best Regards,
> Stefan
>
> Files:
> - 15-mailboxes.conf: https://gist.github.com/e54d458ece16ad6f29b536fa840e99ec
> - dovecot version: 2.2.31 (65cde28)
> - OS: FreeBSD 11.0-RELEASE-p11
>
There are a few known issues in the virtual plugin for Dovecot 2.2.31. Some of these we will have fixed in 2.2.32. Your issue seems like a case of https://github.com/dovecot/core/commit/bc7d7e41fe00f76c38d1a5194c130c983487911b
br,
Teemu
More information about the dovecot
mailing list