-/* $Cambridge: exim/src/src/dns.c,v 1.14 2006/02/16 10:05:33 ph10 Exp $ */
+/* $Cambridge: exim/src/src/dns.c,v 1.15 2006/11/07 14:13:19 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
else if (rr->type == T_CNAME) cname_rr = *rr;
}
- /* If a CNAME was found, take the fully qualified name from it; otherwise
- from the first data record, if present. For testing, there is a magic name
- that gets its casing adjusted, because my resolver doesn't seem to pass back
- upper case letters in domain names. */
+ /* For the first time round this loop, if a CNAME was found, take the fully
+ qualified name from it; otherwise from the first data record, if present. */
- if (fully_qualified_name != NULL)
+ if (i == 0 && fully_qualified_name != NULL)
{
if (cname_rr.data != NULL)
{
cname_rr.data, (DN_EXPAND_ARG4_TYPE)data, 256);
if (datalen < 0) return DNS_FAIL;
name = data;
+
+ DEBUG(D_dns) debug_printf("CNAME found: change to %s\n", name);
} /* Loop back to do another lookup */
/*Control reaches here after 10 times round the CNAME loop. Something isn't
--- /dev/null
+Exim version x.yz ....
+changed uid/gid: forcing real = effective
+ uid=uuuu gid=CALLER_GID pid=pppp
+configuration file is TESTSUITE/test-config
+admin user
+originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
+sender address = CALLER@the.local.host.name
+Address testing: uid=uuuu gid=EXIM_GID euid=uuuu egid=EXIM_GID
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+Testing userx@alias-eximtesthost
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+Considering userx@alias-eximtesthost
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+routing userx@alias-eximtesthost
+--------> dns router <--------
+local_part=userx domain=alias-eximtesthost
+calling dns router
+dns router called for userx@alias-eximtesthost
+ domain = alias-eximtesthost
+DNS lookup of alias-eximtesthost (MX) using fakens
+DNS lookup of alias-eximtesthost (MX) succeeded
+CNAME found: change to eximtesthost.test.ex
+DNS lookup of eximtesthost.test.ex (MX) using fakens
+DNS lookup of eximtesthost.test.ex (MX) gave NO_DATA
+returning DNS_NODATA
+DNS lookup of alias-eximtesthost (AAAA) succeeded
+CNAME found: change to eximtesthost.test.ex
+DNS lookup of alias-eximtesthost (A) using fakens
+DNS lookup of alias-eximtesthost (A) succeeded
+CNAME found: change to eximtesthost.test.ex
+DNS lookup of eximtesthost.test.ex (A) using fakens
+DNS lookup of eximtesthost.test.ex (A) succeeded
+local host found for non-MX address
+fully qualified name = alias-eximtesthost.test.ex
+eximtesthost.test.ex ip4.ip4.ip4.ip4 mx=-1 sort=xx
+domain changed to alias-eximtesthost.test.ex
+rewriting header lines
+re-routed to userx@alias-eximtesthost.test.ex
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+Considering userx@alias-eximtesthost.test.ex
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+routing userx@alias-eximtesthost.test.ex
+--------> dns router <--------
+local_part=userx domain=alias-eximtesthost.test.ex
+calling dns router
+dns router called for userx@alias-eximtesthost.test.ex
+ domain = alias-eximtesthost.test.ex
+DNS lookup of alias-eximtesthost.test.ex (MX) using fakens
+DNS lookup of alias-eximtesthost.test.ex (MX) succeeded
+CNAME found: change to eximtesthost.test.ex
+DNS lookup of eximtesthost.test.ex-MX: using cached value DNS_NODATA
+DNS lookup of alias-eximtesthost.test.ex (AAAA) succeeded
+CNAME found: change to eximtesthost.test.ex
+DNS lookup of eximtesthost.test.ex-AAAA: using cached value DNS_NODATA
+DNS lookup of alias-eximtesthost.test.ex (A) using fakens
+DNS lookup of alias-eximtesthost.test.ex (A) succeeded
+CNAME found: change to eximtesthost.test.ex
+DNS lookup of eximtesthost.test.ex (A) using fakens
+DNS lookup of eximtesthost.test.ex (A) succeeded
+local host found for non-MX address
+fully qualified name = alias-eximtesthost.test.ex
+eximtesthost.test.ex ip4.ip4.ip4.ip4 mx=-1 sort=xx
+remote host address is the local host: alias-eximtesthost.test.ex: configured to try delivery anyway
+set transport smtp
+queued for smtp transport: local_part = userx
+domain = alias-eximtesthost.test.ex
+ errors_to=NULL
+ domain_data=NULL localpart_data=NULL
+routed by dns router
+ envelope to: userx@alias-eximtesthost.test.ex
+ transport: smtp
+ host eximtesthost.test.ex [ip4.ip4.ip4.ip4]
+search_tidyup called
+>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>>
+Exim version x.yz ....
+changed uid/gid: forcing real = effective
+ uid=uuuu gid=CALLER_GID pid=pppp
+configuration file is TESTSUITE/test-config
+admin user
+originator: uid=CALLER_UID gid=CALLER_GID login=CALLER name=CALLER_NAME
+sender address = CALLER@the.local.host.name
+Address testing: uid=uuuu gid=EXIM_GID euid=uuuu egid=EXIM_GID
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+Testing userx@alias-eximtesthost.test.ex
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+Considering userx@alias-eximtesthost.test.ex
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
+routing userx@alias-eximtesthost.test.ex
+--------> dns router <--------
+local_part=userx domain=alias-eximtesthost.test.ex
+calling dns router
+dns router called for userx@alias-eximtesthost.test.ex
+ domain = alias-eximtesthost.test.ex
+DNS lookup of alias-eximtesthost.test.ex (MX) using fakens
+DNS lookup of alias-eximtesthost.test.ex (MX) succeeded
+CNAME found: change to eximtesthost.test.ex
+DNS lookup of eximtesthost.test.ex (MX) using fakens
+DNS lookup of eximtesthost.test.ex (MX) gave NO_DATA
+returning DNS_NODATA
+DNS lookup of alias-eximtesthost.test.ex (AAAA) succeeded
+CNAME found: change to eximtesthost.test.ex
+DNS lookup of alias-eximtesthost.test.ex (A) using fakens
+DNS lookup of alias-eximtesthost.test.ex (A) succeeded
+CNAME found: change to eximtesthost.test.ex
+DNS lookup of eximtesthost.test.ex (A) using fakens
+DNS lookup of eximtesthost.test.ex (A) succeeded
+local host found for non-MX address
+fully qualified name = alias-eximtesthost.test.ex
+eximtesthost.test.ex ip4.ip4.ip4.ip4 mx=-1 sort=xx
+remote host address is the local host: alias-eximtesthost.test.ex: configured to try delivery anyway
+set transport smtp
+queued for smtp transport: local_part = userx
+domain = alias-eximtesthost.test.ex
+ errors_to=NULL
+ domain_data=NULL localpart_data=NULL
+routed by dns router
+ envelope to: userx@alias-eximtesthost.test.ex
+ transport: smtp
+ host eximtesthost.test.ex [ip4.ip4.ip4.ip4]
+search_tidyup called
+>>>>>>>>>>>>>>>> Exim pid=pppp terminating with rc=0 >>>>>>>>>>>>>>>>