SA rules_du_jour lint bug: FOUND
Jeff A. Earickson
jaearick at colby.edu
Thu Aug 3 17:15:12 IST 2006
Gang,
I upgraded to SA 3.1.4 last night, and continued to be plagued by
lint failures in the rules_du_jour script, like so:
/opt/perl5/bin/spamassassin -p /opt/MailScanner/etc/spam.assassin.prefs.conf --lint
[27791] warn: config: SpamAssassin failed to parse line, "/var/spool/spamassassin" is not valid for "bayes_path", skipping: bayes_path /var/spool/spamassassin
I had this problem in earlier versions of SA, but had worked around
it by having a different spam.assassin.prefs.conf with no bayes_path
entry. This hack quit working with 3.1.4.
I found where the problem is in the SpamAssassin code. The following
diff to [perlpath]/5.8.8/Mail/SpamAssassin/Conf.pm "fixes" the problem:
*** Conf.pm.orig Thu Aug 3 11:49:37 2006
--- Conf.pm.new Thu Aug 3 12:04:24 2006
***************
*** 2239,2246 ****
unless (defined $value && $value !~ /^$/) {
return $MISSING_REQUIRED_VALUE;
}
! if (-d $value) {
! return $INVALID_VALUE;
}
$self->{bayes_path} = $value;
}
--- 2239,2246 ----
unless (defined $value && $value !~ /^$/) {
return $MISSING_REQUIRED_VALUE;
}
! if (-f $value) {
! return $INVALID_VALUE;
}
$self->{bayes_path} = $value;
}
I know this isn't quite right, since the test should be "if NOT a
directory, return INVALID_VALUE". But the code:
if ( ! -d $value)
didn't work correctly. Anyway, this clearly seems to be a bug
in SpamAssassin.
Since I'm not a subscriber to SpamAssassin-dev, would somebody
else (Raymond?) care to post this bug to the SA developers?
Jeff Earickson
Colby College
More information about the MailScanner
mailing list