Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions nixos/modules/services/mail/tlsrpt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,17 @@ in
};
};

systemd.services.postfix.serviceConfig.SupplementaryGroups = mkIf (
config.services.postfix.enable && cfg.collectd.configurePostfix
) [ "tlsrpt" ];
users.users.tlsrpt = {
isSystemUser = true;
group = "tlsrpt";
};
users.groups.tlsrpt = { };

users.users.postfix.extraGroups =
lib.mkIf (config.services.postfix.enable && cfg.collectd.configurePostfix)
[
"tlsrpt"
];

systemd.services.tlsrpt-collectd = {
description = "TLSRPT datagram collector";
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/tlsrpt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

# Enabling postfix should put sendmail as the sendmail setting
machine.succeed("grep -q sendmail_script=sendmail /etc/tlsrpt/reportd.cfg")
machine.succeed("systemctl show --property SupplementaryGroups postfix.service | grep tlsrpt")
machine.succeed("getent group tlsrpt | grep -q postfix")

machine.log(machine.succeed("systemd-analyze security tlsrpt-collectd.service tlsrpt-reportd.service | grep -v ✓"))
'';
Expand Down
Loading