Fix for SA Configure Files Version Mismatch
I was getting quite a few of these errors of version mismatches with spamassassin's configure files. I beleive this is causing a few spam checks to be not run by amavis. The following is an example of the error, zmtrainsa will also throw these errors.
Code:
config: configuration file "/opt/zimbra/conf/spamassassin/20_html_tests.cf" requires version 3.000004 of SpamAssassin, but this is code version 3.001000. Maybe you need to use the -C switch, or remove the old config files? Skipping this file at /opt/zimbra/zimbramon/lib/Mail/SpamAssassin/Conf/Parser.pm line 342.
To fix this or rather make it ignore the version errors, edit "/opt/zimbra/zimbramon/lib/Mail/SpamAssassin/Conf/Parser.pm" around line 342 to as follows. This probably isn't the best way to fix it but it seems to make it work right.
Code:
# if we want to allow "require_version 3.0" be good for all
# "3.0.x" versions:
## make sure it's a numeric value
$value += 0.1;
## convert 3.000000 -> 3.0, stay backwards compatible ...
$ver =~ s/^(\d+)\.(\d{1,3}).*$/sprintf "%d.%d", $1, $2/e;
$value =~ s/^(\d+)\.(\d{1,3}).*$/sprintf "%d.%d", $1, $2/e;
if ($ver != $value) {
warn "config: configuration file \"$self->{currentfile}\" requires version ".
"$value of SpamAssassin, but this is code version ".
"$ver. Maybe you need to use ".
"the -C switch, or remove the old config files? ".
"Skipping this file";
$skip_parsing = 1;
$conf->{errors}++;
}
Also, for some reason AWL checks aren't run anymore. I get this error message shown as Amavis is started in debug mode:
Code:
rules: failed to run AWL test, skipping:
(Can't locate object method "check_from_in_auto_whitelist" via package "Mail::SpamAssassin::PerMsgStatus" at /opt/zimbra/zimbramon/lib/Mail/SpamAssassin/PerMsgStatus.pm line 2581.
)
I havn't quite figured that one out yet. I assume the AWL test is no longer installed. Of course there are the same errors for razor, pyzor, dcc not being installed.
-Ben
Note: This is M2 on Fedora Core 4 using the FC4 build.