From: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: Fwd: spam-check-spamassassin-headers with spamassasin 3.0/3.1
Date: Tue, 14 Feb 2006 11:10:18 +0900 [thread overview]
Message-ID: <b4mvevivgfp.fsf@jpl.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 42 bytes --]
Could anyone please take a look at this?
[-- Attachment #2: Type: message/rfc822, Size: 1899 bytes --]
[-- Attachment #2.1.1: Type: text/plain, Size: 483 bytes --]
Hi,
I am using spamassassin 3.1, and (setq spam-use-spamassassin-headers t).
When I typed S t in Summary buffer, reported score is always 0.
Spamassassin 3.0 or later, the default X-Spam-Status field is changed as:
|X-Spam-Status: No, score=0.1 required=8.0 ...
But, `spam-check-spamassassin-headers' checks only "hits=".
cf. http://issues.apache.org/SpamAssassin/show_bug.cgi?id=1332
When I changed spam.el as attached, the reported score is corrected.
Regards,
ARISAWA Akihiro
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1.2: spam.el.patch --]
[-- Type: text/x-patch, Size: 875 bytes --]
2006-02-11 ARISAWA Akihiro <ari@mbf.ocn.ne.jp>
* spam.el (spam-check-spamassassin-headers): Improved regexp
for spamassassin 3.0 or later.
Index: lisp/spam.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/spam.el,v
retrieving revision 7.77
diff -u -r7.77 spam.el
--- lisp/spam.el 8 Feb 2006 04:17:15 -0000 7.77
+++ lisp/spam.el 11 Feb 2006 01:35:11 -0000
@@ -2614,8 +2614,8 @@
(if score ; scoring mode
(let ((header (message-fetch-field spam-spamassassin-spam-status-header)))
(when header
- (if (string-match "hits=\\(-?[0-9.]+\\)" header)
- (match-string 1 header)
+ (if (string-match "\\(hits\\|score\\)=\\(-?[0-9.]+\\)" header)
+ (match-string 2 header)
"0")))
;; spam detection mode
(let ((header (message-fetch-field spam-spamassassin-spam-flag-header)))
next reply other threads:[~2006-02-14 2:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-14 2:10 Katsumi Yamaoka [this message]
2006-02-14 16:20 ` Reiner Steib
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4mvevivgfp.fsf@jpl.org \
--to=yamaoka@jpl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).