🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #80275

Re: Can Cleanfeed filter on a specific user?

#80275
From: John F. Morse
Date: Sun, 08 Mar 2009 20:26
83 lines
3867 bytes
Ray Banana wrote:
> Thus spake "John F. Morse" <xanadu.bbs@example.invalid>
>  
>   
>> I'm not even sure that cleanfeed.local is actually working. I can only
>> guess the filter is working because I get daily reports containing
>> info like this:
>> Readers follow enabled
>> Perl filtering enabled
>> Perl filter stats: Pass: 157616  Reject: 2723  Refuse:   MD5: 61  PHL:
>> 56  FSL: 24
>> I presume the Perl filter stats are the result of cleanfeed.local.pl
>> and not just filter.innd alone.
>>     
>
> No, they are for cleanfeed with or without cleanfeed.local.
>
>   
>> In /etc/news/filter/filter_innd.pl I have:
>> $config_dir = '/etc/news/filter';
>> In cleanfeed.local.pl I have added the new data as a new item at the
>> end of the existing areas as shown below:
>>     
>
> Please check your cleanfeed file for the line
>
>     my $local_file = "$config_dir/cleanfeed.local";
>
> and note that cleanfeed will look for a file called 
> "cleanfeed.local", not "cleanfeed.local.pl".
>   


The "my $local_file = "$config_dir/cleanfeed.local";" was present, and 
it was another clue after I studied it. ;-)

I removed the ".pl" from cleanfeed.local and it apparently made a 
difference according to news.notice which now indicates filter entries 
(see the reply to Steve).

All these years fighting this because of that one error. I remember how 
confusing it was back then to read docs referring to "cleanfeed" which 
was renamed to "filter_innd.pl" but I suppose was necessary to keep it 
separate from Highwinds.


> Also, please take a look at Steve's Cleanfeed documentation at
>
> http://www.mixmin.net/svn/cleanfeed/branches/cleanfeed-0.95.7b/cleanfeed.man
>
> for subroutines you can define in your cleanfeed.local and when they are
> called by cleanfeed.
>
> If you just want to filter articles by the From: header, this might be
> as simple as adding a subroutine
>
> sub local_filter_first {
>
>     if ( $hdr{'From'} =~ /$your_regex_goes_here/ ) {
>         return 'Spam';
>     }
>
>     return '';
>
> }
>
> to your cleanfeed.local.
>
> hth


Thanks, Ray. I'll use this if my other additions to cleanfeed.local 
don't work. I'll need to wait until "posting time" to see what happens. ;-)

What does the "return 'Spam'" actually do?


-- 
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: <gp19ln$2jl$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!xlned.com!feeder3.xlned.com!feeder.news-service.com!news.motzarella.org!motzarella.org!optima7.xanadu-bbs.net!not-for-mail
References: <gou9pu$a8c$1@optima7.xanadu-bbs.net> <80ocwdgpxd.fsf@banana.shacknet.nu>

Show Full Headers
Complete Article Headers
Message-ID: <gp19ln$2jl$1@optima7.xanadu-bbs.net>
Subject: Re: Can Cleanfeed filter on a specific user?
Date: Sun, 08 Mar 2009 15:26:31 -0500
From: "John F. Morse" <xanadu.bbs@example.invalid>
References: <gou9pu$a8c$1@optima7.xanadu-bbs.net> <80ocwdgpxd.fsf@banana.shacknet.nu>
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!xlned.com!feeder3.xlned.com!feeder.news-service.com!news.motzarella.org!motzarella.org!optima7.xanadu-bbs.net!not-for-mail
Newsgroups: news.software.nntp
Organization: Xanadu BBS
Lines: 83
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 1236543991 2677 192.168.89.210 (8 Mar 2009
X-Complaints-To: newsmaster@xanadu-bbs.net
NNTP-Posting-Date: Sun, 8 Mar 2009 20:26:31 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.19 (X11/20090105)
In-Reply-To: <80ocwdgpxd.fsf@banana.shacknet.nu>