[dev] [cvs] commit: imp/lib/IMAP Tree.php

Michael M Slusarz slusarz at horde.org
Sat Feb 24 13:41:58 PST 2007


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Jan Schneider <jan at horde.org>:
>
>>> Log:
>>> Don't allow namespace delimiter to be used when creating folders.
>>
>> I don't think this is a good place for the check. I create  
>> subfolders from the folder drop down lists all the time, and I  
>> really don't want to miss them. We should only disallow them in the  
>> tree UI where you can create subfolders more easily.
>
> I agree. Also with servers like UW-IMAPd and Dovecot (non-maildir  
> anyway), the only way to create a container folder is to create  
> "folder/subfolder". If you create just "folder", then "subfolder",  
> folder will already exist as a real mailbox and so can't have  
> children.

And this was all intended.  Copying my discussion from another list:

=====

Actually, dots have no special meanings in IMAP. They only have  
meaning when they are the delimiter used in a particular namespace.  
But there is absolutely no requirement that a period be used as a  
delimiter (heck, if you wanted to you could use the number 44 as a  
delimiter for example....)

I don't think limiting valid folder characters via IMP/DIMP is a smart  
idea. Invalid characters in a folder name will be caught by the IMAP  
server and should be shown to the user in an error message. It is best  
to let the IMAP servers catch this error - especially since different  
IMAP servers may possibly have different limitations. There are a list  
of characters that can NEVER be used in a folder name defined by the  
RFCs, '%' for example, but an IMAP server may have a more restrictive  
set of characters allowed if they like.

What I do agree with is that users should not be allowed to enter the  
delimiter character when creating a folder, or at least this should be  
an admin option. With the new tree code, users should now be able to  
create a folder in any directory possible. However, presently we do  
allow users to create a folder several layers deeper than the current  
level - i.e. 'create test.foo' creates the 'test.foo' folder and the  
'test' container. Restricting to only creating one subfolder at a time  
would then require 3 activities to replicate - create 'test', create  
'foo', delete 'test'. THis is useful for "power users", but since the  
vast majority of users are clueless as to what a namespace or  
delimiter is, the benefits of disabling this functionality probably  
exceed the positives.

=====

Sounds like this is fertile grounds for either a config or preference  
option.  But there definitely needs to be an option to never allow  
namespace delimiters, since it is only the "power users" that will  
know what their delimiters are for each individual namespace.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list