From 6ebc6832e1939120f009eb13086e9af4d60caef7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 31 Jul 2017 00:23:32 +0200 Subject: Better emails --- custom/unit-status-mail.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'custom/unit-status-mail.nix') diff --git a/custom/unit-status-mail.nix b/custom/unit-status-mail.nix index 1b87a0b0..e07cb7b7 100644 --- a/custom/unit-status-mail.nix +++ b/custom/unit-status-mail.nix @@ -35,10 +35,11 @@ in { Type = "oneshot"; }; scriptArgs = "%I \"Hostname: %H\" \"Machine-ID: %m\" \"Boot-ID: %b\""; + path = with pkgs; [net-tools]; script = '' #!${pkgs.stdenv.shell} MAILTO="${cfg.recipient}" - MAILFROM="unit-status-mailer" + MAILFROM="unit-status-mailer@$(hostname -f)" UNIT=$1 EXTRA="" @@ -46,8 +47,6 @@ in { EXTRA+="$e"$'\n' done - UNITSTATUS=$(systemctl status $UNIT) - ${config.security.wrapperDir}/sendmail $MAILTO <