A. Schulze:
My interim solution was "$log_level = 3". But that fill the log with
much more noise.
Are there better solution?
the attached patch introduce a new configuration value "spam_scan_loglevel"
Now I have
- $log_level = 2;
- $spam_quarantine_method = undef;
- $final_spam_destiny = D_REJECT;
and with
- $spam_scan_loglevel = 2;
amavisd-new writes the SA-Results to the log again.
Andreas
Description: log sa_results even if quarantine is disabled
see http://lists.amavis.org/pipermail/amavis-users/2015-December/003829.html
Author: A. Schulze
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: amavisd-new-2.10.1/amavisd
===================================================================
--- amavisd-new-2.10.1.orig/amavisd
+++ amavisd-new-2.10.1/amavisd
@@ -406,6 +406,7 @@ BEGIN {
%dkim_signing_keys_by_domain
@dkim_signing_keys_list @dkim_signing_keys_storage
$file $altermime $enable_anomy_sanitizer
+ $spam_scan_loglevel
)],
'sa' => # global SpamAssassin settings
[qw(
@@ -944,6 +945,7 @@ BEGIN {
$virus_quarantine_method = 'local:virus-%m';
$banned_files_quarantine_method = 'local:banned-%m';
$spam_quarantine_method = 'local:spam-%m.gz';
+ $spam_scan_loglevel = 3;
$bad_header_quarantine_method = 'local:badh-%m';
$unchecked_quarantine_method = undef; # 'local:unchecked-%m';
$clean_quarantine_method = undef; # 'local:clean-%m';
@@ -30513,7 +30515,7 @@ sub check {
if (defined $spam_level && defined $score_factor) {
$spam_level *= $score_factor;
}
- do_log(3,"spam_scan: score=%s autolearn=%s tests=[%s] recips=%s",
+ do_log($spam_scan_loglevel,"spam_scan: score=%s autolearn=%s tests=[%s] recips=%s",
$spam_level, $supplementary_info_ref->{'AUTOLEARN'},
$sa_tests, $rind_list);
my(%sa_tests_h);