[EMAIL PROTECTED] (Sam Laffere) wrote in news:022301c33f97$76ad8240
[EMAIL PROTECTED]:
> Steph,
>
> Thank you for the reply. I have added your fix into
> the plugins/spamassassin file, and that has
> stopped the error in the logs. The next problem
> is that the sub check_spam_reject is never triggering
> and rejecting the spam.
> I don't know perl, but I have been dinking with it, but
> all I have come up with is this hack.
> Please keep in mind that I do NOT know perl.
>
>
> while (<SPAMD>) {
> warn "GOT FROM SPAMD1: $_";
> next unless m/^Spam: \w/;
> # next unless m/\S/;
> s/\r?\n$/\n/;
> my @h = split /; /, $_, 2;
> # my @h = split /: /, $_, 2;
>
> $transaction->header->add(@h);
> last if $h[0] eq "Spam" and $h[1] =~ m/^False/;
>
> return (DENY, "spam score exceeded threshold")
> if $h[0] eq "Spam: Yes " ;
>
> }
>
> return (DECLINED);
>
>
> This bypasses the ability to compare the thresholds
> and such, but it does refuse based on the local.cf
> value.
> Sam
>
>
>
The X-Spam-Status header is not added by the SpamAssassin plug-in.
I guess the code should be :
while (<SPAMD>) {
# warn "GOT FROM SPAMD1:$_";
#next unless m/\S/;
s/\r?\n$/\n/;
if (/^Spam: (\w+) ; (\S+) \/ (\S+)/)
{
my $spam=$1;
my $score=$2;
my $treshold=$3;
# warn "$spam hits=$score required=$treshold" ;
$transaction->header->add("X-Spam-Status", "$spam, hits=
$score required=$treshold");
last;
}
}