[Dovecot] Namespace, prefix questions

Timo Sirainen tss at iki.fi
Thu Mar 29 02:25:57 EEST 2012


On 27.3.2012, at 17.40, Steve Campbell wrote:

> We've got some users who are using Outlook Express version 6. The client allows me to specify the root folder, but not a prefix or namespace. I'm still struggling with some users on our new server that have crazy imap folder layouts, so I've got a few questions.
> 
> When I specify the root folder, does that bypass any namespace/prefix definitions on the imap server?

Like you noticed, these are pretty much the same things, since most clients don't understand about namespaces. And Dovecot doesn't "select" a namespace for clients. They mostly affect mailbox listing.. Like when a client asks Dovecot to list mailboxes under foo/, then Dovecot checks if a foo/ namespace exists.

> On some clients, like Thunderbird, I have the option of specifying namespace OR prefix. How do these differ? I thought that the prefix was the "name" of the namespace.

I have no idea how Thunderbird handles them differently.

> It appears that I have to delete and re-create the account on these OE 6 clients to make the list of folders show properly. Does that sound right?

Not really.

> This all came about because one of these OE 6 users was not able to use their imap folders (server errors). Turns out it was one of the users that had their folders directly under ~. So I moved them to ~/mail, created a .subscriptions file from their .mailboxlist file and tried everything in the world to get the folders to list properly. Only after specifying the root folder as ~/mail after recreating the account and restarting OE did it show properly and the folders remained listed. My default config has this setup as the "mail_location" parm, but blanks as the root folder don't seem to work in this situation. I'm also wondering where I specify the "list", "hidden" and other parms that are usually set in namespace blocks.
..
> mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u
> mbox_write_locks = fcntl
> namespace {
>  hidden = yes
>  inbox = yes
>  list = yes
>  location = mbox:~/mail:INBOX=/var/spool/mail/%u
>  prefix =
>  separator = /
>  type = private
> }

All of your namespaces have hidden=yes. There should be (at least) one with hidden=no (this prefix= namespace in your case). I guess I'll need to add a check to have Dovecot fail if there aren't any.

Also it's not necessary to duplicate the "location" setting, since it defaults to the global mail_location.

> namespace {
>  hidden = yes
>  list = no
>  location = mbox:~/mail:INBOX=/var/spool/mail/%u
>  prefix = "#mbox/"
>  separator = /
>  type = private
> }

This namespace is unlikely to be useful to you, unless you actually have some IMAP client configured to use #mbox/ prefix.

> namespace {
>  hidden = yes
>  list = yes
>  location = mbox:~/mail:INBOX=/var/spool/mail/%u
>  prefix = ~/mail/
>  separator = /
>  type = private
> }

This shouldn't have list=yes .. I'm not sure what even happens with it. I guess if client lists all mailboxes from root you'll get a mailbox named "~", which has a "mail" child, which has all of your mailboxes duplicated.


More information about the dovecot mailing list