🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #84140

Cleanfeed and headers.

#84140
From: D. Stussy
Date: Fri, 24 Jun 2011 06:49
18 lines
2038 bytes
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."  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?

Why do I ask?  Because some (well, at least one) of our trolls out there
have resulted to using headers like "X-.*f.ck.*" (replace the lone period
with "u") and other nasty words which would never appear in any "legitimate
use" extended header.  Although posted to some of the "sewer" groups, I am
of the opinion that perhaps accepting such is accepting too much,
especially when one has 20+ of those headers in a single message.

Thoughts?

Technical Details
Message-ID: <iu1bv3$o9b$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!border1.nntp.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news.snarked.org!pool-71-106-211-51.lsanca.dsl-w.verizon.net!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <iu1bv3$o9b$1@snarked.org>
Subject: Cleanfeed and headers.
Date: Thu, 23 Jun 2011 23:49:15 -0700
From: "D. Stussy" <spam+newsgroups@bde-arc.ampr.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.dca3.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!news.snarked.org!pool-71-106-211-51.lsanca.dsl-w.verizon.net!not-for-mail
Newsgroups: news.software.nntp
Lines: 18
Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org>
Injection-Date: Fri, 24 Jun 2011 06:48:03 +0000 (UTC)
Injection-Info: snarked.org;
 posting-host="pool-71-106-211-51.lsanca.dsl-w.verizon.net:71.106.211.51";
 logging-data="24875"; 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
X-Original-Bytes: 1792