Bug 87836 - Can't send mail to IDN hosts or domains
Summary: Can't send mail to IDN hosts or domains
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.6.2
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 93304 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-08-23 13:23 UTC by Anders E. Andersen
Modified: 2007-09-14 12:17 UTC (History)
2 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 Anders E. Andersen 2004-08-23 13:23:48 UTC
Version:           1.6.2 (using KDE 3.3.0,  (3.1))
Compiler:          gcc version 3.3.4 (Debian 1:3.3.4-7)
OS:                Linux (i686) release 2.6.7

For kmail to be able to send mail to an IDN domain name it needs to translate the adress properly. Currently email adresses in recipient fields are translated incorrectly.

Example: andersa@ellenshøj.dk becomes andersa@=?iso-8859-1?q?ellensh=F8j=2Edk?=

Should be: andersa@xn--ellenshj-c5a.dk

The result is that mails bounce with the error 'host not found'.
Comment 1 kris 2004-08-23 13:36:16 UTC
It is actually more complicated than that, I have found.

Sending Mail to kris@köhntopp.de, I get a popup "Error":

"Sending failed:

Message sending failed since the following recipients were rejected by the server:

kris@=?iso-8859-1?q?k=f6hntopp=2ede?= (The server responded: "5.5.4 invalid address")

The message will stay in the 'outbox' folder..."

Looking into the outbox, I get

From: Kristian =?iso-8859-1?q?K=F6hntopp?= <kris@xn--khntopp-90a.de>
To: kris@xn--khntopp-90a.de

in some installations of KDE 3.3 (kmail 1.7) (Suse Linux 9.1 precompiled binaries), and in others I get MIME encoded headers.
Comment 2 Anders E. Andersen 2004-08-23 13:58:10 UTC
I think that depends on the MTA implementation (the smtp server you are using). Some MTAs may refuse to initiate the transfer if it recognizes an incorrect RCPT line. Others will just tell you things went fine and then get back to you when it finds out it can't deliver the message.

In the last case I would suspect you would be able to send a mail to multiple adresses where one is an IDN, and the others are standart ascii domains and have all the normal adresses delivered correctly, but the IDN one will bounce.
Comment 3 Leo Savernik 2005-01-04 16:41:56 UTC
I can confirm it in KMail 1.7.2 (KDE 3.3.2).

As international domain names become more and more common, this problem should be tackled early on.

I suggest converting all non-ascii domain names to their respective IDN-encoded ascii equivalents before sending any message (i. e. moving it to the outbox).

Comment 4 Leo Savernik 2005-01-04 16:42:47 UTC
*** Bug 93304 has been marked as a duplicate of this bug. ***
Comment 5 Till Adam 2005-02-12 23:30:27 UTC
CVS commit by tilladam: 

Make sending mail to IDN domains work.

BUGS: 87836
CCMAIL: kris@koehntopp.de


  M +1 -1      kmcomposewin.cpp   1.920
  M +1 -1      kmmessage.cpp   1.515
  M +1 -1      messagecomposer.cpp   1.45


--- kdepim/kmail/messagecomposer.cpp  #1.44:1.45
@@ -1681,5 +1681,5 @@ void MessageComposer::addBodyAndAttachme
 
   msg->setHeaderField( "X-KMail-Recipients",
-                       splitInfo.recipients.join(", ") );
+                       splitInfo.recipients.join(", "), KMMessage::Address );
 
   if ( mDebugComposerCrypto ) {

--- kdepim/kmail/kmcomposewin.cpp  #1.919:1.920
@@ -3708,5 +3708,5 @@ void KMComposeWin::slotContinueDoSend( b
       QString recips = (*it)->headerField( "X-KMail-Recipients" );
       if( !recips.isEmpty() ) {
-        (*it)->setHeaderField( "X-KMail-Recipients", KMMessage::expandAliases( recips ) );
+        (*it)->setHeaderField( "X-KMail-Recipients", KMMessage::expandAliases( recips ), KMMessage::Address );
       }
       (*it)->cleanupHeader();

--- kdepim/kmail/kmmessage.cpp  #1.514:1.515
@@ -1092,5 +1092,5 @@ KMMessage* KMMessage::createRedirect( co
 
   msg->setHeaderField( "X-KMail-Redirect-From", strByWayOf );
-  msg->setHeaderField( "X-KMail-Recipients", toStr );
+  msg->setHeaderField( "X-KMail-Recipients", toStr, Address );
 
   msg->link(this, KMMsgStatusForwarded);


Comment 6 Anders E. Andersen 2005-06-11 11:17:55 UTC
Tested on KDE 3.4.1 / KMail 1.8.1. It seems to work. Removing votes.