From 55728a4f2bbb52eb648380b40ebb4e44db590039 Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Mon, 20 Nov 2006 14:29:31 +0000 Subject: [PATCH] Don't set $sender_host_name if forward lookup of name obtained from reverse lookup times out. --- doc/doc-txt/ChangeLog | 6 ++++-- src/src/host.c | 3 ++- test/log/0094 | 2 +- test/mail/0094.userx | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 629762d4c..2629276fe 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.438 2006/11/20 13:53:44 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.439 2006/11/20 14:29:31 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -330,7 +330,9 @@ PH/47 Put in an explicit test for a DNS lookup of an address record where the those revolvers/nameservers that support "A-for-A" lookups, in contravention of the specifications. - +PH/48 When a host name was looked up from an IP address, and the subsequent + forward lookup of the name timed out, the host name was left in + $sender_host_name, contrary to the specification. Exim version 4.63 diff --git a/src/src/host.c b/src/src/host.c index 039f58fb2..24c4bec79 100644 --- a/src/src/host.c +++ b/src/src/host.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/host.c,v 1.26 2006/10/09 14:36:25 ph10 Exp $ */ +/* $Cambridge: exim/src/src/host.c,v 1.27 2006/11/20 14:29:31 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1792,6 +1792,7 @@ for (hname = sender_host_name; hname != NULL; hname = *aliases++) { HDEBUG(D_host_lookup) debug_printf("temporary error for host name lookup\n"); host_lookup_deferred = TRUE; + sender_host_name = NULL; return DEFER; } else diff --git a/test/log/0094 b/test/log/0094 index 17b388fb1..9325a3459 100644 --- a/test/log/0094 +++ b/test/log/0094 @@ -5,6 +5,6 @@ 1999-03-02 09:44:33 10HmaY-0005vi-00 <= userx@test.ex H=[99.99.99.99] U=root P=smtp S=sss 1999-03-02 09:44:33 10HmaY-0005vi-00 => userx R=localuser T=appendfile 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed -1999-03-02 09:44:33 10HmaZ-0005vi-00 <= userx@test.ex H=x.test.again.dns [V4NET.99.99.96] U=root P=smtp S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= userx@test.ex H=[V4NET.99.99.96] U=root P=smtp S=sss 1999-03-02 09:44:33 10HmaZ-0005vi-00 => userx R=localuser T=appendfile 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed diff --git a/test/mail/0094.userx b/test/mail/0094.userx index bbc8b2ad8..255c12026 100644 --- a/test/mail/0094.userx +++ b/test/mail/0094.userx @@ -21,7 +21,7 @@ host_lookup_deferred: 1 This is a test message From userx@test.ex Tue Mar 02 09:44:33 1999 -Received: from x.test.again.dns ([V4NET.99.99.96] ident=root) +Received: from [V4NET.99.99.96] (ident=root) by the.local.host.name with smtp (Exim x.yz) (envelope-from ) id 10HmaZ-0005vi-00 -- 2.30.2