Article View: news.software.nntp
Article #80304Re: Can Cleanfeed filter on a specific user?
From: John F. Morse
Date: Mon, 09 Mar 2009 17:54
Date: Mon, 09 Mar 2009 17:54
183 lines
9652 bytes
9652 bytes
John F. Morse wrote:
> Steve wrote:
>> On Mon, 09 Mar 2009 11:15:41 -0500, John F. Morse wrote in
>> Message-Id: <gp3fbd$k29$1@optima7.xanadu-bbs.net>:
>>
>>> Here is what I have added to the bottom of the sub
>>> local_filter_first (the "from_name_here" is the actual name in the
>>> header From entry):
>>>
>>
>> [snip]
>>
>> Hi John,
>>
>> It looks like you're using the example cleanfeed.local supplied with
>> cleanfeed-20020501. I'd suggest you use this for examples rather than
>> going live with it. It contains various sections that are specific to
>> the environment it was created on. For example:
>>
>> $localpost = 1 if $hdr{'X-Trace'} and $hdr{'X-Trace'} =~
>> /\.inwind\.it /;
>>
>> This will only work if your domain is inwind.it, so anything that sits
>> within the "if localpost" conditional will not work.
>>
>> I'd suggest keeping that file as a reference and creating your own from
>> scratch. All you want at the moment in local_filter_first is:
>>
>> sub local_filter_first {
>> if ($hdr{'From'} =~ /$from_name_here/) {
>> return reject('Spam'); };
>>
>> I'd further suggest:
>> * Delete all the other local_filter sections and create them as needed.
>> * Keep local_config for defining things specific to your environment.
>> * Use local_filter_reject to log what you're filtering.
>> * Keep the few lines at the bottom that reside outside any functions,
>> they're important.
>>
>
>
> Thanks for the fast reply, Steve.
>
> Have made your suggested edits, but am now receiving an error message
> in news.notice :
>
> Mar 9 11:58:08 localhost innd: filter: Cannot load
> /etc/news/filter/cleanfeed.local: Missing right curly or square
> bracket at (eval 7) line 90, at end of line syntax error at (eval 7)
> line 90, at EOF
>
> This is odd because there are only 88 lines in the cleanfeed.local
> file (see complete file below).
>
> I do see an unbalance in the curly brackets in the sub
> local_filter_first section. Should it be like this? :
>
> 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:
Mar 9 12:28:31 localhost innfeed[21804]: loading /etc/news/innfeed.conf
Mar 9 12:28:31 localhost innd: filter: Cannot load
/etc/news/filter/cleanfeed.local: Missing right curly or square bracket
at (eval 8) line 90, at end of line syntax error at (eval 8) line 90, at
EOF
Mar 9 12:28:31 localhost innd: SERVER reload all jfm
Mar 9 12:28:31 localhost innd: controlchan! exit 0 elapsed 1825 pid 21221
Mar 9 12:28:32 localhost controlchan[21803]: starting
...
Mar 9 12:29:31 localhost innfeed[21950]: loading /etc/news/innfeed.conf
Mar 9 12:29:32 localhost innd: SERVER reload all jfm
Mar 9 12:29:32 localhost controlchan[21949]: starting
However, now EVERY article is being rejected as SPAM, including my own
locally-posted test post shown at the end of the following:
Mar 9 12:29:57 localhost innd: rejecting[perl]
<gp3jmk$lld$2@news.motzarella.org> 437 Spam
Mar 9 12:30:15 localhost innd: rejecting[perl]
<20090309172504.F12824832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:38 localhost innd: rejecting[perl] <gp3jn5$6tp$1@online.de>
437 Spam
Mar 9 12:30:39 localhost innd: rejecting[perl]
<20090309172517.445104832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:40 localhost innd: rejecting[perl]
<20090309172538.CA1464832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:40 localhost innd: rejecting[perl]
<20090309172629.BB75C4832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:40 localhost innd: rejecting[perl]
<262076e7-c5a4-4e7c-aa3f-47b4682a45f4@q1g2000vbn.googlegroups.com> 437 Spam
Mar 9 12:30:41 localhost innd: rejecting[perl]
<20090309172621.AED444832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:41 localhost innd: rejecting[perl]
<20090309172638.715264832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:43 localhost innd: rejecting[perl]
<20090309172958.DCD4BBCDF@ip-64-139-1-69.sjc.megapath.net> 437 Spam
Mar 9 12:30:47 localhost innd: rejecting[perl]
<20090309172648.7908A4832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:47 localhost innd: rejecting[perl]
<20090309172453.011204832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:48 localhost innd: rejecting[perl]
<71l21lFl6bupU1@mid.individual.net> 437 Spam
Mar 9 12:30:50 localhost innd: rejecting[perl]
<20090309172551.B3E5B4832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:51 localhost innd: rejecting[perl]
<20090309172601.281BC4832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:51 localhost innd: rejecting[perl]
<20090309172609.F26EA4832D@thamesys.demon.co.uk> 437 Spam
Mar 9 12:30:53 localhost innd: rejecting[perl]
<mailman.1540.1236619830.11746.python-list@python.org> 437 Spam
Mar 9 12:31:26 localhost innd: rejecting[perl]
<gp3jpc$mot$1@news.motzarella.org> 437 Spam
Mar 9 12:31:42 localhost innd: rejecting[perl]
<gp3jps$op0$1@news.motzarella.org> 437 Spam
Mar 9 12:32:00 localhost innd: rejecting[perl]
<x7mybuiovk.fsf@mail.sysarch.com> 437 Spam
Mar 9 12:32:01 localhost innd: rejecting[perl]
<4832b2cc-2d36-49ad-990c-a7e833e6936b@o11g2000yql.googlegroups.com> 437 Spam
Mar 9 12:32:02 localhost innd: rejecting[perl]
<Fictl.13557$8_3.418@flpi147.ffdc.sbc.com> 437 Spam
Mar 9 12:32:45 localhost innd: rejecting[perl]
<gp3jrs$lld$3@news.motzarella.org> 437 Spam
Mar 9 12:34:16 localhost innd: rejecting[perl]
<tph-D9A2BA.11341309032009@localhost> 437 Spam
Mar 9 12:34:49 localhost innfeed[21950]: feeder.motzarella.org:0
periodic close
Mar 9 12:34:49 localhost innfeed[21950]: feeder.motzarella.org:0 final
seconds 315 offered 0 accepted 0 refused 0 rejected 0 accsize 0 rejsize 0
Mar 9 12:34:49 localhost innfeed[21950]: feeder.motzarella.org final
seconds 315 offered 0 accepted 0 refused 0 rejected 0 missing 0 accsize
0 rejsize 0 spooled 0 on_close 0 unspooled 0 deferred 0/0.0 requeued 0
queue 0.0/200:100,0,0,0,0,0
Mar 9 12:35:02 localhost innd: nntp.club.cc.cmu.edu connected 31
streaming allowed
Mar 9 12:35:02 localhost innd: nntp.club.cc.cmu.edu:31 NCmode "mode
stream" received
Mar 9 12:35:02 localhost innd: nntp.club.cc.cmu.edu:21 closed seconds
1200 accepted 0 refused 1 rejected 0 duplicate 0 accepted size 0
duplicate size 0
Mar 9 12:35:06 localhost innd: rejecting[perl]
<WeydnRxdu5_YzijUnZ2dnUVZ_qHinZ2d@supernews.com> 437 Spam
Mar 9 12:35:10 localhost innd: rejecting[perl]
<f80a9809b3ce0c677d82c0513929815b@pseudo.borked.net> 437 Spam
Mar 9 12:35:10 localhost innd: rejecting[perl]
<3c70301d-93b2-46f3-965f-bf1f3d090ddb@l37g2000vba.googlegroups.com> 437 Spam
Mar 9 12:35:48 localhost innd: rejecting[perl]
<20090309173538.CB6A037F1@mta-fe.casema.nl> 437 Spam
Mar 9 12:36:07 localhost innd: rejecting[perl]
<gp3k25$2rs4$1@sf1.isc.org> 437 Spam
Mar 9 12:36:10 localhost nnrpd[21957]: SERVER perl filtering enabled
Mar 9 12:36:10 localhost innd: localhost connected 21
Mar 9 12:36:10 localhost innd: rejecting[perl]
<gp3k2a$le5$1@news.my.net> 437 Spam
Mar 9 12:36:10 localhost innd: localhost:21 closed seconds 0 accepted 0
refused 0 rejected 1 duplicate 0 accepted size 0 duplicate size 0
Mar 9 12:36:10 localhost nnrpd[21957]: noc.my.net post failed 437 Spam
I had to shut off the filter ("ctlinnd perl n") until this can be resolved.
Actually, I will go back to cleanfeed.local and remove the curly-bracket
to "break" cleanfeed.local, then restart the Perl filter to stop all of
the other garbage.
--
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:
<gp3l3v$lob$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!border2.nntp.ams.giganews.com!feeder6.cambrium.nl!feeder3.cambrium.nl!feed.tweaknews.nl!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.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-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>Show Full Headers
Complete Article Headers
Message-ID: <gp3l3v$lob$1@optima7.xanadu-bbs.net> Subject: Re: Can Cleanfeed filter on a specific user? Date: Mon, 09 Mar 2009 12:54:07 -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> 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!border2.nntp.ams.giganews.com!feeder6.cambrium.nl!feeder3.cambrium.nl!feed.tweaknews.nl!postnews.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.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: 183 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 1236621247 22283 192.168.89.210 (9 Mar 2009 X-Complaints-To: newsmaster@xanadu-bbs.net NNTP-Posting-Date: Mon, 9 Mar 2009 17:54:07 +0000 (UTC) User-Agent: Thunderbird 2.0.0.19 (X11/20090105) In-Reply-To: <gp3jhm$l97$1@optima7.xanadu-bbs.net>