[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: exim, local resolver, host name lookups and IPv6

On Fri, Apr 11, 2008 at 05:48:19PM +0000, Robert Edmonds wrote:

> Why is exim using gethost* calls?  If you look in the
> exim-4.69/src/host.c file, you'll see implementation details like:
>     hostdata = getipnodebyname(CS host->name, af, 0, &error_num);
>     #else
>     hostdata = gethostbyname2(CS host->name, af);
>     error_num = h_errno;
>     #endif
> glibc has had these new getipnode* calls for quite some time; there's no
> reason not to use them.  Why doesn't exim-4.69/OS/os.h-Linux define
> these feature macros?

From the getipnodebyname(3) manpage:

       These functions were present in glibc 2.1.91-95, but were removed
       again.  Several Unix-like systems support them, but all call them

The best way is to use getaddrinfo() and getnameinfo().

> Yes, there is a much better way: do not perform name resolution to
> determine the host's FQDN.  It is wrong.

I agree.

Met vriendelijke groet / with kind regards,
      Guus Sliepen <guus@debian.org>

Attachment: signature.asc
Description: Digital signature

Reply to: