retained column in metadata table set to 0 even with the default_retention_days variable set to something else

Issue #1073 closed
Samuel Chege created an issue

Hi Jonas,

I needed to purge two specific emails (sensitive info). I have enabled purge on the web interface and also specified the days in the default_retention_days variable in the piler.conf file. Checking the postfix log for incoming emails shows the correct retention is assigned for the emails coming through. However, the retained column in the metadata table for these emails is zero and indeed, running pilerpurge in dry mode shows that these emails will be deleted if I run pilerpurge normally. I have tried setting the retained column manually via an SQL query for some emails to test if the pilerpurge utility will ignore them and it actually does.

My piler version is piler 0.1.25-rc2, build 871. Kindly assist. Thank you.

Comments (12)

  1. Samuel Chege reporter

    Hi Jonas,

    I was hoping you could point on whether this is normal behaviour or if I have an incorrect setting in my configuration.

  2. Janos SUTO repo owner

    If pilerpurge running in dry run prints only those messages you want to remove, then it’s good, go ahead and run piler-purge normally.

  3. Samuel Chege reporter

    Hi Jonas,

    Thanks. However, the problem is actually that, pilerpurge will delete messages that I do not intend it to delete. I have set the retention_period to over 18000 days in my config file. However, this is not reflected in the retained column in the metadata table.

  4. Janos SUTO repo owner

    The retention value is determined at archive time based on the settings at that time. If you later change the default in piler.conf, it won’t affect already archived emails. So you tweaked the retained column before, do it again to fix the retained column values that only those 2 messages are affected by pilerpurge.

  5. Samuel Chege reporter

    Hi Jonas,

    This is noted. However, I need to understand when the retained column is updated, because right now it's being set to 0 for all emails. I'm confused.

  6. Janos SUTO repo owner

    Once the message is archived, the retained column is set. Then its value shouldn’t change ever.

  7. Samuel Chege reporter

    Therein lies my dilemma; all my emails are having their retained column set to 0 instead of the time I have set in the default_retention_period variable. What could be the cause of this? Thanks.

  8. Janos SUTO repo owner

    Not sure. Try setting 3650 days in piler.conf for default_retention_days, then restart piler and check the retained column for new emails.

  9. Samuel Chege reporter

    Just tried this, but the issue still persists. I notice that as the emails are being received by Postfix, the correct retention is shown in the postfix log, but the retained_column in the metadata table remains at 0. 😞

  10. Log in to comment