[monit-dev] [monit] r335 committed - * Fix Debian bug #614984: smtp protocol test issues both EHLO and HELO...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[monit-dev] [monit] r335 committed - * Fix Debian bug #614984: smtp protocol test issues both EHLO and HELO...

monit-2
Revision: 335
Author: [hidden email]
Date: Mon Mar  7 00:29:06 2011
Log: * Fix Debian bug #614984: smtp protocol test issues both EHLO and HELO.
   Thanks to Sergey B Kirpichev for report.


http://code.google.com/p/monit/source/detail?r=335

Modified:
  /trunk/CHANGES.txt
  /trunk/protocols/smtp.c

=======================================
--- /trunk/CHANGES.txt Tue Mar  1 11:39:55 2011
+++ /trunk/CHANGES.txt Mon Mar  7 00:29:06 2011
@@ -9,9 +9,12 @@

  Version 5.2.5

-* bug #32583: Multiple SIP OPTIONS messages use the same header data.
+* Fix bug #32583: Multiple SIP OPTIONS messages use the same header data.
    Thanks to Hugh Waite for patch.

+* Fix Debian bug #614984: smtp protocol test issues both EHLO and HELO.
+  Thanks to Sergey B Kirpichev for report.
+
  * AIX: Fix the time display which was off by GMT difference. Thanks to
    Helen Chen for report.

=======================================
--- /trunk/protocols/smtp.c Wed Jan 19 10:40:32 2011
+++ /trunk/protocols/smtp.c Mon Mar  7 00:29:06 2011
@@ -63,17 +63,11 @@
  int check_smtp(Socket_T s) {
    ASSERT(s);

-  if (! expect(s, 220, TRUE))
-    return FALSE;
-
    /* Try HELO also before giving up as of rfc2821 4.1.1.1 */
-  if (! (say(s, "EHLO localhost\r\n") && expect(s, 250, FALSE)) || !  
(say(s, "HELO localhost\r\n") && expect(s, 250, TRUE)))
-    return FALSE;
-
-  if (! (say(s, "QUIT\r\n") && expect(s, 221, TRUE)))
-    return FALSE;
-
-  return TRUE;
+  if (expect(s, 220, TRUE) && ((say(s, "EHLO localhost\r\n") && expect(s,  
250, FALSE)) || (say(s, "HELO localhost\r\n") && expect(s, 250, TRUE))) &&  
(say(s, "QUIT\r\n") && expect(s, 221, TRUE)))
+    return TRUE;
+
+  return FALSE;
  }



_______________________________________________
monit-dev mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/monit-dev