From fc1a7944554de9c1394261b02e6b2f319bbd9973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Mon, 19 Oct 2020 18:57:07 +0200 Subject: [PATCH] fix(mail): msmtp passwordeval --- configs/mail.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/mail.nix b/configs/mail.nix index 3169a11..8e8a2bf 100644 --- a/configs/mail.nix +++ b/configs/mail.nix @@ -21,7 +21,8 @@ let } ]; - pass_ = file: "echo ${lib.escapeShellArg (lib.strings.fileContents file)}"; + # turns out we have to escape $ because, if the password contains a $, it will get interpolated as a variable by the msmtp `passwordeval` which does: `bash -c "COMMAND; echo"` + pass_ = file: "echo ${lib.escape ["$"] (lib.escapeShellArg (lib.strings.fileContents file))}"; generateTaggingScript = filters: let