[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11.6 Spam messages

(1) In the case where a spam filter is running on your POP server or your IMAP server.

You can put the ‘D’ mark to spam messages while you are retrieving messages in +inbox or you are scanning messages in $inbox/%inbox.

If you use "bogofilter", put the following to your "~/.mew.el".

 
(defun mew-spam-bogofilter (val)
  (let ((case-fold-search t))
    (if (string-match "yes" val) ?D)))

(setq mew-inbox-action-alist
      '(("X-Bogosity:" mew-spam-bogofilter)))

If you want to put the ‘o’ mark so as to be refiled to the +spam folder, instead of putting to th ‘D’ mark, you should program the function as follows:

 
(defun mew-spam-bogofilter (val)
  (let ((case-fold-search t))
    (if (string-match "yes" val) "+spam")))

If you use "spamassassin", put the following to your "~/.mew.el".

 
(setq mew-spam: "X-Spam-Flag:")
(defun mew-spam-assassin (val)
  (let ((case-fold-search t))
    (if (string-match "yes" val) ?D)))

(setq mew-inbox-action-alist
      '(("X-Spam-Flag:" mew-spam-assassin)))

In the case where you want to use bsfilter, see a document in the bsfilter package.

(2) In the case where a spam filter is running in your IMAP server.

You can delete or move spam messages while you are scanning %inbox. If you use "bogofilter", put the following to your "~/.mew.el".

 
(setq mew-imap-spam-field "X-Bogosity")
(setq mew-imap-spam-word "Yes")

If ‘mew-imap-spam-folder’ or ‘mew-imap-trash-folder’ is defined, spam messages are moved to the folder. Otherwise, they are removed.

(3) In the case where you installed "bogofilter" in your local machine, you can put the ‘*’ mark to spam messages. First you need to install the following script, say "bogo":

 
#!/bin/sh

bogofilter -v -T -B $* | grep S

Type ‘?’ and ‘RET’, then specify "bogo", and spam messages are marked with ‘*’. After that, you may want to process them with ‘md’ + ‘x’.

(4) In the case where you use POP and a spam filter does not run on the POP server but you want to mark spam messages when retrieving

Since bsfilter can be a POP proxy server, you can implement your policy. See a document in the bsfilter package.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated by U-X61T\saito on June, 6 2008 using texi2html 1.78.