nixos/tlsrpt: fix default postfix sendmail path

It is not in the PATH for the reportd, since it is a SUID wrapper.

(cherry picked from commit 1f9431801f)
This commit is contained in:
Martin Weinelt
2025-07-27 17:34:13 +02:00
committed by github-actions[bot]
parent 02e7f1e8b5
commit 6a90d84e44

View File

@@ -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.