Gnus development mailing list
 help / color / mirror / Atom feed
From: IRIE Tetsuya <irie@t.email.ne.jp>
Subject: Re: spam-check-spamassassin-headers with spamassasin 3.0/3.1
Date: Sun, 26 Feb 2006 11:45:18 +0900	[thread overview]
Message-ID: <87zmkergcz.fsf%irie@t.email.ne.jp> (raw)
In-Reply-To: <v9pslb2kfh.fsf@marauder.physik.uni-ulm.de> (Reiner Steib's message of "Sat, 25 Feb 2006 22:33:06 +0100")

[-- Attachment #1: Type: text/plain, Size: 673 bytes --]

Thank you for your reply.

Reiner Steib <reinersteib+gmane@imap.cc> 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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: spam.el.patch --]
[-- Type: text/x-patch, Size: 722 bytes --]

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

  reply	other threads:[~2006-02-26  2:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <873biqwtf5.fsf@puyo.nijino.com>
2006-02-13 16:42 ` Ted Zlatanov
2006-02-14 15:01 ` Reiner Steib
2006-02-25  0:47   ` IRIE Tetsuya
2006-02-25 21:33     ` Reiner Steib
2006-02-26  2:45       ` IRIE Tetsuya [this message]
2006-02-28 13:44         ` Reiner Steib
2006-03-01 13:57           ` IRIE Tetsuya

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=87zmkergcz.fsf%irie@t.email.ne.jp \
    --to=irie@t.email.ne.jp \
    /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).