🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80794

Re: INND NNTP-Posting-Host

#80794
From: gabrix
Date: Tue, 28 Apr 2009 18:41
53 lines
2587 bytes
Steve Crook wrote:
> On Tue, 28 Apr 2009 01:11:20 +0000 (UTC), Gab wrote in
> Message-Id: <100a1ed66b4e677671a2a84aaedd6c70$1@www.gabrix.ath.cx>:
> 
>> Hi all!
>> I'm trying this script taken here 
>> https://www.autistici.org/it/stuff/network_howto/newsserver/filter_nnrpd 
>> which should anonymize users server.
>> I don't know perl and innd refuses to load the script
> 
> I use this little script.  It doesn't remove the NNTP-Posting-Host
> header but does a one-way hash with some added salt.  I prefer this to
> completely removing the header as it maintains linkability and hence
> filterability.
> 
> use strict;
> use Digest::MD5;
> our (%hdr, $modify_headers);
> 
> sub filter_post {
> 
>     # Hash the NNTP-Posting-Host header
>     my $ctx = Digest::MD5->new;
>     $ctx->add($hdr{'NNTP-Posting-Host'});
>     $ctx->add("Would you like some salt with that?");
>     $hdr{'NNTP-Posting-Host'} = $ctx->hexdigest;
>     undef $hdr{'X-Trace'};
> 
>     # Refuse these From addresses
>     if ($hdr{From} =~ /(
>         \@darkshado\.ca
>     |   arcturianone\@earthlink\.net
>     )/ix) {
>         return "Sender address ($1) is blacklisted";
>     };
> 
>     # Blacklist these groups
>     if ($hdr{Newsgroups} =~ /(
>         rec\.radio\.amateur\.policy
>     |   hr\.alt\.trash
>     )/x) {
>         return "Posting to $1 is currently blocked";
>     };
> 
>     $modify_headers = 1;
>     return '';
> }
> 

Nop !!!!

> Apr 28 20:40:37 news innd: SERVER perl filter not defined
Technical Details
Message-ID: <gt7im5$5fl$1@news.gabrix.ath.cx>
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!nntp.giganews.com!news.mixmin.net!news.gabrix.ath.cx!not-for-mail
References: <100a1ed66b4e677671a2a84aaedd6c70$1@www.gabrix.ath.cx> <slrngveep8.99p.steve@news.mixmin.net>

Show Full Headers
Complete Article Headers
Message-ID: <gt7im5$5fl$1@news.gabrix.ath.cx>
Subject: Re: INND NNTP-Posting-Host
Date: Tue, 28 Apr 2009 20:41:57 +0200
From: gabrix <gabrix@gabrix.ath.cx>
References: <100a1ed66b4e677671a2a84aaedd6c70$1@www.gabrix.ath.cx> <slrngveep8.99p.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!nntp.giganews.com!news.mixmin.net!news.gabrix.ath.cx!not-for-mail
Newsgroups: news.software.nntp
Organization: Noauth
Lines: 53
Reply-To: gabrix@gabrix.ath.cx
NNTP-Posting-Host: 33680209a8c9620e6c5af09a322d1b60
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@gabrix.ath.cx
NNTP-Posting-Date: Tue, 28 Apr 2009 18:42:13 +0000 (UTC)
In-Reply-To: <slrngveep8.99p.steve@news.mixmin.net>
User-Agent: Thunderbird 2.0.0.21 (X11/20090302)