[Dovecot] Changing the Seen Flags
Hi ,
Can we change the setting on dovecot so that the Seen mail flag S should be saved where everybody can see that and not in the dovecot.index file
As we are facing problems with public folder read/unread mails.
Any help is appreciated
Thanks, Amardeep
On Wed, 2006-12-06 at 19:18 +0530, Amardeep Singh wrote:
Hi ,
Can we change the setting on dovecot so that the Seen mail flag S should be saved where everybody can see that and not in the dovecot.index file
As we are facing problems with public folder read/unread mails.
Usually people want private seen flag with shared folders. I want to make this configurable, but I haven't yet much thought how this should be done, so for now it's hardcoded.
You can change it by modifying the sources:
src/lib-storage/index/maildir/maildir-storage.c around line 519: mbox->private_flags_mask = MAIL_SEEN;
Change MAIL_SEEN to 0.
As we are facing problems with public folder read/unread mails.
Usually people want private seen flag with shared folders.
One exception that we have is our main incoming fax folder...
For this folder, we have 3 people who check it all day, and forward the fax to whoever it is for. I would *love* to have public seen flag for this folder, so the first person who reads a fax and forwards it will mark it as seen, and anyone else checking the folder will know it has already been dealt with.
But you are right, most of our other Public folders we want private seen flags...
I want to make this configurable, but I haven't yet much thought how this should be done, so for now it's hardcoded.
Afraid I can't help you much as far as how to do it, but just wanted to give you one good example of the need.
Thanks Timo! Dovecot just gets better all the time...
--
Best regards,
Charles
Hi Timo,
This feature is one of only two that, if implemented, would make dovecot 'perfect' (for me) as far as feature set goes.
There were a few messages about this subject previously, but I'm confused - it appears you say one thing, then another... with all of the changes dovecot has seen recently, can you clarify the status of this capability?
I am also interested in having this configurable on a per shared folder basis... I have some folders that I want to force shared 'seen' flags - ie, if one person marks a message as seen, everyone else will also see it as seen (this would be for our incoming efaxes), and on another I want each user to maintain their own 'seen' flags (for company-wide info messages, etc).
Anyway, first, on 23/03/2006 you replied to someone's question about this:
I was wondering if the above was possible. I know that the "seen" flag is stored in the filename, but was wondering if anyone knew of a way to separate it out? I know this would strictly-speaking break maildir compatibility, but it would be extremely useful for shared folders.
Timo replies:
The way this worked at one point was by making each user have separate index file for the mailbox, then keeping the \Seen flag only inside that index file and ignoring the maildir's seen flag completely. Then I rewrote the maildir syncing code and this part was dropped out. Probably wouldn't be too difficult to make it work again.. Yea, looks like it wasn't. Works now in CVS.
Here, you said 'it works'... this was in March of 2006.
Then, on Dec 6, you replied to someone else's similar question:
Amardeep wrote:
Can we change the setting on dovecot so that the Seen mail flag S should be saved where everybody can see that and not in the dovecot.index file
As we are facing problems with public folder read/unread mails.
Timo replied:
Usually people want private seen flag with shared folders. I want to make this configurable, but I haven't yet much thought how this should be done, so for now it's hardcoded.
You can change it by modifying the sources:
src/lib-storage/index/maildir/maildir-storage.c around line 519: mbox->private_flags_mask = MAIL_SEEN;
Change MAIL_SEEN to 0.
So, again, just to clarify - it is currently not possible to configure this on a per shared folder basis?
If not, any idea when you might be able to get around to making this possible?
There are only two things that - for me - dovecot lacks to make it 'perfect':
per-share configurable message flags (mainly 'seen', but if you're going to do that might as well make this possible for all of them, no?), and
single-instance storage - ie, links for duplicate messages, and for duplicate message attachments that may have differing body text.
--
Best regards,
Charles
On Thu, 2007-02-08 at 08:26 -0500, Charles Marcus wrote:
src/lib-storage/index/maildir/maildir-storage.c around line 519: mbox->private_flags_mask = MAIL_SEEN;
Change MAIL_SEEN to 0.
This is the part of the code where it's configured whether the mailbox stores private seen flags or not.
So, again, just to clarify - it is currently not possible to configure this on a per shared folder basis?
No, it's hardcoded. I'll make it configurable whenever I get around to making Dovecot really and properly support shared folders. Not sure when that will happen.
If you want it now, you can change that code to check somehow if you want private seen flags or not. For example something like:
if (stat(t_strdup_printf("%s/dovecot-shared-private-seen-flags", mbox->path)) == 0) mbox->private_flags_mask = MAIL_SEEN;
src/lib-storage/index/maildir/maildir-storage.c around line 519: mbox->private_flags_mask = MAIL_SEEN;
Change MAIL_SEEN to 0.
This is the part of the code where it's configured whether the mailbox stores private seen flags or not.
Now thats a scary thought - me, modifying a c program file... ;)
So, again, just to clarify - it is currently not possible to configure this on a per shared folder basis?
No, it's hardcoded. I'll make it configurable whenever I get around to making Dovecot really and properly support shared folders. Not sure when that will happen.
When the time is right, I'm sure... it works now, but I'm sure when you implement it 'properly', it will just kick the crap out of courier and cyrus' implementations.
If you want it now, you can change that code to check somehow if you want private seen flags or not. For example something like:
if (stat(t_strdup_printf("%s/dovecot-shared-private-seen-flags", mbox->path)) == 0) mbox->private_flags_mask = MAIL_SEEN;
Ahhh... hmmm... well, I guess I'll have to see if I can find someone to help me out with this. I wouldn't trust myself to code this even if it was on my own personal server, much less a production server that I manage for someone else (I do all the time-consuming stuff, and have a friend who I call when I can't figure something out on my own).
Also - I'm assuming this isn't only supported for mbox format, and that I would just substitute maildir for mbox above if I'm using maildir (why use anything else)?
Thanks Timo, both for dovecot and for taking the time to answer all these questions on the list. I'll be glad when I'm confident enough to start helping you with the trivial stuff.
--
Best regards,
Charles
participants (3)
-
Amardeep Singh
-
Charles Marcus
-
Timo Sirainen