Users with extra mailbox: namespace/mailbox in userdb lookup?
Hello,
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 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 } }'
Or is there some other way to do this?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Fri, 27 Jan 2017, MRob wrote:
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
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBWI763Xz1H7kL/d9rAQI+Awf/V0vZpyQMQclFUy7OYDLbR3RsyIGAVT3Z zr7vlbui7wViskBqXriNkucz3vUw9B8S0KdAlJnpFR37Hf7yJg9O/q2YAQF9OcYh HJBNUfOgo8fiCrSFp4R6iInRYXzgM3CFDObm9Rf5OiYjb9sW8taAuX2hT61ccXaW 0sX6MGHgruWGZoZlo0qxo8/5/sb2iY0dNRVEQGaopEHg3DmpeRsJOmbV7XKNaG3v lovL9kHxQkZTT3Tu26ZXCzVjkVYoSD7IgPathdAGzlGbe2M04RnN6GIM5aXGoTOo QxSGpvscIHUheSUa3kTrMb2JPdiwkfZKJckQmrtfAvLkzE1WGKIo9Q== =ZXVy -----END PGP SIGNATURE-----
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.
Am 11. März 2017 08:04:28 MEZ schrieb MRob mrobti@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
On 2017-03-10 23:22, Christian Kivalo wrote:
Am 11. März 2017 08:04:28 MEZ schrieb MRob mrobti@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> ?
Oh I did not know this doveadm command, thank you!
Output included all my other userdb fields as well as this:
namespace/inbox/mailbox/Important/auto subscribe
On 2017-03-10 23:28, MRob wrote:
On 2017-03-10 23:22, Christian Kivalo wrote:
Am 11. März 2017 08:04:28 MEZ schrieb MRob mrobti@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> ?
Oh I did not know this doveadm command, thank you!
Output included all my other userdb fields as well as this:
namespace/inbox/mailbox/Important/auto subscribe
In other words, I think it's configured correctly, so I hope someone can help me understand why it does not auto-create this folder when logging in.
I know it's the weekend, maybe someone sees this on Monday morning. Thank you.
On 2017-03-10 23:28, MRob wrote:
On 2017-03-10 23:22, Christian Kivalo wrote:
Am 11. März 2017 08:04:28 MEZ schrieb MRob mrobti@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> ?
Oh I did not know this doveadm command, thank you!
Output included all my other userdb fields as well as this:
namespace/inbox/mailbox/Important/auto subscribe
Just a polite ping on this problem. Folder auto-creation isn't working with folders specified as part of the userdb lookup. Help appreciated.
On 2017-03-13 19:31, MRob wrote:
On 2017-03-10 23:28, MRob wrote:
On 2017-03-10 23:22, Christian Kivalo wrote:
Am 11. März 2017 08:04:28 MEZ schrieb MRob mrobti@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> ?
Oh I did not know this doveadm command, thank you!
Output included all my other userdb fields as well as this:
namespace/inbox/mailbox/Important/auto subscribe
Just a polite ping on this problem. Folder auto-creation isn't working with folders specified as part of the userdb lookup. Help appreciated.
Can you change config to
mail_debug=yes
and provide logs for a single session?
Aki
This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus
On 2017-03-13 13:40, Aki Tuomi wrote:
On 2017-03-13 19:31, MRob wrote:
On 2017-03-10 23:28, MRob wrote:
On 2017-03-10 23:22, Christian Kivalo wrote:
Am 11. März 2017 08:04:28 MEZ schrieb MRob mrobti@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> ?
Oh I did not know this doveadm command, thank you!
Output included all my other userdb fields as well as this:
namespace/inbox/mailbox/Important/auto subscribe
Just a polite ping on this problem. Folder auto-creation isn't working with folders specified as part of the userdb lookup. Help appreciated.
Can you change config to
mail_debug=yes
and provide logs for a single session?
Sorry to return so much later. I can provide full logs, but it looks like this is what you're looking for:
Mar 14 01:26:24 mail dovecot: imap(user@example.com): Debug: Unknown userdb setting: plugin/namespace/inbox/mailbox/Important/auto=subscribe
Is it the "plugin/" on front? As you see with my doveadm result above, I don't think I caused that to be placed there. Any further guidance?
On 14.03.2017 05:57, MRob wrote:
On 2017-03-13 13:40, Aki Tuomi wrote:
On 2017-03-13 19:31, MRob wrote:
On 2017-03-10 23:28, MRob wrote:
On 2017-03-10 23:22, Christian Kivalo wrote:
Am 11. März 2017 08:04:28 MEZ schrieb MRob mrobti@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> ?
Oh I did not know this doveadm command, thank you!
Output included all my other userdb fields as well as this:
namespace/inbox/mailbox/Important/auto subscribe
Just a polite ping on this problem. Folder auto-creation isn't working with folders specified as part of the userdb lookup. Help appreciated.
Can you change config to
mail_debug=yes
and provide logs for a single session?
Sorry to return so much later. I can provide full logs, but it looks like this is what you're looking for:
Mar 14 01:26:24 mail dovecot: imap(user@example.com): Debug: Unknown userdb setting: plugin/namespace/inbox/mailbox/Important/auto=subscribe
Is it the "plugin/" on front? As you see with my doveadm result above, I don't think I caused that to be placed there. Any further guidance? userdb_namespace/inbox/mailbox=Important userdb_namespace/inbox/mailbox/Important/name=Important userdb_namespace/inbox/mailbox/Important/auto=create
Also if you want to create multiple mailboxes, you can use mailbox=Important,SecondBox,SomeOtherBox and add settings for them. The important one is the 'name' setting.
Aki
On 2017-03-14 01:52, Aki Tuomi wrote:
On 14.03.2017 05:57, MRob wrote:
On 2017-03-13 13:40, Aki Tuomi wrote:
On 2017-03-13 19:31, MRob wrote:
On 2017-03-10 23:28, MRob wrote:
On 2017-03-10 23:22, Christian Kivalo wrote:
Am 11. März 2017 08:04:28 MEZ schrieb MRob mrobti@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> ?
Oh I did not know this doveadm command, thank you!
Output included all my other userdb fields as well as this:
namespace/inbox/mailbox/Important/auto subscribe
Just a polite ping on this problem. Folder auto-creation isn't working with folders specified as part of the userdb lookup. Help appreciated.
Can you change config to
mail_debug=yes
and provide logs for a single session?
Sorry to return so much later. I can provide full logs, but it looks like this is what you're looking for:
Mar 14 01:26:24 mail dovecot: imap(user@example.com): Debug: Unknown userdb setting: plugin/namespace/inbox/mailbox/Important/auto=subscribe
Is it the "plugin/" on front? As you see with my doveadm result above, I don't think I caused that to be placed there. Any further guidance? userdb_namespace/inbox/mailbox=Important userdb_namespace/inbox/mailbox/Important/name=Important userdb_namespace/inbox/mailbox/Important/auto=create
Am I to understand that I'll need all three of these? It makes sense, though the Important/name=Important is a bit awkward - wondering, is this documented anywhere I may have missed?
Also if you want to create multiple mailboxes, you can use mailbox=Important,SecondBox,SomeOtherBox and add settings for them. The important one is the 'name' setting.
Good tip, thank you.
participants (4)
-
Aki Tuomi
-
Christian Kivalo
-
MRob
-
Steffen Kaiser