Fix scheduled emails being sent to bogus address when no default destination is set

This commit is contained in:
Ilia Ross
2026-08-20 03:27:56 +02:00
parent 3eccc770dd
commit 5395befcef
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ if (($err || $backup->{'emode'} == 0) && $backup->{'email'}) {
my $email = $backup->{'email'}; my $email = $backup->{'email'};
if ($email eq '*') { if ($email eq '*') {
$email = $gconfig{'webmin_email_to'}; $email = $gconfig{'webmin_email_to'};
if ($gconfig{'webmin_email_to_name'}) { if ($email && $gconfig{'webmin_email_to_name'}) {
$email = "$gconfig{'webmin_email_to_name'} <$email>"; $email = "$gconfig{'webmin_email_to_name'} <$email>";
} }
} }
+1 -1
View File
@@ -119,7 +119,7 @@ if ($out && $dump->{'email'} && &foreign_check("mailboxes")) {
my $email = $dump->{'email'}; my $email = $dump->{'email'};
if ($email eq '*') { if ($email eq '*') {
$email = $gconfig{'webmin_email_to'}; $email = $gconfig{'webmin_email_to'};
if ($gconfig{'webmin_email_to_name'}) { if ($email && $gconfig{'webmin_email_to_name'}) {
$email = "$gconfig{'webmin_email_to_name'} <$email>"; $email = "$gconfig{'webmin_email_to_name'} <$email>";
} }
} }
+1 -1
View File
@@ -92,7 +92,7 @@ if ($tellcount) {
$emailto = $config{'sched_email'}; $emailto = $config{'sched_email'};
if ($emailto eq '*') { if ($emailto eq '*') {
$emailto = $gconfig{'webmin_email_to'}; $emailto = $gconfig{'webmin_email_to'};
if ($gconfig{'webmin_email_to_name'}) { if ($emailto && $gconfig{'webmin_email_to_name'}) {
$emailto = "$gconfig{'webmin_email_to_name'} <$emailto>"; $emailto = "$gconfig{'webmin_email_to_name'} <$emailto>";
} }
} }