aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS13
-rw-r--r--driver.c20
2 files changed, 23 insertions, 10 deletions
diff --git a/NEWS b/NEWS
index c614b9b8..016ce99e 100644
--- a/NEWS
+++ b/NEWS
@@ -10,7 +10,18 @@
Release Notes:
------------------------------------------------------------------------------
-fetchmail-2.3 (Wed Dec 18 09:17:52 EST 1996)
+fetchmail-2.4 ()
+
+bugs --
+
+* Fixed a core-dump bug in MX processing that's been lurking there for ghods
+ know how long.
+
+* Fixed a minor bug in Received processing.
+
+* Restored portability to Solaris.
+
+------------------------------------------------------------------------------
features --
diff --git a/driver.c b/driver.c
index 5cfbddd1..a0c9f600 100644
--- a/driver.c
+++ b/driver.c
@@ -178,12 +178,7 @@ static int is_host_alias(const char *name, struct query *ctl)
switch (h_errno)
{
case HOST_NOT_FOUND: /* specified host is unknown */
- return(FALSE);
-
case NO_ADDRESS: /* valid, but does not have an IP address */
- for (mxp = mxrecords; mxp->name; mxp++)
- if (strcmp(name, mxp->name) == 0)
- goto match;
return(FALSE);
break;
@@ -198,8 +193,15 @@ static int is_host_alias(const char *name, struct query *ctl)
break;
}
}
+ else
+ {
+ for (mxp = mxrecords; mxp->name; mxp++)
+ if (strcmp(ctl->canonical_name, mxp->name) == 0)
+ goto match;
+ return(FALSE);
+ match:;
+ }
-match:
/* add this name to relevant server's `also known as' list */
save_str(&ctl->lead_server->servernames, -1, name);
return(TRUE);
@@ -414,7 +416,7 @@ struct query *ctl; /* query control record */
cchdr = bufp;
else if (!strncasecmp("Bcc:", bufp, 4))
bcchdr = bufp;
-#ifdef HAVE_GETHOSTBYNAME
+#ifdef HAVE_RES_SEARCH
else if (MULTIDROP(ctl) && !strncasecmp("Received:", bufp, 9))
{
char *ok;
@@ -456,7 +458,7 @@ struct query *ctl; /* query control record */
tp = rbuf;
sp = ok + 4;
- if (*ok == '<')
+ if (*sp == '<')
sp++;
while (*sp && *sp != '>' && *sp != '@' && *sp != ';')
if (!isspace(*sp))
@@ -480,7 +482,7 @@ struct query *ctl; /* query control record */
received_for);
}
}
-#endif /* HAVE_GETHOSTBYNAME */
+#endif /* HAVE_RES_SEARCH */
goto skipwrite;
}