diff options
Diffstat (limited to 'src/domain.c')
-rw-r--r-- | src/domain.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/domain.c b/src/domain.c index b7bed93..ec79be8 100644 --- a/src/domain.c +++ b/src/domain.c @@ -492,52 +492,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 ** ** This algorithm tries to be smart about wildcard MX records. |