File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222libpcre
2323libstemmer
2424libtextcat
25+ lri
2526lto
2627mharden
2728mmaped
Original file line number Diff line number Diff line change @@ -113,6 +113,62 @@ namespace shared {
113113#acl_username = %{master_user}
114114```
115115
116+ ### Creating rule sets with group
117+
118+ You can also simplify ACL rule set management by defining rule sets.
119+ Group settings expand as configuration where they are used,
120+ so they can include values from other filters too.
121+
122+ ``` [dovecot.conf]
123+ # define rule sets
124+
125+ group @acl_rule_set set1 {
126+ acl user=user1 {
127+ rights = lri
128+ }
129+ }
130+
131+ group @acl_rule_set set2 {
132+ acl user=user2 {
133+ rights = lri
134+ }
135+ }
136+
137+ group @acl_rule_set set3 {
138+ acl user=user3 {
139+ rights = lri
140+ }
141+ }
142+
143+ group @acl_rule_set default {
144+ acl user=admin {
145+ rights = lwristepai
146+ }
147+ }
148+
149+ namespace public {
150+ @acl_rule_set = default
151+ mailbox "Secret" {
152+ @acl_rule_set = set1
153+ }
154+ mailbox "TopSecret" {
155+ @acl_rule_set = set2
156+ }
157+ mailbox "Foo*" {
158+ @acl_rule_set = set3
159+ }
160+ mailbox "FooBar" {
161+ @acl_rule_set = set1
162+ }
163+ }
164+ ```
165+
166+ With this configuration user ` admin ` will have full rights to all folders under public unless negated.
167+ Folders ` Secret ` and ` FooBar ` will have ` user1 ` with rights, while folders ` TopSecret ` has ` user2 ` with rights.
168+ This includes user ` admin ` from namespace level.
169+
170+ User ` user3 ` will have rights on anything that starts with ` Foo ` , including ` FooBar ` .
171+
116172## Master Users
117173
118174::: info
You can’t perform that action at this time.
0 commit comments