aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rw-r--r--fetchmail.c44
2 files changed, 27 insertions, 19 deletions
diff --git a/NEWS b/NEWS
index 0d525f19..25098d87 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,8 @@
* Nalin Dahyabhai's patch to make IPv6 build on older systems.
* Restrict shrouding to just the password send so it won't leak info.
+* Move an #ifdef INET6_ENABLE to deal with libc5 headers.
+* Only DNS-probe entries that are active on this run.
fetchmail-5.7.4 (Mon Mar 12 00:02:23 EST 2001), 20323 lines:
diff --git a/fetchmail.c b/fetchmail.c
index cac7b413..a62103d1 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -976,6 +976,30 @@ static int load_params(int argc, char **argv, int optind)
if (check_only && run.poll_interval)
run.poll_interval = 0;
+ /*
+ * DNS support is required for some protocols. We used to
+ * do this unconditionally, but it made fetchmail excessively
+ * vulnerable to misconfigured DNS setups.
+ *
+ * If we're using ETRN or ODMR, the smtp hunt list is the
+ * list of systems we're polling on behalf of; these have
+ * to be fully-qualified domain names. The default for
+ * this list should be the FQDN of localhost.
+ *
+ * If we're using Kerberos for authentication, we need
+ * the FQDN in order to generate capability keys.
+ */
+ if (strcmp(fetchmailhost, "localhost") == 0)
+ for (ctl = querylist; ctl; ctl = ctl->next)
+ if (ctl->active &&
+ (ctl->server.protocol==P_ETRN || ctl->server.protocol==P_ODMR
+ || ctl->server.authenticate == A_KERBEROS_V4
+ || ctl->server.authenticate == A_KERBEROS_V5))
+ {
+ fetchmailhost = host_fqdn();
+ break;
+ }
+
/* merge in wired defaults, do sanity checks and prepare internal fields */
for (ctl = querylist; ctl; ctl = ctl->next)
{
@@ -1016,24 +1040,6 @@ static int load_params(int argc, char **argv, int optind)
#undef DEFAULT
/*
- * DNS support is required for some protocols. We used to
- * do this unconditionally, but it made fetchmail excessively
- * vulnerable to misconfigured DNS setups.
- *
- * If we're using ETRN or ODMR, the smtp hunt list is the
- * list of systems we're polling on behalf of; these have
- * to be fully-qualified domain names. The default for
- * this list should be the FQDN of localhost.
- *
- * If we're using Kerberos for authentication, we need
- * the FQDN in order to generate capability keys. */
- if (ctl->server.protocol==P_ETRN || ctl->server.protocol==P_ODMR
- || ctl->server.authenticate == A_KERBEROS_V4
- || ctl->server.authenticate == A_KERBEROS_V5)
- if (strcmp(fetchmailhost, "localhost") == 0)
- fetchmailhost = host_fqdn();
-
- /*
* Make sure we have a nonempty host list to forward to.
*/
if (!ctl->smtphunt)
@@ -1117,7 +1123,7 @@ static int load_params(int argc, char **argv, int optind)
ctl->server.truename = xstrdup(leadname);
}
#ifdef HAVE_GETHOSTBYNAME
- else if (!configdump)
+ else if (ctl->active && !configdump)
{
if (ctl->server.authenticate==A_KERBEROS_V4 ||
ctl->server.authenticate==A_KERBEROS_V5 ||