monit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: sendmail.c, use EHLO only if needed.


From: Martin Pala
Subject: Re: Patch: sendmail.c, use EHLO only if needed.
Date: Tue, 21 Aug 2007 21:20:57 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070802 Iceape/1.1.4 (Debian-1.1.4-1)

Thanks :)

Martin

Thomas Lohmüller wrote:
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
address@hidden
http://lists.nongnu.org/mailman/listinfo/monit-dev




reply via email to

[Prev in Thread] Current Thread [Next in Thread]