From: Teodor Zlatanov Date: Mon, 18 Dec 2006 15:35:53 +0000 (+0000) Subject: (spam-extra-header-to-number): don't require spam-use-crm114 for X-Git-Url: https://cgit.sxemacs.org/?a=commitdiff_plain;h=e4a4a092020f63ccbae09d307e048f04895b124a;p=gnus (spam-extra-header-to-number): don't require spam-use-crm114 for header sorting --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 21333b500..e312df280 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -2,6 +2,8 @@ * spam.el (spam-necessary-extra-headers): make spam-use-regex-headers trigger all the extra headers + (spam-extra-header-to-number): don't require spam-use-crm114 for + header sorting 2006-12-14 Andreas Seltenreich (tiny change) diff --git a/lisp/spam.el b/lisp/spam.el index 5c2f9c879..7fca07898 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -1182,10 +1182,6 @@ backends)." ".*\\b\\(?:score\\|hits\\)=\\(-?[0-9.]+\\)" "Regexp matching SpamAssassin score header. The first group must match the number.") -;; "score" for Spamassassin 3.0 or later: -;; X-Spam-Status: Yes, score=13.1 required=5.0 tests=DNS_FROM_RFC_ABUSE, -;; [...],UNDISC_RECIPS autolearn=disabled version=3.0.3 - (defun spam-extra-header-to-number (header headers) "Transform an extra HEADER to a number, using list of HEADERS. @@ -1199,7 +1195,7 @@ Note this has to be fast." spam-spamassassin-score-regexp "\\1"))) ;; for CRM checking, it's probably faster to just do the string match - ((and spam-use-crm114 (string-match "( pR: \\([0-9.-]+\\)" header-content)) + ((string-match "( pR: \\([0-9.-]+\\)" header-content) (string-to-number (match-string 1 header-content))) ((eq header 'X-Bogosity) (string-to-number (gnus-replace-in-string