From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/54844 Path: main.gmane.org!not-for-mail From: lorentey@elte.hu (=?iso-8859-2?q?L=F5rentey_K=E1roly?=) Newsgroups: gmane.emacs.gnus.general Subject: spam.el: automatically resplitting ham in a spam group? Date: Wed, 19 Nov 2003 16:14:27 +0100 Sender: ding-owner@lists.math.uh.edu Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1069256708 26924 80.91.224.253 (19 Nov 2003 15:45:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 19 Nov 2003 15:45:08 +0000 (UTC) Original-X-From: ding-owner+M3384@lists.math.uh.edu Wed Nov 19 16:45:05 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 1AMUVt-0004he-00 for ; Wed, 19 Nov 2003 16:45:05 +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 1AMUUy-0005DH-00; Wed, 19 Nov 2003 09:44:08 -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 1AMU2T-0005Bc-00 for ding@lists.math.uh.edu; Wed, 19 Nov 2003 09:14:41 -0600 Original-Received: from eris.elte.hu (eris.elte.hu [157.181.150.146]) by justine.libertine.org (Postfix) with ESMTP id 906CB3A0045 for ; Wed, 19 Nov 2003 09:14:39 -0600 (CST) Original-Received: by eris.elte.hu (Postfix, from userid 1000) id 245637F816; Wed, 19 Nov 2003 16:14:27 +0100 (CET) Original-To: ding@gnus.org Face: iVBORw0KGgoAAAANSUhEUgAAADEAAAAwCAMAAACPHmKLAAAAM1BMVEU4AACgionl0MpnW1C5 e3yFUE23mnvxuLWCc2fcmpaukoGhaGllOTOTb2t6VlHfw6tRODF/A7ocAAAAAXRSTlMAQObYZgAA AAFiS0dEAIgFHUgAAAIeSURBVHic1ZbrcqswDITxBbANvrz/055dydCkYJL+PJpMyaT6sloJo0zT /xUp/SndhZDSsnwNIZ9IXRif04OGI7N8wzimp5QEU6LWR8A511WAdZH64Mf1kPyFGmLmQeTIPz2w ps+EdLZqkHhElEjJMKy1BzckmgDGuMYAqgx1HiQC8vcezSkzbjA9GMfcGSFQqIIMbQQTqDAfAQQy Y8IZJxUhdZMQpoWxjQK7BDTdKyOI/QLwGoo4c4tIS/fC2PKJgCES7IUprQM5s/z5JIjgP5jNBeDn yM+ltF0JFJez91m+DZ1/I8TBznpAqEb0ek1bUXl3IWAgb2f4GFFeySB7S9o7gR6Jh147rjFKf7cY s2jsv5xzbCUbcxIxrpFvoxL7hZhQPglzEisiyl+Piu6I+YfYlJB0EnJTXic4o08C9JmDIGZJzLcE OmtEQ24ntkAJu26c+xWgE6nqpb2AQEQSdwBaLERmdCNKRD8ApoYjbjh0NRIrOksfax4AUzNCzMf9 npIQcZSPh7QSejrw/Zg3nA8FEEYJHbvMfFmv5+JCmBeCI38CDo2sRcFxrav5LCFGvFfgaQ9036JB Fbmn7AAwUDZYAIcGTtacF5R1/9CxkoXskwil4HjlNFpn1v4mMHQeeQA23c0Cz25FQsinEdRFoC7p 5ncA1goXTJDXj/dUuW9uN60lYl7y+V6JemzCK2Frklj0ApGUuDYO4q3J/wDffCXdfiy3fgAAAABJ RU5ErkJggg== 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:54844 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:54844 I may have missed something obvious, but is there a way to automatically resplit the ham that I find in a spam group? Currently they all go to a designated mail group and then just sit there until I remember to resplit them by hand, which kind of works, but is not very nice. More details: My mail splitting is handled entirely by Gnus. For spam filtering, I use Bogofilter, which is run by Gnus' spam.el during the splitting. All spam candidates discovered by spam-split are stored in a spam group named nnml+mail:mail.spam.candidates. This candidates group has no spam processor, but it has a spam destination for the really hardcore spam group, nnml+mail:mail.spam.proven, which has its spam process set to feed all spam to Bogofilter's magical spam analysis algorithms. My real mail groups also move their spam to mail.spam.proven, and that is the only mail group with a spam exit processor. The idea is that spam is only fed to Bogofilter if I had a chance to look at it, either by spotting it as a false negative in a normal mailgroup, or by leaving its spam mark set while browsing for false positives in mail.spam.candidates. By having two spam groups, I can avoid ever having to deal with the same spam twice, which is important to me. I also like having all my spam tidily collected in a single group, hence mail.spam.proven instead of just expiring the messages in whatever group they first appeared in. I think all this is not unsimilar to some previously discussed configurations. Does this sound all right to you, or is this setup a perverse hack of the delicate instrument that is spam.el? :-) My problem is what to do with false positives in mail.spam.candidates. When I mark them as ham and exit the candidates group, I would like to have them (1) unregistered as spam (if needed), (2) registered as ham, and (3) re-fed to the mail split mechanism as if the message had just arrived in my inbox. I understand that (1) will be solved elegantly with the registry, and I am happy to wait for it. I have already solved (2) by setting spam-process-ham-in-spam-groups to t, and setting up ham exit processors for my spam groups. But I could not find an easy solution for (3): I have even considered setting up an nnmaildir group, and then adding its directory to my mail-sources, but that practice is explicitly discouraged in the manual, so I hesitate to do that. Could someone help me with this? For even more details, here is my config: (setq spam-use-bogofilter t) (setq gnus-spam-process-destinations '(("mail\\.spam" nil) ("mail\\." "nnml+mail:mail.spam.proven") ("list\\." "nnml+mail:mail.spam.proven"))) (setq spam-split-group "mail.spam.candidates") ;; Process ham in spam groups (to teach Bogofilter about false posi= tives). (setq spam-process-ham-in-spam-groups t) ;; Don't ignore the spam process destination of spam groups. (setq spam-move-spam-nonspam-groups-only nil) (spam-initialize) ;;; ... (defun lk-gnus-group-split-updated-hook () (setq nnmail-split-fancy (list '| ;; Get rid of spam. '("keywords" "CERN SpamKiller Note: [12][0-9]" "mail.spam.ca= ndidates") '(: spam-split) ;; Put followups into the same group their parents ar= e in. (: nnmail-split-fancy-with-parent) ;; Handle the rest. nnmail-split-fancy))) (add-hook 'gnus-group-split-updated-hook 'lk-gnus-group-split-updated-hook) (gnus-group-split-setup 'auto-update) The relevant group parameters for nnml+mail:mail.spam.candidates are: (spam-contents gnus-group-spam-classification-spam) (spam-process (gnus-group-ham-exit-processor-bogofilter)) (spam-process-destination . "nnml+mail:mail.spam.proven") (ham-process-destination . "nnml+mail:mail.ham.proven") The same for nnml+mail:mail.spam.proven: (spam-contents gnus-group-spam-classification-spam) (spam-process (gnus-group-spam-exit-processor-bogofilter gnus-group-ham-exit-processor-= bogofilter)) (spam-process-destination) (ham-process-destination . "nnml+mail:mail.ham.proven") (nnml+mail:mail.ham.proven is just a normal mail group without spam or ham classification.) --=20 K=E1roly