make sendmail-cmd optional

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
This commit is contained in:
Hugo Osvaldo Barrera 2023-08-23 09:31:41 +02:00 committed by Clément DOUIN
parent 43c270bd44
commit f61a1f6669
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72

View file

@ -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)]