amavisd-new doesn't seem to get autolearn= portion of the X-Spam-Status header from spamassassin
I've been trying to get Amavis to report if the mail it's checking has been auto learned by SpamAssassin, however the Amavis X-Spam-Status header seems to make no reference to it. This result is rather important to me as I would like to script sa-learn so users can use dump folders on IMAP for mail which hasn't been, or has been incorrectly learned by SA.
I'm running these versions on a fresh install of Hardy:
amavisd-new:
Installed: 1:2.5.3-1ubuntu3
Candidate: 1:2.5.3-1ubuntu3
Version table:
*** 1:2.5.3-1ubuntu3 0
500 http://
100 /var/lib/
spamassassin:
Installed: 3.2.4-1ubuntu1
Candidate: 3.2.4-1ubuntu1
Version table:
*** 3.2.4-1ubuntu1 0
500 http://
100 /var/lib/
Here is what I'm getting:
X-Spam-Status: No, score=-1.927 tagged_above=-9999 required=6.31
tests=[AWL=0.673, BAYES_00=-2.599, SPF_PASS=-0.001]
Here is what I want (from the old mail server):
X-Spam-Status: not spam, SpamAssassin (score=-0.803, required 6,
According to all the docs I've read on Amavis/SA, Amavis doesn't alter the return values of the test results from SA.
From running Amavis in SA debug mode, I get this:
[28443] dbg: learn: auto-learn: currently using scoreset 3, recomputing score based on scoreset 1
[28443] dbg: learn: auto-learn: message score: -3.25358685446009, computed score for autolearn: 0
[28443] dbg: learn: auto-learn? ham=1, spam=6, body-points=0, head-points=0, learned-
[28443] dbg: learn: auto-learn? yes, ham (0 < 1)
[28443] dbg: learn: initializing learner
[28443] dbg: learn: learning ham
[28443] dbg: bayes: tie-ing to DB file R/W /var/lib/
[28443] dbg: bayes: tie-ing to DB file R/W /var/lib/
[28443] dbg: bayes: found bayes db version 3
[28443] dbg: bayes: learned '9e0024004b5cce
[28443] dbg: bayes: untie-ing
[28443] dbg: bayes: files locked, now unlocking lock
[28443] dbg: learn: initializing learner
[28443] dbg: check: is spam? score=-3.254 required=5
[28443] dbg: check: tests=AWL,
[28443] dbg: check: subtests=
So SA seems to be doing the autolearn as expected.
Here are my config files:
Amavis 50-user:
use strict;
#
# Place your configuration directives here. They will override those in
# earlier files.
#
# See /usr/share/
# the directives you can use in this file
#
$unfreeze = ['unfreeze', 'freeze -d', 'melt', 'fcat']; #disabled (non-free, no security support)
$unrar = ['rar', 'unrar']; #disabled (non-free, no security support)
$lha = 'lha'; #disabled (non-free, no security support)
$myhostname = "windy.skanes.ca";
$final_spam_destiny = D_DISCARD;
$X_HEADER_LINE = "Ubuntu $myproduct_name at $mydomain";
$sa_tag_level_deflt = -9999;
$sa_kill_
$sa_dsn_
$sa_auto_whitelist = 1;
$sa_spam_
#
# Debugging settings
#
$sa_debug = '1,bayes,learn';
$log_level = 5;
$LOGFILE = "$MYHOME/
$DEBUG=1;
#
#------------ Do not modify anything below this line -------------
1; # ensure a defined return
SA local.cf:
# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssas
# tweaked.
#
# Only a small subset of options are listed below
#
#######
# Add *****SPAM***** to the Subject header of spam e-mails
#
# rewrite_header Subject *****SPAM*****
# Save spam messages as a message/rfc822 MIME attachment instead of
# modifying the original message (0: off, 2: use text/plain instead)
#
# report_safe 1
# Set which networks or hosts are considered 'trusted' by your mail
# server (i.e. not spammers)
#
# trusted_networks 212.17.35.
# Set file-locking method (flock is not safe over NFS, but is faster)
#
# lock_method flock
# Set the threshold at which a message is considered spam (default: 5.0)
#
# required_score 5.0
# Use Bayesian classifier (default: 1)
#
use_bayes 1
# Bayesian classifier auto-learning (default: 1)
#
bayes_auto_learn 1
# Set headers which may provide inappropriate cues to the Bayesian
# classifier
#
# bayes_ignore_header X-Bogosity
# bayes_ignore_header X-Spam-Flag
# bayes_ignore_header X-Spam-Status
bayes_auto_
bayes_auto_
Any help would be greatly appreciated as I have quite a busy mail server to retire.
Thanks,
Jonathan Skanes
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Jon Skanes
- Solved:
- Last query:
- Last reply: