🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80367

Re: Can Cleanfeed filter on a specific user?

#80367
From: Son of Serpent Esq
Date: Wed, 11 Mar 2009 02:40
46 lines
2497 bytes
John F. Morse wrote:
> This is similar to what Steve recommended for multiple bad guys:
>
>
> if ($hdr{'From'} =~ /
>         steve\@mixmin\.net      # Troll
>     |   example\@invalid\.org   # Flooder
>     |   \@baddomain.com         # Shoe sales
> /x) {
>
>
> I did try the above, but perl -wc reports a syntax error that I couldn't 
> find/fix. Maybe it was a missing curly bracket?

You would just need to add what to do when one of those conditions
matches. Here's what I do:

###
 if ($hdr{'From'} =~ /
         steve\@mixmin\.net      # Troll
     |   example\@invalid\.org   # Flooder
     |   \@baddomain.com         # Shoe sales
 /x) {
 saveart('local.reject.from');
   if ($hdr{Path} =~ /^not\-for\-mail$/) { 
   return reject('Please read *local group here* '); 
   }; # end path check
 }; # end reject from
###

I do the path check for local posts "not-for-mail" because I'm 
not trying to save usenet and just want to make sure stuff I 
consider abuse does not originate from my site.

And I don't want to reject anything posted to my local groups so I
put everything between:

 if ($hdr{Newsgroups} !~ /^mylocalgroups/) {
 
  #  All my filters are inside here.

 );

This leaves the option open to discuss any problems in my local
groups. Just in case I screw something up. ;)
Technical Details
Message-ID: <gp78bq$be0$4@tioat.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!goblin3!goblin.stu.neva.ru!tioat.net!not-for-mail
References: <gou9pu$a8c$1@optima7.xanadu-bbs.net> <gp3fbd$k29$1@optima7.xanadu-bbs.net> <gp4hp7$u1j$1@puck.litech.org> <gp4jp2$tc5$1@optima7.xanadu-bbs.net> <gp7244$ut5$1@puck.litech.org> <gp73uj$ic1$1@optima7.xanadu-bbs.net>

Show Full Headers
Complete Article Headers
Message-ID: <gp78bq$be0$4@tioat.net>
Subject: Re: Can Cleanfeed filter on a specific user?
Date: Wed, 11 Mar 2009 02:40:58 +0000
From: Son of Serpent Esq <junior@tioat.net>
References: <gou9pu$a8c$1@optima7.xanadu-bbs.net> <gp3fbd$k29$1@optima7.xanadu-bbs.net> <gp4hp7$u1j$1@puck.litech.org> <gp4jp2$tc5$1@optima7.xanadu-bbs.net> <gp7244$ut5$1@puck.litech.org> <gp73uj$ic1$1@optima7.xanadu-bbs.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!goblin3!goblin.stu.neva.ru!tioat.net!not-for-mail
Newsgroups: news.software.nntp
Organization: Serpent and Son - Garden Supplies and Lawn Mower Repair
Lines: 46
NNTP-Posting-Host: 0x12768570C1B9C0EB
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: news@tioat.net or http://tioat.net/nntp-contact
NNTP-Posting-Date: Wed, 11 Mar 2009 02:40:58 +0000 (UTC)
X-Original-Bytes: 2273