On 02 Aug 2014, at 00:26, Gedalya <gedalya@gedalya.net> wrote:
On 08/01/2014 04:54 PM, Mike Pultz wrote:
I wanted to take advantage of the mailbox option to auto create and auto subscribe users to a Sent and Trash folder (using the support for the special use flags), but ideally, I only want to do this for new mailboxes, and not for all the mailboxes that already exist on the system.
I guess this could be done with extra fields: http://wiki2.dovecot.org/UserDatabase/ExtraFields
The syntax being something like namespace/inbox/mailbox/Sent/special_use=\Sent ..? Or something like that. Note the userdb_import facility for passing multiple options.
**I wonder if it wouldn't be useful to be able to create configuration sections and activate them with a single, simple extra field rather than pass the entire section itself? In a similar manner to protocol imap { }, maybe we can have $extra_options1 == "yes" { } and pass extra_options1 = yes as an extra field?
Maybe, but could be a lot of work. For this case however it's easy. Create two namespaces:
namespace inbox { prefix = inbox = yes mailbox Sent { auto = create } # ..etc.. } namespace old { prefix = inbox = yes disabled = yes }
Then in the extra field you can just set namespace/inbox/disabled=yes and namespace/old/disabled=no