1

Topic: internal server error on non-english

Hi,

just installed iRedMail 0.6.1 on a clean Debian Lenny system.
Several issues popped up: If the mysql server is pre-installed (in my case a left over from former installation tests) installation of postfix-policyd fails. Make sure you have *no* mysql root password set. (The installer seems to expect no passwords and sets it later).

My major problem is:
If I select german as language, either during installation or later on the iredadmin web-ui, any http request ends with an "internal server error".
Apache log says
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]   File "/var/lib/python-support/python2.5/web/application.py", line 242, in process
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]     return self.handle()
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]   File "/var/lib/python-support/python2.5/web/application.py", line 233, in handle
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]     return self._delegate(fn, self.fvars, args)
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]   File "/var/lib/python-support/python2.5/web/application.py", line 412, in _delegate
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]     return handle_class(cls)
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]   File "/var/lib/python-support/python2.5/web/application.py", line 387, in handle_class
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]     return tocall(*args)
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]   File "/usr/share/apache2/iredadmin/controllers/base.py", line 48, in proxyfunc
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]     return func(self, *args, **kw)
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]   File "/usr/share/apache2/iredadmin/controllers/ldap/admin.py", line 127, in GET
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]     msg=i.get('msg', None),
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]   File "/var/lib/python-support/python2.5/jinja2/environment.py", line 705, in render
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]     return self.environment.handle_exception(exc_info, True)
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]   File "/usr/share/apache2/iredadmin/libs/../templates/default/ldap/admin_profile.html", line 49, in top-level template code
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]     {% if session.get('domainGlobalAdmin') == 'yes' %}
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]   File "/usr/share/apache2/iredadmin/libs/../templates/default/ldap/layout.html", line 29, in top-level template code
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]     <title>{% block title %}{%endblock%}</title>
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]   File "/usr/share/apache2/iredadmin/libs/../templates/default/ldap/admin_profile.html", line 41, in block "title"
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4]     {% block title %}{{ _('Edit admin profile') }}{% endblock %}
[Sun Nov 28 17:01:22 2010] [error] [client 1.2.3.4] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 21: ordinal not in range(128)

I could track this down to some unicode/utf-8 "problem" within python/jinja and the hint to utf-8-en/decode your strings, but couldn't find a way to fix it without going down to the python source.
Additinal hint: Trying to set the template's file encoding to something else did indeed remove the internal server error, but rendered the template useless.

Any hints?
TIA!

1x

----

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

2

Re: internal server error on non-english

1xm@discardmail.com wrote:

Several issues popped up: If the mysql server is pre-installed (in my case a left over from former installation tests) installation of postfix-policyd fails.

This is a known issue, and it's mentioned in Installation Guide:

***************************** WARNING ********************************
* iRedMail is designed to deploy on a FRESH server system, which     *
* means it does NOT have mail related components installed, e.g.     *
* Apache, MySQL, OpenLDAP, Postfix, Dovecot, Amavisd, etc. Otherwise *
* it may override your existing files/configurations althought it    *
* will backup files before modify, and it may be not working as      *
* expected.                                                          *
***************************** WARNING ********************************
1xm@discardmail.com wrote:

If I select german as language, either during installation or later on the iredadmin web-ui, any http request ends with an "internal server error".

A known issue too. German translation is not fully completed, so this error occurs.

You can download the latest translation here (Both iredadmin.po and iredadmin.mo):
http://iredadmin.iredmail.googlecode.co … _MESSAGES/

Or try to fix it manually like this:
- Find out which translation strings are incorrect with below commands:

# cd /path/to/iRedAdmin/i18n/de_DE/LC_MESSAGES/
# msgfmt -C -c iredadmin.po -o iredadmin.mo

msgfmt will report incorrect translation in terminal output.

3

Re: internal server error on non-english

Thanks for your fast reply.
I've downloaded the current .mo and .po files, but the internal server error stays the same.

/usr/share/apache2/iRedAdmin-0.1.3/i18n/de_DE/LC_MESSAGES $ msgfmt -C -c iredadmin.po -o iredadmin.mo
does'nt return any problems, resultcode 0.

Any further hints?
Any use to try get the 0.7beta up and running instead?

We are mostly impressed with iRedMail, but we will certainly need more Web-GUI features than the OS edition offers. The more self provisioning we could provide to our customers the better. So I'm wondering if the full featured edition is usable in german? Optionally could provide translations ourself, but at least for the OS edition missing translation doesn't seem to be the issue?

4

Re: internal server error on non-english

I'm sorry that i don't know German, so it's impossible for me to verify the translation.
You can try to translate exist PO file, and correct them.

Also, you can try to set "lang = en_US" in settings.ini, restart Apache, so that you can try it with English temporary. Or append '?lang=en_US' in URL which doesn't work with German translation, so that it will use en_US instead.