You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Jochen Gazda <ga...@gmail.com> on 2012/02/08 11:37:52 UTC

Are flags implicitly shared in James mailboxes?

Gentlemen,

I am working on the mapping of ACL to to READ-WRITE and READ-ONLY
response codes. The mapping is defined in RFC 4314 section 5.2. The
definition uses the term "shared flags":

  If the ACL server implements some flags as shared for a mailbox
  (i.e., the ACL for the mailbox MAY be set up so that changes to those
  flags are visible to another user), ....

I tried to search through the Mailbox code how this is supported. The
only relevant locations seem to be the
getPermanentFlags(MailboxSession) methods in StoreMessageManager
hierarchy.
My conclusion is, that there is no possibility to configure some flags
as shared or not shared. Am I right?
All flags are probably either implicitly shared or implicitly not
shared but I am not able to tell which one is the case.
So, my question is: If we allow multiple users to access a single
mailbox (which we do not allow at the moment), would the flag
modifications performed by one user be visible to other users?

AFAIK in Cyrus IMAP server, the only flag which can be configured as
shared for a given mailbox is the SEEN flag, see
http://linux.die.net/man/1/cyradm

Best,

gazda

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: Are flags implicitly shared in James mailboxes?

Posted by Jochen Gazda <ga...@gmail.com>.
@Norman:

> as we store the flags with each message I guess we also would share all flags modifications. Is this not allowed as per rfc ?

RFC 4314 "If the ACL server implements some flags as shared for a
mailbox..." implies that it is OK to share *some* flags and I was not
able to find any explicit statement that is illegal to share *all*
flags. So, if we share all flags, it is probably RFC compliant.

One more example how it is done by others:
Oracle Communications Suite can be configured either so that all flags
are shared or so that all flags are private:
> store.privatesharedfolders.shareflags	
> If disabled (0), users of a shared folder have their own set of flags
> (for example, seen, deleted, and so on) for messages in that folder.
> If enabled (1), a single set of flags is shared between all users of each shared folder.
See: https://wikis.oracle.com/display/CommSuite/Managing+Shared+Folders

@Eric:
> I didn't see either in the code the notion of R/RW flags, so we should conclude it's not there at all.

READ-WRITE and READ-ONLY response codes are sent by James. The actual
value comes from StoreMessageManager.isWriteable(MailboxSession) which
returns always true. This is where I am going to intervene with my ACL
mapping.

> I read RFC4314#5.2, but I'm not sure to get it right: is "shared multiuser access"
> mandatory to give access to another user to my mailbox, or is it an option. In
> other words is "shared multiuser access" synonym to "acl-based access" ?

I also had problems to digest that section. It says that "server [=
impementation] MAY allow "shared multiuser access" [...] if [...]
users have proper access rights. I believe it means that "shared
multiuser access" is synonymous to "acl-based access".


I propose that in the mapping of ACL to READ-WRITE and READ-ONLY
response codes I will use a new method
getSharedPermanentFlags(MailboxSession) in StoreMessageManager which
will just return this.getPermanentFlags(session), i.e all flags are
shared, in accordance with what Norman said. This solution will allow
us to make the sharedness of individual flags configurable later in
the future.

Best,

gazda

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: Are flags implicitly shared in James mailboxes?

Posted by Norman Maurer <no...@googlemail.com>.
Hi there,

as we store the flags with each message I guess we also would share all flags modifications. Is this not allowed as per rfc ?

Thanks,
Norman

Am 08.02.2012 um 11:37 schrieb Jochen Gazda:

> Gentlemen,
> 
> I am working on the mapping of ACL to to READ-WRITE and READ-ONLY
> response codes. The mapping is defined in RFC 4314 section 5.2. The
> definition uses the term "shared flags":
> 
>  If the ACL server implements some flags as shared for a mailbox
>  (i.e., the ACL for the mailbox MAY be set up so that changes to those
>  flags are visible to another user), ....
> 
> I tried to search through the Mailbox code how this is supported. The
> only relevant locations seem to be the
> getPermanentFlags(MailboxSession) methods in StoreMessageManager
> hierarchy.
> My conclusion is, that there is no possibility to configure some flags
> as shared or not shared. Am I right?
> All flags are probably either implicitly shared or implicitly not
> shared but I am not able to tell which one is the case.
> So, my question is: If we allow multiple users to access a single
> mailbox (which we do not allow at the moment), would the flag
> modifications performed by one user be visible to other users?
> 
> AFAIK in Cyrus IMAP server, the only flag which can be configured as
> shared for a given mailbox is the SEEN flag, see
> http://linux.die.net/man/1/cyradm
> 
> Best,
> 
> gazda
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: Are flags implicitly shared in James mailboxes?

Posted by Eric Charles <er...@apache.org>.
Hi Jochen,

I didn't see either in the code the notion of R/RW flags, so we should 
conclude it's not there at all.

I read RFC4314#5.2, but I'm not sure to get it right: is "shared 
multiuser access" mandatory to give access to another user to my 
mailbox, or is it an option. In other words is "shared multiuser access" 
synonym to "acl-based access" ?

Depending on your answer, I may have further questions regarding the 
flags :)

Thx,

Eric


On 08/02/12 11:37, Jochen Gazda wrote:
> Gentlemen,
>
> I am working on the mapping of ACL to to READ-WRITE and READ-ONLY
> response codes. The mapping is defined in RFC 4314 section 5.2. The
> definition uses the term "shared flags":
>
>    If the ACL server implements some flags as shared for a mailbox
>    (i.e., the ACL for the mailbox MAY be set up so that changes to those
>    flags are visible to another user), ....
>
> I tried to search through the Mailbox code how this is supported. The
> only relevant locations seem to be the
> getPermanentFlags(MailboxSession) methods in StoreMessageManager
> hierarchy.
> My conclusion is, that there is no possibility to configure some flags
> as shared or not shared. Am I right?
> All flags are probably either implicitly shared or implicitly not
> shared but I am not able to tell which one is the case.
> So, my question is: If we allow multiple users to access a single
> mailbox (which we do not allow at the moment), would the flag
> modifications performed by one user be visible to other users?
>
> AFAIK in Cyrus IMAP server, the only flag which can be configured as
> shared for a given mailbox is the SEEN flag, see
> http://linux.die.net/man/1/cyradm
>
> Best,
>
> gazda
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>

-- 
eric | http://about.echarles.net | @echarles

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org