著者: Sheldon Hearn 日付: To: Philip Hazel CC: exim-users 題目: Re: [Exim] IP address lookups - opinions wanted
On (2003/10/15 12:16), Philip Hazel wrote:
> It seems that getipnodebyaddr() is deprecated (and though in the man
> page, does not appear to be in libc any more). The brave new function to
> do this job is getnameinfo(). I investigated this. Not only does it just
> give one name only, but its API doesn't seem to have any way of
> returning more than one name.
The getaddrinfo(3) and getnameinfo(3) interfaces are an absolute
pleasure to work with, and would certainly render this whole issue moot,
because they're defined to operate exactly the same on any implementing
platform; if there are multiple matching records, you get a linked list
containing all of them.
Unfortunately, uptake of the defining standard (IEEE Std 1003.1g-2000)
seems slow. Well, it was slow when I was paying attention 2 years ago.
Things may have improved since then.
But before you go down that route, you definitely want assurances that
the interfaces are available on all Exim target platforms.
> Instead of just calling gethostbyaddr(), Exim first does a direct DNS
> lookup. If it finds any PTR records, the first is used as the host
> name, and the rest are treated as aliases.
What's a direct DNS lookup? Are you bypassing the resolver in some way?