πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80335

Re: Can Cleanfeed filter on a specific user?

#80335
From: John F. Morse
Date: Tue, 10 Mar 2009 15:03
42 lines
2818 bytes
Julien Γ‰LIE wrote:
> Hi John,
>
>>>>                    if ( $hdr{'From'} =~ /$from_name_here/ ) {
>>
>> I was just reading http://perldoc.perl.org/perlintro.html and 
>> couldn't see why the $ was used since this is not a variable.
>
> In which *regular expression pattern* do you see that on that page?
>

I was referring to the above regex: "/$from_name_here/" which, in my 
case, I use a real name and not a variable. Something like:

if ( $hdr{'From'} =~ /john/ ) {

No "@" nor domain required because the actual name I'm trying to filter 
is not a simple "john" but very unique.

Therefore it is highly unlikely any other like-named poster would have 
articles rejected.

I guess I could use a full e-mail address to eliminate any possibility.

Further reading and thinking makes me wonder if I shouldn't be using 
something like this:

if ( $hdr{'From'} =~ /^john/ ) {

So any following text, like the "@domain" wouldn't matter. Comments?

BTW, "reading and thinking" can also be defined as "muddying up the water"!

Right now this is as clear as mud. ;-)


-- 
John 

No Microsoft, Apple, AT&T, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.

The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Technical Details
Message-ID: <gp5vfa$8nh$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!goblin1!goblin.stu.neva.ru!nntp.club.cc.cmu.edu!74.222.216.191.MISMATCH!optima7.xanadu-bbs.net!not-for-mail
References: <gou9pu$a8c$1@optima7.xanadu-bbs.net> <80ocwdgpxd.fsf@banana.shacknet.nu> <gp3fbd$k29$1@optima7.xanadu-bbs.net> <gp4hp7$u1j$1@puck.litech.org> <gp4jp2$tc5$1@optima7.xanadu-bbs.net> <gp53em$60h$1@news.trigofacile.com>

Show Full Headers
Complete Article Headers
Message-ID: <gp5vfa$8nh$1@optima7.xanadu-bbs.net>
Subject: Re: Can Cleanfeed filter on a specific user?
Date: Tue, 10 Mar 2009 10:03:06 -0500
From: "John F. Morse" <xanadu.bbs@example.invalid>
References: <gou9pu$a8c$1@optima7.xanadu-bbs.net> <80ocwdgpxd.fsf@banana.shacknet.nu> <gp3fbd$k29$1@optima7.xanadu-bbs.net> <gp4hp7$u1j$1@puck.litech.org> <gp4jp2$tc5$1@optima7.xanadu-bbs.net> <gp53em$60h$1@news.trigofacile.com>
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!goblin1!goblin.stu.neva.ru!nntp.club.cc.cmu.edu!74.222.216.191.MISMATCH!optima7.xanadu-bbs.net!not-for-mail
Newsgroups: news.software.nntp
Organization: Xanadu BBS
Lines: 42
Reply-To: dont.bother
NNTP-Posting-Host: n100.xanadu-bbs.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: optima7.xanadu-bbs.net 1236697386 8945 192.168.89.210 (10 Mar 2009
X-Complaints-To: newsmaster@xanadu-bbs.net
NNTP-Posting-Date: Tue, 10 Mar 2009 15:03:06 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.19 (X11/20090105)
In-Reply-To: <gp53em$60h$1@news.trigofacile.com>
X-Original-Bytes: 2596