dovecot Digest, Vol 154, Issue 14

Richard Platel rplatel at
Wed Feb 17 20:30:48 UTC 2016

Thanks, Hajo

This mostly works, but we can’t seem to send an arbitrary mailbox name with UserDB, we have to initialize it in the config:

"namespace/inbox/mailbox=Junk namespace/inbox/mailbox/Junk/name"="Spam"
seems to initialize the folder somehow so that the subsequent
have something to act upon.

(the first line doesn't work quite properly, however - it ends up
causing a folder named "" to show up)

we've noticed that if we set a very minimal config for the mailbox in
the main config (that wouldn't cause the mailbox to be autocreated),
that this also initializes the folder name allowing for subsequent auto
and subscribe directives to be processed for it:
namespace inbox {
 inbox = yes
 mailbox "Spam" {
   auto = no

is there some userdb response that will simply initialize the folder
(without doing any name remapping) in the same way that the above config
lines do?

we have tried a few things based off Hajo's first line, but nothing we
guess at seems to do the trick. ie:

> ------------------------------
> Message: 2
> Date: Tue, 9 Feb 2016 23:33:53 +0100
> From: Hajo Locke <Hajo.Locke at>
> To: dovecot at
> Subject: Re: Per-user special folder?
> Message-ID: <56BA6951.8010000 at>
> Content-Type: text/plain; charset=windows-1252; format=flowed
> Hello,
> Am 09.02.2016 um 22:28 schrieb Richard Platel:
>> Hi
>> It's possible to mark some folders as special use for IMAP in the config like:
>> namespace inbox {
>>   mailbox Spam {
>>     special_use = \Junk
>>   }
>> }
>> Our webmail allows users to use an arbitrary folder for Spam, and we have this settings and we'd like to return it in from our UserDB (which is a custom dict proxy).
>> For testing were able to set a namespace parameter like "separator" by returning:
>> "namespace/inbox/separator" : "=",
>> from UserDB, but can't figure out a way to set mailbox settings,
>> "namespace/inbox/mailbox Spam/special_use" : "\Junk", for example doesn't work.
>> Is there a way to return this setting from a UserDB query?
> we use this a lot with userdb to allow individual folders marked as special.
> your userbd-query should return something like this:
> namespace/inbox/mailbox=Junk namespace/inbox/mailbox/Junk/name=Spam 
> namespace/inbox/mailbox/Junk/auto=subscribe 
> namespace/inbox/mailbox/Junk/special_use=\Junk
> Spam is visible name in this case.
> Hajo

More information about the dovecot mailing list