(1) Typo in redirect router; (2) Update version number; (3) Update
[exim.git] / src / src / lookups / dnsdb.c
index 9cd8612b10c35fef6bb16c1ab6374f90720cc8fb..7f42963a5937bfe36d80261f2cff3e0d2c5eee43 100644 (file)
@@ -1,10 +1,10 @@
-/* $Cambridge: exim/src/src/lookups/dnsdb.c,v 1.6 2004/12/20 15:24:28 ph10 Exp $ */
+/* $Cambridge: exim/src/src/lookups/dnsdb.c,v 1.8 2005/01/04 10:00:44 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2004 */
+/* Copyright (c) University of Cambridge 1995 - 2005 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 #include "../exim.h"
@@ -231,10 +231,12 @@ while ((domain = string_nextinlist(&keystring, &sep, buffer, sizeof(buffer)))
   int searchtype = (type == T_ZNS)? T_NS :          /* record type we want */
                    (type == T_MXH)? T_MX : type; 
 
-  /* If the type is PTR, we have to construct the relevant magic lookup
-  key. This code is now in a separate function. */
+  /* If the type is PTR, we have to construct the relevant magic lookup key if
+  the original is an IP address (some experimental protocols are using PTR
+  records for different purposes where the key string is a host name). This
+  code for doing the reversal is now in a separate function. */
   
-  if (type == T_PTR)
+  if (type == T_PTR && string_is_ip_address(domain, NULL)) 
     {
     dns_build_reverse(domain, rbuffer);
     domain = rbuffer;