Skip to content

Commit 378ef16

Browse files
sirainencmouse
authored andcommitted
Convert shared namespace prefix variables
And a bit of other fixes too.
1 parent a0c5d6d commit 378ef16

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

data/updates.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const updates = {
5151
mail_location_keep_noselect: '2.4.0',
5252
mail_location_no_noselect: '2.4.0',
5353
migration_imapc_features: '2.4.0',
54+
namespace_prefix_shared_variables_changed: '2.4.0',
5455
pbkdf2_hashing: '2.4.0',
5556
process_title_imap_process: '2.4.0',
5657
process_title_initializing: '2.4.0',

docs/core/config/namespaces.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,9 @@ namespace inbox {
401401
402402
namespace {
403403
type = shared
404-
prefix = shared/%%u/
404+
prefix = shared/$user/
405405
mail_driver = mdbox
406-
mail_path = %%h/mdbox
406+
mail_path = %{owner_home}/mdbox
407407
mail_index_private_path = %{owner_home}/mdbox/shared
408408
list = children
409409
subscriptions = no

docs/core/config/shared_mailboxes.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ namespace {
244244
namespace {
245245
type = shared
246246
separator = /
247-
prefix = shared/%%u/
247+
prefix = shared/$user/
248248
mail_path = %{owner_home}/Maildir
249249
mail_index_private_path = ~/Maildir/shared/%{owner_user}
250250
# If users have direct filesystem level access to their mails, it's safer
@@ -266,15 +266,20 @@ protocol imap {
266266
acl_driver = vfile
267267
```
268268

269-
This creates a shared/ namespace under which each user's mailboxes are.
269+
This creates a `shared/` namespace under which each user's mailboxes are.
270270
If you have multiple domains and allow sharing between them, you might
271-
want to set `prefix=shared/%%d/%%n/` instead (although %%u works just
272-
fine too). If you don't, you might want to drop the domain part and
273-
instead use `prefix=shared/%%n/`.
271+
want to set [[setting,namespace_prefix,shared/$domain/$username/]] instead
272+
(although `$user` works just fine too). If you don't, you might want to drop
273+
the domain part and instead use [[setting,namespace_prefix,shared/$username/]].
274274

275-
`list=children` specifies that if no one has shared mailboxes to the
276-
user, the "shared" directory isn't listed by the LIST command. If you
277-
wish it to be visible always, you can set `list=yes`.
275+
[[changed,namespace_prefix_shared_variables_changed]] The shared namespaces
276+
now use `$user`, `$username` and `$domain` template variables, rather than
277+
the old `%%u`, `%%n` and `%%d`.
278+
279+
[[setting,namespace_list,children]] specifies that if no one has shared
280+
mailboxes to the user, the "shared" directory isn't listed by the LIST command.
281+
If you wish it to be visible always, you can set
282+
[[setting,namespace_list,yes]].
278283

279284
The sharing user can be accessed with `%{owner_user}`, `%{owner_username}` and
280285
`%{owner_domain}` variables. The sharing user's home directory can also be
@@ -512,7 +517,10 @@ initially have "lookup" right, but later we don't:
512517

513518
### Troubleshooting
514519

515-
- Make sure the `%` and `%%` variables are specified correctly in the
520+
- Make sure `$user` or `$username` is specified in the
521+
[[setting,namespace_prefix]] setting rather than the old `%%u` or `%%n`.
522+
523+
- Make sure the [[setting,mail_path]] is set correctly in the
516524
namespace location. [[setting,log_debug,category=mail]] will help you see
517525
if Dovecot is trying to access correct paths.
518526

0 commit comments

Comments
 (0)