Autor: Mark Baker Data: Para: exim-users, debian-ipv6 Assunto: [Exim] Problem with IPv6 support in exim on non-IPv6 systems
I've been shipping the exim package in debian with IPv6 support compiled in
for some time now, and many people use it with no problems---including
hundreds of people who have no IPv6 support in their kernel. Recently,
though, a couple of people have run into a serious problem with it.
They have tried to send mail to hosts which have got AAAA records in the DNS
(at least, that's the only way I can reproduce their problem so I assume
that's what they were doing). When trying to connect to the host in
smtp_connect(), the socket() call fails because it can't open an IPv6
socket, and there is no attempt to fall back to IPv4.
I wrote the following paragraph and was about to send it:
: I can't see any easy way to fix this as at that stage only the IPv6 address
: is known; it's a bit late to go back to the DNS to look up an IPv4 address
: to use instead. I suppose the best way to fix this would be to always look
: up an IPv4 address (if there is one, of course), and pass both to
: smtp_connect(); that means changing smtp_transport_entry().
Actually, looking at the code again, I wonder whether if smtp_connect() died
in a less unpleasant way (like, say, returning an error instead of
panicking), smtp_transport_entry() already contains code to fallback to the
next address? That would certainly be a neater solution. Philip, do you
think that would work?