[pve-devel] [PATCH v3 pve-guest-common 1/5] vzdump: config: add 'notification-mode' param for backup jobs

Lukas Wagner l.wagner at proxmox.com
Tue Nov 21 13:23:24 CET 2023


'legacy-sendmail': Use mailto/mailnotification parameters and send
emails directly.
'notification-system': Always notify via notification system
'auto': Notify via mail if mailto is set, otherwise use notification
system.

Signed-off-by: Lukas Wagner <l.wagner at proxmox.com>
---
 src/PVE/VZDump/Common.pm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/src/PVE/VZDump/Common.pm b/src/PVE/VZDump/Common.pm
index b93ad86..6ee8d3c 100644
--- a/src/PVE/VZDump/Common.pm
+++ b/src/PVE/VZDump/Common.pm
@@ -188,6 +188,20 @@ my $confdesc = {
 	enum => [ 'always', 'failure' ],
 	default => 'always',
     },
+    'notification-mode' => {
+	type => 'string',
+	description => "Determine which notification system to use." .
+	    " If set to 'legacy-sendmail', vzdump will consider the" .
+	    " mailto/mailnotification parameters and send emails to the" .
+	    " specified address(es) via the 'sendmail' command." .
+	    " If set to 'notification-system', a notification will be sent via PVE's" .
+	    " notification system and mailto/mailnotification will be ignored" .
+	    " If set to 'auto' (default setting), an email will be sent if " .
+	    " mailto is set, and the notification system will be used if not.",
+	optional => 1,
+	enum => [ 'auto', 'legacy-sendmail', 'notification-system'],
+	default => 'auto',
+    },
     'notification-policy' => {
 	type => 'string',
 	description => "Deprecated: Do not use",
-- 
2.39.2






More information about the pve-devel mailing list