From 4e2c4cdcd62c4ab1d5e884e8afaa0bbe1b981e42 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Tue, 7 Dec 1999 02:32:22 +0100 Subject: Imported Debian patch 8.9.3-3slink1 --- src/domain.c | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'src/domain.c') diff --git a/src/domain.c b/src/domain.c index b7bed93..ec79be8 100644 --- a/src/domain.c +++ b/src/domain.c @@ -491,52 +491,6 @@ bestmx_map_lookup(map, name, av, statp) } return map_rewrite(map, buf, len, av); } - /* -** ISMX -- find if we are the MX for a certain host. -** -** This is really a hack, but I don't see any obvious way -** to generalize it at the moment. -*/ - -char * -ismx_map_lookup(map, name, av, statp) - MAP *map; - char *name; - char **av; - int *statp; -{ - int nmx, i, len; - auto int rcode; - int saveopts = _res.options; - char *mxhosts[MAXMXHOSTS + 1]; - char *mymx = NULL; - - _res.options &= ~(RES_DNSRCH|RES_DEFNAMES); - nmx = getmxrr(name, mxhosts, FALSE, &rcode); - _res.options = saveopts; - if (rcode != EX_TEMPFAIL) { - if (nmx <= 0) - return NULL; - for(i = 0; i < nmx; i++) { - len = strlen(mxhosts[i]); - if (len && mxhosts[i][len - 1] == '.') - mxhosts[i][len - 1] = 0; - if (wordinclass(mxhosts[i], 'w')) { - mymx = mxhosts[i]; - break; - } - } - if (mymx == NULL) - return NULL; - } else - mymx = "TEMPFAIL"; - - if (bitset(MF_MATCHONLY, map->map_mflags)) - return map_rewrite(map, name, strlen(name), NULL); - else - return map_rewrite(map, mymx, strlen(mymx), av); -} - /* ** DNS_GETCANONNAME -- get the canonical name for named host using DNS ** -- cgit v1.2.3