summary refs log tree commit diff
path: root/nixos/modules/services/mail/dovecot.nix
diff options
context:
space:
mode:
authorDrew Hess <src@drewhess.com>2018-10-22 13:57:32 -0400
committerDrew Hess <src@drewhess.com>2018-10-22 15:01:47 -0400
commitfa388534e4a74f4055643e5ed85c95ee4148eda4 (patch)
tree9202868071d8196ef37f47436c7371b290b64999 /nixos/modules/services/mail/dovecot.nix
parent01fcaf8d29b74fe163d34328b15edbbb828577d6 (diff)
downloadnixlib-fa388534e4a74f4055643e5ed85c95ee4148eda4.tar
nixlib-fa388534e4a74f4055643e5ed85c95ee4148eda4.tar.gz
nixlib-fa388534e4a74f4055643e5ed85c95ee4148eda4.tar.bz2
nixlib-fa388534e4a74f4055643e5ed85c95ee4148eda4.tar.lz
nixlib-fa388534e4a74f4055643e5ed85c95ee4148eda4.tar.xz
nixlib-fa388534e4a74f4055643e5ed85c95ee4148eda4.tar.zst
nixlib-fa388534e4a74f4055643e5ed85c95ee4148eda4.zip
dovecot: dovenull user should have its own group.
Quoting from https://wiki.dovecot.org/UserIds#dovenulluser:

"It should belong to its own private dovenull group where no one else
belongs to..."
Diffstat (limited to 'nixos/modules/services/mail/dovecot.nix')
-rw-r--r--nixos/modules/services/mail/dovecot.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix
index e6091182b2ab..30ad7d82fb80 100644
--- a/nixos/modules/services/mail/dovecot.nix
+++ b/nixos/modules/services/mail/dovecot.nix
@@ -311,7 +311,7 @@ in
       { name = "dovenull";
         uid = config.ids.uids.dovenull2;
         description = "Dovecot user for untrusted logins";
-        group = cfg.group;
+        group = "dovenull";
       }
     ] ++ optional (cfg.user == "dovecot2")
          { name = "dovecot2";
@@ -332,6 +332,10 @@ in
       }
     ++ optional (cfg.createMailUser && cfg.mailGroup != null)
       { name = cfg.mailGroup;
+      }
+    ++ singleton
+      { name = "dovenull";
+        gid = config.ids.gids.dovenull2;
       };
 
     environment.etc."dovecot/modules".source = modulesDir;