← Back to team overview

vm team mailing list archive

[Bug 262159] Re: Problem with vm-su-spam-score-aux

 

** Project changed: viewmail => vm

** Changed in: vm
    Milestone: 8.0.12 => None

-- 
Problem with vm-su-spam-score-aux
https://bugs.launchpad.net/bugs/262159
You received this bug notification because you are a member of VM
development team, which is the registrant for VM (defunct).

Status in VM (View Mail) for Emacs: Fix Released

Bug description:
vm-su-spam-score-aux looks for the spam score in an email header, in the
form "hits=NUM".  It needs to look for "score=NUM" as well.

This patch corrects the behavior.


diff -u -b -r --exclude=CVS --exclude=.hg --exclude=.hgtags --exclude=.hg --exclude=.svn /DS/home-0/mernst/emacs/vm-8.0.11-581/lisp/vm-summary.el.\~1\~ /DS/home-0/mernst/emacs/vm-8.0.11-581/lisp/vm-summary.el
--- /DS/home-0/mernst/emacs/vm-8.0.11-581/lisp/vm-summary.el.~1~	2008-08-11 22:42:58.000000000 +0200
+++ /DS/home-0/mernst/emacs/vm-8.0.11-581/lisp/vm-summary.el	2008-08-28 09:31:47.705059471 +0200
@@ -737,8 +737,8 @@
 (defun vm-su-spam-score-aux (m)
   "Return the numeric spam level for M."
   (let ((spam-status (vm-get-header-contents m "X-Spam-Status:")))
-    (if (string-match "hits=\\([+-]?[0-9.]+\\)" spam-status)
-        (string-to-number (match-string 1 spam-status))
+    (if (string-match "\\(hits\\|score\\)=\\([+-]?[0-9.]+\\)" spam-status)
+        (string-to-number (match-string 2 spam-status))
       0)))
 
 (defun vm-su-spam-score (m)

Diff finished.  Thu Aug 28 09:31:56 2008