+2003-06-10 Teodor Zlatanov <tzz@lifelogs.com>
+
+ * spam.el (spam-check-bogofilter-headers): fix for when the score
+ is requested but the message is not spam
+
2003-06-09 Teodor Zlatanov <tzz@lifelogs.com>
From Eric Knauel <knauel@informatik.uni-tuebingen.de>
;;;; Bogofilter
(defun spam-check-bogofilter-headers (&optional score)
(let ((header (message-fetch-field spam-bogofilter-header)))
- (when (and header
- (string-match spam-bogofilter-bogosity-positive-spam-header
- header))
- (if score
- (when (string-match "spamicity=\\([0-9.]+\\)" header)
- (match-string 1 header))
- spam-split-group))))
+ (when header ; return nil when no header
+ (if score ; scoring mode
+ (if (string-match "spamicity=\\([0-9.]+\\)" header)
+ (match-string 1 header)
+ "0")
+ ;; spam detection mode
+ (when (string-match spam-bogofilter-bogosity-positive-spam-header
+ header)
+ spam-split-group)))))
;; return something sensible if the score can't be determined
(defun spam-bogofilter-score ()