From: "Helmut Schneider"

[problems resolving a host]

Damn!!

[root@BSDHelmut ~]# cat /var/amavis/test2.pl
#!/usr/bin/perl -w

use Net:NS;
my $res = Net:NS::Resolver->new;
my $query = $res->search("www.google.de");

if ($query) {
foreach my $rr ($query->answer) {
next unless $rr->type eq "A";
print $rr->address, "\n";
}
} else {
warn "query failed: ", $res->errorstring, "\n";
}
[root@BSDHelmut ~]# ktrace chroot -u vscan -g vscan /var/amavis/ /test2.pl
query failed: could not get socket
[root@BSDHelmut ~]# kdump -f ./ktrace.out
[...]
40635 perl5.8.8 CALL open(0x28275464,0,0x1b6)
40635 perl5.8.8 NAMI "/etc/protocols"
40635 perl5.8.8 RET open -1 errno 2 No such file or directory
40635 perl5.8.8 CALL open(0x28275464,0,0x1b6)
40635 perl5.8.8 NAMI "/etc/protocols"
40635 perl5.8.8 RET open -1 errno 2 No such file or directory
40635 perl5.8.8 CALL open(0x28275464,0,0x1b6)
40635 perl5.8.8 NAMI "/etc/protocols"
40635 perl5.8.8 RET open -1 errno 2 No such file or directory
40635 perl5.8.8 CALL open(0x28275464,0,0x1b6)
40635 perl5.8.8 NAMI "/etc/protocols"
40635 perl5.8.8 RET open -1 errno 2 No such file or directory
40635 perl5.8.8 CALL break(0x82c0800)
40635 perl5.8.8 RET break 0
40635 perl5.8.8 CALL break(0x82c1000)
40635 perl5.8.8 RET break 0
40635 perl5.8.8 CALL write(0x2,0x82beee0,0x23)
40635 perl5.8.8 GIO fd 2 wrote 35 bytes
"query failed: could not get socket
"
40635 perl5.8.8 RET write 35/0x23
40635 perl5.8.8 CALL break(0x82c1800)
40635 perl5.8.8 RET break 0
40635 perl5.8.8 CALL break(0x82c2000)
40635 perl5.8.8 RET break 0
40635 perl5.8.8 CALL exit(0)
[root@BSDHelmut ~]# cp /etc/protocols /var/amavis/etc/
[root@BSDHelmut ~]# chroot -u vscan -g vscan /var/amavis/ /test2.pl
209.85.135.104
209.85.135.147
209.85.135.99
209.85.135.103
[root@BSDHelmut ~]#

[40648] dbg: dns: is_dns_available() last checked 1184068231 seconds ago;
re-checking
[40648] dbg: dns: name server: 192.168.0.90, LocalAddr: 0.0.0.0
[40648] dbg: dns: testing resolver nameservers: 192.168.0.90, 192.168.0.80
[40648] dbg: dns: trying (3) msn.com...
[40648] dbg: dns: looking up NS for 'msn.com'
[40648] dbg: dns: NS lookup of msn.com using 192.168.0.90 succeeded => DNS
available (set dns_available to override)
[40648] dbg: dns: is DNS available? 1

Thanks a lot, Helmut