[pmg-devel] [RFC PATCH pmg-api] api: quarantine: include descriptions for KAM rules in the spaminfo

Dominik Csapak d.csapak at proxmox.com
Fri Apr 14 13:06:38 CEST 2023


so that the KAM rules also get a description instead of '-'

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
sending as RFC because i'm not sure if that path is fixed, and if not
how we'd get that

 src/PMG/API2/Quarantine.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/PMG/API2/Quarantine.pm b/src/PMG/API2/Quarantine.pm
index 7101795..a100e11 100644
--- a/src/PMG/API2/Quarantine.pm
+++ b/src/PMG/API2/Quarantine.pm
@@ -72,8 +72,9 @@ sub decode_spaminfo {
 
     my $salocaldir = "/var/lib/spamassassin/$saversion/updates_spamassassin_org";
     my $sacustomdir = "/etc/mail/spamassassin";
+    my $kamdir = "/var/lib/spamassassin/$saversion/kam_sa-channels_mcgrail_com";
 
-    $spamdesc = PMG::Utils::load_sa_descriptions([$salocaldir, $sacustomdir]) if !$spamdesc;
+    $spamdesc = PMG::Utils::load_sa_descriptions([$salocaldir, $sacustomdir, $kamdir]) if !$spamdesc;
 
     foreach my $test (split (',', $info)) {
 	my ($name, $score) = split (':', $test);
-- 
2.30.2





More information about the pmg-devel mailing list