From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/176994-check-smtp-ehlo.diff | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 web/attachments/176994-check-smtp-ehlo.diff (limited to 'web/attachments/176994-check-smtp-ehlo.diff') diff --git a/web/attachments/176994-check-smtp-ehlo.diff b/web/attachments/176994-check-smtp-ehlo.diff new file mode 100644 index 0000000..d40329a --- /dev/null +++ b/web/attachments/176994-check-smtp-ehlo.diff @@ -0,0 +1,43 @@ +Index: check_smtp.c +=================================================================== +RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_smtp.c,v +retrieving revision 1.50 +diff -u -r1.50 check_smtp.c +--- check_smtp.c 2 Nov 2005 08:47:26 -0000 1.50 ++++ check_smtp.c 6 May 2006 01:41:30 -0000 +@@ -270,6 +270,35 @@ + } else { + ssl_established = 1; + } ++ ++ /* ++ * Resend the EHLO command. ++ * ++ * RFC 3207 (4.2) says: ``The client MUST discard any knowledge ++ * obtained from the server, such as the list of SMTP service ++ * extensions, which was not obtained from the TLS negotiation ++ * itself. The client SHOULD send an EHLO command as the first ++ * command after a successful TLS negotiation.'' For this ++ * reason, some MTAs will not allow an AUTH LOGIN command before ++ * we resent EHLO via TLS. ++ */ ++ if (my_send(helocmd, strlen(helocmd)) <= 0) { ++ printf(_("SMTP UNKNOWN - Cannot send EHLO command via TLS.\n")); ++ my_close(); ++ return STATE_UNKNOWN; ++ } ++ if (verbose) ++ printf(_("sent %s"), helocmd); ++ if ((n = my_recv(buffer, MAX_INPUT_BUFFER - 1)) <= 0) { ++ printf(_("SMTP UNKNOWN - Cannot read EHLO response via TLS.\n")); ++ my_close(); ++ return STATE_UNKNOWN; ++ } ++ if (verbose) { ++ buffer[n] = '\0'; ++ printf("%s", buffer); ++ } ++ + # ifdef USE_OPENSSL + if ( check_cert ) { + result = np_net_ssl_check_cert(days_till_exp); -- cgit v1.2.3-74-g34f1