Thread View: news.software.nntp
6 messages
6 total messages
Started by Steve
Thu, 28 Feb 2008 15:08
Cleanfeed - bad_hosts_central
Author: Steve
Date: Thu, 28 Feb 2008 15:08
Date: Thu, 28 Feb 2008 15:08
43 lines
2606 bytes
2606 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I've published a first attempt at creating a centralised bad_hosts file
for use with Cleanfeed. It can be downloaded from
http://www.mixmin.net/bad_hosts_central.
Currently this file is populated from just the Cleanfeed EMP filters and
requires a given NNTP-Posting-Host to violate a filter by in excess
of 200 messages.
Once marked as bad, a host will be listed for a period of 48 hours and
then expired, providing another violation doesn't occur within that
period in which case the 48 hour period begins again.
The downloadable file is generated every 6 hours, at 0250, 0850, 1450
and 2050. If it's being fetched via cron, it should be configured to
run at 0300, 0900, 1500 and 2100, so allowing 10 minutes for the scripts
to generate the file.
Using wget, something like this should work:-
wget -qNP /usr/local/news/cleanfeed/etc http://www.mixmin.net/bad_hosts_central
At least to begin with I'd suggest saving the rejected articles to a
file in order to check that nothing of value is being discarded by it.
This can be done in the local_filter_reject subroutine of
cleanfeed.local with an entry like this:-
saveart('cf.hosts', $vr) if $vr =~ /^Bad\shost/;
Feedback will be very much appreciated.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHxs5atHGA1SKHYecRCtVuAJ9Ycgjz4R0eguE//y0+cMbJDtrEaACgmVPx
jr9NK+4RuJYC3kXrYthYqW4=
=/rlZ
-----END PGP SIGNATURE-----
--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook <steve@mixmin.net>
Re: Cleanfeed - bad_hosts_central
Author: Julien ÉLIE
Date: Thu, 28 Feb 2008 16:10
Date: Thu, 28 Feb 2008 16:10
42 lines
2574 bytes
2574 bytes
Hi Steve, > http://www.mixmin.net/bad_hosts_central Thanks a lot for this central file! > The downloadable file is generated every 6 hours, at 0250, 0850, 1450 > and 2050. If it's being fetched via cron, it should be configured to > run at 0300, 0900, 1500 and 2100, so allowing 10 minutes for the scripts > to generate the file. I assume these hours are GMT. By the way, I see in phn_exclude "gmane\."; should it be there since it is a hierarchy which is not supposed to be fed? Also: 17:04 iulius@news ~/bin/filter% ctlinnd mode Server running Allowing remote connections Parameters c 10 i 50 (11) l 600000 o 1011 t 300 H 2 T 60 X 0 normal specified Not reserved Readers follow enabled Perl filtering enabled Perl filter stats: Pass: 99157 Reject: 1741 Refuse: 228 MD5: 18 PHL: 50 PHN: 50 PHR: 0 FSL: 62 Is it normal that PHL, PHN and FSL are increased even though no article seems to be rejected by them? I have rejects because of MD5 but I do not understand why these numbers increase. Regards, -- Julien ÉLIE « Quand on demande aux gens d'observer le silence, au lieu de l'observer comme on observe une éclipse de lune, ils l'écoutent ! » (Raymond Devos)
Re: Cleanfeed - bad_hosts_central
Author: Steve
Date: Thu, 28 Feb 2008 16:59
Date: Thu, 28 Feb 2008 16:59
23 lines
1986 bytes
1986 bytes
On Thu, 28 Feb 2008 17:10:11 +0100, =?Windows-1252?Q?Julien_=C9LIE?= wrote in
Message-Id: <fq6me2$282$1@news.trigofacile.com>:
> I assume these hours are GMT.
Yes they are.
> By the way, I see in phn_exclude "gmane\."; should it be there since
> it is a hierarchy which is not supposed to be fed?
It's one of those hierarchies that falls victim of any filter that works
off Posting Host because all the messages are posted via a common
gateway. If I hadn't excluded it, the introduction of a PHN filter would
have adversely affected it's propagation.
> Is it normal that PHL, PHN and FSL are increased even though no article
> seems to be rejected by them?
> I have rejects because of MD5 but I do not understand why these numbers increase.
No, that wouldn't be normal. The rejections count should exactly match
the actual number of articles filtered.
--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook <steve@mixmin.net>
Re: Cleanfeed - bad_hosts_central
Author: Julien ÉLIE
Date: Thu, 28 Feb 2008 17:34
Date: Thu, 28 Feb 2008 17:34
37 lines
2446 bytes
2446 bytes
Hi Steve,
>> Is it normal that PHL, PHN and FSL are increased even though no article
>> seems to be rejected by them?
>> I have rejects because of MD5 but I do not understand why these numbers increase.
>
> No, that wouldn't be normal. The rejections count should exactly match
> the actual number of articles filtered.
Then there is a bug in your implementation since you wrote:
return reject('EMP (phn nph)', 'EMP')
if $PHNhistory->add("$hdr{'NNTP-Posting-Host'} $hdr{Newsgroups}");
So it adds an entry for almost every article.
And you then write the status with $phnhashentries defined as follows:
my $phnhashentries = $PHNhistory ? $PHNhistory->count : 0;
while:
sub count {
my ($self) = @_;
return scalar keys %{$self->{history}};
}
I believe you should instead write $status{phncaught} or something
like that (where it is incremented if there is a rejection).
--
Julien ÉLIE
« -- Sauve qui peut !
-- Je ne sais pas si je peux, mais je vais essayer ! » (Astérix)
Re: Cleanfeed - bad_hosts_central
Author: Steve
Date: Fri, 29 Feb 2008 10:13
Date: Fri, 29 Feb 2008 10:13
16 lines
1744 bytes
1744 bytes
On Thu, 28 Feb 2008 18:34:32 +0100, =?Windows-1252?Q?Julien_=C9LIE?= wrote in
Message-Id: <fq6rb9$7r1$1@news.trigofacile.com>:
> So it adds an entry for almost every article.
Ah, I think I see the problem, (after some time staring blankly at it).
The counters you're looking at don't report the number of rejections, they
report the number of entries in each of the various EMP hashes.
If an article meets all the criteria to be included in the (for example)
PHN filter and there isn't already a matching hash, then the counter
will increment.
--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook <steve@mixmin.net>
Re: Cleanfeed - bad_hosts_central
Author: Julien ÉLIE
Date: Sat, 01 Mar 2008 08:22
Date: Sat, 01 Mar 2008 08:22
18 lines
1968 bytes
1968 bytes
Hi Steve, >> So it adds an entry for almost every article. > > Ah, I think I see the problem, (after some time staring blankly at it). > The counters you're looking at don't report the number of rejections, they > report the number of entries in each of the various EMP hashes. All right. Thanks! I mixed up the count of rejected articles and the count of saved hashes. Sorry. -- Julien ÉLIE « -- Nous sommes acculés ! -- Tant pis pour eux. » (Astérix)
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