diff options
Diffstat (limited to 'plugins/check_smtp.c')
-rw-r--r-- | plugins/check_smtp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index ee6d0cb..94214ee 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c | |||
@@ -171,7 +171,6 @@ main (int argc, char **argv) | |||
171 | char *helocmd = NULL; | 171 | char *helocmd = NULL; |
172 | char *error_msg = NULL; | 172 | char *error_msg = NULL; |
173 | struct timeval tv; | 173 | struct timeval tv; |
174 | struct hostent *hp; | ||
175 | 174 | ||
176 | setlocale (LC_ALL, ""); | 175 | setlocale (LC_ALL, ""); |
177 | bindtextdomain (PACKAGE, LOCALEDIR); | 176 | bindtextdomain (PACKAGE, LOCALEDIR); |
@@ -191,9 +190,6 @@ main (int argc, char **argv) | |||
191 | printf(_("gethostname() failed!\n")); | 190 | printf(_("gethostname() failed!\n")); |
192 | return STATE_CRITICAL; | 191 | return STATE_CRITICAL; |
193 | } | 192 | } |
194 | hp = gethostbyname(localhostname); | ||
195 | if(!hp) helocmd = localhostname; | ||
196 | else helocmd = hp->h_name; | ||
197 | } else { | 193 | } else { |
198 | helocmd = localhostname; | 194 | helocmd = localhostname; |
199 | } | 195 | } |
@@ -202,6 +198,9 @@ main (int argc, char **argv) | |||
202 | else | 198 | else |
203 | asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n"); | 199 | asprintf (&helocmd, "%s%s%s", SMTP_HELO, helocmd, "\r\n"); |
204 | 200 | ||
201 | if (verbose) | ||
202 | printf("HELOCMD: %s", helocmd); | ||
203 | |||
205 | /* initialize the MAIL command with optional FROM command */ | 204 | /* initialize the MAIL command with optional FROM command */ |
206 | asprintf (&cmd_str, "%sFROM: %s%s", mail_command, from_arg, "\r\n"); | 205 | asprintf (&cmd_str, "%sFROM: %s%s", mail_command, from_arg, "\r\n"); |
207 | 206 | ||