cvs commit: qpsmtpd/plugins spamassassin
[email protected] (John Peacock)
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
cvsuser 04/09/24 08:17:07
Modified: plugins spamassassin
Log:
* spamassassin
Must replace any existing X-Spam headers with local score,
rather than adding. Don't care what other SA instances thought.
(Michael Holzt)
Revision Changes Path
1.12 +3 -3 qpsmtpd/plugins/spamassassin
Index: spamassassin
===================================================================
RCS file: /cvs/public/qpsmtpd/plugins/spamassassin,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -w -r1.11 -r1.12
--- spamassassin 18 Jul 2004 11:02:24 -0000 1.11
+++ spamassassin 24 Sep 2004 15:17:07 -0000 1.12
@@ -144,7 +144,7 @@
my $line0 = <SPAMD>; # get the first protocol lines out
if ($line0) {
$self->log(6, "check_spam: spamd: $line0");
- $transaction->header->add("X-Spam-Check-By", $self->qp->config('me'), 0);
+ $transaction->header->replace("X-Spam-Check-By", $self->qp->config('me'), 0);
}
my ($flag, $hits, $required);
@@ -162,8 +162,8 @@
$flag = $flag eq 'True' ? 'Yes' : 'No';
$self->log(6, "check_spam: finished reading from spamd");
- $transaction->header->add('X-Spam-Flag', 'YES', 0) if ($flag eq 'Yes');
- $transaction->header->add('X-Spam-Status',
+ $transaction->header->replace('X-Spam-Flag', 'YES', 0) if ($flag eq 'Yes');
+ $transaction->header->replace('X-Spam-Status',
"$flag, hits=$hits required=$required\n" .
"\ttests=$tests", 0);
$self->log(5, "check_spam: $flag, hits=$hits, required=$required, " .