1

Topic: Decrease stored info

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

Hello,

Today all informations about mails sent/received and quarantine is stored for 7 days. How can I decrease to 5 days for example? I'd like to keep only last 5 days for example.

Thank You.

André

----

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

2

Re: Decrease stored info

If you're running the latest iRedAdmin-Pro-PGSQL-1.4.2, you can override default settings by appending below two settings in iRedAdmin-Pro config file (/var/www/iredadmin/settings.py)

AMAVISD_REMOVE_MAILLOG_IN_DAYS = 3
AMAVISD_REMOVE_QUARANTINED_IN_DAYS = 7

Update the days to fit your need. Don't forget to restart Apache service after modified iRedAdmin-Pro config file.

3

Re: Decrease stored info

Hello Zhang

Like this?

my settings.py
############################################################
# Place your custom settings below, you can override all settings in this file
# and libs/default_settings.py here.
#

AMAVISD_REMOVE_MAILLOG_IN_DAYS = 3
AMAVISD_REMOVE_QUARANTINED_IN_DAYS = 3

And default_settings.py I should modify too?

After this changes I can execute the cleanup_amavisd_db.py script to clean my data?

Thanks

André

4

Re: Decrease stored info

andreluizpr wrote:

Like this?
my settings.py

AMAVISD_REMOVE_MAILLOG_IN_DAYS = 3
AMAVISD_REMOVE_QUARANTINED_IN_DAYS = 3

Correct.

andreluizpr wrote:

And default_settings.py I should modify too?

No. Just settings.py, ALL your custom settings should be set in settings.py, do NOT touch/modify libs/default_settings.py.

andreluizpr wrote:

After this changes I can execute the cleanup_amavisd_db.py script to clean my data?

Correct.