Email maintenance can be a real “pain in the bane” – every time my wife logs in, her email provider warns that the mailbox is full and needs cleaning. I’m definitely not going to sort through over 5,000 emails spanning 15 years to decide what’s important or spam. My approach is to archive everything locally and delete emails older than two years from the provider. Glad there are tools out there like Bichon .
Bichon is an open-source email archiving system that synchronizes emails from IMAP servers, indexes them for full-text search, it is designed for archiving and searching rather than sending/receiving emails.

Bichon data directory explained (TrueNAS)
Bichon stores all runtime data under a single data/ directory. This includes databases, archived mail, and search indexes.
Directory layout
data/
├─ mailbox.db
├─ meta.db
├─ eml/
├─ envelope/
├─ logs/
└─ tmp/
What each part is for
mailbox.db
Main SQLite database. Stores mailbox configuration and account data.
Required for restore.
meta.db
Metadata database. Tracks messages and internal state.
Required for restore.
eml/
Email storage and full-text search index (Tantivy).
Contains raw message data and index files.
Required for restore, though indexes can be rebuilt.
envelope/
Search index for email headers (from, subject, dates).
Not required; can be regenerated.
logs/
Application logs.
Not required.
tmp/
Temporary working files.
Not required.
Bichon eml/ folder, which contains the raw email storage and full-text search index
truenas[/mnt/.ix-apps/app_mounts/bichon/data/eml]$ ll
total 603830
drwxr-xr-x 2 apps 25 Jan 26 15:51 ./
drwxr-xr-x 6 apps 8 Jan 16 15:02 ../
-rw------- 1 apps 791 Jan 26 15:51 .managed.json
-rw-r--r-- 1 apps 0 Jan 16 15:02 .tantivy-meta.lock
-rw-r--r-- 1 apps 0 Jan 16 15:02 .tantivy-writer.lock
-rw-r--r-- 1 apps 253 Jan 26 15:46 39e9e74ead7849aa9741c6e09bafd4e7.fast
-rw-r--r-- 1 apps 123 Jan 26 15:46 39e9e74ead7849aa9741c6e09bafd4e7.fieldnorm
-rw-r--r-- 1 apps 147 Jan 26 15:46 39e9e74ead7849aa9741c6e09bafd4e7.idx
-rw-r--r-- 1 apps 117 Jan 26 15:46 39e9e74ead7849aa9741c6e09bafd4e7.pos
-rw-r--r-- 1 apps 4016 Jan 26 15:46 39e9e74ead7849aa9741c6e09bafd4e7.store
-rw-r--r-- 1 apps 307 Jan 26 15:46 39e9e74ead7849aa9741c6e09bafd4e7.term
-rw-r--r-- 1 apps 1074 Jan 26 15:36 910570110fe84ac596e8438b7679c99c.30934.del
-rw------- 1 apps 1327 Jan 26 15:51 meta.json
.managed.json
- Tracks which email files are currently indexed and managed by Bichon
- Required for proper index consistency
- Small JSON file, automatically updated
.tantivy-meta.lock & .tantivy-writer.lock
- Lock files used by Tantivy (Rust full-text search engine) to prevent concurrent writes
- Not needed for backup; they are recreated automatically
Files with long hex names (e.g., 910570110fe84ac596e8438b7679c99c.*)
- These are search index files for individual email batches
- File types inside each batch:
.store→ actual email content stored for search.idx,.term,.pos,.fast,.fieldnorm→ various search index structures.del→ marks deleted documents
- Required for restore if you want to keep the full-text search working without rebuilding
- Can be rebuilt from
mailbox.db/meta.dbif lost, but rebuilding takes time
meta.json
- Metadata for this email batch
- Required for indexing consistency
Backup recommendation
Back up the entire data/ directory, excluding logs/ and tmp/.
At minimum, ensure mailbox.db, meta.db, and eml/ are preserved.
How to Export
1.) Single Mail Exports are currently supported. A full mailbox export is on the Roadmap
See: [FEATURE] Add mailbox export to Mbox/EML formats · Issue #26 · rustmailer/bichon
2.) Another approach is the IMAP 2 IMAP sync
3.) I am currently working on a Bichon Exporter for the time being until the export feauture is avail.
You can reuse Bichon’s archived emails with another app, but there are a few important things to know as Bichon does not have Email export implemented (yet)! Essentially, the .store files inside data/eml/ are Tantivy index files, not raw .eml files. That means other apps cannot read them directly. You have to extract the original emails first.
Check out my project on github: MRi-LE/Bichon-Export-Tools: Bichon Export Tool + Inspector with search capabilties due to lack of EML Export in Bichon