aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_smtp.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r--plugins/check_smtp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index ee6d0cb7..94214ee0 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -171,7 +171,6 @@ main (int argc, char **argv)
char *helocmd = NULL;
char *error_msg = NULL;
struct timeval tv;
- struct hostent *hp;
setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR);
@@ -191,9 +190,6 @@ main (int argc, char **argv)
printf(_("gethostname() failed!\n"));
return STATE_CRITICAL;
}
- hp = gethostbyname(localhostname);
- if(!hp) helocmd = localhostname;
- else helocmd = hp->h_name;
} else {
helocmd = localhostname;
}
@@ -202,6 +198,9 @@ main (int argc, char **argv)
else
asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n");
+ if (verbose)
+ printf("HELOCMD: %s", helocmd);
+
/* initialize the MAIL command with optional FROM command */
asprintf (&cmd_str, "%sFROM: %s%s", mail_command, from_arg, "\r\n");