Re: [exim-dev] Preliminary testing of a new Exim test suite

Top Page
Delete this message
Reply to this message
Author: John W. Baxter
Date:  
To: exim-dev
Subject: Re: [exim-dev] Preliminary testing of a new Exim test suite
On 9/28/05 10:38 AM, "John Jetmore" <jetmore@???> wrote:

> I looked into this a bit more because I don't use 10.* addrs on my network
> and 10.11.12.13 doesn't resolve. What I found is that for some reason on
> my machine gethostbyaddr returns NO_RECOVERY for an unknown IP rather than
> HOST_NOT_FOUND. This is seen by exim as a temp error which causes the odd
> combination of sender_host_name being NULL and host_lookup_failed being 0.
> The clue that was missing was that host_lookup_deferred was set to 1:
>
> 0:build-Darwin-powerpc> ./exim -be -oMa 10.11.12.13
>> -oMs  sender_host_name = $sender_host_name
> -oMs  sender_host_name =
>>       host_lookup_failed = $host_lookup_failed
>       host_lookup_failed = 0
>>       host_lookup_deferred = $host_lookup_deferred
>       host_lookup_deferred = 1


Hmmm...with Darwin as used by Apple for "Tiger" (10.4.2), and as the error
is massaged by the Python socket library (where the Pythonistas hid the
gethostbyaddr call), I get

$cat t1.py
#!/usr/bin/python

import socket
print socket.gethostbyaddr('10.11.12.13')

$./t1.py
Traceback (most recent call last):
  File "./t1.py", line 4, in ?
    print socket.gethostbyaddr('10.11.12.13')
socket.herror: (1, 'Unknown host')



It's been so long since I wrote C code that I can't "dash off a little test"
in C. Sorry.

--John (who could, until about 10 years ago, say "I've been around
computers twice as long as C has". I can still say "I refereed a basketball
game with Vannevar Bush as my partner")