Discussion:
shared \seen flags on shared folders
Gavin McCullagh
2010-08-12 13:17:49 UTC
Permalink
Hi,

we have a kolab server here which as you probably know uses Cyrus for its
IMAP/POP/LMTP services.

One issue we come across now and then is with a group who share a generic
incoming email address as well as each having their own personal address.
This email may take general customer queries for example. They want to be
able to "share" the \seen flag between them, so that if one user reads the
email and deals with it, the others no longer see it as unread in their
clients.

We can set up their email client to have several accounts and share the
same username and password between them. However, this is awkward for
various reasons. We'd prefer to share the folder among each user, but this
gives each user their own copy of the \seen flag which is awkward.

I gather courier shares the \seen flag between users sharing a folder. Is
it possible to do this on cyrus?

Needless to say I can see advantages in either behaviour but it would be
handy to have the option of sharing that flag on cyrus.

Gavin
--
Gavin McCullagh
Senior System Administrator
IT Services
Griffith College
South Circular Road
Dublin 8
Ireland
Tel: +353 1 4163365
http://www.gcd.ie
http://www.gcd.ie/brochure.pdf
http://www.gcd.ie/opendays

This E-mail is from Griffith College.
The E-mail and any files transmitted with it are confidential and may be
privileged and are intended solely for the use of the individual or entity
to whom they are addressed. If you are not the addressee you are prohibited
from disclosing its content, copying it or distributing it otherwise than to
the addressee. If you have received this e-mail in error, please immediately
notify the sender by replying to this e-mail and delete the e-mail from your
computer.

Bellerophon Ltd, trades as Griffith College (registered in Ireland No.
60469) with its registered address as Griffith College Campus, South
Circular Road, Dublin 8, Ireland.
Dan White
2010-08-12 13:38:26 UTC
Permalink
Post by Gavin McCullagh
we have a kolab server here which as you probably know uses Cyrus for its
IMAP/POP/LMTP services.
One issue we come across now and then is with a group who share a generic
incoming email address as well as each having their own personal address.
This email may take general customer queries for example. They want to be
able to "share" the \seen flag between them, so that if one user reads the
email and deals with it, the others no longer see it as unread in their
clients.
Gavin,

The /vendor/cmu/cyrus-imapd/sharedseen annotation will share the seen state
for a given mailbox.

In cyradm, you enable it with:

mboxconfig <mailbox> sharedseen true

See the cyradm man page. This feature was introduced in version 2.3.9.
--
Dan White
Jeroen van Meeuwen (Kolab Systems)
2010-08-12 14:04:23 UTC
Permalink
Post by Dan White
Post by Gavin McCullagh
we have a kolab server here which as you probably know uses Cyrus for its
IMAP/POP/LMTP services.
One issue we come across now and then is with a group who share a generic
incoming email address as well as each having their own personal address.
This email may take general customer queries for example. They want to be
able to "share" the \seen flag between them, so that if one user reads the
email and deals with it, the others no longer see it as unread in their
clients.
Gavin,
The /vendor/cmu/cyrus-imapd/sharedseen annotation will share the seen state
for a given mailbox.
mboxconfig <mailbox> sharedseen true
See the cyradm man page. This feature was introduced in version 2.3.9.
Note that setting flushseenstate may come in handy here as well.
--
Jeroen van Meeuwen
Senior Engineer, Kolab Systems AG

e: ***@kolabsys.com
t: +316 42 801 403
w: http://www.kolabsys.com

pgp: 9342 BF08
Gavin McCullagh
2010-08-12 15:17:43 UTC
Permalink
Hi,

thanks guys, that's exactly what I was looking for.

Gavin
Post by Dan White
The /vendor/cmu/cyrus-imapd/sharedseen annotation will share the seen state
for a given mailbox.
See the cyradm man page. This feature was introduced in version 2.3.9.
Gavin McCullagh
2010-09-02 09:59:45 UTC
Permalink
Hi,

sorry for the very late reply.
Post by Gavin McCullagh
I gather courier shares the \seen flag between users sharing a
folder. Is it possible to do this on cyrus?
"sharedseen"
Enables the use of a shared \Seen flag on messages rather than
a per-user \Seen flag. The ’s’ right in the mailbox ACL still
controls whether a user can set the shared \Seen flag.
Brilliant, thanks. I hadn't noticed that.
The Kolab client may have direct support for managing sharedseen, so
you might take a look at that, as well.
It has a sufficiently new cyradm to support sharedseen, but it doesn't seem
to have a web-based way to do this.

Gavin
--
Gavin McCullagh
Senior System Administrator
IT Services
Griffith College
South Circular Road
Dublin 8
Ireland
Tel: +353 1 4163365
http://www.gcd.ie
http://www.gcd.ie/brochure.pdf
http://www.gcd.ie/opendays

This E-mail is from Griffith College.
The E-mail and any files transmitted with it are confidential and may be
privileged and are intended solely for the use of the individual or entity
to whom they are addressed. If you are not the addressee you are prohibited
from disclosing its content, copying it or distributing it otherwise than to
the addressee. If you have received this e-mail in error, please immediately
notify the sender by replying to this e-mail and delete the e-mail from your
computer.

Bellerophon Ltd, trades as Griffith College (registered in Ireland No.
60469) with its registered address as Griffith College Campus, South
Circular Road, Dublin 8, Ireland.
Adam Tauno Williams
2010-09-02 12:47:42 UTC
Permalink
Post by Gavin McCullagh
Hi,
sorry for the very late reply.
Post by Gavin McCullagh
I gather courier shares the \seen flag between users sharing a
folder. Is it possible to do this on cyrus?
"sharedseen"
Enables the use of a shared \Seen flag on messages rather than
a per-user \Seen flag. The ’s’ right in the mailbox ACL still
controls whether a user can set the shared \Seen flag.
Brilliant, thanks. I hadn't noticed that.
The Kolab client may have direct support for managing sharedseen, so
you might take a look at that, as well.
It has a sufficiently new cyradm to support sharedseen, but it doesn't seem
to have a web-based way to do this.
This is a constant pain (cyradm isn't very help-desk friendly).

Does anyone know of a, even abandoned, project to implement the cyradm
capabilities as a network API? SOAP, XML-RPC, REST, whatever.... It
would be really nice to be able to manage a Cyrus server via an API (and
make building clients for that task way easier).
--
Adam Tauno Williams <***@whitemice.org> LPIC-1, Novell CLA
<http://www.whitemiceconsulting.com>
OpenGroupware, Cyrus IMAPd, Postfix, OpenLDAP, Samba
André Schild
2010-09-02 12:58:12 UTC
Permalink
Post by Adam Tauno Williams
Post by Gavin McCullagh
Hi,
sorry for the very late reply.
Post by Gavin McCullagh
I gather courier shares the \seen flag between users sharing a
folder. Is it possible to do this on cyrus?
"sharedseen"
Enables the use of a shared \Seen flag on messages rather than
a per-user \Seen flag. The ’s’ right in the mailbox ACL still
controls whether a user can set the shared \Seen flag.
Brilliant, thanks. I hadn't noticed that.
The Kolab client may have direct support for managing sharedseen, so
you might take a look at that, as well.
It has a sufficiently new cyradm to support sharedseen, but it doesn't seem
to have a web-based way to do this.
This is a constant pain (cyradm isn't very help-desk friendly).
Does anyone know of a, even abandoned, project to implement the cyradm
capabilities as a network API? SOAP, XML-RPC, REST, whatever.... It
would be really nice to be able to manage a Cyrus server via an API (and
make building clients for that task way easier).
I started a small project a few years ago for this in java...

https://sourceforge.net/projects/jcyrusapi/

It still does what we need (And we don't needed much at that time...)

additionally a search on SF returns a list:

https://sourceforge.net/search/?words=cyrus&type_of_search=soft&words=cyrus&search=Search



André
Adam Tauno Williams
2010-09-02 13:05:41 UTC
Permalink
Post by André Schild
Post by Adam Tauno Williams
Post by Gavin McCullagh
It has a sufficiently new cyradm to support sharedseen, but it doesn't seem
to have a web-based way to do this.
This is a constant pain (cyradm isn't very help-desk friendly).
Does anyone know of a, even abandoned, project to implement the cyradm
capabilities as a network API? SOAP, XML-RPC, REST, whatever.... It
would be really nice to be able to manage a Cyrus server via an API (and
make building clients for that task way easier).
I started a small project a few years ago for this in java...
https://sourceforge.net/projects/jcyrusapi/
It still does what we need (And we don't needed much at that time...)
Interesting, I'll probably poke at it.
Post by André Schild
https://sourceforge.net/search/?words=cyrus&type_of_search=soft&words=cyrus&search=Search
Yep; most of which are completely worthless. And so many go straight to
building a WebUI that ends up tied into a myriad other things [LDAP,
MySQL, etc...] which ends up not being very general-purpose.
OBATA Akio
2010-09-02 13:02:50 UTC
Permalink
Post by Adam Tauno Williams
Post by Gavin McCullagh
Hi,
sorry for the very late reply.
Post by Gavin McCullagh
I gather courier shares the \seen flag between users sharing a
folder. Is it possible to do this on cyrus?
"sharedseen"
Enables the use of a shared \Seen flag on messages rather than
a per-user \Seen flag. The ?s? right in the mailbox ACL still
controls whether a user can set the shared \Seen flag.
Brilliant, thanks. I hadn't noticed that.
The Kolab client may have direct support for managing sharedseen, so
you might take a look at that, as well.
It has a sufficiently new cyradm to support sharedseen, but it doesn't seem
to have a web-based way to do this.
This is a constant pain (cyradm isn't very help-desk friendly).
Does anyone know of a, even abandoned, project to implement the cyradm
capabilities as a network API? SOAP, XML-RPC, REST, whatever.... It
would be really nice to be able to manage a Cyrus server via an API (and
make building clients for that task way easier).
I believe the protocol is IMAP.
(cyradm is just a IMAP client focused to manage cyrus IMAP Server).
--
OBATA Akio / ***@lins.jp
Adam Tauno Williams
2010-09-02 13:24:57 UTC
Permalink
Post by OBATA Akio
Post by Adam Tauno Williams
Post by Gavin McCullagh
Hi,
sorry for the very late reply.
Post by Gavin McCullagh
I gather courier shares the \seen flag between users sharing a
folder. Is it possible to do this on cyrus?
"sharedseen"
Enables the use of a shared \Seen flag on messages rather than
a per-user \Seen flag. The ?s? right in the mailbox ACL still
controls whether a user can set the shared \Seen flag.
Brilliant, thanks. I hadn't noticed that.
The Kolab client may have direct support for managing sharedseen, so
you might take a look at that, as well.
It has a sufficiently new cyradm to support sharedseen, but it doesn't seem
to have a web-based way to do this.
This is a constant pain (cyradm isn't very help-desk friendly).
Does anyone know of a, even abandoned, project to implement the cyradm
capabilities as a network API? SOAP, XML-RPC, REST, whatever.... It
would be really nice to be able to manage a Cyrus server via an API (and
make building clients for that task way easier).
I believe the protocol is IMAP.
(cyradm is just a IMAP client focused to manage cyrus IMAP Server).
Understood; but that doesn't really change the question.

mybinding.mailboxInfo(mailbox), just like "cyradm> info mailbox", is
much more approachable than...

17 GETANNOTATION user.adam.fred "*" "value.shared"
* ANNOTATION "user.adam.fred"
"/vendor/cmu/cyrus-imapd/duplicatedeliver" ("value.shared" "false")
* ANNOTATION "user.adam.fred"
"/vendor/cmu/cyrus-imapd/sharedseen" ("value.shared" "false")
* ANNOTATION "user.adam.fred"
"/vendor/cmu/cyrus-imapd/condstore" ("value.shared" "false")
* ANNOTATION "user.adam.fred"
"/vendor/cmu/cyrus-imapd/pop3newuidl" ("value.shared" "true")
* ANNOTATION "user.adam.fred"
"/vendor/cmu/cyrus-imapd/lastpop" ("value.shared" " ")
* ANNOTATION "user.adam.fred"
"/vendor/cmu/cyrus-imapd/lastupdate" ("value.shared" " 2-Sep-2010
09:17:54 -0400")
* ANNOTATION "user.adam.fred"
"/vendor/cmu/cyrus-imapd/size" ("value.shared" "0")
* ANNOTATION "user.adam.fred"
"/vendor/cmu/cyrus-imapd/partition" ("value.shared" "default")
17 OK Complete
Gavin McCullagh
2010-09-08 17:10:44 UTC
Permalink
Hi,
Post by Gavin McCullagh
"sharedseen"
Enables the use of a shared \Seen flag on messages rather than
a per-user \Seen flag. The ’s’ right in the mailbox ACL still
controls whether a user can set the shared \Seen flag.
Brilliant, thanks. I hadn't noticed that.
Just a further question on this.

If a folder has sharedseen=true set in the metadata from its creation and
forever, I would expect shared seen flags. If a folder always has
sharedseen=false for its entire life, I expect per-user \Seen flags.

What happens if the sharedseen attribute is changed during the lifetime of
a folder, when users may already have their own (or shared) \Seen flags?

Gavin
Bron Gondwana
2010-09-08 21:39:35 UTC
Permalink
Post by Gavin McCullagh
If a folder has sharedseen=true set in the metadata from its creation and
forever, I would expect shared seen flags. If a folder always has
sharedseen=false for its entire life, I expect per-user \Seen flags.
What happens if the sharedseen attribute is changed during the lifetime of
a folder, when users may already have their own (or shared) \Seen flags?
In Cyrus 2.3 and before (i.e. everything that's released now!) they are
completely separate. Under the hood, the \Seen flags are actually owned
by a 'nobody' user.

In Cyrus 2.4 (when I finish it!) the sharedseen flags are actually the
_owner_'s flags. So if I turned on sharedseen on user.brong.SharedFolder
then everybody would inherit my \Seen flags. If I turned it back on again,
they would each get back their own \Seen flags, and I would keep the shared
flags.

This is because the owner's flags will be stored in the index rather than
a separate .seen file for efficiency in the common case - and shared seen
is implemented by mapping all the \Seen flags to the index by ignoring
the username.

Bron ( this stuff it running in production at FastMail - it's not just in
my imagination! It's the upgrade path and ancillary tools that
aren't ready yet. The core is solid... )
Gavin McCullagh
2010-09-09 09:55:28 UTC
Permalink
Hi,
Post by Bron Gondwana
Post by Gavin McCullagh
What happens if the sharedseen attribute is changed during the lifetime of
a folder, when users may already have their own (or shared) \Seen flags?
In Cyrus 2.3 and before (i.e. everything that's released now!) they are
completely separate. Under the hood, the \Seen flags are actually owned
by a 'nobody' user.
I take it there's no way to sensibly migrate flag data from one to the
other?

When a user leaves, it's sometimes useful to hang onto their mailboxes and
share them with another member of staff. The \Seen flags can be useful in
this instance. In general we wouldn't set seenflags by default so you end
up wishing to retro-fit it.
Post by Bron Gondwana
In Cyrus 2.4 (when I finish it!) the sharedseen flags are actually the
_owner_'s flags. So if I turned on sharedseen on user.brong.SharedFolder
then everybody would inherit my \Seen flags. If I turned it back on again,
they would each get back their own \Seen flags, and I would keep the shared
flags.
That sounds like exactly what I want :-)

Thanks for the information,
Gavin
Adam Tauno Williams
2010-09-09 10:03:49 UTC
Permalink
Post by Gavin McCullagh
Post by Bron Gondwana
Post by Gavin McCullagh
What happens if the sharedseen attribute is changed during the lifetime of
a folder, when users may already have their own (or shared) \Seen flags?
In Cyrus 2.3 and before (i.e. everything that's released now!) they are
completely separate. Under the hood, the \Seen flags are actually owned
by a 'nobody' user.
I take it there's no way to sensibly migrate flag data from one to the
other?
Not that I know of; would be really nice.
Post by Gavin McCullagh
When a user leaves, it's sometimes useful to hang onto their mailboxes and
share them with another member of staff.
Yep, we do that all the time.
Post by Gavin McCullagh
The \Seen flags can be useful in
this instance. In general we wouldn't set seenflags by default so you end
up wishing to retro-fit it.
Post by Bron Gondwana
In Cyrus 2.4 (when I finish it!) the sharedseen flags are actually the
_owner_'s flags. So if I turned on sharedseen on user.brong.SharedFolder
then everybody would inherit my \Seen flags. If I turned it back on again,
they would each get back their own \Seen flags, and I would keep the shared
flags.
That sounds like exactly what I want :-)
So the user's own \Seen flags continue to exist [are just ignored] when
shared seen state is enabled?
Bron Gondwana
2010-09-09 11:25:44 UTC
Permalink
Post by Adam Tauno Williams
Post by Gavin McCullagh
Post by Bron Gondwana
Post by Gavin McCullagh
What happens if the sharedseen attribute is changed during the lifetime of
a folder, when users may already have their own (or shared) \Seen flags?
In Cyrus 2.3 and before (i.e. everything that's released now!) they are
completely separate. Under the hood, the \Seen flags are actually owned
by a 'nobody' user.
I take it there's no way to sensibly migrate flag data from one to the
other?
Not that I know of; would be really nice.
You could use cyr_dbtool to copy the record from the nobody.seen file into
the user's seen file, and vice versa. I'm not sure that's "sensible" as
such!
Post by Adam Tauno Williams
Post by Gavin McCullagh
When a user leaves, it's sometimes useful to hang onto their mailboxes and
share them with another member of staff.
Yep, we do that all the time.
Any reason you don't just enable shared seen for all mailboxes? Apart from
that it's a huge performance cow on current releases of course. Bah.
Sorry, it's hard to even think about Cyrus 2.3 any more because I've been
working on the new code for 6 months and using it in production for two!
Post by Adam Tauno Williams
Post by Gavin McCullagh
The \Seen flags can be useful in
this instance. In general we wouldn't set seenflags by default so you end
up wishing to retro-fit it.
Yeah - that will be nicer in 2.4 for sure.
Post by Adam Tauno Williams
Post by Gavin McCullagh
Post by Bron Gondwana
In Cyrus 2.4 (when I finish it!) the sharedseen flags are actually the
_owner_'s flags. So if I turned on sharedseen on user.brong.SharedFolder
then everybody would inherit my \Seen flags. If I turned it back on again,
they would each get back their own \Seen flags, and I would keep the shared
flags.
That sounds like exactly what I want :-)
So the user's own \Seen flags continue to exist [are just ignored] when
shared seen state is enabled?
Yes - it's functionally identical to using the owner's username for seen
rather than a special "nobody" user. The .seen files don't get cleaned
out, so if you turn shared seen back off, they still have the seen state
for the messages they already knew about, but everything since then
appears as unseen.

Bron.

Loading...