MBOX-Line: From mrc at CAC.Washington.EDU  Wed Aug  8 08:48:52 2007
To: imap-protocol@u.washington.edu
From: Mark Crispin <mrc@CAC.Washington.EDU>
Date: Fri Jun  8 12:34:40 2018
Subject: [Imap-protocol] More evil hierarchy delimiters
In-Reply-To: <1186583972.29782.339.camel@hurina>
References: <1182954665.3768.348.camel@hurina>
	<alpine.OSX.0.99.0706270931420.6426@pangtzu.panda.com>
	<1186583972.29782.339.camel@hurina>
Message-ID: <alpine.OSX.0.999.0708080836190.25790@pangtzu.panda.com>

The simple answer to your question is yes, it is legal.  But!!

The fact that a specification does not flatly prohibit doing something 
idiotic does not mean that it is a good thing for servers (or clients) to 
do the idiotic thing.

I doubt that very many clients would recognize a non-default namespace 
rooted with INBOX/, much less cope with the situation of the default 
namespace having a different hierarchy character than this non-default 
INBOX/ namespace.

Note too that the case-independent rules only apply for INBOX and not for 
INBOX/ .  Thus there is no reason to expect that INBOX/foo and inbox/foo 
refer to the same object.  Nor is there a reason to be surprised if they 
do refer to the same object.  This is this reason why hierarchies in the 
default namespace rooted with INBOX are a bad idea; although not as bad as 
a namespace rooted with INBOX.

Please consider Postel's robustness principle: "be conservative in what 
you send, and liberal in what you accept."

That principle does NOT mean "accept protocol violations."

It means that, to maximize interoperability, that you should not send 
idiotic things EVEN IF they are in compliance with the specification.  It 
also means that you should be able to cope with reading idiotic things.

RFC 3501 clearly lays out a model of namespaces using the # convention as 
an identifiable breakout character.  If you intend to have multiple 
namespaces (and if you have simultaneous hierarchies with different 
delimiters then you have multiple namespaces) then you should use this 
model and not try to do something else that is ambiguous.

On Wed, 8 Aug 2007, Timo Sirainen wrote:
> So, based on that description I assume this is legal then:
>
> 1 LIST "" *
> * LIST () "/" INBOX
> * LIST () "." foo
> 1 OK
> INBOX would be in a separate namespace, so:
> 2 LIST "" INBOX/*
> * LIST () "/" "INBOX/sub"
> 2 OK

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.

