From ab5425702f3448cd56e1bb0c3a751c6c34c55d5f Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 3 Feb 2013 15:54:58 +0100 Subject: Work around systems returning obsolete EAI_NODATA. Older systems that provide the older RFC-2553 implementation of getaddrinfo, rather than the current RFC-3493, and systems that do not provide this getaddrinfo() interface at all and thus use the replacement functions from libesmtp/getaddrinfo.?, might return EAI_NODATA when a host is registered in DNS as MX or similar, but without A or AAAA records. Handle this situation when checking for multidrop aliases and treat EAI_NODATA the same as EAI_NONAME, i. e. name cannot be resolved. The proper fix, however, is to upgrade the operating system. --- checkalias.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'checkalias.c') diff --git a/checkalias.c b/checkalias.c index 2e50ea09..1e1d1633 100644 --- a/checkalias.c +++ b/checkalias.c @@ -194,6 +194,15 @@ int is_host_alias(const char *name, struct query *ctl, struct addrinfo **res) switch (e) { case EAI_NONAME: /* specified host is unknown */ +#ifdef EAI_NODATA + /* EAI_NODATA was in the older RFC-2553, but that got + * obsoleted by RFC-3493 - there, EAI_NODATA is no longer + * valid, and modern operating systems no longer issue this + * error code. libesmtp/getaddrinfo.?, however, still does. + * (This was reported to Brian Stafford 2013-02-03.) + */ + case EAI_NODATA: /* specified host is unknown */ +#endif break; default: -- cgit v1.2.3