Skip to content

Commit

Permalink
make sendmail-cmd optional
Browse files Browse the repository at this point in the history
Use the common /usr/sbin/sendmail the default. This is a common default
hardcoded in many applications.

Fixes: https://todo.sr.ht/~soywod/pimalaya/126
  • Loading branch information
WhyNotHugo authored and soywod committed Aug 27, 2023
1 parent 43c270b commit f61a1f6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/config/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,18 @@ pub enum SmtpOAuth2ScopesDef {
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
#[serde(remote = "SendmailConfig", rename_all = "kebab-case")]
pub struct SendmailConfigDef {
#[serde(rename = "sendmail-cmd", with = "CmdDef")]
#[serde(
rename = "sendmail-cmd",
with = "CmdDef",
default = "sendmail_default_cmd"
)]
cmd: Cmd,
}

fn sendmail_default_cmd() -> Cmd {
Cmd::from("/usr/sbin/sendmail")
}

/// Represents the email hooks. Useful for doing extra email
/// processing before or after sending it.
#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize, Deserialize)]
Expand Down

0 comments on commit f61a1f6

Please sign in to comment.