**Feature Request: Configurable retention policies with per-folder age-based deletion**
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by tracing how Bichon stores archived message index entries and blobs, then follow the account configuration and web UI paths mentioned by the feature request. Check how deletion is currently handled and how account settings are exposed. Done means per-folder policies and a per-account fallback can be configured, and expired messages are removed from the local index and blob store without affecting the IMAP server.
Written by the indexing model from the issue text.
Description
Describe the feature
Bichon currently retains all archived emails indefinitely with no mechanism to automatically delete emails from the archive based on age. A retention policy system would allow users to configure automatic deletion of archived emails older than a specified period, ideally configurable at the folder level rather than just globally per account.
Proposed behaviour
- Allow a retention period to be configured per folder (e.g. delete archived emails from
INBOX.Junkafter 30 days,INBOX.Sentafter 365 days,INBOXafter 7 years) - Also support a global per-account fallback retention period for folders without a specific policy
- Retention deletion should apply only to the local Bichon archive — it should never delete anything from the IMAP server (in keeping with Bichon's existing non-destructive philosophy)
- Deletion should remove both the index entry and the blob store entry for the affected email
- Retention policies should be configurable per account via the web UI
Why this matters
Without retention management, the archive grows indefinitely. For users archiving multiple accounts over years, this becomes a significant and unmanageable disk space issue. Folders like Junk, Trash, and promotional email subfolders in particular accumulate large volumes of low-value mail that does not need to be retained long-term.
Per-folder granularity is important because different folders have very different retention requirements — a user may want to keep Inbox emails for several years but purge Junk after 30 days.
Additional context
This feature exists in commercial email archivers such as Mailstore and in Mail-Archiver (s1t5/mail-archiver), where it is one of the primary reasons users choose a more feature-complete archiver. Its absence is currently a barrier to Bichon being used as a full Mailstore replacement.
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 91
- Avg merge
- 14h 54m
- Merged PRs (30d)
- 6
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rustmailer/bichon
-
[BUG] Incremental sync warns "no stored highest_uid" on every round for folders with no new mailOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
rustmailer/bichon#411 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
rustmailer/bichon#331 · 8 comments ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
rustmailer/bichon#409 · 4 comments ·
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
rustmailer/bichon#407 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
rustmailer/bichon#403 · 2 comments ·
All issues in rustmailer/bichon
Similar issues
-
bug UI
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
wardian-app/Wardian#1746 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jlcodes99/cockpit-tools#3125 ·
Maintainers usually reply within 2 days
-
bug user-sprint
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Vondor/KassenSturz#967 ·
Maintainers usually reply within 1 day
-
area/ci
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
ImageGen generate-batch aborts valid JSONL jobs containing a Unicode line separator in poster textOpenbug imagen skills
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day