Thread View: news.software.nntp
13 messages
13 total messages
Started by Dave H
Sat, 19 Jun 2010 18:40
Is filter on
Author: Dave H
Date: Sat, 19 Jun 2010 18:40
Date: Sat, 19 Jun 2010 18:40
33 lines
2266 bytes
2266 bytes
I installed cleanfeed, from mixmin Incidentally, I think there is a mistake there? .............................. /usr/local/news/bin/filter mv filter_innd.pl filter_innd.pl.old mv /usr/local/news/cleanfeed/cleanfeed filter_innd.pl Open the filter_innd.pl file with your preferred text editor and check the $config_dir variable is pointing to the correct location of the cleanfeed.local file. If it isn't, correct it and resave the file. Validate the syntax of cleanfeed and cleanfeed.local: perl -wc /usr/local/news/bin/filter/cleanfeed Wait, did we just move and rename cleanfeed to filter_innd.pl ? <<<<<<<<< ........................... Anyway, I have this line in cleanfeed.local do_scoring_filter => 1, while this appears in cleanfeed.stats do_scoring_filter: 1 I copied a lot of bad words, replacing pipe with space, and post went thru ok. I did reload the filter, BTW. The group posted to was not in any hierarchy, just a local thing How did it get thru? Thanks Dave
Re: Is filter on
Author: Steve Crook
Date: Sat, 19 Jun 2010 19:23
Date: Sat, 19 Jun 2010 19:23
31 lines
2107 bytes
2107 bytes
On Sat, 19 Jun 2010 19:40:07 +0100, Dave H wrote in
Message-Id: <hvj2u6$p6s$1@news.eternal-september.org>:
> Wait, did we just move and rename cleanfeed to filter_innd.pl ? <<<<<<<<<
Hi Dave,
Oops, that's an error. Corrected now, thanks.
> Anyway, I have this line in cleanfeed.local
> do_scoring_filter => 1,
> while this appears in cleanfeed.stats
> do_scoring_filter: 1
Yes, the first is how Perl expects to see hash entries formatted. The
second is just a human-friendly output.
> I copied a lot of bad words, replacing pipe with space, and post went thru
> ok.
> I did reload the filter, BTW.
> The group posted to was not in any hierarchy, just a local thing
> How did it get thru?
Cleanfeed doesn't actually score bad words in the message body, only in
specific headers: Subject, From, Message-ID and Organization. It would
be very easy to score the body from within cleanfeed.local if this is
what you're trying to do.
sub local_filter_scoring {
my $score = '';
$score .= "!Sub1Pt" while $body =~ /$one_point_words/go;
$score .= "!!Sub2Pt" while $body =~ /$two_point_words/go;
return $score;
};
Re: Is filter on
Author: Steve Crook
Date: Sat, 19 Jun 2010 19:28
Date: Sat, 19 Jun 2010 19:28
19 lines
1691 bytes
1691 bytes
On Sat, 19 Jun 2010 19:23:38 +0000 (UTC), Steve Crook wrote in
Message-Id: <slrni1q69q.rj2.steve@news.mixmin.net>:
> Cleanfeed doesn't actually score bad words in the message body, only in
> specific headers: Subject, From, Message-ID and Organization. It would
> be very easy to score the body from within cleanfeed.local if this is
> what you're trying to do.
>
> sub local_filter_scoring {
> my $score = '';
> $score .= "!Sub1Pt" while $body =~ /$one_point_words/go;
> $score .= "!!Sub2Pt" while $body =~ /$two_point_words/go;
> return $score;
> };
Better if I'd edited my pasting a bit more carefully. :)
$score .= "!Body1Pt" while $body =~ /$one_point_words/go;
$score .= "!!Body2Pt" while $body =~ /$two_point_words/go;
Re: Is filter on
Author: Dave H
Date: Sat, 19 Jun 2010 23:38
Date: Sat, 19 Jun 2010 23:38
19 lines
2260 bytes
2260 bytes
"Steve Crook" <steve@mixmin.net> wrote in message news:slrni1q6ji.rj2.steve@news.mixmin.net... > On Sat, 19 Jun 2010 19:23:38 +0000 (UTC), Steve Crook wrote in > Message-Id: <slrni1q69q.rj2.steve@news.mixmin.net>: > >> Cleanfeed doesn't actually score bad words in the message body, only in >> specific headers: Subject, From, Message-ID and Organization. It would >> be very easy to score the body from within cleanfeed.local if this is >> what you're trying to do. >> Worked a treat, thank you Steve, got a score of 145. Dave Windows Mail could not post your message. Subject 'Re: d', Account: '192.168.2.239', Server: '192.168.2.239', Protocol: NNTP, Server Response: '441 437 Scoring filter (145)', Port: 119, Secure(SSL): No, Server Error: 441, Error Number: 0x800CCCA9
Re: Is filter on
Author: Steve Crook
Date: Sun, 20 Jun 2010 08:57
Date: Sun, 20 Jun 2010 08:57
8 lines
1233 bytes
1233 bytes
On Sun, 20 Jun 2010 00:38:56 +0100, Dave H wrote in Message-Id: <hvjkee$gl8$1@news.eternal-september.org>: > Worked a treat, thank you Steve, got a score of 145. Excellent. :) I probably should put up a FAQ page for code snippets like that.
Re: Is filter on
Author: Dave H
Date: Sun, 20 Jun 2010 11:43
Date: Sun, 20 Jun 2010 11:43
19 lines
2097 bytes
2097 bytes
"Steve Crook" <steve@mixmin.net> wrote in message news:slrni1rlvi.rj2.steve@news.mixmin.net... > On Sun, 20 Jun 2010 00:38:56 +0100, Dave H wrote in > Message-Id: <hvjkee$gl8$1@news.eternal-september.org>: > >> Worked a treat, thank you Steve, got a score of 145. > > Excellent. :) > > I probably should put up a FAQ page for code snippets like that. Could a block for X-Newsreader be done in cleanfeed.local too? Bad urls would be nice there also. What do the inn developer think of their filter_innd.pl being replaced? Thanks Dave
Re: Is filter on
Author: Julien ÉLIE
Date: Sun, 20 Jun 2010 12:33
Date: Sun, 20 Jun 2010 12:33
36 lines
2674 bytes
2674 bytes
Hi Dave,
> Could a block for X-Newsreader be done in cleanfeed.local too?
Yes. The X-Newsreader: header field is given to Perl filters.
See the list of header fields handled by filter_art() here:
http://www.eyrie.org/~eagle/software/inn/docs/hook-perl.html
> Bad urls would be nice there also.
Isn't it already dealt with by Cleanfeed?
> What do the inn developer think of their filter_innd.pl being replaced?
It is meant to be replaced by Cleanfeed or any other Perl filter
after having installed INN, if the news administrator wants to.
I do not think it is up to the INN developers to maintain Perl or
Python filters, which are more admin policy than anything else.
http://www.mixmin.net/cleanfeed/ is the right place to look at
for a more powerful filter_innd.pl.
You do not have Amavisd, Clamav, Spamassassin, Razor or equivalent
shipped with Postfix, and installed at the same time. These are
more extensions, "plug-in"s to the Postfix base installation.
--
Julien ÉLIE
« Quand j'étais petit, je séchais la natation. » (Philippe Geluck)
Re: Is filter on
Author: Steve Crook
Date: Sun, 20 Jun 2010 16:20
Date: Sun, 20 Jun 2010 16:20
28 lines
2051 bytes
2051 bytes
On Sun, 20 Jun 2010 12:43:09 +0100, Dave H wrote in
Message-Id: <hvkusa$u36$1@news.eternal-september.org>:
> Could a block for X-Newsreader be done in cleanfeed.local too?
Yes, this example would reject any articles posted with an X-Newsreader
header beginning with "Microsoft".
sub local.filter.last {
if ($hdr{'X-Newsreader'} =~ /^Microsoft/) {
return reject('Microsoft Newsreader', 'Bad Reader');
};
};
Additionally this would log rejects with a short reason of "Bad Reader"
to a file called cf.readers. In this example only the Posting-Host
will be logged due to the format 32 passed to logart.
sub local_filter_reject {
my ($vr, $sr) = @_;
logart('cf.readers', $vr, 32) if $sr =~ /^Bad\sReader/;
};
> Bad urls would be nice there also.
Not sure what you mean here. There is a Bad URL filter but it's managed
from a file called bad_url, or bad_url_central if you elect to download
the centrally managed file.
Re: Is filter on
Author: Dave H
Date: Sun, 20 Jun 2010 17:32
Date: Sun, 20 Jun 2010 17:32
24 lines
2396 bytes
2396 bytes
"Steve Crook" <steve@mixmin.net> wrote in message news:slrni1sftv.rj2.steve@news.mixmin.net... > On Sun, 20 Jun 2010 12:43:09 +0100, Dave H wrote in > Message-Id: <hvkusa$u36$1@news.eternal-september.org>: Thanks >> Bad urls would be nice there also. > Not sure what you mean here. There is a Bad URL filter but it's managed > from a file called bad_url, or bad_url_central if you elect to download > the centrally managed file. I am a little lazy, looking at bad_url file, would \S*foneslax\S*\. block- foneslax.com foneslax.net foneslax.gggggggg.org Will set bad_url_central and see what arrives, I don't seem to see that option anywhere though. Thanks Dave
Re: Is filter on
Author: Steve Crook
Date: Mon, 21 Jun 2010 08:41
Date: Mon, 21 Jun 2010 08:41
35 lines
2668 bytes
2668 bytes
On Sun, 20 Jun 2010 18:32:54 +0100, Dave H wrote in Message-Id: <hvljc4$h14$1@news.eternal-september.org>: > "Steve Crook" <steve@mixmin.net> wrote in message > news:slrni1sftv.rj2.steve@news.mixmin.net... >> On Sun, 20 Jun 2010 12:43:09 +0100, Dave H wrote in >> Message-Id: <hvkusa$u36$1@news.eternal-september.org>: > > Thanks > >>> Bad urls would be nice there also. >> Not sure what you mean here. There is a Bad URL filter but it's managed >> from a file called bad_url, or bad_url_central if you elect to download >> the centrally managed file. > > I am a little lazy, looking at bad_url file, would > \S*foneslax\S*\. > block- > foneslax.com > foneslax.net > foneslax.gggggggg.org > > Will set bad_url_central and see what arrives, I don't seem to see that > option anywhere though. bad_url and bad_url_central are used if they exist (in the same dir as you have cleanfeed.local). Your above examples are fine for the bad_url file. If you choose to use the bad_url_central than you need to download it frequently using Cron. 00 06,18 * * * wget -qNP /usr/local/news/cleanfeed/etc http://www.mixmin.net/cleanfeed/bad_hosts_central This example will download it every 12 hours. You'll also need to check out bad_rate_reload in cleanfeed. See: http://www.mixmin.net/cleanfeed/config.html#bad_rate_reload
Re: Is filter on
Author: Dave H
Date: Mon, 21 Jun 2010 15:29
Date: Mon, 21 Jun 2010 15:29
56 lines
4036 bytes
4036 bytes
"Steve Crook" <steve@mixmin.net> wrote in message news:slrni1u9d0.rj2.steve@news.mixmin.net... > bad_url and bad_url_central are used if they exist (in the same dir as > you have cleanfeed.local). Your above examples are fine for the bad_url > file. If you choose to use the bad_url_central than you need to > download it frequently using Cron. > > 00 06,18 * * * wget -qNP /usr/local/news/cleanfeed/etc > http://www.mixmin.net/cleanfeed/bad_hosts_central > > This example will download it every 12 hours. You'll also need to check > out bad_rate_reload in cleanfeed. See: > http://www.mixmin.net/cleanfeed/config.html#bad_rate_reload I am puzzled, Steve. When I download thus, wget -qNP /opt/news/bin/filter/etc/ http://www.mixmin.net/cleanfeed/bad_hosts_central I get 20 entries. When I look at the web page with IE of that file, there is a whole lot more, will post the 20 below Thanks Dave ############################################################ # This file is downloaded from a central resource. Do not # # manually edit it as your changes will be overwritten # # during the next scheduled update. For manual listings, # # update the bad_hosts file. # ############################################################ # Last Updated: 2010-06-21 13:54:02 24.222.249.145 # 206 108.14.199.157 # 211 7baffabb.news.jobcircle.com # 215 82.94.164.166 # 218 151.96.3.241 # 269 0e6fd95c.news.jobcircle.com # 273 6597fe36.news.jobcircle.com # 280 #news.queue.to # 297 Whitelisted #webapp-03-blr.mathworks.com # 305 Whitelisted #webapp-02-blr.mathworks.com # 329 Whitelisted #webapp-05-blr.mathworks.com # 338 Whitelisted #news.hub.org # 346 Whitelisted 88.149.254.42 # 376 50a2d83a.flatrate.dk # 385 4978aa60.news.jobcircle.com # 386 #localhost.webtv.net # 479 Whitelisted 576b84bf.news.astraweb.com # 1027 23b6b989.news.astraweb.com # 1243 60-248-154-180.hinet-ip.hinet.net # 3079 eweka internet services # 3497
Re: Is filter on
Author: Steve Crook
Date: Mon, 21 Jun 2010 16:13
Date: Mon, 21 Jun 2010 16:13
23 lines
2244 bytes
2244 bytes
On Mon, 21 Jun 2010 16:29:49 +0100, Dave H wrote in Message-Id: <hvo0he$m9k$1@news.eternal-september.org>: > I am puzzled, Steve. > When I download thus, > wget -qNP /opt/news/bin/filter/etc/ > http://www.mixmin.net/cleanfeed/bad_hosts_central Hi Dave, This example is for the bad_hosts_central file, you want the bad_url_central one. So:- wget -qNP /opt/news/bin/filter/etc/ \ http://www.mixmin.net/cleanfeed/bad_url_central As an aside, bad_hosts_central currently contains: eweka internet services # 3497 This happens because Eweka misuse the NNTP-Posting-Host header and put their service name in it. The result is that every rejected article coming from their service is assumed to come from the same poster. I could whitelist their NNTP-Posting-Host entry but that's circumventing the problem which is their misuse of the header.
Re: Is filter on
Author: Dave H
Date: Mon, 21 Jun 2010 16:35
Date: Mon, 21 Jun 2010 16:35
21 lines
2638 bytes
2638 bytes
"Steve Crook" <steve@mixmin.net> wrote in message news:slrni1v3u4.rj2.steve@news.mixmin.net... > Hi Dave, > > This example is for the bad_hosts_central file, you want the > bad_url_central one. So:- > wget -qNP /opt/news/bin/filter/etc/ > http://www.mixmin.net/cleanfeed/bad_url_central > > As an aside, bad_hosts_central currently contains: > eweka internet services # 3497 > > This happens because Eweka misuse the NNTP-Posting-Host header and put > their service name in it. The result is that every rejected article > coming from their service is assumed to come from the same poster. I > could whitelist their NNTP-Posting-Host entry but that's circumventing > the problem which is their misuse of the header. Thanks, Steve. Dave
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads