Luigi,

>     127.0.0.1.53 > 127.0.0.1.15896: [udp sum ok] 12915 q: AAAA?
> 0.0.0.0.luigilauro.it. 1/0/0 0.0.0.0.luigilauro.it. AAAA
> 2002:4e2e:3890::1 (67)

>     127.0.0.1.53 > 127.0.0.1.24312: [udp sum ok] 12919 q: AAAA?
> 127.0.0.1.luigilauro.it. 1/0/0 127.0.0.1.luigilauro.it. AAAA
> 2002:4e2e:3890::1 (69)


> > Why does your resolver map an AAAA query 0.0.0.0.luigilauro.it to
> > 2002:4e2e:3890::1 ?
> 
> This is perfectly fine, my authoritative DNS is set up for resolving
> any *.luigilauro.it to my A and AAAA public addresses (78.46.56.144
> and 2002:4e2e:3890::1).
> 
> This is what I want and need and have been using with no problems with
> any software for years, not to mention it's a 'standard' widely
> used... ;-)

> I wish I could just make spamassassin do what he should do: query the
> dns on the IPv4 127.0.0.1 for the needed addresses, not try to resolve
> 127.0.0.1 as a name against my domain or other weird, wrong and
> unneeded things :-)

> It's not a MISconfiguration, really :-)
> It's a wanted, needed, standard DNS configuration, to use wildcard in
> domains.
> 
> What is a 'misconfiguration' is spamassassin trying to resolve
> 127.0.0.1 as a domain name instead of treating it for what it is: an
> ipv4 to call for DNS requests :-)

Well, you are asking for trouble with that wildcarding!

The actual bug lies in module IO::Socket::INET6 in sub configure.
Your nameserver entry in /etc/resolv.conf is 127.0.0.1 .
The configure() is trying to figure out which protocol family to use,
so it tries both, the AF_INET6, then AF_INET. Code near line 192 is:

192:  @rres = getaddrinfo(
193:    $raddr,$rport,$fam,$type,$proto,AI_PASSIVE
194:  );

Since getaddrinfo is told to try AF_INET6 first but is given 127.0.0.1
as $raddr, it decides it is not an IPv6 address, and tries to resolve it!
Instead of receiving a usual NXDOMAIN, you are supplying it with an
address 2002:4e2e:3890::1, letting all hell break loose from here on.

I don't think there is anything the Net::DNS or SpamAssassin can do
about it. Your options are:
- contact the maintainer of IO::Socket::INET6 and sort out the problem;
- avoid mapping AAAA 127.0.0.1 query into an IPv6 address of your
  nonrecursive DNS server.

(preferably both).

  Mark

Reply via email to