Skip to content

docs(email-security): retention is a setting that deletes, and it has two lanes - #379

Merged
maximelb merged 2 commits into
masterfrom
m2ret-retention
Sep 6, 2026
Merged

docs(email-security): retention is a setting that deletes, and it has two lanes#379
maximelb merged 2 commits into
masterfrom
m2ret-retention

Conversation

@maximelb

@maximelb maximelb commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Why

The retention section documented a setting that did nothing. Two of its statements were false in the customer's disfavour:

  • "Composition takes the maximum … the safe resolution is always 'keep it longer'." With the default already at the ceiling, a maximum can only raise — so flagged_days: 30 and flagged_days: 200 both resolved to 400 and no record could ever shorten anything.
  • "The 35-day searchable message index and the raw-message window … are not configured here." They are now.

Backing change: go-mailsec#93 and legion_mailsec (the retention janitor's second duty) make the knob actually delete, below the store's own ceilings. This PR makes the docs describe what the product does.

What changes

  • policy.mdretention: both fields with what each lane governs; the ceilings and the one-day floor, both refused rather than clamped; what deletion actually removes and that it is permanent; and composition taking the minimum — the strictest record wins, toward holding less of the customer's mail.
  • Two consequences a customer would otherwise discover by surprise are stated: a large backlog drains over several sweeps rather than at once, and setting flagged_days below message_days leaves index entries whose stored copy is already deleted (which is what they asked for, but is worth saying).
  • messages.md / pipeline.md: the two lanes are now labelled with the field that shortens each, and "tunable" is corrected to "tunable downwards, and what falls past the horizon is deleted".

Notes

  • Overlaps docs(email-security): document the tenant purge #378 (the tenant-purge docs, also open and awaiting you): both edit the tail of the retention section in policy.md and the retention block in pipeline.md. Whichever lands second needs a small rebase — say the word and I will do it. The two are complementary: docs(email-security): document the tenant purge #378 is deletion on request, this is deletion on a clock the customer sets.
  • No release note. The feature is exp-only while the prod rollout is on hold; the composition change is a real behaviour change and belongs in the GA notes, not in today's.

Public repo — opening for review only, not merging.

@maximelb
maximelb marked this pull request as ready for review September 5, 2026 17:40
@maximelb

maximelb commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

/lc-review

lcbill
lcbill previously approved these changes Sep 5, 2026
… two lanes

The retention section described a knob that had no effect: it documented a
maximum-wins composition (which, with the default at the ceiling, could never
resolve to anything but the ceiling) and told the reader the message index was
not configurable. Both are now false.

- `message_days` (1-35) beside `flagged_days` (1-400), with what each lane
  actually governs, because 'keep my queue for a week' and 'keep my phishing
  evidence for a week' are different asks.
- the ceilings, the one-day floor, and that both are refused rather than clamped.
- what deletion actually removes, that it is permanent, and the two consequences
  a customer will otherwise discover by surprise (a backlog drains over several
  sweeps; setting the evidence lane below the message lane leaves index entries
  without a downloadable copy).
- composition takes the MINIMUM: the strictest record wins, toward holding less
  of the customer's mail.
@maximelb

maximelb commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

/lc-review

@maximelb
maximelb merged commit dad912b into master Sep 6, 2026
7 checks passed
@maximelb
maximelb deleted the m2ret-retention branch September 6, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants