help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dotfile spam rmail emacs


From: John Paul Wallington
Subject: Re: dotfile spam rmail emacs
Date: Mon, 25 Aug 2003 02:23:30 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Don Saklad <address@hidden> wrote:

> It didn't work yet for emacs 20.7.2

How ?  What did you expect to happen and what happened instead ?

> when there now are these files in the home directory
> get-new-mail-for-spam-filter.el
> rmail-spam-filter.el

If you get "Cannot open load file" errors, then you have to add your
home directory to `load-path' like so:

(add-to-list 'load-path (expand-file-name "~"))

> and now in the file .emacs
>
> (setq rmail-use-spam-filter t)
>
> (load "rmail-spam-filter.el")
> (require 'rmail)
> (load "get-new-mail-for-spam-filter.el")

You also have to tell rmail-spam-library what is spam, which you do
by customizing the variable `rmail-spam-definitions-alist'.

My mail goes through a filter before I get it, which writes lots of
guff in the headers.  The spams have an X-Spam-Flag: YES header, so I
just use this:

(setq rmail-spam-definitions-alist
      '(((from . "") (to . "") (subject . "")
         (contents . "X-Spam-Flag: YES")
         (action . output-and-delete))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]