🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80375

Re: Cleanfeed vs. "meow" groups.

#80375
From: D. Stussy
Date: Wed, 11 Mar 2009 21:05
77 lines
4471 bytes
"Steve" <steve@mixmin.net> wrote in message
news:slrngrffim.690.steve@news.mixmin.net...
> On Wed, 11 Mar 2009 10:40:52 +0000 (UTC), Steve wrote in
> Message-Id: <slrngrf59k.690.steve@news.mixmin.net>:
> > One solution I'm considering is merging @groups and @followups and
> > removing duplictates to create a @grfu.  Taking our previous examples:

I think that the merging of groups from "Newsgroups:" and "Followup-To:"
headers is dangerous.  Although currently, I don't see anything that uses
the actual list of followup groups, there are PLENTY of other things that
are using the COUNT of followup groups, and the merge could cause those
rules to fire.  They should be kept separately.  Even if you do merge, if
you store the count of followup groups in a variable, you need to make
certain the count happens BEFORE the merger.

My proposal, although not in diff format and not complete (I omitted the
code to count meow groups in followups), keeps the separation.  Have you
tried my code?

I assumed this would be included (which I now state; about line 530):

   for (@followups) {
       $fugr{meow}++ if $config{meow_ext_maxgroups}
            and /$config{meow_groups}/o;
   }

> The following diff shows some changes I'm trying, (against current svn).
> Currently this only alters the meow reject behaviour but can be easily
> extended to other filters if judged to be more appropriate.
>
> I've also added a fupcnt and a grpfupcnt, grpcnt already existed.  Don't
> know why there wasn't a fupcnt before as 'scalar @followups' was
> evaluated at numerous places throughout the code.
>
> Index: cleanfeed
> ===================================================================
> --- cleanfeed (revision 190)
> +++ cleanfeed (working copy)
> @@ -538,9 +538,14 @@
>      } else {
>          @followups = @groups;
>      }
> +    # Create a merged array of groups and followups with no duplicates
> +    my %merge = ();
> +    my @grpfup = grep { ! $merge{ $_ }++ } (@groups, @followups);
>
>      # Count the number of groups in the distribution
>      $grpcnt = scalar @groups;
> +    $fupcnt = scalar @followups;
> +    $grpfupcnt = scalar @grpfup;
>
>      trimhashes() if $now - $Last_Trim >= $config{trim_interval};
>      writestats() if $now - $Last_Stats >= $config{stats_interval};
> @@ -570,8 +575,6 @@
>              and /$config{spam_report_groups}/o;
>          $gr{low_xpost}++ if $config{low_xpost_groups}
>              and /$config{low_xpost_groups}/o;
> -        $gr{meow}++ if $config{meow_groups}
> -            and /$config{meow_groups}/o;
>          $gr{no_cancel}++ if $config{no_cancel_groups}
>              and /$config{no_cancel_groups}/o;
>          $gr{test}++ if /$config{test_groups}/o;
> @@ -585,6 +588,12 @@
>          }
>      }
>
> +    # Check Newsgroups and Followup-To groups in the message
> +    for (@grpfup) {
> +        $gr{meow}++ if $config{meow_groups}
> +            and /$config{meow_groups}/o;
> +    };
> +
>      # these only count if all groups match
>      $gr{skip} = ($gr{skip} == $grpcnt);
>      $gr{fslskip} = ($gr{fslskip} == $grpcnt);

Technical Details
Message-ID: <gp9965$o14$1@aux.snarked.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder1.news.weretis.net!weretis.net!news.snarked.org!not-for-mail
References: <gp4b26$nl3$1@aux.snarked.org> <slrngrci3q.6et.steve@news.mixmin.net> <slrngrcsmp.6et.steve@news.mixmin.net> <gp6q98$k66$1@aux.snarked.org> <slrngrf59k.690.steve@news.mixmin.net> <slrngrffim.690.steve@news.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <gp9965$o14$1@aux.snarked.org>
Subject: Re: Cleanfeed vs. "meow" groups.
Date: Wed, 11 Mar 2009 14:05:57 -0700
From: "D. Stussy" <spam@bde-arc.ampr.org>
References: <gp4b26$nl3$1@aux.snarked.org> <slrngrci3q.6et.steve@news.mixmin.net> <slrngrcsmp.6et.steve@news.mixmin.net> <gp6q98$k66$1@aux.snarked.org> <slrngrf59k.690.steve@news.mixmin.net> <slrngrffim.690.steve@news.mixmin.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!feeder1.news.weretis.net!weretis.net!news.snarked.org!not-for-mail
Newsgroups: news.software.nntp
Lines: 77
Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org>
NNTP-Posting-Host: pool-71-106-211-188.lsanca.dsl-w.verizon.net
X-Trace: aux.snarked.org 1236805637 24612 71.106.211.188 (11 Mar 2009 21:07:17
 GMT)
X-Complaints-To: newsmaster@snarked.org
NNTP-Posting-Date: Wed, 11 Mar 2009 21:07:17 +0000 (UTC)
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478
X-Original-Bytes: 4265