From 77bf0b01d0b77c2ac2e4da41ec872c63e7892d4c Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sat, 7 Mar 2026 15:42:36 +0100 Subject: [PATCH] nixos/tlsrpt: reuse sender address as envelope sender This prevents leaking the local user and hostname into the envelope, which could prevent DKIM signing due to lack of keys for the MX hostname. --- nixos/modules/services/mail/tlsrpt.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/mail/tlsrpt.nix b/nixos/modules/services/mail/tlsrpt.nix index 52ed3793309d..76ba800ee6c3 100644 --- a/nixos/modules/services/mail/tlsrpt.nix +++ b/nixos/modules/services/mail/tlsrpt.nix @@ -244,12 +244,12 @@ in type = with types; nullOr str; default = if config.services.postfix.enable && config.services.postfix.setSendmail then - "/run/wrappers/bin/sendmail -i -t" + "/run/wrappers/bin/sendmail -i -t -f ${cfg.reportd.settings.sender_address}" else null; defaultText = lib.literalExpression '' if config.services.postfix.enable && config.services.postfix.setSendmail then - "/run/wrappers/bin/sendmail -i -t" + "/run/wrappers/bin/sendmail -i -t -f $${cfg.reportd.settings.sender_address}" else null '';