From 972430e234364d09644c9c92fa035917bb78198d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 5 Dec 2020 17:05:58 +0000 Subject: [PATCH] set return-path Signed-off-by: Ian Jackson --- src/spec.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/spec.rs b/src/spec.rs index 9c9f09e6..b8948ed8 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -403,6 +403,9 @@ pub mod implementation { ipl: &IPlayerState, token: AccessTokenInfo) -> AccessTokenReport { + let sendmail = &config().sendmail; + let mut command = Command::new(sendmail); + #[derive(Debug,Serialize)] struct CommonData<'r> { player_email: &'r str, @@ -435,6 +438,7 @@ pub mod implementation { unix_user: user, common, }; + command.args(&["-f", &user]); nwtemplates::render("token-unix.tera", &data) }, _ => { @@ -461,8 +465,6 @@ pub mod implementation { Ok::<_,AE>(messagefile) })().context("write email to temporary file.")?; - let sendmail = &config().sendmail; - let mut command = Command::new(sendmail); command .args(&["-oee","-odb","-oi","-t","--"]) .stdin(messagefile); -- 2.30.2