From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/73821 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.gnus.general Subject: Re: SPAM in spam group is processed into that exact same group Date: Wed, 03 Nov 2010 17:39:52 +0100 Message-ID: <87aalqnyxz.fsf@thinkpad.tsdh.de> References: <87ocan4cis.fsf@thinkpad.tsdh.de> <87tykbj4of.fsf@thinkpad.tsdh.de> <87iq0q3xzx.fsf@lifelogs.com> <87tykaf37y.fsf@thinkpad.tsdh.de> <87fwvu2f9m.fsf@lifelogs.com> <878w1lxwnm.fsf@thinkpad.tsdh.de> <874oc8zzqp.fsf@lifelogs.com> <874oc8ua5o.fsf@thinkpad.tsdh.de> <87tyk8x03w.fsf@lifelogs.com> <87fwvsis21.fsf@thinkpad.tsdh.de> <871v7bmt8w.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1288802470 14631 80.91.229.12 (3 Nov 2010 16:41:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 3 Nov 2010 16:41:10 +0000 (UTC) Cc: ding@gnus.org To: Ted Zlatanov Original-X-From: ding-owner+M22190@lists.math.uh.edu Wed Nov 03 17:41:06 2010 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PDgOX-0008J3-7t for ding-account@gmane.org; Wed, 03 Nov 2010 17:41:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PDgNU-00055J-0u; Wed, 03 Nov 2010 11:40:00 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PDgNR-000553-U4 for ding@lists.math.uh.edu; Wed, 03 Nov 2010 11:39:57 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PDgNP-0008SA-JC for ding@lists.math.uh.edu; Wed, 03 Nov 2010 11:39:57 -0500 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1PDgNO-0001js-00 for ; Wed, 03 Nov 2010 17:39:54 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 4AFC578014AC; Wed, 3 Nov 2010 17:39:54 +0100 (CET) Original-Received: from deliver.uni-koblenz.de ([127.0.0.1]) by localhost (deliver.uni-koblenz.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00678-01; Wed, 3 Nov 2010 17:39:53 +0100 (CET) X-CHKRCPT: Envelopesender noch tassilo@member.fsf.org Original-Received: from thinkpad.tsdh.de (tsdh.uni-koblenz.de [141.26.67.142]) by deliver.uni-koblenz.de (Postfix) with ESMTP id 2594F78014AA; Wed, 3 Nov 2010 17:39:53 +0100 (CET) In-Reply-To: <871v7bmt8w.fsf@lifelogs.com> (Ted Zlatanov's message of "Wed, 27 Oct 2010 12:37:51 -0500") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) X-Virus-Scanned: amavisd-new at uni-koblenz.de X-Spam-Score: -4.9 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:73821 Archived-At: Ted Zlatanov writes: Hi Ted, >>> Try the attached patch, it just prefilters the groups list. > > TH> No, it doesn't seem to work correctly. Now the message was copied > TH> successfully to INBOX.training.ham but the copy to my INBOX (which > TH> should have been a move anyway) failed. > > Can you trace `spam-copy-or-move-routine' as it walks through the > articles and groups? Also set `gnus-verbose' to 10 so you'll see the > debug messages in `spam-copy-or-move-routine'. Your settings may be a > little unusual so I can't replicate the problem here. Ok, here we go. In "nnimap+Fastmail:INBOX.Junk Mail" I mark one spam article as read, to indicate a false positive that should be copied/moved to my INBOX.training.ham an INBOX. Here's the output: --8<---------------cut here---------------start------------->8--- 20101103T172621.741> Exiting summary buffer and applying spam rules 20101103T172621.746> Registering 1 specific articles as ham using backend spam-use-move 20101103T172621.747> Copying article 11958 to group nnimap+Fastmail:INBOX.training.ham 20101103T172621.748> Copying to nnimap+Fastmail:INBOX.training.ham: (11958)... 20101103T172622.593> No more newsgroups 20101103T172622.595> Deleting article 11958 20101103T172622.945> Copying article 11958 to group nnimap+Fastmail:INBOX 20101103T172622.945> Copying to nnimap+Fastmail:INBOX: (11958)... 20101103T172622.951> *nnimap*<1> killed 20101103T172622.951> Couldn't Copy article 11958: *nnimap*<1> killed 20101103T172622.952> No more newsgroups 20101103T172622.952> Deleting article 11958 20101103T172623.153> 1 ham messages were registered by backend spam-use-move. 20101103T172623.155> Expiring articles... 20101103T172623.369> Expiring articles...done 20101103T172623.473> No more unread newsgroups --8<---------------cut here---------------end--------------->8--- Looking at the code, it seems to me that the (setq deletep t) in the copying part is wrong, isn't it? I mean, if you want to put false positives/negatives in N groups, you first copy N-1 times (without deletion) and then move 1 time (which includes deletion), right? --8<---------------cut here---------------start------------->8--- ;; else, we are not respooling (if (or (not backend-supports-deletions) (> (length groups) 1)) (progn ; if copying, copy and set deletep (gnus-message 9 "Copying article %d to group %s" article group) (gnus-summary-copy-article nil group) (setq deletep t)) (gnus-message 9 "Moving article %d to group %s" article group) (gnus-summary-move-article nil group))))) ; else move articles --8<---------------cut here---------------end--------------->8--- > TH> BTW: I cannot figure out exactly how to mark a false positive in a spam > TH> group as ham. I always remove the spam mark (or all marks) using M-u, > TH> but that alone doesn't make the article moved away on exit. I somehow > TH> need to reopen that group, read the message and exit summary again. How > TH> is it meant to be? > > You have to mark it with at least one ham-mark. Those are defined as > group/topic parameters in gnus.el with the default: > > '((".*" ((gnus-del-mark gnus-read-mark gnus-killed-mark gnus-kill-file-mark gnus-low-score-mark)))) > > I should really add gnus-ticked-mark to that default list, btw. Do you agree? I agree. But I still have a hard time marking false positives in "INBOX.Junk Mail", because it seems new mail in that group is not automatically marked as spam. But I have (setq gnus-spam-newsgroup-contents '(("\\(spam\\|Junk\\)" gnus-group-spam-classification-spam))) which says that new messages would be marked according the classification on summary entry. That seems to work fine for the group nnimap+Uni:Junk but not for nnimap+Fastmail:INBOX.Junk Mail although the regexp matches both. In the latter, the articles are only marked expirable. Maybe that's a server side issue? Bye, Tassilo