๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #84145

Re: Cleanfeed and headers.

#84145
From: D. Stussy
Date: Sun, 26 Jun 2011 03:19
34 lines
2636 bytes
"Ralf Dรถblitz" <doeblitz@doeblitz.net> wrote in message
news:iu50nm$ktp$1@selene.doeblitz.net...
> D. Stussy <spam+newsgroups@bde-arc.ampr.org> wrote:
> > As I understand how headers are stored under perl and the cleanfeed
filter,
> > it's an associative array, with the header name as the "index."
>
> Usually this is called a "hash".
>
> >  However,
> > does that permit an easy way to determine whether a header exists when
> > using a regex to match the header name, not knowing the specific header
> > name in advance?  All I can think of is a loop cycling through the
array,
> > testing for a match one at a time.  Perl is known for efficiency better
> > than that, so is there a better way?
>
> You can get a list of all hash keys with
>   keys %whatever_your_hash_is_named
> and thus can subsequently filter this list with
>   grep { /you_regex/ }
> rendering a list of matching hash keys which can then be processed any
> way you like (count it, e.g.).

1) Thank you for letting me know that there is a way.  I'll look into it.
(Perl was created after I got my CompSci degree, so I never learned it in
school, etc....)

2)  The next question is:  Should I be looking to filter these obnoxious
custom headers that some are using?  So far, I've received answers for both
sides of the argument but nothing persuasive.  I know there's alot of raw
garbage on Usenet, but how much "cleaning" is too much?

Technical Details
Message-ID: <iu68e4$gud$1@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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.snarked.org!pool-71-106-211-51.lsanca.dsl-w.verizon.net!not-for-mail
References: <iu1bv3$o9b$1@snarked.org> <iu50nm$ktp$1@selene.doeblitz.net>

Show Full Headers
Complete Article Headers
Message-ID: <iu68e4$gud$1@snarked.org>
Subject: Re: Cleanfeed and headers.
Date: Sat, 25 Jun 2011 20:19:44 -0700
From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.org>
References: <iu1bv3$o9b$1@snarked.org> <iu50nm$ktp$1@selene.doeblitz.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!num2.nntp.dca.giganews.com!num1.nntp.dca.giganews.com!number.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.snarked.org!pool-71-106-211-51.lsanca.dsl-w.verizon.net!not-for-mail
Newsgroups: news.software.nntp
Lines: 34
Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org>
Injection-Date: Sun, 26 Jun 2011 03:18:28 +0000 (UTC)
Injection-Info: snarked.org;
 posting-host="pool-71-106-211-51.lsanca.dsl-w.verizon.net:71.106.211.51";
 logging-data="17357"; mail-complaints-to="newsmaster+complaints@snarked.org"
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478