From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/62095 Path: news.gmane.org!not-for-mail From: IRIE Tetsuya Newsgroups: gmane.emacs.gnus.general Subject: Re: spam-check-spamassassin-headers with spamassasin 3.0/3.1 Date: Sun, 26 Feb 2006 11:45:18 +0900 Message-ID: <87zmkergcz.fsf%irie@t.email.ne.jp> References: <873biqwtf5.fsf@puyo.nijino.com> <874q2owb1f.fsf%irie@t.email.ne.jp> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1140922004 23930 80.91.229.2 (26 Feb 2006 02:46:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 26 Feb 2006 02:46:44 +0000 (UTC) Original-X-From: ding-owner+m10623@lists.math.uh.edu Sun Feb 26 03:46:44 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 1FDBvj-00068B-Df for ding-account@gmane.org; Sun, 26 Feb 2006 03:46:42 +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 1FDBvb-0000OW-00; Sat, 25 Feb 2006 20:46:31 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1FDBuY-0000OO-00 for ding@lists.math.uh.edu; Sat, 25 Feb 2006 20:45:26 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1FDBuW-0001Wc-8a for ding@lists.math.uh.edu; Sat, 25 Feb 2006 20:45:26 -0600 Original-Received: from mail2.asahi-net.or.jp ([202.224.39.198] helo=mail.asahi-net.or.jp) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1FDBuU-00042P-00 for ; Sun, 26 Feb 2006 03:45:23 +0100 Original-Received: from localhost.localdomain (softbank218116080040.bbtec.net [218.116.80.40]) by mail.asahi-net.or.jp (Postfix) with ESMTP id 8D0301C4EB for ; Sun, 26 Feb 2006 11:45:20 +0900 (JST) Original-To: ding@gnus.org In-Reply-To: (Reiner Steib's message of "Sat, 25 Feb 2006 22:33:06 +0100") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Spam-Score: -2.5 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:62095 Archived-At: --=-=-= Thank you for your reply. Reiner Steib writes: > Could you try the following patch, please? `spam-check-spamassassin-headers' works fine, however `spam-extra-header-to-number' doesn't. spamassasin add header like this: | X-Spam-Status: Yes, score=13.1 required=5.0 tests=DNS_FROM_RFC_ABUSE, | DNS_FROM_RFC_WHOIS,FORGED_YAHOO_RCVD,MISSING_SUBJECT,NO_REAL_NAME, | UNDISC_RECIPS autolearn=disabled version=3.0.3 Score always becomes 0 at (string-to-number (gnus-replace-in-string ... )), because "Yes" or "No" flag exist before score=xxx. When I changed spam.el as attached, the displayed score is corrected. Best regards, -- IRIE Tetsuya --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=spam.el.patch --- spam.el.orig 2006-02-26 10:46:08.533820872 +0900 +++ spam.el 2006-02-26 09:58:40.303817648 +0900 @@ -1184,10 +1184,11 @@ (if (gnus-extra-header header headers) (cond ((eq header 'X-Spam-Status) - (string-to-number (gnus-replace-in-string - (gnus-extra-header header headers) - spam-spamassassin-score-regexp - "\\1"))) + (if (string-match spam-spamassassin-score-regexp + (gnus-extra-header header headers)) + (string-to-number + (match-string 1 (gnus-extra-header header headers))) + 0)) ;; for CRM checking, it's probably faster to just do the string match ((and spam-use-crm114 (string-match "( pR: \\([0-9.-]+\\)" header)) (match-string 1 header)) --=-=-=--