BICHON
A self-hosted email archiving server built in Rust. Download emails from IMAP accounts, builds a full-text search index, and serves a REST API with an embedded WebUI. Purpose-built for long-term preservation, unified cross-account search, and programmatic access to archived email.
Note: Bichon is an archiver, not an email client. It does not send, compose, forward, or reply to emails. Its optional SMTP server is for receiving emails only.
Features
- Multi-Account IMAP Download: Download multi-account concurrently. Supports password (PLAIN/LOGIN) and OAuth 2.0 (SASL XOAUTH2) with automatic token refresh and PKCE. SSL/TLS, STARTTLS, or plain connections with optional self-signed certificate acceptance.
- Incremental Download: UID-based delta fetching downloads only new messages after the initial download. UIDVALIDITY changes are detected and trigger automatic cache rebuilds. Gap-fill repair runs diff each remote folder against the archive and re-download anything that was missed.
- Archive Scoping: Control what gets archived, per account — a date cutoff (IMAP
SINCE), folder include/exclude rules, or an explicit folder list. Configurable per-account SOCKS5 proxy routing. - Auto-Configuration: Discover IMAP server settings automatically from an email domain.
- Full-Text Search: Search across subject, body, sender, recipients, attachment properties, and more. Optimized for European languages. Results sort by BM25 relevance (
RELEVANCE) by default when the query carries a text term; date, size, internal date, and ingest time are also available. - Advanced Filters: Date range, size range, attachment presence, file type, content category, and facet-based tag combinations.
- Thread Grouping: Reconstruct and view complete conversation threads across folders.
- Attachment Search: Browse and filter attachments by sender, file type, size, and other attachment properties.
- Faceted Tags: Add, remove, or overwrite tags on messages and attachments. Filter by tag combinations with real-time count updates.
- Contacts View: Extracted and deduplicated sender/recipient address book across all authorized accounts.
- Three-Layer Storage: Tantivy for full-text indexing (Zstd compression), bichon-blob with Zstd for compressed blob storage, and memdb for relational metadata. All embedded — zero external dependencies.
- Content Deduplication: Identical email bodies and attachments stored once via BLAKE3 content hashing. Folder moves update metadata only.
- Dashboard Analytics: Email volume trends, top senders, storage usage breakdown, attachment statistics, and per-account activity.
- Saved Searches: Save and re-run search queries (email and attachment kinds, 50 per user). Exports can be driven by saved searches.
- Source Mailbox Cleanup: Move archived mail out of the source IMAP mailbox into
bichon_auto_created_trash— scheduled or on demand, after a grace period, verified message by message. The move is reversible; Bichon never permanently deletes from the server. See Source Mailbox Cleanup. - Message Lifecycle: Permission-gated message delete — permanent, no trash or soft-delete. Optional per-account retention (
retention_days) auto-purges mail older than the window. Archived messages can be bulk-restored back to their source IMAP server. Remote-content blocking in the reading view. - Message Repair: Re-fetch a message's missing content blobs from its source IMAP server and restore them in place — without touching the envelope or the index, so no duplicate is created. See Message Repair.
- Backup & Restore: Native incremental backup engine with content-addressed objects, per-restore-point manifests, retention policies, and scheduling. Writes to AWS S3, MinIO, or Cloudflare R2 — or to a local directory on a volume you control.
- OpenAPI 3.0: Interactive API documentation at
/api-docs(Swagger UI, ReDoc, Scalar, OpenAPI Explorer). - Multi-User RBAC: 5 built-in roles plus custom roles with 27 granular permissions.
- MFA / TOTP: Two-factor authentication built into the login flow.
- CLI Import Tools: Import from EML directories, MBOX files (including the Gmail variant), Thunderbird profiles, and Outlook PST files.
- CLI Export: Download account data as MBOX via
bichon-cli— an entire account or a saved search. - WebUI Import: Upload EML, MBOX, and PST files directly in the browser (PST folder structure preserved).
- Embedded SMTP Server: Receive email at delivery time into local
NoSyncaccounts. This closes the one window IMAP polling can never cover: a message deleted from the source mailbox before its first sync still lands in the archive, provided the receiving address exists as a local account. Capturing an entire tenant's journal rule at one address — BCC and internal mail included — is SMTP journaling, a Pro/Enterprise feature. - Three Account Types: IMAP accounts archive from a live server, NoSync accounts hold imported or delivered mail, and — on Pro — View accounts are read-only, filter-scoped windows onto other accounts, granted without handing over the whole mailbox. See Accounts.
- 18 Languages: WebUI available in 18 languages with dark/light themes.
Note: Attachment content (PDF/Word) full-text indexing is a Pro feature — the Community edition indexes attachment metadata only. See Editions for the complete edition comparison.
Tech Stack
| Layer | Technology |
|---|---|
| Backend | Rust, Tokio, Poem + Poem OpenAPI |
| Full-text search | Tantivy (Zstd compression) |
| Blob storage | bichon-blob (log-structured, Zstd compression, BLAKE3 dedup) |
| Metadata DB | memdb (embedded key-value store with WAL) |
| Frontend | React 18, TypeScript, Vite 6, ShadCN UI |
| Container | Ubuntu 24.04, Docker |
License
Bichon is licensed under the GNU Affero General Public License v3.0. Copyright © 2025–2026 rustmailer.com