From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/4438 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.user Subject: Re: How to combine spam-split with Subject filtering. Date: Tue, 08 Feb 2005 14:24:25 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <4nhdkmvora.fsf@lifelogs.com> References: <86zmzeqwcs.fsf@mat.ucm.es> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138670353 23237 80.91.229.2 (31 Jan 2006 01:19:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:19:13 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:33:46 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-X-Trace: individual.net Z+IhOwnzW+imnJ0UPlpOdwOX9PVPQ2C5DTnYMpyu31bUs+aJ+h X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:YCd6LqCyAfuDKeg1tgy3HZum/P8= Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:4579 Original-Lines: 38 X-Gnus-Article-Number: 4579 Tue Jan 17 17:33:46 2006 Xref: news.gmane.org gmane.emacs.gnus.user:4438 Archived-At: 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