JH/27 Bug 286: Support SOA lookup in dnsdb lookups.
+JH/28 Bug 1588: Do not use the A lookup following an AAAA for setting the FQDN.
+ Normally benign, it bites when the pair was led to by a CNAME;
+ modern usage is to not canoicalize the domain to a CNAME target
+ (and we were inconsistent anyway for A-only vs AAAA+A).
+
Exim version 4.85
-----------------
/* Lookup succeeded: fill in the given host item with the first non-ignored
address found; create additional items for any others. A single A6 record
- may generate more than one address. */
+ may generate more than one address. The lookup had a chance to update the
+ fqdn; we do not want any later times round the loop to do so. */
+
+ fully_qualified_name = NULL;
for (rr = dns_next_rr(&dnsa, &dnss, RESET_ANSWERS);
rr != NULL;
--- /dev/null
+# Exim test configuration 0607
+
+SERVER =
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/SERVER%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+log_selector = +received_recipients +sender_on_delivery
+
+acl_smtp_rcpt = accept
+queue_only
+queue_run_in_order
+
+#---------------
+
+begin routers
+
+dump:
+ driver = redirect
+ condition = ${if eq {SERVER}{server}{yes}{no}}
+ data = :blackhole:
+
+all:
+ driver = dnslookup
+ self = send
+ transport = out
+
+#---------------
+
+begin transports
+
+out:
+ driver = smtp
+ port = PORT_D
+
+# End
+
recurse.test.ex A V4NET.99.0.2
+; a CNAME pointing to a name with both ipv4 and ipv6 A-records
+; and one with only ipv4
+
+cname46 CNAME localhost
+cname4 CNAME thishost
+
; -------- Testing RBL records -------
; V4NET.11.12.13 is deliberately not reverse-registered
--- /dev/null
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local-smtp S=sss for testx@cname46.test.ex
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local-smtp S=sss for testx@cname4.test.ex
+1999-03-02 09:44:33 Start queue run: pid=pppp -qq
+1999-03-02 09:44:33 10HmaX-0005vi-00 => testx@cname46.test.ex F=<CALLER@the.local.host.name> R=all T=out H=localhost.test.ex [::1] C="250 OK id=10HmaZ-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaY-0005vi-00 => testx@cname4.test.ex F=<CALLER@the.local.host.name> R=all T=out H=thishost.test.ex [127.0.0.1] C="250 OK id=10HmbA-0005vi-00"
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp -qq
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 (IPv6 and IPv4)
+1999-03-02 09:44:33 no host name found for IP address ::1
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name H=(the.local.host.name) [::1] P=esmtp S=sss id=E10HmaX-0005vi-00@the.local.host.name for testx@cname46.test.ex
+1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name H=localhost (the.local.host.name) [127.0.0.1] P=esmtp S=sss id=E10HmaY-0005vi-00@the.local.host.name for testx@cname4.test.ex
--- /dev/null
+# delivery to cname
+# Exim test configuration 0607
+#
+need_ipv6
+#
+exim -DSERVER=server -bd -oX PORT_D
+****
+#
+exim -bs
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO: <testx@cname46.test.ex>
+DATA
+Subject: test
+
+foo
+.
+RSET
+MAIL FROM:<CALLER@myhost.test.ex>
+RCPT TO: <testx@cname4.test.ex>
+DATA
+Subject: test
+
+foo
+.
+QUIT
+****
+#
+exim -qq
+****
+#
+killdaemon
+no_msglog_check