info-gnus-english
[Top][All Lists]
Advanced

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

Re: How to combine spam-split with Subject filtering.


From: Ted Zlatanov
Subject: Re: How to combine spam-split with Subject filtering.
Date: Tue, 08 Feb 2005 14:24:25 -0500
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux)

On Wed, 12 Jan 2005, oub@mat.ucm.es wrote:

> Finally I got my BBDB and spam-stat based spam filtering to work for
> my imap server. Now my university provides finally its own spam
> filter, which add to possible spam at the beginning of the Subject the
> phrase:
> [SPAM POSIBLE:]
> 
> So I would like to take care of this in the splitting process, and
> split every mail with this subject into a different imap folder so I
> thought the following setting should work:
> (setq
>  nnimap-split-rule  'nnimap-split-fancy
>  nnimap-split-inbox "INBOX"
>  nnimap-split-fancy
>  '(|
>    ("Subject" "[POSIBLE SPAM]:" "SPAM.POSS")
>    (: setq spam-use-BBDB-exclusive nil)
>    (: spam-split 'spam-use-BBDB 'spam-use-stat "SPAM.REAL")
>    (: setq spam-use-BBDB-exclusive t fake-variable nil)
>    (: spam-split 'spam-use-BBDB "SPAM.HAM")
>    (: setq spam-use-BBDB-exclusive nil)
>    "MAILBOX")) 
> 
> it did not however. What do I miss.

You could use spam-use-regex-headers.  Add an entry to the
spam-regex-headers-spam list to match your subject.  The check will be
done against the headers as a whole using re-search-forward so just
escape the brackets appropriately.

It would be nice if in addition to "Subject" we had "Subject+raw" as
an alternative in case the user wants an exact match without regular
expressions (ditto for all the other special headers that can be used,
e.g. "From+raw").  Then "[POSSIBLE SPAM]" would just match, without
the confusion about regex escaping and word boundaries.

Ted

reply via email to

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