This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

2configs.mailserver: migrate dovecot config to settings option

Dovecot 2.4 (now in nixpkgs) removed services.dovecot2.extraConfig and
mailPlugins. Translate the plugin/namespace blocks into the structured
settings tree, hoist ACL plugin keys to top-level (no more `plugin {}`
section), and update the variable-substitution syntax (%n -> %{user |
username}, %u -> %{user}).

+27 -31
+27 -31
2configs/mailserver.nix
··· 185 185 ''; 186 186 }; 187 187 188 - # Dovecot virtual mailbox + ACL-restricted shared namespace for bot 189 - services.dovecot2.mailPlugins.globally.enable = [ 190 - "virtual" 191 - "acl" 192 - ]; 193 188 # Provision virtual mailbox config to a writable directory (nix store is read-only, 194 189 # and the ACL plugin needs to write dovecot-acl-list next to the virtual config) 195 190 systemd.tmpfiles.settings."dovecot-virtual" = { ··· 222 217 }; 223 218 }; 224 219 225 - services.dovecot2.extraConfig = '' 226 - plugin { 227 - acl = vfile 228 - acl_shared_dict = file:/var/vmail/shared-mailboxes.db 229 - } 220 + # Dovecot virtual mailbox + ACL-restricted shared namespace for bot 221 + services.dovecot2.settings = { 222 + mail_plugins = { 223 + virtual = true; 224 + acl = true; 225 + }; 230 226 231 - namespace shared { 232 - type = shared 233 - separator = . 234 - prefix = shared.%%n. 235 - location = maildir:/var/vmail/lassul.us/%%n/mail:LAYOUT=Maildir++ 236 - subscriptions = no 237 - list = children 238 - } 227 + # ACL plugin settings (top-level since dovecot 2.4) 228 + acl = "vfile"; 229 + acl_shared_dict = "file:/var/vmail/shared-mailboxes.db"; 239 230 240 - namespace virtual { 241 - prefix = virtual. 242 - separator = . 243 - location = virtual:/var/vmail/virtual-config:INDEX=/var/vmail/virtual-indexes/%u 244 - subscriptions = no 245 - mailbox Unread { 246 - auto = subscribe 247 - } 248 - mailbox All { 249 - auto = subscribe 250 - } 251 - } 252 - ''; 231 + "namespace shared" = { 232 + type = "shared"; 233 + separator = "."; 234 + prefix = "shared.%{user | username}."; 235 + location = "maildir:/var/vmail/lassul.us/%{user | username}/mail:LAYOUT=Maildir++"; 236 + subscriptions = false; 237 + list = "children"; 238 + }; 239 + 240 + "namespace virtual" = { 241 + prefix = "virtual."; 242 + separator = "."; 243 + location = "virtual:/var/vmail/virtual-config:INDEX=/var/vmail/virtual-indexes/%{user}"; 244 + subscriptions = false; 245 + "mailbox Unread".auto = "subscribe"; 246 + "mailbox All".auto = "subscribe"; 247 + }; 248 + }; 253 249 254 250 # Write dovecot-acl files to grant bot read-only + flag access to lass's mail 255 251 systemd.services.dovecot-acl-sync = {