From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61989 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: Fwd: spam-check-spamassassin-headers with spamassasin 3.0/3.1 Date: Tue, 14 Feb 2006 11:10:18 +0900 Organization: Emacsen advocacy group Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="==-=-=" X-Trace: sea.gmane.org 1139928809 19703 80.91.229.2 (14 Feb 2006 14:53:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2006 14:53:29 +0000 (UTC) Original-X-From: ding-owner+m10517@lists.math.uh.edu Tue Feb 14 15:53:19 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F91YL-0001bE-JS for ding-account@gmane.org; Tue, 14 Feb 2006 15:53:17 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1F91YH-0002kY-00; Tue, 14 Feb 2006 08:53:13 -0600 Original-Received: from nas02.math.uh.edu ([129.7.128.40]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1F91Y1-0002kT-00 for ding@lists.math.uh.edu; Tue, 14 Feb 2006 08:52:57 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas02.math.uh.edu with esmtp (Exim 4.52) id 1F91Y1-0007fM-0x for ding@lists.math.uh.edu; Tue, 14 Feb 2006 08:52:57 -0600 Original-Received: from washington.hostforweb.net ([66.225.201.13]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1F91Xv-00065P-00 for ; Tue, 14 Feb 2006 15:52:51 +0100 Original-Received: from yamaoka by washington.hostforweb.net with local (Exim 4.52) id 1F91b8-0004Wc-Go for ding@gnus.org; Tue, 14 Feb 2006 08:56:10 -0600 Original-To: ding@gnus.org User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:RmrDHqhRyi6M+nMiB6Ts3gs5XF4= X-Hashcash: 1:20:060214:ding@gnus.org::vB89bYWvdfj7plqm:00001rS1 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - washington.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [32233 32235] / [47 12] X-AntiAbuse: Sender Address Domain - washington.hostforweb.net X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -0.4 (/) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61989 Archived-At: --==-=-= Could anyone please take a look at this? --==-=-= Content-Type: message/rfc822 Content-Disposition: inline From: ARISAWA Akihiro Newsgroups: gnus.gnus-bug Subject: spam-check-spamassassin-headers with spamassasin 3.0/3.1 Date: Sat, 11 Feb 2006 10:55:26 +0900 Message-ID: <873biqwtf5.fsf@puyo.nijino.com> Original-To: bugs@gnus.org (The Gnus Bugfixing Girls + Boys) User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.51 (i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="====-=-=" --====-=-= 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 --====-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=spam.el.patch 2006-02-11 ARISAWA Akihiro * 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))) --====-=-=-- --==-=-=--