🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80322

Re: Can Cleanfeed filter on a specific user?

#80322
From: John F. Morse
Date: Tue, 10 Mar 2009 02:37
53 lines
2950 bytes
Jeffrey M. Vinocur wrote:
> In article <gp3fbd$k29$1@optima7.xanadu-bbs.net>,
> John F. Morse <dont.bother> wrote:
>   
>> Ray Banana wrote:
>>     
>>>     if ( $hdr{'From'} =~ /$your_regex_goes_here/ ) {
>>>       
>>                    if ( $hdr{'From'} =~ /$from_name_here/ ) {
>>     
>
> I think both of you know this, but...that dollar sign doesn't
> belong there, unless you've got a variable defined somewhere
> else.
>
> Good:
>
>         if ( $hdr{'From'} =~ /aol\.com/ ) {
>
> Perhaps better:
>
>         my $badpeople = 'aol\.com';
>         if ( $hdr{'From'} =~ /$badpeople/o ) {
>
> Very broken:
>
>         if ( $hdr{'From'} =~ /$aol\.com/ ) {
>   


I was just reading http://perldoc.perl.org/perlintro.html and couldn't 
see why the $ was used since this is not a variable.

Thanks for confirming this, Jeff.

I'm going to remove the $ tomorrow and have another run with 
cleanfeed.local to see if it will work without rejecting every article 
as spam.

Can your my $badpeople = 'aol\.com'; be added to in the future with the 
alternation metacharacter '|' ? Such as:

my $badpeople = 'aol\.com'|'gmail\.com'|'microsoft\.com'|'ex-wife';

and so forth?


-- 
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: <gp4jp2$tc5$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.dca.giganews.com!nntp.giganews.com!nx01.iad.newshosting.com!nx02.iad.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!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>

Show Full Headers
Complete Article Headers
Message-ID: <gp4jp2$tc5$1@optima7.xanadu-bbs.net>
Subject: Re: Can Cleanfeed filter on a specific user?
Date: Mon, 09 Mar 2009 21:37:22 -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>
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.dca.giganews.com!nntp.giganews.com!nx01.iad.newshosting.com!nx02.iad.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!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: 53
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: 7bit
X-Trace: optima7.xanadu-bbs.net 1236652642 30085 192.168.89.210 (10 Mar 2009
X-Complaints-To: newsmaster@xanadu-bbs.net
NNTP-Posting-Date: Tue, 10 Mar 2009 02:37:22 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.19 (X11/20090105)
In-Reply-To: <gp4hp7$u1j$1@puck.litech.org>