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
---
src/config/prelude.rs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/config/prelude.rs b/src/config/prelude.rs
index cf9c443..adc192f 100644
--- a/src/config/prelude.rs
+++ b/src/config/prelude.rs
@@ -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)]
--
2.41.0