aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c49
1 files changed, 6 insertions, 43 deletions
diff --git a/driver.c b/driver.c
index 7f627d47..7e013db2 100644
--- a/driver.c
+++ b/driver.c
@@ -140,7 +140,7 @@ static int is_host_alias(const char *name, struct query *ctl)
return(TRUE);
else if (ctl->server.via && strcmp(name, ctl->server.via) == 0)
return(TRUE);
- else if (strcmp(name, ctl->server.canonical_name) == 0)
+ else if (strcmp(name, ctl->server.truename) == 0)
return(TRUE);
else if (!ctl->server.dns)
return(FALSE);
@@ -153,7 +153,7 @@ static int is_host_alias(const char *name, struct query *ctl)
*/
else if ((he = gethostbyname(name)) != (struct hostent *)NULL)
{
- if (strcmp(ctl->server.canonical_name, he->h_name) == 0)
+ if (strcmp(ctl->server.truename, he->h_name) == 0)
goto match;
else
return(FALSE);
@@ -205,7 +205,7 @@ static int is_host_alias(const char *name, struct query *ctl)
else
{
for (mxp = mxrecords; mxp->name; mxp++)
- if (strcmp(ctl->server.canonical_name, mxp->name) == 0)
+ if (strcmp(ctl->server.truename, mxp->name) == 0)
goto match;
return(FALSE);
match:;
@@ -407,41 +407,9 @@ int smtp_open(struct query *ctl)
if ((ctl->smtp_socket = SockOpen(idp->id,SMTP_PORT)) == -1)
continue;
-#ifndef HAVE_RES_SEARCH
- /*
- * How we compute the fake client name to pass to the
- * listener doesn't affect behavior on RFC1123- violating
- * listener that check for name match; we're going to lose
- * on those anyway because we can never give them a name
- * that matches the local machine fetchmail is running on.
- * What it will affect is the listener's logging.
- *
- * If we have the mailserver's canonical FQDN that is clearly
- * the right thing to log. If we don't life is more complicated.
- * The problem is there are two clashing cases:
- *
- * (1) The poll name is a label. In that case we want the
- * log to show the via or true mailserver name.
- *
- * (2) The poll name is the true one, the via name is localhost.
- * This is going to be typical for ssh-using configurations.
- *
- * We're going to assume the via name is true unless it's
- * localhost.
- */
- if (ctrl->server.via && strcmp(ctrl->server.via, "localhost"))
- fakename = ctrl->server.via;
- else
- fakename = ctrl->server->names.id;
-#endif /* HAVE_RES_SEARCH */
-
if (SMTP_ok(ctl->smtp_socket) != SM_OK
|| SMTP_ehlo(ctl->smtp_socket,
-#ifdef HAVE_RES_SEARCH
- ctl->server.canonical_name,
-#else
- fakename,
-#endif /* HAVE_RES_SEARCH */
+ ctl->server.truename,
&ctl->server.esmtp_options) != SM_OK)
{
/*
@@ -464,13 +432,8 @@ int smtp_open(struct query *ctl)
if ((ctl->smtp_socket = SockOpen(idp->id,SMTP_PORT)) == -1)
continue;
else if (SMTP_ok(ctl->smtp_socket) != SM_OK
- || SMTP_helo(ctl->smtp_socket,
-#ifdef HAVE_RES_SEARCH
- ctl->server.canonical_name
-#else
- fakename
-#endif /* HAVE_RES_SEARCH */
- ) != SM_OK)
+ || SMTP_helo(ctl->smtp_socket,
+ ctl->server.truename) != SM_OK)
{
close(ctl->smtp_socket);
ctl->smtp_socket = -1;