Panayiotis Fafakos
2015-May-04 22:17 UTC
PublicFolders using Maildir and INDEXPVT in Dovecot v2.2.13
Dear all, we have succesfully configured Dovecot v2.2.13 in debian wheezy 7.8 (using backports) using Maildir structure, to use private index files for the \Seen flag on a per user basis. All users access their emails and Public Folders using IMAP protocol. The problem is that when a user moves an email from publicFolderA to publicFolderB under the same namespace the other users see this message as unread, although they have actually read it when it was in publicFolderA. Please note that this is an old message which has been moved , it was not copied, so the actual UID should be the same... Is there a way to keep the \Seen flag for the messages that are moved from folder to folder? Is there a way to keep the \Seen flag in a database, so that we can ignore the folder structure and only check the message UIDs? We could use MySQL, PgSQL or even SQLite... Below follows the Public-Folder namespace declaration: ------------------------------------------ namespace { inbox = no location = maildir:/var/vmail/Public-Folders:LAYOUT=fs:INDEXPVT=~/Maildir/public/%u prefix = Public-Folders/ separator = / subscriptions = no type = public } ------------------------------------------ With the above system configuration we have the complete folder structure under ~/Maildir/public/%u, and many log files, one for each folder a user has accessed. Could we only have one index file for each user for all the public folder structure under the same namespace? Kind regards to all, Panayiotis Fafakos
Panayiotis Fafakos
2015-May-08 15:24 UTC
PublicFolders using Maildir and INDEXPVT in Dovecot v2.2
Do we have a way to keep the user \Seen flags in public folders when an email is moved in another folder? Sample test to reproduce: Step a - UserA and UserB have both read the email in PublicFolderA. Step b - UserA moves the email to PublicFolderB. UserA still sees the email as read (with the \Seen flag), this is expected behaviour and we are ok with this. Step c - UserB sees the email in PublicFolderB as an unread message!? He is puzzled since he has already read this message and asks why this is happening. Can we correct this behaviour? Thank you all, Panos. On 5/5/2015 01:17, Panayiotis Fafakos wrote:> Dear all, > > we have succesfully configured Dovecot v2.2.13 in debian wheezy 7.8 > (using backports) > using Maildir structure, to use private index files for the \Seen flag > on a per user basis. > > All users access their emails and Public Folders using IMAP protocol. > > The problem is that when a user moves an email from publicFolderA to > publicFolderB under the same namespace > the other users see this message as unread, although they have > actually read it when it was in publicFolderA. > > Please note that this is an old message which has been moved , it was > not copied, so the actual UID should be the same... > > Is there a way to keep the \Seen flag for the messages that are moved > from folder to folder? > > Is there a way to keep the \Seen flag in a database, so that we can > ignore the folder structure and only check the message UIDs? We could > use MySQL, PgSQL or even SQLite... > > Below follows the Public-Folder namespace declaration: > ------------------------------------------ > namespace { > inbox = no > location = > maildir:/var/vmail/Public-Folders:LAYOUT=fs:INDEXPVT=~/Maildir/public/%u > prefix = Public-Folders/ > separator = / > subscriptions = no > type = public > } > ------------------------------------------ > > With the above system configuration we have the complete folder > structure under ~/Maildir/public/%u, and many log files, one for each > folder a user has accessed. > Could we only have one index file for each user for all the public > folder structure under the same namespace? > > Kind regards to all, > Panayiotis Fafakos > >
Timo Sirainen
2015-May-08 15:42 UTC
PublicFolders using Maildir and INDEXPVT in Dovecot v2.2
On 08 May 2015, at 18:24, Panayiotis Fafakos <pfaf at wisdomsoftware.net> wrote:> > Do we have a way to keep the user \Seen flags in public folders > when an email is moved in another folder? > > Sample test to reproduce: > Step a - UserA and UserB have both read the email in PublicFolderA. > Step b - UserA moves the email to PublicFolderB. UserA still sees the email as read (with the \Seen flag), this is expected behaviour and we are ok with this. > Step c - UserB sees the email in PublicFolderB as an unread message!? He is puzzled since he has already read this message and asks why this is happening. Can we correct this behaviour?No, there's no way to fix this without major changes to how Dovecot works. Per-user seen flags are stored in private per-user index files. When user A moves mail to another folder the shared index and user A's index are updated to copy the flags. User A doesn't know what other users might have the folder accessible (and especially both source and destination folder). Even if it did know, now moving a mail might involve updating a lot of indexes every time a mail is moved, which is way too slow. One possible future solution would be to move more towards GMail-like labels instead of folders. We have beginnings of such code. I'm not sure yet how that could be made to work with shared folders.