From e5721b9062807d0a75900ea5cabe52b7fa2a6f5b Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Thu, 3 Aug 2023 14:17:12 +0200 Subject: [PATCH] vzdump: use as a convention for virtual endpoints/groups Virtual (or anonymous) endpoints/groups are used for sending one-off notifications to a target that does not exist in the config. VZDump uses this to send out notification mails to those addresses configured by the `mailto` parameter. Suggested-by: Wolfgang Bumiller Signed-off-by: Lukas Wagner --- PVE/VZDump.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm index 7dc9f31e..2671e3b1 100644 --- a/PVE/VZDump.pm +++ b/PVE/VZDump.pm @@ -501,10 +501,10 @@ sub send_notification { my $notification_config = PVE::Notify::read_config(); if ($mailto && scalar(@$mailto)) { - # <, >, @ is not allowed in endpoint names, but only it is only + # <, >, @ are not allowed in endpoint names, but that is only # verified once the config is serialized. That means that # we can rely on that fact that no other endpoint with this name exists. - my $endpoint_name = "mail-to-<" . join(",", @$mailto) . ">"; + my $endpoint_name = ""; $notification_config->add_sendmail_endpoint( $endpoint_name, $mailto, @@ -520,7 +520,7 @@ sub send_notification { push @$endpoints, $target; } - $target = "group-$endpoint_name"; + $target = ""; $notification_config->add_group( $target, $endpoints,