[mew-int 2972] Re: killfile

Christophe TROESTLER Christophe.Troestler at example.com
Wed Mar 2 16:02:42 JST 2011


On Wed, 2 Mar 2011 00:18:10 +0100, maxigas wrote:
>
> From: Kazu Yamamoto (山本和彦) <kazu at example.com>
> Subject: [mew-int 2969] Re: killfile
> Date: Mon, 28 Feb 2011 15:14:15 +0900 (JST)
>
> >> is there a killfile functionality in mew?
> >>
> >> i mean that i have a file with keywords like this:
> >>
> >> $ cat killfile.mew
> >> foo
> >> bar
> >> baz
> >> $
> >>
> >> and then if a mail contains the keywords foo, bar, or baz,
> >> then it is automatically deleted.
> >
> > How about this?
> >
> > 1) Put mark "*" by "?" or "k?" with keywords.
> > 2) Type "md" to convert "*" to "D"
> > 3) Type "x"
> >
> > --Kazu
>
> Interesting possibility, but I would rather need something
> more permament, that works like this:
>
> Once I put a word in the file, I will never have to see any
> message containing that word, and I will never have to push
> any more buttons to get rid of them.
>
> You see, this functionality was invented against trolls and
> spammers.

Why don't you use SpamAssassin or another spam filter?
http://www.askdavetaylor.com/how_do_i_add_custom_spamassassin_rules_f 
or_content_filtering.html

For SpamAssassin put

(setq mew-spam-prog "sa-learn")
(setq mew-spam-prog-args '("--spam" "--single"))
(setq mew-ham-prog "sa-learn")
(setq mew-ham-prog-args '("--ham" "--single"))

To get spam tagged messages to be deleted automatically, add:

(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)
	))

Best,
C.


More information about the Mew-int mailing list