diff options
author | Drew Hess <src@drewhess.com> | 2018-10-22 13:57:32 -0400 |
---|---|---|
committer | Drew Hess <src@drewhess.com> | 2018-10-22 15:01:47 -0400 |
commit | fa388534e4a74f4055643e5ed85c95ee4148eda4 (patch) | |
tree | 9202868071d8196ef37f47436c7371b290b64999 | |
parent | 01fcaf8d29b74fe163d34328b15edbbb828577d6 (diff) | |
download | nixlib-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..."
-rw-r--r-- | nixos/modules/misc/ids.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/mail/dovecot.nix | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 0b4ed6d3b628..5c30e512a1b3 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -385,7 +385,7 @@ virtuoso = 44; #rtkit = 45; # unused dovecot2 = 46; - #dovenull = 47; # unused + dovenull2 = 47; prayer = 49; mpd = 50; clamav = 51; 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; |