]> git.proxmox.com Git - pmg-api.git/commitdiff
user accesslists: reword logging and hits for newer SA rule sets
authorStoiko Ivanov <s.ivanov@proxmox.com>
Mon, 28 Nov 2022 18:17:29 +0000 (19:17 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 29 Nov 2022 13:30:11 +0000 (14:30 +0100)
This commit adapts the sa-hits and the logging for the user
block/welcomelist to be consistent with the terms used in the
SpamAssassin 4.0 release, which tries to avoid some terms that might
be interpreted as racially charged.

This patch is a (small part) of the fix for #3755, which will be
addressed along with the upgrade to SpamAssassin 4.0 (to be
consistent with the (quite well thought-through) namings used by SA)

Keeping the USER_IN_BLACKLIST hit when loading the descriptions
catches mails put in quarantine before the patched version was
installed.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
 [ T: slight commit message edit ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PMG/RuleDB/Spam.pm
src/PMG/Utils.pm

index d7bfb63de768d727335aadab6f179ad4a3eaea0a..14d7beabb8cd56c9d2fa3463e36cd16769f8a20c 100644 (file)
@@ -204,7 +204,7 @@ sub what_match_targets {
            if ($queue->{blackwhite}->{$pmail} && 
                ($list = $queue->{blackwhite}->{$pmail}->{whitelist}) &&
                check_addrlist($list, $queue->{all_from_addrs})) {
-               syslog('info', "%s: sender in user (%s) whitelist", 
+               syslog('info', "%s: sender in user (%s) welcomelist",
                       $queue->{logid}, encode('UTF-8', $pmail));
            } else {
                $target_info->{$t}->{marks} = []; # never add additional marks here
@@ -219,11 +219,11 @@ sub what_match_targets {
                sa_score => 100,
                sa_max => $self->{level},
                sa_data => [{
-                   rule => 'USER_IN_BLACKLIST',
+                   rule => 'USER_IN_BLOCKLIST',
                    score => 100,
                    desc => PMG::Utils::user_bl_description(),
                }],
-               sa_hits => 'USER_IN_BLACKLIST',
+               sa_hits => 'USER_IN_BLOCKLIST',
            };
 
            my $list;
@@ -233,7 +233,7 @@ sub what_match_targets {
                check_addrlist($list, $queue->{all_from_addrs})) {
                $target_info->{$t}->{marks} = [];
                $target_info->{$t}->{spaminfo} = $info;
-               syslog ('info', "%s: sender in user (%s) blacklist", 
+               syslog ('info', "%s: sender in user (%s) blocklist",
                        $queue->{logid}, encode('UTF-8',$pmail));
            }
        }
index b9b1478bd67d2faf176388cf543272b5f5d3f416..10193f6ec943985806b9e0715452e3d8b7bb9931 100644 (file)
@@ -1167,7 +1167,7 @@ sub bencode_header {
 }
 
 sub user_bl_description {
-    return 'From: address is in the user black-list';
+    return 'From: address is in the user block-list';
 }
 
 sub load_sa_descriptions {
@@ -1207,6 +1207,7 @@ sub load_sa_descriptions {
 
     $res->{'ClamAVHeuristics'}->{desc} = "ClamAV heuristic tests";
     $res->{'USER_IN_BLACKLIST'}->{desc} = user_bl_description();;
+    $res->{'USER_IN_BLOCKLIST'}->{desc} = user_bl_description();;
 
     return $res;
 }