]> git.proxmox.com Git - pmg-api.git/commitdiff
What: Spam: add uri hits to rule description
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 8 Aug 2019 08:49:14 +0000 (10:49 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Thu, 8 Aug 2019 11:09:44 +0000 (13:09 +0200)
this is for the header info only, since we do not save the description
in the quarantine db

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Stoiko Ivanov <s.ivanov@proxmox.com>
src/PMG/RuleDB/Spam.pm

index 97a80b3cd978a385cc1edf717c94694f672f0fa5..cc9a34726d75e5296040f3aef3b25c7e27e4089f 100644 (file)
@@ -431,6 +431,9 @@ sub analyze_spam {
                my $score = $status->{conf}->{scores}->{$rule};
                $loglist .= $loglist ? ",$rule($score)" : "$rule($score)";
                my $desc = $status->{conf}->get_description_for_rule($rule);
+               if (my $hits = $status->{uridnsbl_hits}->{$rule}) {
+                   $desc .= ' [' . join(',', keys %$hits) . ']';
+               }
                push @$sa_scores, { score => $score, rule => $rule, desc => $desc };
            }