From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/55070 Path: main.gmane.org!not-for-mail From: Xavier Maillard Newsgroups: gmane.emacs.gnus.general Subject: Re: Spam/Ham training Date: Wed, 03 Dec 2003 00:57:46 +0100 Organization: GNU Rox ! Sender: ding-owner@lists.math.uh.edu Message-ID: References: <4nhe0kfdt0.fsf@lockgroove.bwh.harvard.edu> <87d6b7oxrm.fsf@everett.mit.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1070409482 14033 80.91.224.253 (2 Dec 2003 23:58:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2003 23:58:02 +0000 (UTC) Original-X-From: ding-owner+M3610@lists.math.uh.edu Wed Dec 03 00:57:59 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ARKP1-0002B9-00 for ; Wed, 03 Dec 2003 00:57:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1ARKOv-0004wj-00; Tue, 02 Dec 2003 17:57:53 -0600 Original-Received: from justine.libertine.org ([66.139.78.221] ident=postfix) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1ARKOo-0004vz-00 for ding@lists.math.uh.edu; Tue, 02 Dec 2003 17:57:46 -0600 Original-Received: from smtp.gnu-rox.org (rms.gnu-rox.org [213.41.134.247]) by justine.libertine.org (Postfix) with ESMTP id AE6963A0073 for ; Tue, 2 Dec 2003 17:57:45 -0600 (CST) Original-Received: from totoz.gnu-rox.org.gnu-rox.org (totoz.gnu-rox.org [10.0.0.3]) by smtp.gnu-rox.org (Postfix) with ESMTP id 8C5C83E13B for ; Wed, 3 Dec 2003 00:57:45 +0100 (CET) Original-To: ding@gnus.org X-Whatever: no X-Url-GnusFr: http://www.gnusfr.org X-Url-EmacsFr: http://www.emacsfr.org X-In-No-Sense: Nonsense X-Home-Page: http://www.gnu-rox.org/~zedek/cgi-bin/wiki.pl X-Gpg-Key-ID: 1E028EA5 X-Gpg-Fingerprint: FDB0 EE1F 33E5 8C22 5E3E 96E7 6900 CA9B 1E02 8EA5 X-Gpg-Affinity: Will accept encrypted message for GNUpg X-Face: 63TbQAY?C>dKDtNNr7 (David Z. Maze's message of "Tue, 02 Dec 2003 13:55:09 -0500") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:55070 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:55070 David Z Maze disait r=E9cemment que : > Ted Zlatanov writes: > >> I am considering adding spam *recognition* when you enter a group, >> which would be useful for NNTP groups which have no splitting. >> Unseen articles would be checked against a blacklist, for instance. > > Oh, I already have code to do that; I don't use it for nntp, but I do > use it for another [MIT-local] read-only backend. > > ;; Look for spam in discuss groups. > (defun dzm-gnus-find-spam () > (mapcar > (lambda (article) > (let ((split-group > (with-temp-buffer > (gnus-request-article-this-buffer article gnus-newsgroup-name) > (spam-split)))) > (if (equal split-group spam-split-group) > (gnus-summary-mark-article article gnus-spam-mark)))) > gnus-newsgroup-articles)) > > (defun dzm-gnus-nndsc-spam () > (if (equal (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnds= c) > (dzm-gnus-find-spam))) > > (add-hook 'gnus-summary-prepare-hook 'dzm-gnus-nndsc-spam) > ...so the core of this, in dzm-gnus-find-spam, downloads each article > in turn into a temporary buffer, calls spam-split, and sees if the > result is spam-split-group; if so, it marks the message as spam. This > seems to work pretty well in practice. Thanx, I will try this solution as well. /me is really fed up with the huge number of spam he receives those days ! zeDek