[Exim] [BUG] Exim 4.10 incorrectly issues EHLO after STARTTL…

Pàgina inicial
Delete this message
Reply to this message
Autor: Phil Brutsche
Data:  
A: exim-users
CC: ph10
Assumpte: [Exim] [BUG] Exim 4.10 incorrectly issues EHLO after STARTTLS in LMTP session
While playing around with Exim 4.10 delivering messages to Cyrus, I
discovered that after negotiating TLS Exim issues a EHLO when it should
issue a LHLO. This is best demonstrated with the following debugging
snippet:

Connecting to localhost [127.0.0.1]:2003 ... connected
read response data: size=51
   SMTP<< 220 postale LMTP Cyrus v2.1.5-Debian2.1.5-5 ready
   SMTP>> LHLO postale.optimumdata.com
read response data: size=125
   SMTP<< 250-postale
          250-8BITMIME
          250-ENHANCEDSTATUSCODES
          250-PIPELINING
          250-SIZE
          250-STARTTLS
          250 IGNOREQUOTA
127.0.0.1 in hosts_avoid_tls? no (option unset)
   SMTP>> STARTTLS
read response data: size=31
   SMTP<< 220 Begin TLS negotiation now
Initialised TLS
[TLS stuff]
Cipher: TLSv1:DES-CBC3-SHA:168
   SMTP>> EHLO postale.optimumdata.com
tls_do_write(bfffcab0, 30)
SSL_write(SSL, bfffcab0, 30)
outbytes=30 error=0
Calling SSL_read(80e17c0, bfffceb0, 4096)
read response data: size=24
   SMTP<< 500 5.5.2 Syntax error
ok=0 send_quit=1 send_rset=1 continue_more=0 yield=0 first_address=135114256
   SMTP>> QUIT


Philip, please consider the following patch for Exim 4.11. It is also
available at http://tux.obix.com/~phil/lmtp-starttls.patch.

--- src/transports/smtp.c.orig  Wed Oct 16 22:05:44 2002
+++ src/transports/smtp.c       Wed Oct 16 22:06:26 2002
@@ -893,7 +893,8 @@


  if (tls_active >= 0)
    {
-  if (!smtp_write_command(&outblock, FALSE, "EHLO %s\r\n", helo_data))
+  if (!smtp_write_command(&outblock, FALSE, "%s %s\r\n", lmtp? "LHLO" :
"EHLO",
+        helo_data))
      goto SEND_FAILED;
    if (!smtp_read_response(&inblock, buffer, sizeof(buffer), '2',
         ob->command_timeout))


--

Phil Brutsche
phil@???