From 0fbfbafb6e05197cc5bc5be57e6ebb5ad89be77a Mon Sep 17 00:00:00 2001 From: Brian Olsen Date: Fri, 4 May 2018 14:56:33 +0200 Subject: [PATCH] Make dovecot sockets use postfix user/group options --- mail-server/dovecot.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/mail-server/dovecot.nix b/mail-server/dovecot.nix index 4294a2d..655b92a 100644 --- a/mail-server/dovecot.nix +++ b/mail-server/dovecot.nix @@ -28,6 +28,8 @@ let # maildir in format "/${domain}/${user}" dovecotMaildir = "maildir:${cfg.mailDirectory}/%d/%n${maildirLayoutAppendix}"; + + postfixCfg = config.services.postfix; in { config = with cfg; lib.mkIf enable { @@ -83,9 +85,9 @@ in service lmtp { unix_listener /var/lib/postfix/queue/private/dovecot-lmtp { - group = postfix + group = ${postfixCfg.group} mode = 0600 - user = postfix # TODO: < make variable + user = ${postfixCfg.user} } } @@ -106,8 +108,8 @@ in service auth { unix_listener /var/lib/postfix/queue/private/auth { mode = 0660 - user = postfix # TODO: < make variable - group = postfix # TODO: < make variable + user = ${postfixCfg.user} + group = ${postfixCfg.group} } }