From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/69173 Path: news.gmane.org!not-for-mail From: Steinar Bang Newsgroups: gmane.emacs.gnus.general Subject: Re: filtering nntp messages Date: Sun, 25 Oct 2009 00:05:24 +0200 Organization: Probably a good idea Message-ID: References: <87fx9ayr7z.fsf@newsguy.com> <874oppivvc.fsf@topper.koldfront.dk> <87skd9en56.fsf@lifelogs.com> <87bpjxpnim.fsf@newsguy.com> <873a58q14l.fsf@newsguy.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1256422064 7275 80.91.229.12 (24 Oct 2009 22:07:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Oct 2009 22:07:44 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M17586@lists.math.uh.edu Sun Oct 25 00:07:38 2009 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.50) id 1N1olr-0008EU-V4 for ding-account@gmane.org; Sun, 25 Oct 2009 00:07:36 +0200 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 1N1olL-0007Fx-2F; Sat, 24 Oct 2009 17:07:03 -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 1N1olJ-0007Fo-PQ for ding@lists.math.uh.edu; Sat, 24 Oct 2009 17:07:01 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1N1olI-000409-23 for ding@lists.math.uh.edu; Sat, 24 Oct 2009 17:07:01 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1N1olH-0000Vo-00 for ; Sun, 25 Oct 2009 00:06:59 +0200 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1N1olG-0007zE-OT for ding@gnus.org; Sun, 25 Oct 2009 00:06:58 +0200 Original-Received: from cm-84.208.231.232.getinternet.no ([84.208.231.232]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Oct 2009 00:06:58 +0200 Original-Received: from sb by cm-84.208.231.232.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 25 Oct 2009 00:06:58 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 94 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.208.231.232.getinternet.no Mail-Copies-To: never User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:g/pz+05SzFvJyTUYA2jxRQaQPaI= X-Spam-Score: -2.8 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:69173 Archived-At: >>>>> Harry Putnam : > The rule ends up looking like: > (("from" > ("@[0-9]+\\.com>" -1 nil s))) Two things to mention: 1. s (as Adam mentioned), means it is a substring match, rather than a regexp match. An r at the end means it should be interpreted as a regexp 2. -1 is very little if you want to really zap it. nil here would mean the default negative score, which (I think) would be -1000 > I was shooting for matching any From: header with ATsign followed by 1 > or more digits followed by a dot followed by com> Should match reasonably well, if interpreted as a regexp... > It appears the vast majority of spam in comp.unix.shell has that > regexp in its `From:' line. But I think it would be quite rare for regular > folks to have that in their `From:' line. > If that regex does what I was shooting for, then from their how do I > get to where those are marked read? What I've done so far appears to > have had no effect on what I see when I open the group. > After creating the rule, I marked several hundred messages as unread, > left the group with ZZ and reopened it... I still see all the spam. > Nearly all those messages now have a Y on the left of summary line. It means that they have gotten a negative score, but not enough to zap them. -1000 or more would help. Here are the score settings from my ~/.gnus.el file. They are too old for me to remember what they actually mean... (setq gnus-thread-sort-functions '(gnus-thread-sort-by-number gnus-thread-sort-by-total-score)) (setq gnus-score-find-score-files-function 'gnus-score-find-hierarchical) (setq gnus-thread-score-function 'max) (setq gnus-use-scoring t) (setq gnus-use-adaptive-scoring nil) (setq gnus-decay-scores t) (defun gnus-set-score-limit () "Set the limit of when scored down articles are no longer displayed" (setq gnus-summary-expunge-below -1500)) (add-hook 'gnus-summary-mode-hook 'gnus-set-score-limit) I think what the expunge-below means is that I zap everything with a score lower than -1500. Here's myntp+news.gmane.org:SCORE file: (("from" ("Steinar Bang" nil nil s)) ("subject" ("^ANNOUNCE: " nil nil r) ("^ANN: " nil nil r) ("^\\[ANN] " nil nil r) ("^\\[SPAM] " -2000 nil r)) ("xref" ("gmane.spam.detected" -2000 nil s)) (decay 733571)) As you can see I zap two kinds of messages: - those that are spam-tagged by a mailing list's SpamAssassin - those that are detected by gmane's spamassassin, and crossposted to gmane.spam.detected Those messages that matche either, I never see. > Should I not see the spam now? No. You're not lowering the score enough, I think. And you don't expunge low scored messages. > Is my regexp messed up? If the above example is copy/pasted, your rexep is only interpreted as a substring match (strange that it should match so many articles then...? Not copy/pasted correctly...?) > How would I combine that rule with a more compound rule including some > other header? > If I go back into the group select a spam message and attempt to > create a filter on Subject (L s r p) after adjusting the regex and > press enter... the rule seems to just disappear. Opening the SCORE > file I see the same `From:' rule and nothing else. Hm... you should see the new rule added. That's what happens for me.