Gnus development mailing list
 help / color / mirror / Atom feed
* Fwd: spam-check-spamassassin-headers with spamassasin 3.0/3.1
@ 2006-02-14  2:10 Katsumi Yamaoka
  2006-02-14 16:20 ` Reiner Steib
  0 siblings, 1 reply; 2+ messages in thread
From: Katsumi Yamaoka @ 2006-02-14  2:10 UTC (permalink / 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)))

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fwd: spam-check-spamassassin-headers with spamassasin 3.0/3.1
  2006-02-14  2:10 Fwd: spam-check-spamassassin-headers with spamassasin 3.0/3.1 Katsumi Yamaoka
@ 2006-02-14 16:20 ` Reiner Steib
  0 siblings, 0 replies; 2+ messages in thread
From: Reiner Steib @ 2006-02-14 16:20 UTC (permalink / raw)


On Tue, Feb 14 2006, Katsumi Yamaoka wrote:

> Could anyone please take a look at this?
>
> From: ARISAWA Akihiro <ari@mbf.ocn.ne.jp>  
> Subject: spam-check-spamassassin-headers with spamassasin 3.0/3.1
> Newsgroups: gnus.gnus-bug

Done.  ... just before your message arrived here from Gmane. ;-) See
<news:v9r7666l2y.fsf@marauder.physik.uni-ulm.de>.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-14 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-14  2:10 Fwd: spam-check-spamassassin-headers with spamassasin 3.0/3.1 Katsumi Yamaoka
2006-02-14 16:20 ` Reiner Steib

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).