/[emacs]/emacs/lisp/mh-e/mh-junk.el
ViewVC logotype

Diff of /emacs/lisp/mh-e/mh-junk.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by lute, Mon Jul 4 17:15:52 2005 UTC revision 1.9 by deego, Sun Sep 18 12:48:32 2005 UTC
# Line 63  For more information about using your pa Line 63  For more information about using your pa
63                                 (substring mh-junk-disposition 1)))                                 (substring mh-junk-disposition 1)))
64                        (t (concat "+" mh-junk-disposition)))))                        (t (concat "+" mh-junk-disposition)))))
65        (mh-iterate-on-range msg range        (mh-iterate-on-range msg range
66          (message (format "Blacklisting message %d..." msg))          (message "Blacklisting message %d..." msg)
67          (funcall (symbol-function blacklist-func) msg)          (funcall (symbol-function blacklist-func) msg)
68          (message (format "Blacklisting message %d...done" msg))          (message "Blacklisting message %d...done" msg)
69          (if (not (memq msg mh-seen-list))          (if (not (memq msg mh-seen-list))
70              (setq mh-seen-list (cons msg mh-seen-list)))              (setq mh-seen-list (cons msg mh-seen-list)))
71          (if dest          (if dest
# Line 87  The `mh-junk-program' option specifies t Line 87  The `mh-junk-program' option specifies t
87      (unless whitelist-func      (unless whitelist-func
88        (error "Customize `mh-junk-program' appropriately"))        (error "Customize `mh-junk-program' appropriately"))
89      (mh-iterate-on-range msg range      (mh-iterate-on-range msg range
90        (message (format "Whitelisting message %d..." msg))        (message "Whitelisting message %d..." msg)
91        (funcall (symbol-function whitelist-func) msg)        (funcall (symbol-function whitelist-func) msg)
92        (message (format "Whitelisting message %d...done" msg))        (message "Whitelisting message %d...done" msg)
93        (mh-refile-a-msg nil (intern mh-inbox)))        (mh-refile-a-msg nil (intern mh-inbox)))
94      (mh-next-msg)))      (mh-next-msg)))
95    
# Line 179  done by adding the following to your cro Line 179  done by adding the following to your cro
179          (msg-file (mh-msg-filename msg mh-current-folder))          (msg-file (mh-msg-filename msg mh-current-folder))
180          (sender))          (sender))
181      (save-excursion      (save-excursion
182        (message (format "Reporting message %d..." msg))        (message "Reporting message %d..." msg)
183        (mh-truncate-log-buffer)        (mh-truncate-log-buffer)
184        (call-process mh-spamassassin-executable msg-file mh-log-buffer nil        (call-process mh-spamassassin-executable msg-file mh-log-buffer nil
185                      ;;"--report" "--remove-from-whitelist"                      ;;"--report" "--remove-from-whitelist"
# Line 188  done by adding the following to your cro Line 188  done by adding the following to your cro
188            (message "Recategorizing this message as spam...")            (message "Recategorizing this message as spam...")
189            (call-process mh-sa-learn-executable msg-file mh-log-buffer nil            (call-process mh-sa-learn-executable msg-file mh-log-buffer nil
190                          "--single" "--spam" "--local" "--no-rebuild"))                          "--single" "--spam" "--local" "--no-rebuild"))
191        (message (format "Blacklisting message %d..." msg))        (message "Blacklisting message %d..." msg)
192        (set-buffer (get-buffer-create mh-temp-buffer))        (set-buffer (get-buffer-create mh-temp-buffer))
193        (erase-buffer)        (erase-buffer)
194        (call-process (expand-file-name mh-scan-prog mh-progs)        (call-process (expand-file-name mh-scan-prog mh-progs)
# Line 200  done by adding the following to your cro Line 200  done by adding the following to your cro
200            (progn            (progn
201              (setq sender (match-string 0))              (setq sender (match-string 0))
202              (mh-spamassassin-add-rule "blacklist_from" sender)              (mh-spamassassin-add-rule "blacklist_from" sender)
203              (message (format "Blacklisting message %d...done" msg)))              (message "Blacklisting message %d...done" msg))
204          (message (format "Blacklisting message %d...not done (from my address)" msg))))))          (message "Blacklisting message %d...not done (from my address)" msg)))))
205    
206  (defun mh-spamassassin-whitelist (msg)  (defun mh-spamassassin-whitelist (msg)
207    "Whitelist MSG with SpamAssassin.    "Whitelist MSG with SpamAssassin.
# Line 230  See `mh-spamassassin-blacklist' for more Line 230  See `mh-spamassassin-blacklist' for more
230          (message "Recategorizing this message as ham...")          (message "Recategorizing this message as ham...")
231          (call-process mh-sa-learn-executable msg-file mh-temp-buffer nil          (call-process mh-sa-learn-executable msg-file mh-temp-buffer nil
232                        "--single" "--ham" "--local --no-rebuild"))                        "--single" "--ham" "--local --no-rebuild"))
233        (message (format "Whitelisting message %d..." msg))        (message "Whitelisting message %d..." msg)
234        (setq from        (setq from
235              (car (mh-funcall-if-exists              (car (mh-funcall-if-exists
236                    ietf-drums-parse-address (mh-get-header-field "From:"))))                    ietf-drums-parse-address (mh-get-header-field "From:"))))
237        (kill-buffer nil)        (kill-buffer nil)
238        (unless (or (null from) (equal from ""))        (unless (or (null from) (equal from ""))
239          (mh-spamassassin-add-rule "whitelist_from" from))          (mh-spamassassin-add-rule "whitelist_from" from))
240        (message (format "Whitelisting message %d...done" msg)))))        (message "Whitelisting message %d...done" msg))))
241    
242  (defun mh-spamassassin-add-rule (rule body)  (defun mh-spamassassin-add-rule (rule body)
243    "Add a new rule to `~/.spamassassin/user_prefs'.    "Add a new rule to `~/.spamassassin/user_prefs'.

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26