From e40e96a1e2e1a359d1d8094bdbb2b3c8b42518c4 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 11 May 2025 11:11:52 +0200 Subject: [PATCH] Add more hosts and special cases. Signed-off-by: Thomas Hochstein --- bin/gatherstats.pl | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/bin/gatherstats.pl b/bin/gatherstats.pl index e47f51f..8359b8a 100755 --- a/bin/gatherstats.pl +++ b/bin/gatherstats.pl @@ -133,11 +133,11 @@ foreach my $Month (&ListMonth($Period)) { ### HostStats if ($OptStatsType eq 'all' or $OptStatsType eq 'hosts') { # define known hosts using subdomains - my @KnownHosts = qw(aioe.org arcor-online.net arcor-ip.de news.astraweb.com read.cnntp.org easynews.com - eternal-september.org euro.net fernuni-hagen.de free.fr newsread.freenet.ag - googlegroups.com news.neostrada.pl newsdawg.com newscene.com news-service.com - octanews.com wieslauf.sub.de highway.telekom.at united-newsserver.de xsnews.nl - news.xs4all.nl); + my @KnownHosts = qw(abavia.com aioe.org arcor-online.net arcor-ip.de news.astraweb.com read.cnntp.org + easynews.com eternal-september.org euro.net fernuni-hagen.de free.fr newsread.freenet.ag + googlegroups.com heirich.name news.neostrada.pl netcologne.de newsdawg.com newscene.com + news-service.com octanews.com .readnews.com wieslauf.sub.de highway.telekom.at + united-newsserver.de xennanews.com xlned.com xsnews.nl news.xs4all.nl); &HostStats($DBHandle,$DBRaw,$DBHosts,$Month,$OptMID,$OptTest,$OptDebug,@KnownHosts); }; }; @@ -315,14 +315,15 @@ sub HostStats { } } - # special cases - $Host = 'news.highwinds-media.com' if $Host =~ /fx\d\d\.\S{3}\.POSTED/ - or $Host =~ /newsfe\d+\.(iad|ams2)/; - $Host = 'newshosting.com' if $Host =~ /post\d*\.iad/; - # trailing .POSTED ($Host) = $Host =~ /(\S+)\.POSTED$/ if $Host =~ /\.POSTED$/; + # special cases + $Host = 'news.highwinds-media.com' if $Host =~ /f(e|x)\d\d\.\S{3}\d?$/ + or $Host =~ /(newsfe|fed)\d+\.(iad|ams2)$/; + $Host = 'newshosting.com' if $Host =~ /post\d*\.iad$/; + $Host = 'eternal-september.org' if $Host =~ /dont-email\.me$/; + # normalize hosts foreach (@KnownHosts) { if ($Host =~ /\.$_$/) {