1

Topic: Error displaying quarentined emails

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

When I click in System -> Quarentined Emails it gives me Internal Server Error

If I use System -> Quarantined Emails - > Spam it shows the emails but only the first page. If I try another not found error is returned.

----

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

2

Re: Error displaying quarentined emails

Do you have amavisd enabled in iRedAdmin-Pro config file (settings.py)? What's the error message in Apache log file?

3

Re: Error displaying quarentined emails

Hi @hferreira,

I cannot reproduce this issue with iRedAdmin-Pro-MySQL-1.8.1. Could you please paste me related error in Apache log file?

4

Re: Error displaying quarentined emails

Relevant log entries in apache log:

[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000] Traceback (most recent call last):
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]   File "/usr/lib/pymodules/python2.7/web/application.py", line 242, in process
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]     return self.handle()
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]   File "/usr/lib/pymodules/python2.7/web/application.py", line 233, in handle
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]     return self._delegate(fn, self.fvars, args)
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]   File "/usr/lib/pymodules/python2.7/web/application.py", line 415, in _delegate
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]     return handle_class(cls)
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]   File "/usr/lib/pymodules/python2.7/web/application.py", line 390, in handle_class
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]     return tocall(*args)
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]   File "/usr/share/apache2/iredadmin/controllers/decorators.py", line 11, in proxyfunc
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]     return func(self, *args, **kw)
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]   File "/usr/share/apache2/iredadmin/controllers/amavisd/log.py", line 154, in GET
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]     page = int(quarantined_type) or 1
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000] TypeError: int() argument must be a string or a number, not 'NoneType'
[Mon Jan 13 09:45:43 2014] [error] [client 000.000.000.000]

5

Re: Error displaying quarentined emails

So sorry about this trouble. You can fix it with below steps:

1: Open file controllers/amavisd/log.py under iRedAdmin-Pro directory, find
below line (about line 151):

       if quarantined_type in ['spam', 'virus', 'banned']:

2: Please modify it to below line:

       if quarantined_type in ['spam', 'virus', 'banned', None]:

3: Save your change and restart Apache service.

It should now work as expected.

6

Re: Error displaying quarentined emails

hferreira wrote:

If I use System -> Quarantined Emails - > Spam it shows the emails but only the first page. If I try another not found error is returned.

This one keeps happening. The apache error log doesn't throw any message.

The first one was solved.

7

Re: Error displaying quarentined emails

i can not find the line 151 with the following code:

if quarantined_type in ['spam', 'virus', 'banned']:

my one looks like that

        if not quarantined_type in ['spam', 'virus', 'banned']:
            quarantined_type = None

i see a:
not found

message if try to go to the second page on virus, spam or banned


Kind regards

8

Re: Error displaying quarentined emails

Hi @gaxy,

I sent you a patched version, you can download it and override running version to fix this issue. Sorry about this trouble.

9

Re: Error displaying quarentined emails

hferreira wrote:
hferreira wrote:

If I use System -> Quarantined Emails - > Spam it shows the emails but only the first page. If I try another not found error is returned.

This one keeps happening. The apache error log doesn't throw any message.

Did you try this patch?
http://www.iredmail.org/forum/post26944.html#p26944

10

Re: Error displaying quarentined emails

i downloadet and installed now the new version, still the same :

not found

the version is 1.8.1 again right?

11

Re: Error displaying quarentined emails

o and yes webserver was restartet.

12

Re: Error displaying quarentined emails

Hi @gaxy,

is it possible to let me login to your server remotely (via ssh) to check this issue? If yes, mail me ssh account info please.

13

Re: Error displaying quarentined emails

yes but not this week. i am off.
or you let me know what kind of logfiles you need.

14

Re: Error displaying quarentined emails

For this issue, it doesn't log in any file. I need to check whether you're running the latest stable release.

15

Re: Error displaying quarentined emails

fixed with your special patch, thx

16

Re: Error displaying quarentined emails

It's caused by incorrect URL handle (missing '/'), here's patch for iRedAdmin-Pro-LDAP-2.1.1, iRedAdmin-Pro-MySQL-1.8.1, iRedAdmin-Pro-PGSQL-1.4.1:

diff -r 3662702e448d controllers/amavisd/urls.py
--- a/controllers/amavisd/urls.py    Tue Jan 21 11:25:01 2014 +0800
+++ b/controllers/amavisd/urls.py    Wed Jan 22 18:05:15 2014 +0800
@@ -21,7 +21,7 @@
     '/activities/quarantined',              'controllers.amavisd.log.QuarantinedMails',
     '/activities/quarantined/page/(\d+)',   'controllers.amavisd.log.QuarantinedMails',
     '/activities/quarantined/(spam|virus|banned)', 'controllers.amavisd.log.QuarantinedMails',
-    '/activities/quarantined/(spam|virus|banned)/page(\d+)', 'controllers.amavisd.log.QuarantinedMails',
+    '/activities/quarantined/(spam|virus|banned)/page/(\d+)', 'controllers.amavisd.log.QuarantinedMails',
     # Per-user quarantined mails
     '/activities/quarantined/(user)/(%s)' % regx_email, 'controllers.amavisd.log.QuarantinedMailsPerAccount',
     '/activities/quarantined/(user)/(%s)/page/(\d+)' % regx_email, 'controllers.amavisd.log.QuarantinedMailsPerAccount',