Article View: news.software.nntp
Article #80339Re: Can Cleanfeed filter on a specific user?
From: John F. Morse
Date: Tue, 10 Mar 2009 15:33
Date: Tue, 10 Mar 2009 15:33
80 lines
4386 bytes
4386 bytes
Steve wrote:
> On Mon, 09 Mar 2009 12:54:07 -0500, John F. Morse wrote in
> Message-Id: <gp3l3v$lob$1@optima7.xanadu-bbs.net>:
>
>
>>> sub local_filter_first {
>>> if ($hdr{'From'} =~ /$from_name_here/) {
>>> return reject('Spam');
>>> } <==Added
>>> };
>>>
>>>
>> Steve,
>>
>> The above is how I edited the file to test if that was the cause of the
>> news.notice error, and it apparently was. I didn't see any error message
>> in news.notice:
>>
>> However, now EVERY article is being rejected as SPAM, including my own
>> locally-posted test post shown at the end of the following:
>>
>
> It's hard to debug this without knowing what you replaced
> $from_name_here with. As an example, it should read something like
> this:
> if ($hdr{'From'} =~ /steve\@mixmin\.net/) {
>
> If you want to keep your cleanfeed.local in a more human-friendly
> format, you can also do it like this:
>
> if ($hdr{'From'} =~ /
> steve\@mixmin\.net # Troll
> | example\@invalid\.org # Flooder
> | \@baddomain.com # Shoe sales
> /x) {
>
> The /x tells Perl to ignore whitespace, comments and newlines.
>
I was just using a "handle" in the "from_name_here" spot. Not a complete
e-mail "From" address. If you want to debug the text, just plug in
anything, like "john" or "steve" where "from_name_here" is shown. But
first read on below as I may have an idea....
The cause of everything being filtered might have been due to the use of
the $ at the beginning of the regex. This $ would indicate the regex is
a variable as I understand it, and as Jeff pointed out.
The other use of a dollar sign would be at the end of a regex but there
it represents using the end of the matching text, like the caret ("^")
represents the beginning.
With that in mind (and I'm losing mine!), I wonder if this regex would
be better written as:
if ($hdr{'From'} =~ /^steve/) {
I believe this would filter ANY Steve from any domain? Then if the
person changed their e-mail address but retained the same unique handle,
the filter would still catch them.
Don't worry -- I'm not planing on filtering you or even Steve Jobs. ;-)
Speaking of Steves, did you see Steve Wozniak on "Dancing with the
Stars" last night? I guess he will be huffing and puffing every week
until he is voted off. He's put on a few pounds since I last saw a
picture of him. Maybe he will lose some of it? He certainly appears to
be having a blast on that show.
I'll be trying this new format and the others today to see what happens.
Thanks for your assistance.
--
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:
<gp6197$970$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!nntp.giganews.com!transit4.hitnews.eu!feeder.news-service.com!nntp.club.cc.cmu.edu!74.222.216.191.MISMATCH!optima7.xanadu-bbs.net!not-for-mailReferences:
<gou9pu$a8c$1@optima7.xanadu-bbs.net> <80ocwdgpxd.fsf@banana.shacknet.nu> <gp3fbd$k29$1@optima7.xanadu-bbs.net> <slrngrahju.6et.steve@news.mixmin.net> <gp3jhm$l97$1@optima7.xanadu-bbs.net> <gp3l3v$lob$1@optima7.xanadu-bbs.net> <slrngrcedr.6et.steve@news.mixmin.net>Show Full Headers
Complete Article Headers
Message-ID: <gp6197$970$1@optima7.xanadu-bbs.net> Subject: Re: Can Cleanfeed filter on a specific user? Date: Tue, 10 Mar 2009 10:33:58 -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> <slrngrahju.6et.steve@news.mixmin.net> <gp3jhm$l97$1@optima7.xanadu-bbs.net> <gp3l3v$lob$1@optima7.xanadu-bbs.net> <slrngrcedr.6et.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!transit4.hitnews.eu!feeder.news-service.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: 80 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 1236699239 9440 192.168.89.210 (10 Mar 2009 X-Complaints-To: newsmaster@xanadu-bbs.net NNTP-Posting-Date: Tue, 10 Mar 2009 15:33:59 +0000 (UTC) User-Agent: Thunderbird 2.0.0.19 (X11/20090105) In-Reply-To: <slrngrcedr.6et.steve@news.mixmin.net>