-#else
- /*
- * The only code that calls the BIND library is here and in the
- * start-of-run probe with gethostbyname(3) under ETRN/Kerberos.
- *
- * We know DNS service was up at the beginning of the run.
- * If it's down, our nameserver has crashed. We don't want to try
- * delivering the current message or anything else from the
- * current server until it's back up.
- */
- if ((he = gethostbyname((char*)name)) != (struct hostent *)NULL)
- {
- if (strcasecmp(ctl->server.truename, he->h_name) == 0)
- goto match;
- else if (((he_st = gethostbyname(ctl->server.truename)) != (struct hostent *)NULL) && ctl->server.checkalias)
- {
- if (outlevel >= O_DEBUG)
- report(stdout, GT_("Checking if %s is really the same node as %s\n"),ctl->server.truename,name);
- if (is_ip_alias(ctl->server.truename,name) == TRUE)
- {
- if (outlevel >= O_DEBUG)
- report(stdout, GT_("Yes, their IP addresses match\n"));
- goto match;
- }
- if (outlevel >= O_DEBUG)
- report(stdout, GT_("No, their IP addresses don't match\n"));
- return(FALSE);
- }
- else
- return(FALSE);
- }
- else
- switch (h_errno)
- {
- case HOST_NOT_FOUND: /* specified host is unknown */
-#ifndef __BEOS__
- case NO_ADDRESS: /* valid, but does not have an IP address */
- break;
-#endif
- case NO_RECOVERY: /* non-recoverable name server error */
- case TRY_AGAIN: /* temporary error on authoritative server */
- default:
- if (outlevel != O_SILENT)
- report_complete(stdout, "\n"); /* terminate the progress message */
- report(stderr,
- GT_("nameserver failure while looking for `%s' during poll of %s.\n"),
- name, ctl->server.pollname);
- ctl->errcount++;
- break;
- }
-
- /*
- * We're only here if DNS was OK but the gethostbyname() failed
- * with a HOST_NOT_FOUND or NO_ADDRESS error.
- * Search for a name match on MX records pointing to the server.
- */
- h_errno = 0;
- if ((mxrecords = getmxrecords(name)) == (struct mxentry *)NULL)
- {
- switch (h_errno)
- {
- case HOST_NOT_FOUND: /* specified host is unknown */
-#ifndef __BEOS__
- case NO_ADDRESS: /* valid, but does not have an IP address */
- return(FALSE);
- break;
-#endif
- case NO_RECOVERY: /* non-recoverable name server error */
- case TRY_AGAIN: /* temporary error on authoritative server */
- default:
- report(stderr,
- GT_("nameserver failure while looking for `%s' during poll of %s.\n"),
- name, ctl->server.pollname);
- ctl->errcount++;
- break;
- }
- }
- else
- {
- for (mxp = mxrecords; mxp->name; mxp++)
- if (strcasecmp(ctl->server.truename, mxp->name) == 0)
- goto match;
- return(FALSE);
- match:;
- }
-
- /* add this name to relevant server's `also known as' list */
- save_str(&lead_server->akalist, name, 0);
- return(TRUE);
-#endif /* HAVE_RES_SEARCH */