From: Ian Jackson Date: Sat, 5 Dec 2020 17:05:58 +0000 (+0000) Subject: set return-path X-Git-Tag: otter-0.2.0~270 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=972430e234364d09644c9c92fa035917bb78198d;p=otter.git set return-path Signed-off-by: Ian Jackson --- 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);