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 "namespace/inbox/mailbox/Junk/auto"="subscribe" and "namespace/inbox/mailbox/Junk/special_use"="\Junk" 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: "namespace/inbox/mailbox"="Spam" "namespace/inbox/mailbox=Spam"=“Spam"
Message: 2 Date: Tue, 9 Feb 2016 23:33:53 +0100 From: Hajo Locke <Hajo.Locke@gmx.de> To: dovecot@dovecot.org Subject: Re: Per-user special folder? Message-ID: <56BA6951.8010000@gmx.de> 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