[pmg-devel] [PATCH pmg-api 1/2] api: quarantine: fix wrong backward-compatibility action
Stoiko Ivanov
s.ivanov at proxmox.com
Mon Oct 13 13:06:18 CEST 2025
While renaming to blocklist/welcomelist we kept the old
methods in the API for backward compatibilty, and added
both options as equivalent actions.
However it seems I substituted the backward compatibility name, as
well at some point and did not notice it.
Additionally the commits of renaming and re-adding the old names for
backward compatibility were not separated cleanly (thus this
patch fixes 2 commits).
Reported in our German community forum:
https://forum.proxmox.com/threads/.173910/
Tested by reproducing with a spamreport template with the old actions,
and verified that the welcomelist action works with this patch.
Fixes: ba7a7855 ("api: quarantine: re-add black- whitelist api methods for compatibilty")
Fixes: 85981ebd ("api: quarantine: rename to block/welcomelist")
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
src/PMG/API2/Quarantine.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PMG/API2/Quarantine.pm b/src/PMG/API2/Quarantine.pm
index 3887a741..e38d3ab2 100644
--- a/src/PMG/API2/Quarantine.pm
+++ b/src/PMG/API2/Quarantine.pm
@@ -1433,7 +1433,7 @@ __PACKAGE__->register_method({
my $pmail = try_decode_utf8($ref->{pmail});
my $receiver = try_decode_utf8($ref->{receiver} // $ref->{pmail});
- if ($action eq 'welcomelist' || $action eq 'welcomelist') {
+ if ($action eq 'welcomelist' || $action eq 'whitelist') {
PMG::Quarantine::add_to_blockwelcome($dbh, $pmail, 'WL', [$sender]);
PMG::Quarantine::deliver_quarantined_mail($dbh, $ref, $receiver);
} elsif ($action eq 'blocklist' || $action eq 'blacklist') {
--
2.47.3
More information about the pmg-devel
mailing list