1

Topic: German umlauts and special chars in the domain name

==== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Debian 6.0
- Related log if you're reporting an issue:
====

Hello!
We use iRedMail and iRedAdmin-Pro for some time now.

Today we received the request from a customer to add a domain with non-english chars like the german umlauts äüö.
Unfortunately iRedAdmin complains about the domain name to be invalid.
We tried the international coding like "xn--autognstig24-hlb.de" but we don't know if this will work or not.

Zhang or maybe others, please advise what to do in this case.
Maybe it should be possible to configure the domains with their full and complete name, including the chars, and then internally convert them to the corresponding transciption.

Best regards,
Bernhard

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: German umlauts and special chars in the domain name

broth wrote:

Today we received the request from a customer to add a domain with non-english chars like the german umlauts äüö.
Unfortunately iRedAdmin complains about the domain name to be invalid.

Expected error. iRedAdmin-Pro restricts domain name (and email addresses) to be English characters (and some symbols). Non-english characters are not supported in iRedAdmin-Pro.

Please check parameter "reDomain" in iRedAdmin-Pro directory: libs/iredutils.py. It's regular expression used to verify domain names. Maybe you can modify it to work with German umlauts.

P.S. Looks like below modification works, but i didn't test it with iRedAdmin-Pro:

# Original
#reDomain = r'''[\w\-][\w\-\.]*\.[a-z]{2,6}'''
reDomain = r'''[\w\W\d\D\-][\w\W\d\D\-\.]*\.[a-z]{2,6}'''

Testing in Python shell:

>>> reDomain = r'''[\w\W\d\D\-][\w\W\d\D\-\.]*\.[a-z]{2,6}'''
>>> r = re.compile(reDomain + '$', re.IGNORECASE)
>>> r.match('äüö.com')
<_sre.SRE_Match object at 0x106615850>                       # <- It works.
broth wrote:

We tried the international coding like "xn--autognstig24-hlb.de" but we don't know if this will work or not.

It doesn't work as you expect.

3

Re: German umlauts and special chars in the domain name

Hello Zhang,
thanks for the quick reply.
Adding the domain name works but then I get internal server errors when accessing the iRedAdmin-Pro page.
The apache log file says:

[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67] Traceback (most recent call last):
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]   File "/usr/lib/pymodules/python2.6/web/application.py", line 242, in process
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]     return self.handle()
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]   File "/usr/lib/pymodules/python2.6/web/application.py", line 233, in handle
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]     return self._delegate(fn, self.fvars, args)
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]   File "/usr/lib/pymodules/python2.6/web/application.py", line 415, in _delegate
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]     return handle_class(cls)
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]   File "/usr/lib/pymodules/python2.6/web/application.py", line 390, in handle_class
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]     return tocall(*args)
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]   File "/usr/share/apache2/iredadmin/controllers/decorators.py", line 21, in proxyfunc
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]     return func(self, *args, **kw)
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]   File "/usr/share/apache2/iredadmin/controllers/decorators.py", line 33, in decorated
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]     return f(*args, **kw)
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]   File "/usr/share/apache2/iredadmin/controllers/decorators.py", line 11, in proxyfunc
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]     return func(self, *args, **kw)
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]   File "/usr/share/apache2/iredadmin/controllers/mysql/domain.py", line 209, in POST
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]     raise web.seeother('/profile/domain/general/%s?msg=CREATED' % self.domain)
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]   File "/usr/lib/pymodules/python2.6/web/webapi.py", line 104, in __init__
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]     Redirect.__init__(self, url, '303 See Other', absolute=absolute)
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]   File "/usr/lib/pymodules/python2.6/web/webapi.py", line 84, in __init__
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67]     newloc = home + newloc
[Wed Mar 06 10:51:13 2013] [error] [client 88.217.236.67] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 29: ordinal not in range(128)

What can we do?

IMHO domain names with non-english characters will be coming more and more often.
This feature has to be implemented.
Please share your thoughts.

Best regards,

Bernhard

4

Re: German umlauts and special chars in the domain name

Well, many places in source code have to be improved to support non-ascii domain names. We have no plan to support it, sorry.