unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* rmail-spam-filter.el: also match
@ 2008-02-13  1:00 Bastien Guerry
  2008-02-13 22:01 ` Richard Stallman
  2008-02-13 22:07 ` Bastien Guerry
  0 siblings, 2 replies; 5+ messages in thread
From: Bastien Guerry @ 2008-02-13  1:00 UTC (permalink / raw)
  To: emacs-devel; +Cc: Eli Zaretskii

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

Someone on help-gnu-emacs asked whether RMAIL could check for the
spamassassion spam headers and keep possible spam in a separate 
folder for later double-check.

Eli pointed on rmail-spam-filter.el, but currently it doesn't let the
user request a check on the X-Spam-Status header.

The patch below fix this.

If no objection, I will apply it tomorrow.


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

--- rmail-spam-filter.el.~1.19.~	2008-01-08 20:45:08.000000000 +0000
+++ rmail-spam-filter.el	2008-02-13 00:53:32.000000000 +0000
@@ -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

[-- Attachment #3: Type: text/plain, Size: 13 bytes --]


-- 
Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: rmail-spam-filter.el: also match
  2008-02-13  1:00 rmail-spam-filter.el: also match Bastien Guerry
@ 2008-02-13 22:01 ` Richard Stallman
  2008-02-13 22:11   ` Bastien Guerry
  2008-02-13 22:07 ` Bastien Guerry
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Stallman @ 2008-02-13 22:01 UTC (permalink / raw)
  To: Bastien Guerry; +Cc: eliz, emacs-devel

    If no objection, I will apply it tomorrow.

I have no objection to that patch, but one day is too fast.
Please always wait 4 days for possible objections
before you install.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: rmail-spam-filter.el: also match
  2008-02-13  1:00 rmail-spam-filter.el: also match Bastien Guerry
  2008-02-13 22:01 ` Richard Stallman
@ 2008-02-13 22:07 ` Bastien Guerry
  1 sibling, 0 replies; 5+ messages in thread
From: Bastien Guerry @ 2008-02-13 22:07 UTC (permalink / raw)
  To: emacs-devel; +Cc: Don Saklad, Eli Zaretskii

Bastien Guerry <bzg@altern.org> writes:

> Someone on help-gnu-emacs asked whether RMAIL could check for the
> spamassassion spam headers and keep possible spam in a separate 
> folder for later double-check.
>
> Eli pointed on rmail-spam-filter.el, but currently it doesn't let the
> user request a check on the X-Spam-Status header.
>
> The patch below fix this.
>
> If no objection, I will apply it tomorrow.

Applied.

-- 
Bastien




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: rmail-spam-filter.el: also match
  2008-02-13 22:01 ` Richard Stallman
@ 2008-02-13 22:11   ` Bastien Guerry
  2008-02-14 18:11     ` Richard Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien Guerry @ 2008-02-13 22:11 UTC (permalink / raw)
  To: emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     If no objection, I will apply it tomorrow.
>
> I have no objection to that patch, but one day is too fast.
> Please always wait 4 days for possible objections
> before you install.

Oops.  

I applied it before reading your email.  
I guess it is not useful to undo this tough.  

I will know for the next times and will remove this if asked again.

-- 
Bastien




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: rmail-spam-filter.el: also match
  2008-02-13 22:11   ` Bastien Guerry
@ 2008-02-14 18:11     ` Richard Stallman
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2008-02-14 18:11 UTC (permalink / raw)
  To: Bastien Guerry; +Cc: emacs-devel

    I applied it before reading your email.  
    I guess it is not useful to undo this tough.  

There is no need to undo it unless there is an objection.
It seemed harmless to me.

    I will know for the next times.

Thank you.






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-14 18:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13  1:00 rmail-spam-filter.el: also match Bastien Guerry
2008-02-13 22:01 ` Richard Stallman
2008-02-13 22:11   ` Bastien Guerry
2008-02-14 18:11     ` Richard Stallman
2008-02-13 22:07 ` Bastien Guerry

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).