[pve-devel] [PATCH proxmox-perl-rs] notify context: fix 'default_sendmail_from' context method

Lukas Wagner l.wagner at proxmox.com
Mon Oct 2 09:40:49 CEST 2023


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

Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
Reported in our forum:
https://forum.proxmox.com/threads/mail-alerts-not-sent-with-datacenter-default.134305/

 pve-rs/src/notify_context.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pve-rs/src/notify_context.rs b/pve-rs/src/notify_context.rs
index 48623fd..3cf3e18 100644
--- a/pve-rs/src/notify_context.rs
+++ b/pve-rs/src/notify_context.rs
@@ -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"))
     }
 
-- 
2.39.2






More information about the pve-devel mailing list