From 1f9431801f5262a09c9dbb113d52beb0d668eabd Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 27 Jul 2025 17:34:13 +0200 Subject: [PATCH] nixos/tlsrpt: fix default postfix sendmail path It is not in the PATH for the reportd, since it is a SUID wrapper. --- nixos/modules/services/mail/tlsrpt.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/mail/tlsrpt.nix b/nixos/modules/services/mail/tlsrpt.nix index 83b219443fd0..4692f0cdd2ff 100644 --- a/nixos/modules/services/mail/tlsrpt.nix +++ b/nixos/modules/services/mail/tlsrpt.nix @@ -229,9 +229,16 @@ in sendmail_script = mkOption { type = with types; nullOr str; - default = if config.services.postfix.enable then "sendmail" else null; + default = + if config.services.postfix.enable && config.services.postfix.setSendmail then + "/run/wrappers/bin/sendmail -i -t" + else + null; defaultText = lib.literalExpression '' - if any [ config.services.postfix.enable ] then "sendmail" else null + if config.services.postfix.enable && config.services.postfix.setSendmail then + "/run/wrappers/bin/sendmail -i -t" + else + null ''; description = '' Path to a sendmail-compatible executable for delivery reports.