On Tue, 19 Feb 2003, Timo Sirainen wrote:
> Must parent mailboxes be listed before their children? I don't see this
> defined anywhere, but I know some clients will break if they're not.

There is no such requirement; and clients which presume such are broken.

UW imapd always lists parents before their children, but that's an
artifact of how it is implemented; in most of its supported mail stores it
is unaware of children until it is aware of the parent.

However, there is nothing that precludes a mail store from working
differently.  Consider a mail store in which the names are flat, but by
convention "." is a hierarchy delimiter and "%" breaks on ".".  Unless
that mail store is careful to sort its names, a child could conceivably be
listed before a parent.

> Requesting LIST "" mail/% from UW imapd shows also "mail/" in the reply,
> is this required?

Yes.  RFC 2060, bottom of page 31:

      [...]  If the "%" wildcard
      is the last character of a mailbox name argument, matching levels
      of hierarchy are also returned.  If these levels of hierarchy are
      not also selectable mailboxes, they are returned with the
      \Noselect mailbox name attribute (see the description of the LIST
      response for more details).

Although the intent of this rule was for directories within mail/ the
"zero or more" characters matching rule for wildcards requires that mail/
also match.

> I think this falls into the "server implementations
> are permitted to hide.." clause? Are there any clients that break if
> this isn't sent? And is there any point in sending it anyway? I'd just
> have to add extra code for that.

I don't know if any clients would break.  I think that most clients would
ignore it.  However, do you really want to take a chance that some client
won't break, and have that section of RFC 2060 flung at you as proof of
your non-compliance?

It also does something useful.  It differentiates between the "mail/
exists and is empty" and "mail/ does not exist".

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.

Reply via email to