Subject: [imapext] Non-existent SPECIAL-USE mailboxes

From: Alexey Melnikov <[email-masked]>
Date: Fri, 12 Jul 2013 11:51:04 +0100

Hi,
My server doesn't create SPECIAL-USE mailboxes (other than INBOX), but 
it has their names preconfigured. So what should it return for a special 
use mailbox which is not created yet? Should it omit it or return it 
with \NonExistent attribute?

I.e., if, for example, Junk doesn't exist, should the server return:

f list (special-use) "" *
* LIST (\Drafts) "/" Drafts
* LIST (\Sent) "/" Sent
* LIST (\Trash) "/" Trash
f OK LIST Completed

or

f list (special-use) "" *
* LIST (\Drafts) "/" Drafts
* LIST (\Junk \NonExistent) "/" Junk
* LIST (\Sent) "/" Sent
* LIST (\Trash) "/" Trash
f OK LIST Completed

?

I am also curious about whether clients can handle \NonExistent in this 
case and use it as a hint that such mailbox should be created.

Best Regards,
Alexey

---

From: Timo Sirainen <[email-masked]>
Date: Fri, 12 Jul 2013 16:17:35 +0300

On 12.7.2013, at 13.51, Alexey Melnikov <[email-masked]> wrote:

> My server doesn't create SPECIAL-USE mailboxes (other than INBOX), but it has their names preconfigured. So what should it return for a special use mailbox which is not created yet? Should it omit it or return it with \NonExistent attribute?

I don't think it should return it with \NonExistent. Seems like the worst of all possibilities. Most clients will probably show it similarly to \NoSelect (especially since \Nonexistent is LISTEXT-only), without understanding what it should be used for.

With Dovecot you can specify a SPECIAL-USE folder with or without autocreation. Without autocreate it isn't visible unless the client actually creates it. I think this is something some admins want to enable and some don't..

---

From: Barry Leiba <[email-masked]>
Date: Sat, 13 Jul 2013 08:51:30 -0400

The intent was the former: if there is no mailbox with a particular
attribute, just don't show it.

Barry

On Friday, July 12, 2013, Alexey Melnikov wrote:

> Hi,
> My server doesn't create SPECIAL-USE mailboxes (other than INBOX), but it
> has their names preconfigured. So what should it return for a special use
> mailbox which is not created yet? Should it omit it or return it with
> \NonExistent attribute?
>
> ______________________________**_________________
> imapext mailing list
> [email-masked]
> https://www.ietf.org/mailman/**listinfo/imapext<https://www.ietf.org/mailman/listinfo/imapext>
>

---

From: Alexey Melnikov <[email-masked]>
Date: Mon, 15 Jul 2013 11:28:27 +0100

> attribute, just don't show it.
So basically there is no way for the server to indicate that it hasn't 
pre-created a special use mailbox, but if the client wants one it should 
use a particular name? I am trying to avoid pre-creating mailboxes.

>     My server doesn't create SPECIAL-USE mailboxes (other than INBOX),
>     but it has their names preconfigured. So what should it return for
>     a special use mailbox which is not created yet? Should it omit it
>     or return it with \NonExistent attribute?
>
>     I am also curious about whether clients can handle \NonExistent in
>     this case and use it as a hint that such mailbox should be created.
>
>     Best Regards,
>     Alexey
>

---

From: Barry Leiba <[email-masked]>
Date: Mon, 15 Jul 2013 08:54:57 -0400

> pre-created a special use mailbox, but if the client wants one it should use
> a particular name? I am trying to avoid pre-creating mailboxes.

Right.  If the client wants a mailbox with a particular special use,
and none exists, the client can just create it.  The server can accept
that or fail it.

Why do you care about the particular name?  The whole *point* of the
special-use attribute is to decouple the mailbox name from the special
use.

Barry

---

From: Arnt Gulbrandsen <[email-masked]>
Date: Mon, 15 Jul 2013 22:25:48 +0200

Is there a non-negligible cost associated with pre-creation?

Arnt

---

From: Timo Sirainen <[email-masked]>
Date: Tue, 16 Jul 2013 01:55:41 +0200

> Is there a non-negligible cost associated with pre-creation?

Dovecot v2.1+ "autocreates" the autocreated mailboxes (special-use or not) by simply showing them in the LIST response, not by physically creating anything at all on the filesystem. They are not physically created until SELECT/EXAMINE/STATUS is used on them. If the cost is an issue, I don't see why all servers couldn't create a similar feature..