diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1998-01-18 17:59:03 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1998-01-18 17:59:03 +0000 |
commit | 82d439ab4b351b4193521428fa449f392c8ec0ac (patch) | |
tree | 51843f4a9e003cc1c5804685ed9e5ff8213def94 | |
parent | bc1dbec642a692d2b84d32cee53837dc5f01b726 (diff) | |
download | fetchmail-82d439ab4b351b4193521428fa449f392c8ec0ac.tar.gz fetchmail-82d439ab4b351b4193521428fa449f392c8ec0ac.tar.bz2 fetchmail-82d439ab4b351b4193521428fa449f392c8ec0ac.zip |
Better behavior in absence of bind library.
svn path=/trunk/; revision=1595
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | driver.c | 2 | ||||
-rw-r--r-- | fetchmail.c | 19 |
3 files changed, 13 insertions, 11 deletions
@@ -28,8 +28,9 @@ fetchmail-4.3.6 () in response to the first command after connecting.) * New --smtpaddress option from Henning P. Schmiedehausen allows you to force the hostname used in MAIL FROM lines. +* If link can't find the bind library, force `no dns' on all connections. -There are 281 people on fetchmail-friends and 118 on fetchmail-announce. +There are 279 people on fetchmail-friends and 119 on fetchmail-announce. fetchmail-4.3.5 (Mon Dec 15 06:07:08 EST 1997) * Added Kent Robotti's fetchsetup configuration script. @@ -1539,6 +1539,7 @@ const struct method *proto; /* protocol method table */ { error_build("fetchmail: %s connection to %s failed: ", protocol->name, ctl->server.pollname); +#ifdef HAVE_RES_SEARCH if (h_errno == HOST_NOT_FOUND) error_complete(0, 0, "host is unknown"); else if (h_errno == NO_ADDRESS) @@ -1550,6 +1551,7 @@ const struct method *proto; /* protocol method table */ else if (h_errno) error_complete(0, 0, "unknown DNS error %d", h_errno); else +#endif /* HAVE_RES_SEARCH */ error_complete(0, errno, "local error"); } ok = PS_SOCKET; diff --git a/fetchmail.c b/fetchmail.c index 49c163c2..90446961 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -654,16 +654,6 @@ static int load_params(int argc, char **argv, int optind) if (!ctl->localnames) /* for local delivery via SMTP */ save_str_pair(&ctl->localnames, user, NULL); -#if !defined(HAVE_GETHOSTBYNAME) || !defined(HAVE_RES_SEARCH) - /* can't handle multidrop mailboxes unless we can do DNS lookups */ - if (ctl->localnames && ctl->localnames->next && ctl->server.dns) - { - fputs("fetchmail: can't handle multidrop mailboxes without DNS\n", - stderr); - exit(PS_SYNTAX); - } -#endif /* !HAVE_GETHOSTBYNAME || !HAVE_RES_SEARCH */ - /* this code enables flags to be turned off */ #define DEFAULT(flag, dflt) if (flag == FLAG_TRUE)\ flag = TRUE;\ @@ -683,6 +673,15 @@ static int load_params(int argc, char **argv, int optind) DEFAULT(ctl->server.uidl, FALSE); #undef DEFAULT +#if !defined(HAVE_GETHOSTBYNAME) || !defined(HAVE_RES_SEARCH) + /* can't handle multidrop mailboxes unless we can do DNS lookups */ + if (ctl->localnames && ctl->localnames->next && ctl->server.dns) + { + ctl->server.dns = FALSE; + fprintf(stderr, "fetchmail: warning: no DNS available to check multidrop fetches from %s\n", ctl->server.pollname); + } +#endif /* !HAVE_GETHOSTBYNAME || !HAVE_RES_SEARCH */ + /* * * Compute the true name of the mailserver host. |