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 Samuel Sadek <sa...@hotmail.com> on 2002/03/09 17:10:07 UTC

IMAP CREATE command

I'm currently testing the IMAP4 server commands, one of which is the CREATE 
command.

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 
org.apache.james.imapserver.JamesHost.createAbsoluteMailbox(JamesHost
.java:364)
        at 
org.apache.james.imapserver.JamesHost.createAbsoluteMailbox(JamesHost
.java:397)
        at 
org.apache.james.imapserver.JamesHost.createAbsoluteMailbox(JamesHost
.java:397)
        at 
org.apache.james.imapserver.JamesHost.createMailbox(JamesHost.java:35
7)
        at java.lang.reflect.Method.invoke(Native Method)
        at 
org.apache.avalon.phoenix.components.application.BlockInvocationHandl
er.invoke(BlockInvocationHandler.java:91)
        at $Proxy10.createMailbox(Unknown Source)
        at 
org.apache.james.imapserver.commands.CreateCommand.doProcess(CreateCo
mmand.java:36)
        at 
org.apache.james.imapserver.commands.CommandTemplate.process(CommandT
emplate.java:81)
        at 
org.apache.james.imapserver.SingleThreadedConnectionHandler.parseComm
and(SingleThreadedConnectionHandler.java:341)
        at 
org.apache.james.imapserver.SingleThreadedConnectionHandler.handleCon
nection(SingleThreadedConnectionHandler.java:192)
        at 
org.apache.avalon.cornerstone.blocks.connection.ConnectionRunner.run(
Connection.java:167)
        at 
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Ex
ecutableRunnable.java:47)
        at 
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread
.java:86)

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.

Sam.


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: IMAP CREATE command

Posted by Charles Benett <ch...@benett1.demon.co.uk>.
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.
Cheers,
Charles


Samuel Sadek wrote:

> I'm currently testing the IMAP4 server commands, one of which is the 
> CREATE command.
> 
> 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 
> org.apache.james.imapserver.JamesHost.createAbsoluteMailbox(JamesHost
> .java:364)
>        at 
> org.apache.james.imapserver.JamesHost.createAbsoluteMailbox(JamesHost
> .java:397)
>        at 
> org.apache.james.imapserver.JamesHost.createAbsoluteMailbox(JamesHost
> .java:397)
>        at 
> org.apache.james.imapserver.JamesHost.createMailbox(JamesHost.java:35
> 7)
>        at java.lang.reflect.Method.invoke(Native Method)
>        at 
> org.apache.avalon.phoenix.components.application.BlockInvocationHandl
> er.invoke(BlockInvocationHandler.java:91)
>        at $Proxy10.createMailbox(Unknown Source)
>        at 
> org.apache.james.imapserver.commands.CreateCommand.doProcess(CreateCo
> mmand.java:36)
>        at 
> org.apache.james.imapserver.commands.CommandTemplate.process(CommandT
> emplate.java:81)
>        at 
> org.apache.james.imapserver.SingleThreadedConnectionHandler.parseComm
> and(SingleThreadedConnectionHandler.java:341)
>        at 
> org.apache.james.imapserver.SingleThreadedConnectionHandler.handleCon
> nection(SingleThreadedConnectionHandler.java:192)
>        at 
> org.apache.avalon.cornerstone.blocks.connection.ConnectionRunner.run(
> Connection.java:167)
>        at 
> org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Ex
> ecutableRunnable.java:47)
>        at 
> org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread
> .java:86)
> 
> 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.
> 
> Sam.
> 
> 
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
> 
> 
> -- 
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: IMAP CREATE command

Posted by Darrell DeBoer <da...@apache.org>.
Hi Sam,

On Sun, 10 Mar 2002 02:10, Samuel Sadek wrote:
> I'm currently testing the IMAP4 server commands, one of which is the CREATE
> command.
>
...
> I would appreciate your comments on this.

My main comments would be that you're working with (less than) half finished 
code, and Assertion exceptions are used to indicate that the code has reached 
an invalid state. (So, CREATE is not yet working properly).

Earlier in the year I did a bunch of testing what did work in the IMAP 
proposal, and refactoring some of the complex code. I didn't add any 
functionality (and may have broken things), but I think I made it easier to 
continue development.

I think the next step is to completely redevelop the IMAP storage, to reuse 
the standard MailRepository components. I'm hoping to get back to this in the 
next couple of weeks, but you're *very* welcome to dive in and help. (I'd be 
happy to provide assistance, and who knows, it might prompt me to get coding 
again as well ;-) ).

ciao
Daz

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>