From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id CF353C45B for ; Mon, 28 Nov 2022 19:17:46 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B4DFB36FDF for ; Mon, 28 Nov 2022 19:17:46 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 28 Nov 2022 19:17:44 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id DF1CC44EFB for ; Mon, 28 Nov 2022 19:17:43 +0100 (CET) From: Stoiko Ivanov To: pmg-devel@lists.proxmox.com Date: Mon, 28 Nov 2022 19:17:29 +0100 Message-Id: <20221128181729.63076-3-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221128181729.63076-1-s.ivanov@proxmox.com> References: <20221128181729.63076-1-s.ivanov@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.087 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_NUMSUBJECT 0.5 Subject ends in numbers excluding current years SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pmg-devel] [PATCH pmg-api 2/2] user accesslists: reword logging and hits for SA 4.0 X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2022 18:17:46 -0000 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, avoiding racially charged terms. 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 --- src/PMG/RuleDB/Spam.pm | 8 ++++---- src/PMG/Utils.pm | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/PMG/RuleDB/Spam.pm b/src/PMG/RuleDB/Spam.pm index d7bfb63..14d7bea 100644 --- a/src/PMG/RuleDB/Spam.pm +++ b/src/PMG/RuleDB/Spam.pm @@ -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)); } } diff --git a/src/PMG/Utils.pm b/src/PMG/Utils.pm index b9b1478..10193f6 100644 --- a/src/PMG/Utils.pm +++ b/src/PMG/Utils.pm @@ -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; } -- 2.30.2