1

Topic: Whitelist/Blacklist problem

==== Required information ====
- iRedMail version (check /etc/iredmail-release):  0.9.4
- Linux/BSD distribution name and version: Ubuntu 14.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

I just try to make a filter with whitelist and blacklist in recent days, it has many email list (more than 1000)
but every morning the list is gone and only left 48 emails. I copied again the list, and tomorrow morning it will gone again and only left 48 emails again.
What makes this problem occur ?
Please help

thanks

----

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

2

Re: Whitelist/Blacklist problem

Could you please try steps below to make sure it's not caused by a cron job:

*) Copied again the list.
*) Comment out task below in root's cron job:

python /var/www/iredadmin/tools/cleanup_amavisd_db.py

Then wait for 1 or 2 more days to see whether it happens again.

3

Re: Whitelist/Blacklist problem

hi Zhang,

Thanks for reply, I will try that and inform the result.

thanks

4

Re: Whitelist/Blacklist problem

hi Zhang,

This morning the list is still remain there, so your suggestion is work.
But what does the cleanup_amavisd_db.py do ? Is there any impact if it is turn off forever ?
Please advice, what should I do, I don't want any bad thing happen later if I turn off this script smile

thanks

5

Re: Whitelist/Blacklist problem

After checking source code of cleanup_amavisd_db.py line by line, i figured out it's caused by a bug in this script.

Please try patch below, then re-enable the cron job, let's see whether it works or not:

diff -r a12918790fb6 tools/cleanup_amavisd_db.py
--- a/tools/cleanup_amavisd_db.py    Thu Mar 03 22:04:32 2016 +0800
+++ b/tools/cleanup_amavisd_db.py    Fri Mar 04 11:24:51 2016 +0800
@@ -201,7 +201,7 @@
 try:
     qr = conn.select('outbound_wblist', what='rid')
     for i in qr:
-        wblist_ids.add(i.sid)
+        wblist_ids.add(i.rid)
 except:
     # No outbound_wblist table
     pass

You can also run it manually:

python tools/cleanup_amavisd_db.py

6

Re: Whitelist/Blacklist problem

Hi Zhang,

It works, thanks alot for your support