On Wed, 17 Jun 2009, Filippo Carletti wrote:
http://bugs.contribs.org/show_bug.cgi?id=3340
Also me. Here's the background.
Line 195 highlighted:
my ($flag, $hits, $required);
while (<SPAMD>) {
$self->log(LOGDEBUG, "check_spam: spamd: $_");
#warn "GOT FROM SPAMD1: $_";
last unless m/\S/;
if (m{Spam: (True|False) ; (-?\d+\.\d) / (-?\d+\.\d)}) {
($flag, $hits, $required) = ($1, $2, $3);
}
}
* my $tests = <SPAMD>;
$tests =~ s/\015//; # hack for outlook
Line 219 highlighted:
$transaction->header->add('X-Spam-Flag', 'YES', 0) if ($flag eq 'Yes');
* $transaction->header->add('X-Spam-Status',
"$flag, hits=$hits required=$required\n" .
"\ttests=$tests", 0);
$self->log(LOGNOTICE, "check_spam: $flag, hits=$hits,
required=$required, " .
And line 222:
$self->log(LOGNOTICE, "check_spam: $flag, hits=$hits, required=$required, " .
"tests=$tests");
I think that spamd is not returning a 'tests' line for score 0.0. We could
fix the log noise with a line 195 of:
my $tests = <SPAMD> || '';
Or spamd could be fixed.
FTR, spamassassin version is 3.2.3-44.el4.
diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.40/plugins/spamassassin
mezzanine_patched_qpsmtpd-0.40/plugins/spamassassin
--- qpsmtpd-0.40/plugins/spamassassin 2007-06-14 11:57:24.000000000 -0600
+++ mezzanine_patched_qpsmtpd-0.40/plugins/spamassassin 2008-01-07
10:27:23.000000000 -0700
@@ -191,7 +191,7 @@
}
}
- my $tests = <SPAMD>;
+ my $tests = <SPAMD>|| '';
$tests =~ s/\015//; # hack for outlook
$flag = $flag eq 'True' ? 'Yes' : 'No';
$self->log(LOGDEBUG, "check_spam: finished reading from spamd");