Skip to content

Commit 32f5e8d

Browse files
sirainencmouse
authored andcommitted
config/shared_mailboxes: Use dict_maps directly instead of going through dovecot-dict-sql.conf.inc
There are only two maps, so seems unnecessarily complicated to add an external file for it.
1 parent c94dacf commit 32f5e8d

File tree

1 file changed

+23
-27
lines changed

1 file changed

+23
-27
lines changed

docs/core/config/shared_mailboxes.md

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,29 @@ dict_server {
380380
password = sqlpass
381381
}
382382
}
383-
!include /etc/dovecot/dovecot-dict-sql.conf.inc
383+
384+
dict_map shared/shared-boxes/user/$to/$from {
385+
sql_table = user_shares
386+
value_field dummy {
387+
}
388+
389+
key_field from_user {
390+
value = $from
391+
}
392+
key_field to_user {
393+
value = $to
394+
}
395+
}
396+
397+
dict_map shared/shared-boxes/anyone/$from {
398+
sql_table = anyone_shares
399+
value_field dummy {
400+
}
401+
402+
key_field from_user {
403+
value = $from
404+
}
405+
}
384406
}
385407
}
386408
```
@@ -405,32 +427,6 @@ CREATE TABLE anyone_shares (
405427
COMMENT ON TABLE anyone_shares IS 'User from_user shares folders to anyone.';
406428
```
407429

408-
```[/etc/dovecot/dovecot-dict-sql.conf.inc]
409-
dict_map shared/shared-boxes/user/$to/$from {
410-
sql_table = user_shares
411-
value_field dummy {
412-
}
413-
414-
key_field from_user {
415-
pattern = $from
416-
}
417-
key_field to_user {
418-
pattern = $to
419-
}
420-
}
421-
422-
dict_map shared/shared-boxes/anyone/$from {
423-
sql_table = anyone_shares
424-
value_field dummy {
425-
}
426-
427-
key_field from_user {
428-
pattern = $from
429-
}
430-
}
431-
```
432-
:::
433-
434430
### Mailbox Sharing
435431

436432
You can use [[doveadm,acl]] to share mailboxes, or it can be done using

0 commit comments

Comments
 (0)