Auto create & subscribe folder from Userdb [Was: Users with extra mailbox: namespace/mailbox in userdb lookup?]

Christian Kivalo ml+dovecot at valo.at
Sat Mar 11 07:22:06 UTC 2017



Am 11. März 2017 08:04:28 MEZ schrieb MRob <mrobti at insiberia.net>:
>
>>> We have a need for some users to have an additional folder created
>and 
>>> subscribed for them.
>>> 
>>> Is is possible to return an override for the default "namespace
>inbox" 
>>> containing the needed mailbox definitions in the userdb lookup for 
>>> such users? If so, how would the userdb lookup result be formatted? 
>>> Presumably as
>> 
>> Yes, see here:
>> 
>> http://wiki2.dovecot.org/UserDatabase/ExtraFields
>> 
>> Each setting ist one "Extra Field"
>> 
>>> just one long string, but how would the setting be named given there
>
>>> can't be a space in it? Can I replace the space with an underscore, 
>>> e.g.
>>> 
>>> userdb_namespace_inbox = '{ mailbox Drafts { auto=subscribe 
>>> special_use = \Drafts } mailbox Trash { auto=subscribe special_use =
>
>>> \Trash } }'
>> 
>> sort of:
>> 
>> userdb_namespace/inbox/mailbox/Drafts/auto=subscribe
>> 
>> see also:
>> 
>> http://www.dovecot.org/list/dovecot/2016-February/103140.html
>
>Unfortunately, I'm having trouble with this task.
>
>Dovecot 2.2.27
>
>Trying to have an "Important" folder get created and subscribed for
>only 
>some users. When I put this into my dovecot config file it works as 
>needed (other folders omitted for brevity):
>
>namespace inbox {
>  mailbox Trash {
>   auto=subscribe
>   special_use = \Trash
>  }
>  mailbox Important {
>   auto=subscribe
>  }
>}
>
>But I don't want to do it globally, so put it into the userdb lookup:
>
>SELECT .... 'subscribe' AS 'namespace/inbox/mailbox/Important/auto' ...
>
>WHERE ...
>
>I confirmed that the correct query is executing and I know it works 
>because other userdb fields are populated correctly. But the folder
>does 
>not get created. For passdb lookups:
>
>SELECT .... 'subscribe' AS 
>'userdb_namespace/inbox/mailbox/Important/auto' ... WHERE ...
>
>I'd appreciate help/tips.
Whats the output of doveadm user <username> ?

-- 
Christian Kivalo


More information about the dovecot mailing list