🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #34141

INN filter_innd.pl only about 50 % efficient

#34141
From: Wolfgang Schelongowski
Date: Tue, 29 Dec 1998 00:00
64 lines
2753 bytes
My filter_innd.pl has only been efficient to 30 to 50 % since whenever
I tried to experiment with it, i.e. it rejects about a third or half
of what it should. The lines in the logs like
 <date etc.> closed ... accepted 2060 refused 272 rejected 1107
appear to be consistent with what lands in the spool/in.coming/bad.

I have appended a tiny filter_inn.pl with which I could reproduce the
effect - the real one is larger, of course.

Please e-mail replies, too, because under current conditions Usenet
is rather unreliable. (Reply-To: _does_ work)


Linux 2.0.32 (nearly unmodified), inn-1.7.2.insync-1.1d, 
article batches injected by rnews.

From config.data:
 PERL_SUPPORT            DO
 PERL_LIB        -rdynamic  -L/usr/local/lib /usr/lib/perl5/i586-linux/5.00404/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/i586-linux/5.00404/CORE -lperl -ldl -lm -lc
 PERL_INC        -I /usr/lib/perl5/i586-linux/5.00404/CORE
 _PATH_PERL_STARTUP_INND         /usr/lib/news/bin/control/startup_innd.pl
 _PATH_PERL_FILTER_INND          /usr/lib/news/bin/control/filter_innd.pl
 _PATH_PERL_FILTER_NNRPD         /usr/lib/news/bin/control/filter_nnrpd.pl


$ perl -MExtUtils::Embed -e ldopts
-rdynamic  -L/usr/local/lib /usr/lib/perl5/i586-linux/5.00404/auto/DynaLoader/DynaLoader.a -L/usr/lib/perl5/i586-linux/5.00404/CORE -lperl -ldl -lm -lc

filter_inn.pl:
%reject = (
   'Newsgroups'    => {
      'news.software.nntp,alt.gothic'      => 'Xgroup5 (27.12.98)'
   }
);

sub filter_art {
        my ($rval) = ("") ; # Assume we'll accept. Cannot be `0'

        my ($i, $j, $k, $l) = ('', '', '', '', '');

        while (($i, $j) = each %reject) {
           while (($k, $l) = each %{$j}) {
              if ($hdr{$i} =~ /$k/i) {
                 $rval = $l;
                 goto the_end;
              }
           }
        }
the_end:

        undef %hdr;
        return $rval ;
}





-- 
"You did this to people because they stole your _hat_? What do you do
if they spit in your eye, blow up the country?"
  -- Terry Pratchett, The Last Continent

Technical Details
Message-ID: <76b9jm$e8o$1@xivic.ruhr.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <76b9jm$e8o$1@xivic.ruhr.de>
Subject: INN filter_innd.pl only about 50 % efficient
Date: Tue, 29 Dec 1998 00:00:00 +0000
From: SKaranyi@LOCALHOST.ruhr.de (Wolfgang Schelongowski)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 426872680
X-Advice: Replace LOCALHOST/GAMES with xivic for faster delivery
Organization: Private site in Germany
Reply-To: Skaranyi@GAMES.ruhr.de (Wolfgang Schelongowski)
Newsgroups: news.software.nntp