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 at gmx.de> > To: dovecot at dovecot.org > Subject: Re: Per-user special folder? > Message-ID: <56BA6951.8010000 at 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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 17 Feb 2016, Richard Platel wrote:> "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 > } > }you separate each part with /'s, IMHO: namespace/inbox/inbox=yes namespace/inbox/mailbox/Spam/auto=no BUT I recall something, that you cannot have "NO" or "FALSE" for boolean values in ExtraFields. If the option is present, it is treated as "yes", regardless of the value. Maybe that changed in current version of Dovecot. - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEVAwUBVsV8rnz1H7kL/d9rAQJL4wgAkpQWZvqKzl/EeZV1YliUOcGx8OVlHRu0 BERMvVWvp3bzA5gIenPognWPgvMTluxv+EkaD1jVJBFPUZs4VsyIYWkloGo+oW9C injAV9k0fwiAHTLXFBF3HsjTxzpUzH1BUszAhbhqQkYewIQkSzLOTiq/lVher2cR aRa+5BYA1tFCooWbGJfMY8QPRnjqHjqqsaF4nDsFHXMWyDmb/ivzWogTff1l8cey bmj0x+oRCmhddv2VM+reWGirHtVtaF51rC4n/DaY0V6BdBluzdGAT9Hg5FkbZIbA O732U5pL6MdqNIht5BOz/7vsgTnu9fVosMERc8fc1SE04mPFbb7M4w==jfBe -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, 18 Feb 2016, Steffen Kaiser wrote:> On Wed, 17 Feb 2016, Richard Platel wrote: > >> "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 >> } >> } > > you separate each part with /'s, IMHO: > > namespace/inbox/inbox=yes > namespace/inbox/mailbox/Spam/auto=no > > BUT I recall something, that you cannot have "NO" or "FALSE" for boolean > values in ExtraFields. If the option is present, it is treated as "yes", > regardless of the value. > Maybe that changed in current version of Dovecot.Hmm, it's documented for passwd ExtraFields, but not for UserDB's: http://wiki2.dovecot.org/PasswordDatabase/ExtraFields http://wiki2.dovecot.org/UserDatabase/ExtraFields - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEVAwUBVsV9+3z1H7kL/d9rAQIfjgf8CdD6x+vyaNpAlYZI+b6YO2Z9V7YuwtEz NOhIoQaNuwRSVM770vM24mh+Tt3pYJ69tw8SaX4gNCYVt0XdVsGJL0UKAEv28MvP /3PXPw4Kb4VfGEP8GBNuw8642qCRZQSBswl+TnFccJodEZprun5b2NvLGXbXZ39R 0iZFxdTmx0d026fzyA/YyUPQGwfeu+jtdTHFMCmuqJQA6tDQ5xxjb9hYXCFIgPM9 4b1S0Zz7xYyH/ZcqktQATcDhkl8R+ZKfck/jV6+humDEu6iSqLGaeQt2J8UOi2xe AGFrE4xkRWSCRlnF45oxDr6m6YOEM9MtVVsV6lGpXWQDRkWvMXWmWw==teiW -----END PGP SIGNATURE-----