Retention
Four windows are fixed in the product, and one is set per workspace. The values below are the defaults and the current implementation.
| Data | Retention | What happens at the end |
|---|---|---|
| Message content | 90 days | Bodies are redacted. The delivery record and its metadata stay with the event. |
| Delivery and engagement events | 365 days | Delivered, bounced, complained, opened and clicked events are removed. |
| Background jobs | 30 days | Finished job records are removed. |
| DMARC aggregate reports | 400 days | Reports are removed after a little over a year, so a year can be compared with the year before it. |
| Contact records | Keep, or 30 to 3650 days | The rule is set per workspace. Zero means keep everything. |
The four fixed windows default to the values in domain/retention.go and the operator sets them at start with WERKMAIL_MESSAGE_BODY_RETENTION_DAYS, WERKMAIL_EVENT_RETENTION_DAYS, WERKMAIL_JOB_RETENTION_DAYS and WERKMAIL_DMARC_RETENTION_DAYS. The contact rule is validated on save: the accepted values are 0 for keep, or any value from 30 to 3650 days.
Contact records and the notice period
A stricter contact rule does not apply at once. When a workspace shortens its rule, the new value waits seven days before it takes over, and the workspace is warned how many contacts the purge would remove. The wait exists so a practice can still reach the people it is about to lose. A looser rule, or a change back to keep everything, applies immediately.
What deletion means
- An erasure request removes the person's data from the live database. The record is deleted, it is not flagged as deleted and it is not hidden from a later query.
- The deletion is carried into the backups on the hosting provider's own schedule. Backups are overwritten within that provider's retention window, so a restored backup from before the request is not a permanent copy.
- A message that carries a statutory retention duty is the exception. A send marked
legal_retentionkeeps its content, because bookkeeping retention outranks the erasure request. The erase response reports how many messages were kept this way, and the same number is written into theerasedentry in the consent ledger, so the answer to the request can name what was kept and why.
What an export contains
A contact export returns the contact record, the consent history with the wording the person saw, the source, and the timestamps, plus the message metadata held for that contact. It does not return message bodies that have already been redacted by the 90 day window.