notify context: fix 'default_sendmail_from' context method

The name of the configuration option in datacenter.cfg is `email_from`
and not `mail_from`.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
Lukas Wagner 2023-10-02 09:40:49 +02:00 committed by Thomas Lamprecht
parent 8d031134e1
commit 50f372fe7e

View File

@ -58,7 +58,7 @@ impl Context for PVEContext {
fn default_sendmail_from(&self) -> String { fn default_sendmail_from(&self) -> String {
let content = attempt_file_read("/etc/pve/datacenter.cfg"); let content = attempt_file_read("/etc/pve/datacenter.cfg");
content content
.and_then(|content| lookup_datacenter_config_key(&content, "mail_from")) .and_then(|content| lookup_datacenter_config_key(&content, "email_from"))
.unwrap_or_else(|| String::from("root")) .unwrap_or_else(|| String::from("root"))
} }