[mew-int 2972] Re: killfile
Christophe TROESTLER <[email protected]> Wed, 02 Mar 2011 08:02:42 +0100 (CET)
| Newsgroups | gmane.mail.mew.general |
|---|---|
| Organization | Universite de Mons (http://math.umons.ac.be/an/) |
| Message-ID | <20110302.080242.43186197441501233.Christophe.Troestler@umons.ac.be> |
On Wed, 2 Mar 2011 00:18:10 +0100, maxigas wrote: > > From: Kazu Yamamoto () <[email protected]> > 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.