Idea ID: 2872704

Automatic maintenance on postgres database from SMG to avoid short disk space and drop from database

Status: Waiting for Votes

To avoid disk space issues and dropping the database to setup a new quarantine database the SMG should get the following feature:

a) automatic scheduled job (cron ) 

b) purge old entries in database 

c) vacuum database

The cleaning should be done for different categories of e-mails stored if required:

a) virus 

b) spam

c) other kind of blocks

user defines  number of days e-mails should be kept. each item stored in database gets an index information with the category.

The maintenance job running e.g. daily checks for each category and if item has reached expiration day (hold time of x days) any items found older than defined will be cleaned from database. The database is vacuumed afterwards to free disk space and improve indexing.

The process should check available disk space before executing and sent system alert if disk space is too short for maintenance.

==============================================================================================================

the result of this process should be logged and available on dashboard for admins , auditor....