Retention rules and Archive accounting
Hello,
I am using 'piler 1.1.1, build 901' and have added retention rule for emails from particular email ID. However Archive accounting count for emails sent from particular email ID is still increasing. Not sure if retention rule is not applied or it is not reflecting in GUI. Required changes in sudoers file are done and I get 'applied' message after applying rules. I have also restarted piler service several times manually.
Your help would be greatly appreciated thank you in advance.
Regards, Kishor
Comments (9)
-
repo owner -
reporter - marked as enhancement
- marked as minor
-
reporter Yes, maillog is showing correct retention period i.e. 'retention=1'. Is there any way of checking current email count for particular user?
This is not a bug hence changing type to enhancement.
Thanks, Kishor
-
repo owner Well, the current email count may be correct, provided that you don't run the periodic purge. What if the accounting script scans the whole messages table or view and checks only messages are not deleted yet? Though note that it may take a while to process especially if retention is not 1 as in your example.
-
reporter Sorry to bother you, do we need to run periodic purge manually? it is set ro 'Enable' in the console.
Please let me know how to run accounting script manually to update accounting information after purge. Thanks, Kishor
-
repo owner Add another cron entry for user piler:
1 1 * * * /usr/local/bin/pilerpurge
And if purge is enabled in the gui, then it will remove aged messages.
-
repo owner Running the accounting script is possible, see the piler cron entries on how to run it. Probably it's time to revise the accounting script. An option may be useful to let you decide if you want to substract the value of purged emails.
-
repo owner The pilerpurge utility updates the size column in the counter table, however it leaves the stored_size untouched.
-
repo owner - edited description
- changed status to resolved
I've replaced the pilerpurge utility with a python script to do the job, and it finally updates both size and stored_size columns properly.
- Log in to comment
The retention rule defines an expiry date for the given message. You may check the maillog, if the rules are applied properly. However the archive accounting doesn't care if the given message actually still exists in the archive, it just counts emails for the given user. Not sure if it's a bug or even a major one. Describe your needs, and I'll see what I can do.