- ares_gethostbyname(SendMsg->IO.DNSChannel,
- Hostname,
- AF_INET6, /* it falls back to ipv4 in doubt... */
- get_one_mx_host_ip_done,
- &SendMsg->IO);
+ if (!QueueQuery(ns_t_a,
+ Hostname,
+ &SendMsg->IO,
+ &SendMsg->HostLookup,
+ get_one_mx_host_ip_done))
+ {
+ SendMsg->MyQEntry->Status = 5;
+ StrBufPrintf(SendMsg->MyQEntry->StatusMessage,
+ "No MX hosts found for <%s>", SendMsg->node);
+ return IO->NextState;
+ }