Need advice: mailbox-based \Seen flag

Boris Lytochkin boris.lytochkin at
Sun Sep 2 06:07:01 EDT 2007


Thanks for patch!

Here it is full patch (with cyradm patch additions) that works OK on
my imapd 2.3.9 setup. I can not check replication process for now.

Here it is some logs:
localhost> info user.rootmail
  condstore: false
  lastupdate:  2-Sep-2007 13:57:45 +0400
  partition: default
  sharedseen: true
  size: 18220
localhost> info user.lytochkin
  condstore: false
  lastupdate:  1-Sep-2007 08:11:08 +0400
  partition: default
  sharedseen: false
  size: 61128298

Sep  2 13:57:45 svr imaps[7810]: seen_db: user anyone opened /var/imap/user/a/anyone.seen

Boris Lytochkin
JCS e-port, Moscow


From: Ken Murchison
Sent: 1 сентября 2007 г., 22:05
To:   Boris Lytochkin
Subject: Need advice: mailbox-based \Seen flag
I had some time while waiting for paint to dry, so I whipped up this 
quick patch for shared seen state, based on our previous discussions. 
It uses a "/vendor/cmu/cyrus-imapd/sharedseen" mailbox annotation, 
stored as a mailbox option in the index header, to enable/disable shared 
seen state, and stores the shared seen state in "anyone.seen".  Note 
that this patch is completely untested, although it compiles against 
CVS.  I also didn't consider replication yet.

Feel free to try this and see if it has the intended behavior.  Remember 
that the 's' ACL right controls whether a person can change the \Seen 
flag on a message.

Boris Lytochkin wrote:
> Hello!
> I need an advice in implementing per-mailbox \Seen flag (or 'shared'
> \Seen flag in per-user basis).
> For now I want to implement it this way:
> 1) add a new mailbox attribute, say 'sharedseen'
> 2) switch path for .seen file in imap/seen_*.c:seen_getpath() if
>    'sharedseen' flag is set on mailbox.
> 3) changes in replication module?
> So, setting 'sharedseen' attribute to mailbox will cause using
> per-mailbox seen-file.
> What are weak points of this implementation?
> Is there more correct way to make per-mailbox \Seen flag?

Kenneth Murchison
Systems Programmer
Project Cyrus Developer/Maintainer
Carnegie Mellon University

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sharedseen.patch
Type: application/octet-stream
Size: 8226 bytes
Desc: not available
Url : 

More information about the Cyrus-devel mailing list