[UNEXPECTED] = US"UNEXPECTED",
[CANCELLED] = US"CANCELLED",
[FAIL_SEND] = US"FAIL_SEND",
- [FAIL_DROP] = US"FAIL_DROP"
+ [FAIL_DROP] = US"FAIL_DROP",
+};
+
+const uschar * dns_rc_names[] = {
+ [DNS_SUCCEED] = US"DNS_SUCCEED",
+ [DNS_NOMATCH] = US"DNS_NOMATCH",
+ [DNS_NODATA] = US"DNS_NODATA",
+ [DNS_AGAIN] = US"DNS_AGAIN",
+ [DNS_FAIL] = US"DNS_FAIL",
};
moves down the page. This function is used only in debugging circumstances. The
output is done via debug_printf(). */
-#define tree_printlinesize 132 /* line size for printing */
-static uschar tree_printline[tree_printlinesize];
+#define TREE_PRINTLINESIZE 132 /* line size for printing */
+static uschar tree_printline[TREE_PRINTLINESIZE];
/* Internal recursive subroutine.
*/
static void
-tree_printsub(tree_node *p, int pos, int barswitch)
+tree_printsub(tree_node * p, int pos, int barswitch)
{
if (p->right) tree_printsub(p->right, pos+2, 1);
-for (int i = 0; i <= pos-1; i++) debug_printf("%c", tree_printline[i]);
-debug_printf("-->%s [%d]\n", p->name, p->balance);
-tree_printline[pos] = barswitch? '|' : ' ';
+for (int i = 0; i <= pos-1; i++) debug_printf_indent(" %c", tree_printline[i]);
+debug_printf_indent(" -->%s [%d]\n", p->name, p->balance);
+tree_printline[pos] = barswitch ? '|' : ' ';
if (p->left)
{
tree_printline[pos+2] = '|';
/* The external function, with just a tree node argument. */
void
-debug_print_tree(tree_node *p)
+debug_print_tree(const char * title, tree_node * p)
{
-for (int i = 0; i < tree_printlinesize; i++) tree_printline[i] = ' ';
-if (!p) debug_printf("Empty Tree\n"); else tree_printsub(p, 0, 0);
-debug_printf("---- End of tree ----\n");
+debug_printf_indent("%s:\n", title);
+for (int i = 0; i < TREE_PRINTLINESIZE; i++) tree_printline[i] = ' ';
+if (!p) debug_printf_indent(" Empty Tree\n"); else tree_printsub(p, 0, 0);
+debug_printf_indent("---- End of tree ----\n");
}
val = e->data.val;
rc = e->expiry && e->expiry <= time(NULL) ? -1 : val;
-DEBUG(D_dns) debug_printf("DNS lookup of %.255s-%s: %scached value %s%s\n",
+DEBUG(D_dns) debug_printf("DNS lookup of %.255s (%s): %scached value %s%s\n",
name, dns_text_type(type),
rc == -1 ? "" : "using ",
- val == DNS_NOMATCH ? "DNS_NOMATCH" :
- val == DNS_NODATA ? "DNS_NODATA" :
- val == DNS_AGAIN ? "DNS_AGAIN" :
- val == DNS_FAIL ? "DNS_FAIL" : "??",
+ dns_rc_names[val],
rc == -1 ? " past valid time" : "");
return rc;
extern void debug_print_ids(uschar *);
extern void debug_printf_indent(const char *, ...) PRINTF_FUNCTION(1,2);
extern void debug_print_string(uschar *);
-extern void debug_print_tree(tree_node *);
+extern void debug_print_tree(const char *, tree_node *);
extern void debug_vprintf(int, const char *, va_list);
extern void debug_print_socket(int);
extern int dns_retrans; /* Retransmission time setting */
extern int dns_retry; /* Number of retries */
extern int dns_dnssec_ok; /* When constructing DNS query, set DO flag */
+extern const uschar * dns_rc_names[]; /* Mostly for debug output */
extern uschar *dns_trust_aa; /* DNSSEC trust AA as AD */
extern int dns_use_edns0; /* Coerce EDNS0 support on/off in resolver. */
extern uschar *dnslist_domain; /* DNS (black) list domain */
rc = dns_lookup_timerwrap(dnsa, buffer, T_TLSA, &fullname);
sec = dns_is_secure(dnsa);
DEBUG(D_transport)
- debug_printf("TLSA lookup ret %d %sDNSSEC\n", rc, sec ? "" : "not ");
+ debug_printf("TLSA lookup ret %s %sDNSSEC\n", dns_rc_names[rc], sec ? "" : "not ");
switch (rc)
{
#define DELIVER_MUA_FAILED 2 /* Failure when mua_wrapper is set */
#define DELIVER_NOT_ATTEMPTED 3 /* Not tried (no msg or is locked */
-/* Returns from DNS lookup functions. */
+/* Returns from DNS lookup functions. Use dns_rc_names[] for debug strings */
enum { DNS_SUCCEED, DNS_NOMATCH, DNS_NODATA, DNS_AGAIN, DNS_FAIL };
goto SPOOL_FORMAT_ERROR;
#ifndef COMPILE_UTILITY
-DEBUG(D_deliver)
- {
- debug_printf("Non-recipients:\n");
- debug_print_tree(tree_nonrecipients);
- }
+DEBUG(D_deliver) debug_print_tree("Non-recipients", tree_nonrecipients);
#endif /* COMPILE_UTILITY */
/* After reading the tree, the next line has not yet been read into the
lookuphost router called for abcd@test.again.dns
domain = test.again.dns
test.again.dns in "*"? yes (matched "*")
-DNS lookup of test.again.dns-MX: using cached value DNS_AGAIN
+DNS lookup of test.again.dns (MX): using cached value DNS_AGAIN
lookuphost router: defer for abcd@test.again.dns
message: host lookup did not complete
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
finding IP address for test.again.dns
doing DNS lookup
test.again.dns in "*"? yes (matched "*")
-DNS lookup of test.again.dns-A: using cached value DNS_AGAIN
+DNS lookup of test.again.dns (A): using cached value DNS_AGAIN
useryz router: defer for userz@test.again.dns
message: host lookup for test.again.dns did not complete (DNS timeout?)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
lookuphost router called for xyz@ten-1.test.ex
domain = ten-1.test.ex
ten-1.test.ex in "*"? yes (matched "*")
-DNS lookup of ten-1.test.ex-MX: using cached value DNS_NODATA
+DNS lookup of ten-1.test.ex (MX): using cached value DNS_NODATA
DNS lookup of ten-1.test.ex (A) using fakens
DNS lookup of ten-1.test.ex (A) succeeded
fully qualified name = ten-1.test.ex
lookuphost router called for abcd@test.fail.dns
domain = test.fail.dns
test.fail.dns in "*"? yes (matched "*")
-DNS lookup of test.fail.dns-MX: using cached value DNS_FAIL
+DNS lookup of test.fail.dns (MX): using cached value DNS_FAIL
lookuphost router: defer for abcd@test.fail.dns
message: host lookup did not complete
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
finding IP address for test.fail.dns
doing DNS lookup
test.fail.dns in "*"? yes (matched "*")
-DNS lookup of test.fail.dns-A: using cached value DNS_FAIL
+DNS lookup of test.fail.dns (A): using cached value DNS_FAIL
useryz router: defer for userz@test.fail.dns
message: host lookup for test.fail.dns did not complete (DNS timeout?)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
lookuphost router called for xyz@ten-1.test.ex
domain = ten-1.test.ex
ten-1.test.ex in "*"? yes (matched "*")
-DNS lookup of ten-1.test.ex-MX: using cached value DNS_NODATA
+DNS lookup of ten-1.test.ex (MX): using cached value DNS_NODATA
DNS lookup of ten-1.test.ex (A) using fakens
DNS lookup of ten-1.test.ex (A) succeeded
fully qualified name = ten-1.test.ex
lookuphost router called for abcd@nonexist.test.ex
domain = nonexist.test.ex
nonexist.test.ex in "*"? yes (matched "*")
-DNS lookup of nonexist.test.ex-MX: using cached value DNS_NOMATCH
+DNS lookup of nonexist.test.ex (MX): using cached value DNS_NOMATCH
lookuphost router declined for abcd@nonexist.test.ex
"more" is false: skipping remaining routers
no more routers
finding IP address for nonexist.test.ex
doing DNS lookup
nonexist.test.ex in "*"? yes (matched "*")
-DNS lookup of nonexist.test.ex-A: using cached value DNS_NOMATCH
+DNS lookup of nonexist.test.ex (A): using cached value DNS_NOMATCH
useryz router: defer for userz@nonexist.test.ex
message: lookup of host "nonexist.test.ex" failed in useryz router
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
lookuphost router called for xyz@ten-1.test.ex
domain = ten-1.test.ex
ten-1.test.ex in "*"? yes (matched "*")
-DNS lookup of ten-1.test.ex-MX: using cached value DNS_NODATA
+DNS lookup of ten-1.test.ex (MX): using cached value DNS_NODATA
DNS lookup of ten-1.test.ex (A) using fakens
DNS lookup of ten-1.test.ex (A) succeeded
fully qualified name = ten-1.test.ex
delay router called for userd@nonexist.example.com
domain = nonexist.example.com
nonexist.example.com in "*"? yes (matched "*")
-DNS lookup of nonexist.example.com-MX: cached value DNS_NOMATCH past valid time
+DNS lookup of nonexist.example.com (MX): cached value DNS_NOMATCH past valid time
DNS lookup of nonexist.example.com (MX) using fakens
DNS lookup of nonexist.example.com (MX) gave HOST_NOT_FOUND
returning DNS_NOMATCH
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
sender_rcvhost = [V4NET.11.12.13] (ident=CALLER)
sender_local=0 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
sender_rcvhost = [V4NET.11.12.13] (ident=CALLER)
sender_local=0 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=5
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=608
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=x@y
sender_local=0 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=spaced user uid=CALLER_UID gid=CALLER_GID sender="spaced user"@myhost.test.ex
sender_local=1 ident=spaced user
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
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 eximtesthost.test.ex (MX): 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
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@myhost.test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@myhost.test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@myhost.test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields
user=CALLER uid=CALLER_UID gid=CALLER_GID sender=CALLER@test.ex
sender_local=1 ident=CALLER
Non-recipients:
-Empty Tree
+ Empty Tree
---- End of tree ----
recipients_count=1
**** SPOOL_IN - No additional fields