Subject: | Net::DNS hangs intermittently on WinXP |
I am attempting to run SpamAssassin 2.44 under Windows. I am using
ActiveState Perl 5.6 with ActiveState Perl Dev Kit 5.0. I'm using their
Net-DNS 0.33 PPM (perl package).
As long as I include Win32::Registry, it works, but intermittently
gets stuck (very very slow timeouts) when doing RBL checks. If I turn on
MX/A record checkingfor senders, then the lock-up happens much more quickly
(perhaps either because the look-ups fail more often because MX/A records
tend to be non-existent for spammers or because MX record look-ups are less
reliable on Win32).
It seems that timeouts don't work so well on Win32, but maybe I'm doing
something wrong. However, the same exact script (minus Win32 modules)
is about twice as fast on Linux.
perl -v:
-------------------------------------------------------------------------
This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2001, Larry Wall
Binary build 633 provided by ActiveState Corp. http://www.ActiveState.com
Built 21:33:05 Jun 17 2002
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
-------------------------------------------------------------------------
I am running on Windows XP Home Edition, Version 2002 SP 1.
I'll attach my test script. The spammer domains (no MX record) take
90 seconds *every* time to time-out. On Linux, it varies and is much
lower.
#!/usr/bin/perl -w
use Net::DNS;
use Win32::Registry;
use warnings;
use strict;
my $name;
my $res;
my @mx;
my $time;
$| = 1;
while (<DATA>) {
chomp($name = $_);
next unless length;
$time = time;
$res = new Net::DNS::Resolver;
$res->tcp_timeout(10);
@mx = mx($res, $name);
printf "got=%d time=%.2f %s\n", scalar(@mx), (time - $time), $name;
}
# some slow spammer domains
__DATA__
2nd-world.fr
3z.mail-offers.us
4-virtual.com
4futuredreams.com
69mail.org
800-imaging.com
allbestcheapstuff.com
allyoucanwant.com
amtre.com
azventure.com
banal.co.uk
basedupon.com
bishopsgatelondon.co.uk
bubblegrubble.com
bubfet.com
bundlecord.com
clenie.net
clickitgood.com
compudomainpark.org
confirmation102.atbestcheapstuff.com
cosmeticplanet.net
digitalmortgage.cc
direct--promotions.org
dreamvacationgiveaways.com
email2.qves.net
emailhowdy.com
fairreach.net
framejar.com
free-virtualweb.org
freevirtualconnect.org
fromhereuptous.com
fromypaper.com
herbaltrial.com
jeutnde.ca.ht
lists.atomicdot1.com
lt12.yourip21.com
mail1.listtest.com
mail3.offer-mail.us
mail5.inb-productions.com
mail6.inb-productions.com
mail6.inboxemedia.com
mail8.akindthought.com
mail8.inb-promotions.com
mail9.inb-productions.com
mark11.hostserve21.com
mark8.hostserve21.com
mx03.readyserve21.com
mx05.readyserve21.com
mx07.hostserve21.com
mx08.routeit21.com
mx10.readyserve21.com
mx3.bondhost21.com
mx4.bondhost21.com
my1sexysite.com
national-adv.com
netcourrier.net
netpa-tr.net