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.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index 3bb6cc46..f0bc7363 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -177,6 +177,13 @@ main (int argc, char **argv)
result = STATE_WARNING;
}
}
+
+ /* send the HELO command */
+ send(sd, helocmd, strlen(helocmd), 0);
+
+ /* allow for response to helo command to reach us */
+ read (sd, buffer, MAXBUF - 1);
+
#ifdef HAVE_SSL
if(use_ssl) {
/* send the STARTTLS command */
@@ -206,16 +213,6 @@ main (int argc, char **argv)
}
}
#endif
- /* send the HELO command */
-#ifdef HAVE_SSL
- if (use_ssl)
- SSL_write(ssl, helocmd, strlen(helocmd));
- else
-#endif
- send(sd, helocmd, strlen(helocmd), 0);
-
- /* allow for response to helo command to reach us */
- myrecv();
/* sendmail will syslog a "NOQUEUE" error if session does not attempt
* to do something useful. This can be prevented by giving a command