Bug 64798 - Syntactically incorrect EHLO command, unable to use SMTP server
Summary: Syntactically incorrect EHLO command, unable to use SMTP server
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: smtp (show other bugs)
Version: unspecified
Platform: unspecified FreeBSD
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 64797 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-09-23 14:44 UTC by Lauri Watts
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
tcpdump output (15.94 KB, text/plain)
2003-09-23 22:25 UTC, Lauri Watts
Details
tcpdump output (21.09 KB, text/plain)
2003-09-24 18:34 UTC, Lauri Watts
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lauri Watts 2003-09-23 14:44:30 UTC
Version:           1.5.9 (using KDE 3.1.9)
Compiler:          gcc version 2.95.4 20020320 [FreeBSD]
OS:          FreeBSD (i386) release 4.9-PRERELEASE

For quite some time, KMail has failed to connect to my mail server, any combination of settings results in the error described above.  Watching from the mail server shows no hostname is sent with the EHLO, even if one is set specifically in KMail's configuration.

I can repeat this with a second mail server at another location, also running Exim.

The 'check what the server supports' dialog no longer works either, it takes quite a while to timeout, but then says it couldn't reach the server (which is local, on the LAN)

Recompiling with debug right now, but all I'm seeing on the console already is:
kdeinit: Got EXEC_NEW 'kio_smtp' from launcher.
kio (KLauncher): kio_smtp (pid 95761) up and running.
kio_smtp: S: 220 mandarin.fruitsalad.org ESMTP Exim 4.14 Mon, 22 Sep 2003 13:05:42 +0200
kio_smtp: C: <7 bytes>
kio_smtp: S: 501 Syntactically invalid EHLO argument(s)
kio_smtp: closing connection

The server does not reply with a multiline banner (yes, I did check for duplicates), 
telnet shows:
Trying 192.168.254.243...
Connected to mandarin.internal.hasta.se.
Escape character is '^]'.
220 mandarin.fruitsalad.org ESMTP Exim 4.14 Mon, 22 Sep 2003 12:56:55 +0200
EHLO kurant
250-mandarin.fruitsalad.org Hello kurant.internal.hasta.se [192.168.15.5]
250-SIZE 52428800
250-PIPELINING
250 HELP
HELP
214-Commands supported:

Mail is sent correctly from any other client I have available, and the server is in  production use, it is only KMail that is failing to speak to it.  I can probably arrange a test account on it if needed.
Comment 1 Thiago Macieira 2003-09-23 17:51:33 UTC
Can you provide an ethereal or tcpdump log with the contents of what kio_smtp is sending? 
Comment 2 Lauri Watts 2003-09-23 22:17:09 UTC
*** Bug 64797 has been marked as a duplicate of this bug. ***
Comment 3 Lauri Watts 2003-09-23 22:25:47 UTC
Created attachment 2562 [details]
tcpdump output

Attached 'tcpdump -vvv port smtp' (if this is not what you want, you'll need to
give me more explicit instructions :) 

Machines talking here: Kurant (192.168.15.5) is my workstation, mandarin
(192.168.254.243) is the mail server.  192.168.15.230 is another workstation, I
just didn't want to clip the log in case i clipped it too far.

The attempts are to send without a custom hostname set in KMail, with a custom
hostname set, and then sending (successfully) via local sendmail with mandarin
as the smarthost.
 
More info: Repeatable on a third server, not running Exim like the first two, 
and KMail from 3.1.4 works fine with the same server I'm having trouble with
locally.
Comment 4 Thiago Macieira 2003-09-24 01:09:13 UTC
Nope, sorry, it doesn't contain the contents of the connection. Can you please try this: 
 
tcpdump -nXs 256 port smtp 
Comment 5 Lauri Watts 2003-09-24 18:34:11 UTC
Created attachment 2567 [details]
tcpdump output

Hopefully this one has what you want to know
Comment 6 Marc Mutz 2003-09-25 00:49:47 UTC
Hmm, the "check what the server supports" works for me (using mandarin.fruitsalad.org as host; 
the custom hostname to send is not used by KMail for the check - maybe it should, but that's 
another question). Your server is slow in getting the greeting across, but then everything 
proceeds as expected. 
 
Can you put a few 
kdDebug() << m_Hostname << fakeHostname << endl 
in strategic places in smtp.cc:SMTPProtocol::smtp_open(const QString &), lines 496-513, and 
send the result? Should the conditional in line 507 perhaps be .isEmpty() instead of isNull()? 
Comment 7 Brad Hards 2003-09-26 08:35:06 UTC
Lauri: Can you use tcpdump with the -w option to save the raw packets, along with 
-s 0 (to avoid truncating anything)? And then attach the capture file? 
Comment 8 Thiago Macieira 2003-09-27 00:28:52 UTC
Brad: the second log contains the info needed. The ioslave sends an EHLO, followed by a 
space, then a CRLF. 
Comment 9 Chris Howells 2003-09-27 18:54:03 UTC
Exactly the same problem here. "Check what the server supports" doesn't work (also 
on a LAN mail server) and when I try to send mail via my mail server (postfix on 
FreeBSD 4.7-RELEASE) it complains that no hostname was supplied. I can however 
use my ISPs mail server to send mail, my ISP uses qmail. 
 
I'm running a recent KDE CVS KMail (last week) on FreeBSD 4.7-RELEASE. I find it 
somewhat interesting that despite Lauri and I using different MTAs (so it can't possible 
be a MTA problem) we are both running KMail on FreeBSD. 
Comment 10 Chris Howells 2003-09-27 19:03:56 UTC
Forgot to mention: my mail server isn't publicly accessible via SMTP (firewalled out) 
however I can easily give an ssh account on it if it would be useful for testing maybe 
with ssh port forwarding. 
Comment 11 Lauri Watts 2003-09-27 19:29:35 UTC
Mandarin is running pretty slow indeed, it's getting hammered by Swen, poor thing. 
 
Changing the isNull() to isEmpty() does the trick, tested by Chris and confirmed by me.   
 
Do you still want the debug output in any case? 
Comment 12 Chris Howells 2003-09-27 19:32:10 UTC
Committed fix.