6.0.0-alpha14
7/2/25

[#11021] Sending mail to addresses from an IDN domain
Summary Sending mail to addresses from an IDN domain
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester wrobel (at) horde (dot) org
Created 02/22/2012 (4879 days ago)
Due
Updated 03/08/2012 (4864 days ago)
Assigned 02/22/2012 (4879 days ago)
Resolved 03/08/2012 (4864 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/08/2012 09:15:37 AM Michael Slusarz Comment #10
State ⇒ Resolved
Reply to this comment
Closing.  There's been substantial work done in Horde_Mail the last 10 
days so this should be fixed (at least in Horde 5/IMP 6/Horde_Mail 2).
02/27/2012 07:24:46 AM Git Commit Comment #9 Reply to this comment
Changes have been made in Git (develop):

commit 3d0e5f62efc5090c0d18500c8b619ef3f8a47c01
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sun Feb 26 23:47:27 2012 -0700

     [mms] Added Horde_Mail_Rfc822_Address#encoded property.

     More fixes for IDN parsing (Bug #11021).

  framework/Imap_Client/package.xml                |    2 +
  framework/Mail/doc/Horde/Mail/TODO               |    3 ++
  framework/Mail/lib/Horde/Mail/Rfc822/Address.php |   41 +++++++++++++++------
  framework/Mail/test/Horde/Mail/ObjectTest.php    |   31 ++++++++++++++++
  4 files changed, 65 insertions(+), 12 deletions(-)

http://git.horde.org/horde-git/-/commit/3d0e5f62efc5090c0d18500c8b619ef3f8a47c01
02/27/2012 07:24:26 AM Git Commit Comment #8 Reply to this comment
Changes have been made in Git (develop):

commit 0ea46cf083998b89673eac8d4e325fa32518cae7
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sun Feb 26 23:29:47 2012 -0700

     [mms] Better support for IDN hosts in non-validate address 
parsing mode (Bug #11021).

  framework/Mail/lib/Horde/Mail/Rfc822.php     |    2 +-
  framework/Mail/package.xml                   |    2 +
  framework/Mail/test/Horde/Mail/ParseTest.php |   31 
++++++++++++++++++++++++++
  3 files changed, 34 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/0ea46cf083998b89673eac8d4e325fa32518cae7
02/27/2012 06:56:35 AM Michael Slusarz Comment #7 Reply to this comment
Turns out that even with new IMP code, there were some bugs in IDN 
parsing with the new code.  (For the record... it is really difficult 
to write a parser that strictly conforms to the RFC AND allows 
loose-parsing for more natural-language type input.)

I'll leave open to verify that Horde_Mail 1.2.0 and IMP 5.0.19 fix.
02/27/2012 06:48:36 AM Git Commit Comment #6 Reply to this comment
Changes have been made in Git (master):

commit 3d0e5f62efc5090c0d18500c8b619ef3f8a47c01
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sun Feb 26 23:47:27 2012 -0700

     [mms] Added Horde_Mail_Rfc822_Address#encoded property.

     More fixes for IDN parsing (Bug #11021).

  framework/Imap_Client/package.xml                |    2 +
  framework/Mail/doc/Horde/Mail/TODO               |    3 ++
  framework/Mail/lib/Horde/Mail/Rfc822/Address.php |   41 +++++++++++++++------
  framework/Mail/test/Horde/Mail/ObjectTest.php    |   31 ++++++++++++++++
  4 files changed, 65 insertions(+), 12 deletions(-)

http://git.horde.org/horde-git/-/commit/3d0e5f62efc5090c0d18500c8b619ef3f8a47c01
02/27/2012 06:48:32 AM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit 0ea46cf083998b89673eac8d4e325fa32518cae7
Author: Michael M Slusarz <slusarz@horde.org>
Date:   Sun Feb 26 23:29:47 2012 -0700

     [mms] Better support for IDN hosts in non-validate address 
parsing mode (Bug #11021).

  framework/Mail/lib/Horde/Mail/Rfc822.php     |    2 +-
  framework/Mail/package.xml                   |    2 +
  framework/Mail/test/Horde/Mail/ParseTest.php |   31 
++++++++++++++++++++++++++
  3 files changed, 34 insertions(+), 1 deletions(-)

http://git.horde.org/horde-git/-/commit/0ea46cf083998b89673eac8d4e325fa32518cae7
02/27/2012 06:29:38 AM Gunnar Wrobel Comment #4 Reply to this comment
HORDE: [imp] Validation failed for: test@überfall.de [pid 16934 on
line 972 of "/var/www/webmail/imp/lib/Compose.php"]
Are you using the latest IMP from git master?  There is no 
validation near that line.  E-mail validation has been completely 
rewritten lately - since 5.0.18 was released.
No sorry. I should have logged the issue against IMP or mention in the 
report which packages versions I use as this queue doesn't support any 
reasonable values for the framework packages.

imp-5.0.18
Horde_Mail 1.0.3
Horde_Mime 1.4.1
And it looks as though

Horde_Mime::encodeAddress('Räuber <raeuber@überfall.de>', 'UTF-8')
Yes - encodeAddress() does not support IDN.  That's why it is 
deprecated and why future manipulation of e-mail addresses is going 
to be done solely through Horde_Mail_Rfc822 methods/objects.
02/27/2012 06:10:31 AM Michael Slusarz Comment #3 Reply to this comment
HORDE: [imp] Validation failed for: test@überfall.de [pid 16934 on 
line 972 of "/var/www/webmail/imp/lib/Compose.php"]
Are you using the latest IMP from git master?  There is no validation 
near that line.  E-mail validation has been completely rewritten 
lately - since 5.0.18 was released.
And it looks as though

Horde_Mime::encodeAddress('Räuber <raeuber@überfall.de>', 'UTF-8')
Yes - encodeAddress() does not support IDN.  That's why it is 
deprecated and why future manipulation of e-mail addresses is going to 
be done solely through Horde_Mail_Rfc822 methods/objects.
02/27/2012 05:24:50 AM Michael Slusarz Comment #2 Reply to this comment
I ensured that the PECL IDN package is available.
This won't work - we don't support the PECL IDN package.  You need the 
intl extension.  See horde/docs/INSTALL.
02/22/2012 02:59:15 PM Jan Schneider Assigned to Michael Slusarz
State ⇒ Assigned
 
02/22/2012 01:36:48 PM Gunnar Wrobel Comment #1
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Sending mail to addresses from an IDN domain
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
A customer reported issues with sending mails to IDN domains 
("Validation fails"). I tried to test this and to me it looks as if 
this is currently not possible.

The bug #5180 is closed though so I might just have overlooked something.

I ensured that the PECL IDN package is available.

The error I get is

HORDE: [imp] Validation failed for: test@überfall.de [pid 16934 on 
line 972 of "/var/www/webmail/imp/lib/Compose.php"]

And it looks as though

Horde_Mime::encodeAddress('Räuber <raeuber@überfall.de>', 'UTF-8')

yields an invalid result ('"\274berfall.de>"@')

There are some idn setting available in Horde_Mime_Address but I don't 
see how this IDN parsing could be used when encoding the address.

Saved Queries