james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samuel Sadek" <samuel_sa...@hotmail.com>
Subject Re: IMAP CREATE command
Date Sun, 10 Mar 2002 10:39:45 GMT
Hi there,

I haven't gone to greate lengths in recreating a user which would in turn, 
automatically create a INBOX folder as I would expect it to do per RFC 2060, 
the problem is the CREATE command does allow INBOX to be created by the user 
which is an error, but parking this issue aside, what appears to be most 
critical is that in JamesHost.createAbsoluteMailbox() method it goes into an 
infinite loop, when recursing to each parent folder to check whether the 
user's acl has the appropriate permission rights to create a subfolder 
within the user's context. So the assertion you made re: acl is correct, but 
the behaviour of the mentioned method in JamesHost.java behaves 
indifferently. I'm in the midst of placing a check whereby if the folder to 
be created is not a root folder then do not recurse and do not bother 
checking the acl.

The points 1) and 2) you made is not currently implemented.



>In IMAP, the folder 'INBOX' is special, viz it always exists and >doesn't 
>have a parent. I'm not sure what the code is doing now, but the way I think 
>I did it was, when you add a user to James (ie UserRepository) >it created 
>the IMAP INBOX with appropriate ACL rights. This bootstraps >you around the 
>problem you mention. So there are two problems:
>1) a user should not be able to authenticate to the IMAP server unless the 
>administrator has added them, in which case an INBOX must exist.
>2) a user should not be able to Create an Inbox.
>Also, by the by,
>a) users can't delete their Inbox
>b) there are constraints on moving or renaming inbox - probably the system 
>must creat an empty Inbox automatically.

>Samuel Sadek wrote:

>I'm currently testing the IMAP4 server commands, one of which is the CREATE 
>The problem I'm getting is after successful login into the IMAP server and 
>have gained an IMAP session accordingly, and have no folders assigned to 
>the logged-in user, whenever I issue a CREATE command to create say an 
>"inbox" folder for that user I always seems to get the following error:
>java.lang.RuntimeException: Assertion Failed.
>        at org.apache.james.util.Assert.isTrue(Assert.java:21)
>        at 
>        at 
>        at 
>        at 
>        at java.lang.reflect.Method.invoke(Native Method)
>        at 
>        at $Proxy10.createMailbox(Unknown Source)
>        at 
>        at 
>        at 
>        at 
>        at 
>        at 
>        at 
>which suggests to me that the JamesHost.java in method 
>CreateAbsoluteMailbox(), it recursively seeks for an existing mailbox 
>(considered as a parent in order to verify the user's ACL rights to create 
>subsidiary folders which is nonsense in the case for a user for whom I'm 
>trying to create a first folder for which inevitably gets stuck in an 
>infinite loop within the mentioned method in JamesHost.java file.
>What is the special case for a "root" folder according to IMAP RFC paper?
>I would appreciate your comments on this.
>Thanks in advance.
>MSN Photos is the easiest way to share and print your photos: 
>To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>

Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>

View raw message