[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/mail/rmail-spam-filter.el,v
From: |
Bastien Guerry |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/mail/rmail-spam-filter.el,v |
Date: |
Wed, 13 Feb 2008 20:58:27 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Bastien Guerry <bastien1> 08/02/13 20:58:26
Index: rmail-spam-filter.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mail/rmail-spam-filter.el,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- rmail-spam-filter.el 8 Jan 2008 20:45:08 -0000 1.19
+++ rmail-spam-filter.el 13 Feb 2008 20:58:26 -0000 1.20
@@ -201,6 +201,9 @@
(cons :format "%v" :value (contents . "")
(const :format "" contents)
(string :tag "Contents" ""))
+ (cons :format "%v" :value (x-spam-status . "")
+ (const :format "" x-spam-status)
+ (string :tag "X-Spam-Status" ""))
(cons :format "%v" :value (action . output-and-delete)
(const :format "" action)
(choice :tag "Action selection"
@@ -284,6 +287,7 @@
(concat ", " (mail-fetch-field "Cc")))))
(setq message-subject (mail-fetch-field "Subject"))
(setq message-content-type (mail-fetch-field "Content-Type"))
+ (setq message-spam-status (mail-fetch-field "X-Spam-Status"))
)
;; Find number of spam-definition elements in the list
;; rsf-definitions-alist specified by user:
@@ -363,6 +367,11 @@
(rmail-msgbeg msg) (rmail-msgend msg))
definition maybe-spam)
+ ;; finally, check the X-Spam-Status header. You will typically
+ ;; look for the "Yes" string in this header field
+ (check-field 'x-spam-status message-spam-status
+ definition maybe-spam)
+
;; if the search in rsf-definitions-alist found
;; that this email is spam, output the email to the spam
;; rmail file, mark the email for deletion, leave the
- [Emacs-diffs] Changes to emacs/lisp/mail/rmail-spam-filter.el,v,
Bastien Guerry <=