Re: [Mimedefang] long dns timeouts when first dns in /etc/resolv.conf is down

2016-03-14 Thread G.W. Haywood

Hi there,

On Mon, 14 Mar 2016, Marcus Schopen wrote:


... It shouldn't make a difference to mimedefang if one of the dns
server is down. Any ideas?


Run a nameserver of your own?

--

73,
Ged.
___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] long dns timeouts when first dns in /etc/resolv.conf is down

2016-03-14 Thread Dianne Skoll
On Mon, 14 Mar 2016 14:11:38 +0100
Marcus Schopen  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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] long dns timeouts when first dns in /etc/resolv.conf is down

2016-03-14 Thread Marcus Schopen
Hi,

I had a strange behaviour this weekend: the first of two dns server of
my hoster in /etc/resolv.conf was down. The second dns server was
working. Mimedefang/Spamassassin didn't like that. I had very long dns
time outs for remote checks. It took over a minute for an email to run
through mimedefang. System wide dns worked fine, eg. like pinging
domains. After removing the "down" dns server from /etc/resolv.conf  and
restarting sendmail and mimedefang emails went through within a second
again. It shouldn't make a difference to mimedefang if one of the dns
server is down. Any ideas?

Ciao
Marcus


___
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 MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang