summaryrefslogtreecommitdiffstats
path: root/plugins/check_smtp.c
diff options
context:
space:
mode:
authorM. Sean Finney <seanius@users.sourceforge.net>2005-04-07 04:33:33 (GMT)
committerM. Sean Finney <seanius@users.sourceforge.net>2005-04-07 04:33:33 (GMT)
commitd6b81a591295cb50709f5cd6c21c4a9f80770a3e (patch)
tree6f438c7c92385b1aceeb0096b88630548cecd5c9 /plugins/check_smtp.c
parent5d7f904c200d74365b36ef5f75817204cc7899a8 (diff)
downloadmonitoring-plugins-d6b81a591295cb50709f5cd6c21c4a9f80770a3e.tar.gz
in honor of joining up, my first bugfix. this should resolve 1174070.
note i don't have an exchange server to test this against, but it does what the requester mentioned (slightly cleaner than the patch attached in the tracker). it does, however, still work against my own postfix server :) sean git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1158 f882894a-f735-0410-b71e-b25c423dba1c
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 3bb6cc4..f0bc736 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -177,6 +177,13 @@ main (int argc, char **argv)
177 result = STATE_WARNING; 177 result = STATE_WARNING;
178 } 178 }
179 } 179 }
180
181 /* send the HELO command */
182 send(sd, helocmd, strlen(helocmd), 0);
183
184 /* allow for response to helo command to reach us */
185 read (sd, buffer, MAXBUF - 1);
186
180#ifdef HAVE_SSL 187#ifdef HAVE_SSL
181 if(use_ssl) { 188 if(use_ssl) {
182 /* send the STARTTLS command */ 189 /* send the STARTTLS command */
@@ -206,16 +213,6 @@ main (int argc, char **argv)
206 } 213 }
207 } 214 }
208#endif 215#endif
209 /* send the HELO command */
210#ifdef HAVE_SSL
211 if (use_ssl)
212 SSL_write(ssl, helocmd, strlen(helocmd));
213 else
214#endif
215 send(sd, helocmd, strlen(helocmd), 0);
216
217 /* allow for response to helo command to reach us */
218 myrecv();
219 216
220 /* sendmail will syslog a "NOQUEUE" error if session does not attempt 217 /* sendmail will syslog a "NOQUEUE" error if session does not attempt
221 * to do something useful. This can be prevented by giving a command 218 * to do something useful. This can be prevented by giving a command