]> git.proxmox.com Git - proxmox-perl-rs.git/commitdiff
notify context: fix 'default_sendmail_from' context method
authorLukas Wagner <l.wagner@proxmox.com>
Mon, 2 Oct 2023 07:40:49 +0000 (09:40 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 2 Oct 2023 10:31:11 +0000 (12:31 +0200)
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>
pve-rs/src/notify_context.rs

index 48623fd8cf558667f80af268727351bdd7351609..3cf3e189993ed0911f2ec3d06a8a39fec50bb388 100644 (file)
@@ -58,7 +58,7 @@ impl Context for PVEContext {
     fn default_sendmail_from(&self) -> String {
         let content = attempt_file_read("/etc/pve/datacenter.cfg");
         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"))
     }