[monitoring-plugins] check_smtp.c: modified SSL check for use with -e
Sven Nierlein
git at monitoring-plugins.org
Thu Oct 8 11:30:11 CEST 2015
Module: monitoring-plugins
Branch: maint
Commit: f5f19b4278842ee69e8474789a223bb1abfbbf58
Author: Oliver Skibbe <oliskibbe at gmail.com>
Committer: Sven Nierlein <sven at nierlein.de>
Date: Thu Oct 8 09:04:29 2015 +0200
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=f5f19b4
check_smtp.c: modified SSL check for use with -e
- currently STARTTLS check does not work with -e if there's text
like '220 hostname ESMTP*'. This is caused by SMTP answer from
host. Postfix answer: 220 2.0.0 Ready to start TLS, Exchange
2010: 220 2.0.0 SMTP server ready. This fix checks against 220
closes #1093
(cherry picked from commit b6de2341f8683d51b8723b772e4753507b1607f5)
---
plugins/check_smtp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c
index df6f137..e5e7fac 100644
--- a/plugins/check_smtp.c
+++ b/plugins/check_smtp.c
@@ -231,7 +231,7 @@ main (int argc, char **argv)
send(sd, SMTP_STARTTLS, strlen(SMTP_STARTTLS), 0);
recvlines(buffer, MAX_INPUT_BUFFER); /* wait for it */
- if (!strstr (buffer, server_expect)) {
+ if (!strstr (buffer, SMTP_EXPECT)) {
printf (_("Server does not support STARTTLS\n"));
smtp_quit();
return STATE_UNKNOWN;
More information about the Commits
mailing list