Skip to content

Data Lifecycle

MyEmailVault includes an automated data lifecycle system that permanently deletes archived emails once they have exceeded their retention period. This process is governed entirely by your retention policies.

How It Works

A background lifecycle worker runs on a recurring schedule. On each run, it performs the following steps:

  1. Retrieves all active retention policies.
  2. Evaluates every archived email against each policy's condition rules.
  3. Identifies emails whose retention period has expired.
  4. Permanently deletes expired emails.
  5. Records each deletion in the audit log, including the IDs of the governing policies.

Multiple Matching Policies

When an email matches more than one retention policy, the max-duration-wins rule applies. The policy with the longest retention period sets the effective retention date. The email is not eligible for deletion until that longest period has elapsed.

Fail-Safe Behavior

The lifecycle system includes safeguards to prevent unintended data loss:

  • No policy, no deletion -- If no retention policy matches an email, that email is never deleted. Emails are retained indefinitely unless explicitly covered by a policy.
  • Error handling -- If an error occurs while processing an individual email, that email is skipped and the worker continues with the remaining emails. Skipped emails will be re-evaluated on the next run.

Audit Trail

Every deletion performed by the lifecycle worker is logged in the audit log. Each entry includes:

  • The identifier of the deleted email.
  • The IDs of the retention policies that governed the deletion.
  • The timestamp of the deletion.

This provides a complete, verifiable record of all automated deletions for compliance reporting.