1

Topic: Internal server error on login.

==== Required information ====
- iRedMail version:  1.4.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Ubuntu 10.04
- Related log if you're reporting an issue: /var/log/apache2/ssl_error_iredadmin.log

[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199] Traceback (most recent call last):
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/lib/pymodules/python2.6/web/application.py", line 242, in process
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     return self.handle()
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/lib/pymodules/python2.6/web/application.py", line 233, in handle
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     return self._delegate(fn, self.fvars, args)
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/lib/pymodules/python2.6/web/application.py", line 412, in _delegate
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     return handle_class(cls)
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     return self._delegate(fn, self.fvars, args)
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/lib/pymodules/python2.6/web/application.py", line 412, in _delegate
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     return handle_class(cls)
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/lib/pymodules/python2.6/web/application.py", line 387, in handle_class
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     return tocall(*args)
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/share/apache2/iredadmin/controllers/base.py", line 25, in proxyfunc
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     return tocall(*args)
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/share/apache2/iredadmin/controllers/base.py", line 25, in proxyfunc
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     return func(self, *args, **kw)
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/share/apache2/iredadmin/controllers/ldap/basic.py", line 256, in GET
/share/apache2/iredadmin/controllers/ldap/basic.py", line 256, in GET
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     topRecipients=topRecipients,
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/share/apache2/iredadmin/libs/iredbase.py", line 182, in render_template
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     return jinja_env.get_template(template_name).render(context)
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/lib/pymodules/python2.6/jinja2/environment.py", line 705, in render
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     return self.environment.handle_exception(exc_info, True)
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/share/apache2/iredadmin/libs/../templates/default/ldap/dashboard.html", line 5, in top-level template code
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     {% from "macros/amavisd.html" import display_amavisd_quarantined_mails with context %}
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/share/apache2/iredadmin/libs/../templates/default/layout.html", line 123, in top-level template code
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     {% block main %}{% endblock %}
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/share/apache2/iredadmin/libs/../templates/default/ldap/dashboard.html", line 187, in block "main"
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     {{ display_amavisd_quarantined_mails(amavisdQuarantineRecords) }}
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/share/apache2/iredadmin/libs/../templates/default/macros/amavisd.html", line 22, in template
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     <td>{{ r.sender_email |e }}</td>
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9: ordinal not in range(128)
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]

====
Hello,

I have an issue with my server. I am getting internal server error when trying to access the admin panel. The issue appeared
while deleting spam emails from dashboard.

Please advice !
Thank you in advance !

Best Regards,
Dimitar Atanasov

----

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 login.

dimitar.atanasov wrote:

[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/share/apache2/iredadmin/libs/../templates/default/macros/amavisd.html", line 22, in template
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     <td>{{ r.sender_email |e }}</td>
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9: ordinal not in range(128)

This error is caused by non-ascii characters in sender email address.

dimitar.atanasov wrote:

The issue appeared while deleting spam emails from dashboard.

I'm afraid that you have to delete this email via SQL command line.

Also, iRedAdmin-Pro-LDAP-1.4.0 is really old, the latest stable release is 2.1.1.

3

Re: Internal server error on login.

ZhangHuangbin wrote:
dimitar.atanasov wrote:

[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]   File "/usr/share/apache2/iredadmin/libs/../templates/default/macros/amavisd.html", line 22, in template
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199]     <td>{{ r.sender_email |e }}</td>
[Tue Mar 25 15:31:21 2014] [error] [client 192.168.1.199] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 9: ordinal not in range(128)

This error is caused by non-ascii characters in sender email address.

dimitar.atanasov wrote:

The issue appeared while deleting spam emails from dashboard.

I'm afraid that you have to delete this email via SQL command line.

Also, iRedAdmin-Pro-LDAP-1.4.0 is really old, the latest stable release is 2.1.1.

Thank you for your reply !
I am sorry for the stupid question, but how to find the problem email in the database.
Once everything is running again, I wll perform the update to the latest version.

Best Regards,
Dimitar

4

Re: Internal server error on login.

dimitar.atanasov wrote:

I am sorry for the stupid question, but how to find the problem email in the database.

Check the info in Dashboard (or under menu "System"), do you see the sender/recipient address? Try to find it in Amavisd database.

5

Re: Internal server error on login.

ZhangHuangbin wrote:
dimitar.atanasov wrote:

I am sorry for the stupid question, but how to find the problem email in the database.

Check the info in Dashboard (or under menu "System"), do you see the sender/recipient address? Try to find it in Amavisd database.

Thanks again for comming back to me ! The major issue is that I can not access the dashboard. When trying to access it it throws the error.

Thank you for your help !
Best Regards !
Dimitar

6

Re: Internal server error on login.

Do you have parameter 'REDIRECT_TO_DOMAIN_LIST_AFTER_LOGIN =' in file libs/settings.py under iRedAdmin-Pro directory? If yes, please set it to True, then restart Apache service. Then iRedAdmin-Pro will redirect you to 'Domains' list page instead of Dashboard. And you should be able to check spam messages.

7

Re: Internal server error on login.

ZhangHuangbin wrote:

Do you have parameter 'REDIRECT_TO_DOMAIN_LIST_AFTER_LOGIN =' in file libs/settings.py under iRedAdmin-Pro directory? If yes, please set it to True, then restart Apache service. Then iRedAdmin-Pro will redirect you to 'Domains' list page instead of Dashboard. And you should be able to check spam messages.

Thank you very much for your help !

Issue resolved !

Best Regards,
Dimitar