1

Topic: Quarantined items not expiring

==== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): pgsql
- Linux/BSD distribution name and version: centos 6.5 x86_64
- Related log if you're reporting an issue: n/a
====

I've been monitoring my quarantine and items are not expiring. I believed they should after 7 days. Am I wrong? I thought I read that somewhere. Thanks.

- Fabian s.

----

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

2

Re: Quarantined items not expiring

*) Do you have cron job to delete quarantined items? Show us output of command "crontab -l -u root" please.
*) How long do you keep it? Show us output of below command in iRedAdmin-Pro directory please:

# grep 'AMAVISD_REMOVE_' libs/default_settings.py settings.py

3

Re: Quarantined items not expiring

[root@mail ~]# crontab -l -u root
# iRedMail: Cleanup Cluebringer database
1   3   *   *   *   /usr/sbin/cbpadmin --config=/etc/policyd/cluebringer.conf --cleanup >/dev/null
# iRedMail: update Awstats statistics
1   */1   *   *   *   perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=web -update >/dev/null
1   */1   *   *   *   perl /usr/share/awstats/wwwroot/cgi-bin/awstats.pl -config=smtp -update >/dev/null
# Backup on 03:01 AM
1   3   *   *   *   /bin/bash /var/vmail/backup/backup_pgsql.sh
# all email msg backup daily
0 0 * * * sh /var/vmail/vmail_backup.sh > /var/vmail/vmail1_backup_log.txt
[root@mail ~]#


[root@mail iredadmin]# grep 'AMAVISD_REMOVE_' libs/default_settings.py settings.py
libs/default_settings.py:AMAVISD_REMOVE_MAILLOG_IN_DAYS = 7
libs/default_settings.py:AMAVISD_REMOVE_QUARANTINED_IN_DAYS = 7
[root@mail iredadmin]#


Looks to be the default of 7 days but I don't see the cron job on the list. was that supposed to be added as part of the quarantine implementation or the original install? Thanks.

- Fabian S.

4

Re: Quarantined items not expiring

Add a cron job to delete expired items automatically:

1  2   *   *   *   python /var/www/iredadmin/tools/cleanup_amavisd_db.py &>/dev/null

It's better to execute it manually first, to verify whether or not it works as expected. For example:

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

5

Re: Quarantined items not expiring

ZhangHuangbin wrote:

Add a cron job to delete expired items automatically:

1  2   *   *   *   python /var/www/iredadmin/tools/cleanup_amavisd_db.py &>/dev/null

It's better to execute it manually first, to verify whether or not it works as expected. For example:

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

Thanks it worked fine.