On 11/6/07, Robert Burrell Donkin <[EMAIL PROTECTED]> wrote: > > On Nov 6, 2007 10:17 AM, Zsombor <[EMAIL PROTECTED]> wrote: > > > > On 11/6/07, Robert Burrell Donkin <[EMAIL PROTECTED]> wrote: > > > > > > RFC3501 indicates that IMAP mailbox should not ever be completely > > > deleted: meta-data must be retained in case the mailbox is ever > > > recreated. in order to ensure that clients are not confused, data > > > about subscription, UID and UIDVALIDITY must be retained. > > > > > > MailboxManager ( > > > > http://svn.apache.org/repos/asf/james/server/trunk/core-library/src/main/java/org/apache/james/mailboxmanager/manager/MailboxManager.java > > > ) > > > has a delete method: > > > > > > void deleteMailbox(String mailboxName) throws > MailboxManagerException; > > > > > > with no javadoc's. the Torque implementation deletes the mailbox > > > entirely. this violates the IMAP specification and causes issues for > > > clients. AIUI the right behaviour is to retain the name in the > > > namespace and return \noselect (please jump in if i have this wrong). > > > > > > opinions? > > > > > > - robert > > > > > > > > > Probably I've overlooked something, but I've read this: > > http://tools.ietf.org/html/rfc3501#section-2.3.1.1 > > From that section, I think we dont have to keep mailboxes, just we have > to > > ensure that UIDVALIDITY is properly generated. For example the timestamp > of > > the mailbox creation time would be good. For the subscription status, I > > think a simple list of strings would be enough to persist. > > good catch 8-) > > if we are talking about an IMAP specific data store then yes, > providing that subscription records are kept separately and > UIDVALIDITY is well chosen then you're right that the rest of the > records about that mailbox can be deleted. the torque implementation > uses a random number as UIDVALIDITY which should be ok. the torque > implementation does not support subscriptions. (i will create a > functional test script to test this.) > > but MailboxAPI is intended to be protocol agnostic. i question whether > the IMAP concept of subscription is a general concept. > > if it's not a general concept then IMHO it would be better to adopt a > more concise and general API for mailbox meta-data. subscription data > would then be stored by the MailboxAPI as mailbox meta-data. if that > design is followed then mailbox meta-data would need to be retained > even when the actual mailbox has been deleted. > > - robert >
I think the subscription status should stored as a User attribute (as a string list for example). As for IMAP we need several other user attribute to store, I think it would be benefical, if we can extend JamesUser with two method: Serializable getAttribute(String); and void setAttribute(String, Serializable); In that way, we can store assigned shared namespace, acl, quota objects, and so on. BR, Zsombor
