Hi

Some mailservers don't understand EHLO but this is needed for TLS and
authentification. With this small patch EHLO is only used if it is required.



diff -u -r1.50 sendmail.c
--- sendmail.c  12 Aug 2007 15:53:52 -0000      1.50
+++ sendmail.c  19 Aug 2007 21:19:36 -0000
@@ -127,7 +127,14 @@
   }

   do_status(&S);
-  do_send(&S, "EHLO %s\r\n", S.localhost);
+
+  /* Use EHLO if TLS or Authentification is requested */
+  if((S.ssl.use_ssl && S.ssl.version == SSL_VERSION_TLS) ||
+     S.username) {
+    do_send(&S, "EHLO %s\r\n", S.localhost);
+  } else {
+    do_send(&S, "HELO %s\r\n", S.localhost);
+  }
   do_status(&S);

   /* Switch to TLS now if configured */


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

Reply via email to