Purging emails
How it works
When piler archives a message, it assigns a retention value (=a timestamp) to it. Piler guarantees that the message will sit in the archive at least until its retention time expires.
The removal of aged emails is done by the pilerpurge.py utility. You must run pilerpurge.py if you want aged emails to be purged, otherwise they will be in the archive for eternity. So if you don’t want emails to be purged, then simply don’t run pilerpurge.py, and comment out the purge job in piler's crontab.
If you run pilerpurge.py periodically (eg. from crontab), then it first checks whether purging is allowed. If not, then it stops, otherwise it queries the ids of aged messages, then removes them from the disk, and sets their status as deleted in the metadata table.
Note that to preserve the history of emails, the metadata entries are not deleted.
In case of an ongoing audit or similar event you may disable the periodic purge. It can be done by administrators on the gui health page.
Before deploying piler (or any email archiving solution) make sure to have a well established retention policy. If may be as simple as to set the default retention to 7 years or so. It depends on region, industrial sector, legislation environment, etc.