1

Topic: Unable to delete all quarantined e-mails

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

apache2 error log:

xxx.xxx.xxx.xxx - - [06/Jan/2015:17:02:48 +0100] "POST /iredadmin/activities/quarantined/page/1 HTTP/1.1" 303 3737 "https://xxx.xxx.xxx/iredadmin/activitie … LID_MAILID" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2251.0 Safari/537.36"
xxx.xxx.xxx.xxx - - [06/Jan/2015:17:02:49 +0100] "GET /iredadmin/activities/quarantined?msg=INVALID_MAILID HTTP/1.1" 200 9636 "https://xxx.xxx.xxx/iredadmin/activitie … LID_MAILID" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2251.0 Safari/537.36"

====

Hello,

I've just updated to iRedMail-0.9.0 and iRedAdmin-Pro-LDAP-2.2.0.

Currently, quarantined e-mails are stored in MySQL database.
When I try to "Delete all in database" on the "Quarantined E-Mails" Tab in iRedAdmin-Pro, the script responds:
"Error: Invalid request data."

"Delete selected" works well.

Any ideas?

Thanks in advance.

Best,
Achim.

----

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

2

Re: Unable to delete all quarantined e-mails

Looks like a bug in iRedAdmin-Pro, I will try to reproduce this issue and come back to you.

3

Re: Unable to delete all quarantined e-mails

I can reproduce this error, and here's patch to fix it:

diff -r 3aeb547b4f4b -r 20ce7a17ff49 controllers/amavisd/log.py
--- a/controllers/amavisd/log.py    Tue Jan 06 12:35:31 2015 +0800
+++ b/controllers/amavisd/log.py    Wed Jan 07 09:08:52 2015 +0800
@@ -236,7 +236,8 @@
                 mailids.append(tmp[0])
 
         if not mailids:
-            raise web.seeother('/activities/quarantined?msg=INVALID_MAILID')
+            if not (action == 'deleteAll' and session.get('is_global_admin')):
+                raise web.seeother('/activities/quarantined?msg=INVALID_MAILID')
 
         if action == 'release':
             msg = 'RELEASED'

Please restart Apache or uwsgi (if you're running Nginx) service to reload iRedAdmin-Pro.

4

Re: Unable to delete all quarantined e-mails

Confirmed by another customer, this patch fixes the issue.
https://bitbucket.org/zhb/iredmail/issu … n-database

Topic closed.