On Mon, 14 Mar 2016 14:11:38 +0100
Marcus Schopen <[email protected]> wrote:
> It shouldn't make a difference to mimedefang if one of
> the dns server is down. Any ideas?
I think this is an artifact of the Net::DNS Perl module, which doesn't
seem to handle multiple name servers very well.
I ran the following test program, where 10.50.100.100 is a nonexistent
machine and 192.168.10.23 is the real name server. Results of strace are
shown below; it seems by default that Net::DNS only moves to the next name
server after 10s. If you do lots of DNS lookups, that can really
slow things down.
Regards,
Dianne.
#!/usr/bin/perl
#### ns.pl test program
use Net::DNS;
use Net::DNS::Resolver;
my $r = Net::DNS::Resolver->new(nameservers => ['10.50.100.100',
'192.168.10.23']);
my $x = $r->query('colo3.roaringpenguin.com', 'A');
-------------------------------------------------------------------------
strace output:
$ strace -t -esendto perl ns.pl
10:03:49 sendto(4, "N\341\1\0\0\1\0\0\0\0\0\0\5colo3\16roaringpengui"..., 42,
0, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("10.50.100.100")}, 16) = 42
10:03:59 sendto(4, "N\341\1\0\0\1\0\0\0\0\0\0\5colo3\16roaringpengui"..., 42,
0, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("192.168.10.23")}, 16) = 42
10:03:59 +++ exited with 0 +++
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang