Bug 69828 - kmail: doesnt send fake hostname during check for server support
Summary: kmail: doesnt send fake hostname during check for server support
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: SVN (3.5 branch)
Platform: Debian testing Linux
: NOR normal with 20 votes (vote)
Target Milestone: ---
Assignee: Tom Albers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-08 01:15 UTC by Dominique Devriese
Modified: 2009-12-06 16:59 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Devriese 2003-12-08 01:16:04 UTC
Version:            (using KDE KDE 3.1.4)
Installed from:    Debian testing/unstable Packages

This is a forward of the Debian bug report #222587
( http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=222587 ).  Please don't forget to send reply's to the original submitter too.

From: Matthias Urlichs <smurf@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: kmail: ipv6: sends address as EHLO hostname
Date: Mon, 01 Dec 2003 07:09:40 +0100

Package: kmail
Version: 4:3.1.4-1
Severity: important

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

kmail sends:

>> EHLO fe80::230:65ff:fe10:bba1

when using an IPv6 connection.

I did enter a custom hostname in the appropriate dialog,
but apparently it gets ignored. :-(

- -- System Information:
Debian Release: testing/unstable
Architecture: powerpc
Kernel: Linux linux 2.6.0-test11-smurf8 #73 Fri Nov 28 18:08:33 CET 2003 ppc
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8
Comment 1 Thiago Macieira 2003-12-08 16:01:21 UTC
Subject: kmail: ipv6: sends address as EHLO hostname

This could also be a kio_smtp problem.

Can you provide a way of reproducing this?

Whose IP address is the one being reported: yours or the server's? What are 
your KMail Network configurations? And what MTA is that?

Comment 2 Thiago Macieira 2003-12-08 20:07:25 UTC
Subject: Re: kmail: ipv6: sends address as EHLO hostname

[doing a near-full quote of your e-mail since our bug database doesn't have 
your e-mail as a valid user id, so it won't accept your e-mails]

>> Can you provide a way of reproducing this?
>
>Sure:
>
>- Set up IPv6 (locally is fine)
>- Give your mail server an IPv6 address
>- Do NOT set up reverse name service for the client's addresses
>  (most people don't have one...) (I didn't check whether actually
>   having a reverse entry fixes things, as I don't control the name
>   server in question.)
>- send mail
>
>> Whose IP address is the one being reported: yours or the server's?
>
>The client's. (The server has a globally-scoped IPv6 address).
>
>> What are your KMail Network configurations?
>
>Pretty much standard. No SSL or TLS.
>
>Note that I _did_ set up a custom hostname, but that seemed to have been
>ignored.
>
>> And what MTA is that?
>
>The MTA which reported it is Exim, but that's irrelevant -- any MTA
>which complains about malformed HELO/EHLO should catch it, and these
>days Spam protection requires me to be as strict as possible.  :-/

I'm trying the same thing here and it seems the custom hostname is being 
ignored. That must mean there are two bugs in here:

1) somehow the custom hostname is not being used. I'm about to debug kio_smtp 
to find out if it's being passed on to it or if KMail is failing to do that.

2) if the reverse name lookup for the hostname fails, kio_smtp should enclose 
the IP address within square brackets, as per SMTP protocol:

EHLO ::1
501 syntactically invalid EHLO argument(s)
EHLO [::1]
250-prometheus.local.lan Hello localhost [::1]

Number 2 is easy to solve and I'll open a bug report for it.

Comment 3 Thiago Macieira 2003-12-08 20:33:29 UTC
Subject: kmail: ipv6: sends address as EHLO hostname

Further testing indicates problem #1 (fakeHostname not being passed at all) 
only happens in the "Check what server supports" button in the KMail 
confguration dialog. When really sending e-mails, it works as expected.

To the reporter: can you confirm the behaviour I described? Could you test KDE 
3.2 beta 2?

As for #2, we can't correctly solve it fully right now because of a flaw in 
the API design (mea culpa). The bug is 
http://bugs.kde.org/show_bug.cgi?id=69876.

Comment 4 Thiago Macieira 2003-12-08 20:36:04 UTC
Changing the bug description. Sorry for the lack of ' in "doesn't", but I still can't use dead keys in <input type=text> in Konqueror.
Comment 5 Matthias Urlichs 2003-12-08 22:38:58 UTC
With kmail 1.5.2 (kde 3.1.4, Debian unstable) the problem does happen when sending mail normally -- that's how I noticed. Apparently the problem only shows up when kmail is unable to resolve the local hostname -- I just checked (with ipv6 -- I can't prevent the external nameserver from resolving my ipv4 address to a hostname).

Unfortunately, I don't have enough disk space to download+compile KDE 3.2beta2. I don't know if anybody has built binary Debian packages for PPC yet. :-/
Comment 6 Thiago Macieira 2005-02-13 03:31:20 UTC
Is this still a problem for KDE 3.4 beta 2?
Comment 7 Dominique Devriese 2005-02-13 11:49:25 UTC
Thiago Macieira writes:

> Is this still a problem for KDE 3.4 beta 2?

I don't know.  You should ask the author of the Debian bug report..

cheers
domi

Comment 8 Thiago Macieira 2005-02-13 20:24:50 UTC
Your bug report has been linked to KDE bug #69828.

Can you reproduce your problem with KDE 3.4 beta 2?

Please post your replies at http://bugs.kde.org/show_bug.cgi?id=69828, if 
possible.

Comment 9 Matthias Urlichs 2005-02-14 12:30:52 UTC
Offhand, I couldn't find any Debian builds for 3.4.

I don't have free time at the moment, so if I need to build it myself an answer will take some time. :-/
Comment 10 Thiago Macieira 2005-08-15 04:13:56 UTC
Matthias: have you been able to test KDE 3.4?
Comment 11 hn75 2007-03-02 22:16:48 UTC
Hi 

I am using kmail 1.9.5 on kde 3.5.5 from debian testing. I can still reproduce this bug. It happens while checking for server capabilities and when sending mail. So it prevents me sending mail. 
Comment 12 Rémi Denis-Courmont 2007-09-15 13:21:43 UTC
I think the correct syntax is:
"EHLO [IPv6:" + address + "]", e.g.: "EHLO [IPv6:::1]"

At least Postfix seems to accept this one.
See also RFC2821 §4.1.3 for the reference.

Unfortunately, currently, it kmail sends "EHLO [::1]".

Work around is to force a custom hostname in the kmail configuration.
Comment 13 hn75 2007-10-13 11:40:51 UTC
Hi

> ------- Additional Comments From rdenis simphalempin com 
> 2007-09-15 13:21 ------- I think the correct syntax is:
> "EHLO [IPv6:" + address + "]", e.g.: "EHLO [IPv6:::1]"
>
> At least Postfix seems to accept this one.
> See also RFC2821 §4.1.3 for the reference.
>
> Unfortunately, currently, it kmail sends "EHLO [::1]".
>
> Work around is to force a custom hostname in the kmail
> configuration.


Would you be so kind to give an example of the syntax?

Many thanks

Hendrik 
Comment 14 Rémi Denis-Courmont 2007-10-13 12:25:46 UTC
Le Saturday 13 October 2007 12:40:04 Hendrik Naumann, vous avez écrit :
> > ------- Additional Comments From rdenis simphalempin com
> > 2007-09-15 13:21 ------- I think the correct syntax is:
> > "EHLO [IPv6:" + address + "]", e.g.: "EHLO [IPv6:::1]"
> >
> > At least Postfix seems to accept this one.
> > See also RFC2821 §4.1.3 for the reference.
> >
> > Unfortunately, currently, it kmail sends "EHLO [::1]".
> >
> > Work around is to force a custom hostname in the kmail
> > configuration.
>
> Would you be so kind to give an example of the syntax?


The hostname should simply be the concatenation of "[IPv6:" with the standard 
IPv6 numerical notation, and "]".

So, if the source address is 2002:3e4e:969c::1, that would b 
[IPv6:2002:3e4e:969c::1]

Real-life example:

% nc6 2002:c2f2:7249::1 smtp
220 poy.chewa.net ESMTP Postfix (Debian/GNU)
EHLO [IPv6:2002:3e4e:969c::1]
250-poy.chewa.net
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
...

Regards,
Comment 15 hn75 2007-10-14 11:07:30 UTC
Hi Rémis

Thanks for the quick answer.

> > > ------- Additional Comments From rdenis simphalempin com
> > > 2007-09-15 13:21 ------- I think the correct syntax is:
> > > "EHLO [IPv6:" + address + "]", e.g.: "EHLO [IPv6:::1]"
> > >
> > > At least Postfix seems to accept this one.
> > > See also RFC2821 §4.1.3 for the reference.
> > >
> > > Unfortunately, currently, it kmail sends "EHLO [::1]".
> > >
> > > Work around is to force a custom hostname in the kmail
> > > configuration.
> >
> > Would you be so kind to give an example of the syntax?


My question referred to the work around you mentioned: " ... force a 
custom hostname in the kmail configuration."

Do you mean the option ("send custom name to server") in the 
smtp-Server Dialog? This seems to change nothing in my case.

Thanks Hendrik
Comment 16 Rémi Denis-Courmont 2007-10-14 11:11:12 UTC
Le Sunday 14 October 2007 12:06:47 Hendrik Naumann, vous avez écrit :
> Do you mean the option ("send custom name to server") in the
> smtp-Server Dialog? This seems to change nothing in my case.


Well, yeah, but I'm putting a real hostname there, not a numerical address.
Comment 17 hn75 2007-10-15 09:34:21 UTC
Hi

> Le Sunday 14 October 2007 12:06:47 Hendrik Naumann, vous avez 

écrit :
> > Do you mean the option ("send custom name to server") in the
> > smtp-Server Dialog? This seems to change nothing in my case.
>
> Well, yeah, but I'm putting a real hostname there, not a numerical
> address.


Me, too :). I give a valid hostname and kmail sends

EHLO []\r\n
 
to the mailserver.

Hendrik
Comment 18 Thomas McGuire 2007-12-27 19:11:25 UTC
SVN commit 753513 by tmcguire:

Also send the fake hostname when checking the server capabilities.

BUG: 69828



 M  +41 -5     servertest.cpp  
 M  +17 -0     servertest.h  
 M  +3 -1      transportconfigdialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=753513