Article View: news.software.nntp
Article #80252Re: Can Cleanfeed filter on a specific user?
From: Ray Banana
Date: Sat, 07 Mar 2009 18:15
Date: Sat, 07 Mar 2009 18:15
53 lines
2822 bytes
2822 bytes
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".
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
--
Time flies like an arrow, fruit flies like a Banana.
http://news.motzarella.org
Technical Details
Message-ID:
<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!newsfeed.straub-nv.de!news.motzarella.org!banana.shacknet.nu!motzarella.org!not-for-mailReferences:
<gou9pu$a8c$1@optima7.xanadu-bbs.net>Show Full Headers
Complete Article Headers
Message-ID: <80ocwdgpxd.fsf@banana.shacknet.nu> Subject: Re: Can Cleanfeed filter on a specific user? Date: Sat, 07 Mar 2009 19:15:26 +0100 From: Ray Banana <rayban@banana.shacknet.nu> References: <gou9pu$a8c$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!newsfeed.straub-nv.de!news.motzarella.org!banana.shacknet.nu!motzarella.org!not-for-mail Newsgroups: news.software.nntp Organization: A noiseless patient spider Lines: 53 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: banana.shacknet.nu 1236449783 19927 10.1.30.101 (7 Mar 2009 18:16:23 GMT) X-Complaints-To: abuse@banana.shacknet.nu User-Agent: Plonkenlights X-Attribution: Ray Banana Cancel-Lock: sha1:+xLgh7B0AdwXO9TDnxc4uyAW/ss= X-PGP-Sig: 2.6.3ia Subject,Message-ID,Date,From,User-Agent iQCVAwUBSbK59xFgDSXFGJ/lAQEeMwQAtzSFuYCenSjQ+DP4PS2Kc66jMatsIA// vObRaKHX1ttJseWxG1+XBqWQFjAGubApnclNQ3cXtfI36qYZoi+SoahJbywlDOgh m/GPZfIjpqPtRXyicTkDCsGPduWma7UpEnCfM6CdZH2VUtT61IsG86m+c91PXpLF M4v3lukGQAA= =utBp