On Tue, 2010-12-07 at 16:11 +0100, Tim Mauerbach wrote:
> after recent upgrade from 2.0.5 to 2.0.8 it seems that local seen flags for
> mails reside in shared mailboxes doesn´t work anymore.
..
> namespace {
> location = maildir:%%h/Maildir:INDEX=~/Maildir/shared/%%u
> type = shared
So you mean other users' shared mailboxes? .. The way it should work is
that per-user seen flags are used only when dovecot-shared file exists
in a mailbox. But then again, if that exists then the owner's \Seen flag
also exists only in index file. So this has never really worked the way
you want, I don't know why it would have appeared to work in 2.0.5..
Attached patch should make it work the way you want, but I'm not really
sure how I should permanently handle this. Some people want \Seen flags
shared, others don't. So this would have to be configurable somewhere..
diff -r c41ba33b8e16 src/lib-storage/index/maildir/maildir-storage.c
--- a/src/lib-storage/index/maildir/maildir-storage.c Mon Dec 06 04:36:30 2010 +0000
+++ b/src/lib-storage/index/maildir/maildir-storage.c Tue Dec 07 22:50:34 2010 +0000
@@ -300,7 +300,7 @@
mbox->keywords = maildir_keywords_init(mbox);
shared_path = t_strconcat(box->path, "/dovecot-shared", NULL);
- if (stat(shared_path, &st) == 0)
+ if (stat(shared_path, &st) == 0 || box->list->ns->type == NAMESPACE_SHARED)
box->private_flags_mask = MAIL_SEEN;
if ((box->flags & MAILBOX_FLAG_KEEP_LOCKED) != 0) {