v0.1.2
RustBox CI / rustbox (push) Canceled after 0s

This commit is contained in:
Mateusz Gruszczyński committed 2026-10-31 09:22:42 +01:00
1 parent 698e3c4a1b
commit e3e844ef4f
31 files changed
+287 -75

No files matched your search

+34 -13
View File
@@ -1,4 +1,4 @@
# RustBox 0.1.1
# RustBox 0.1.2
RustBox is a webmail derived from `c0h1b4/oxi`. The consumed Oxi revision is recorded in `UPSTREAM_BASE`.
@@ -43,6 +43,7 @@ Edit `config.dev.toml` before the first run:
```toml
default_theme = "system" # system | dark | light
default_interface_skin = "rustbox" # rustbox | gmail | proton | zoho | outlook | fastmail | apple-mail | yahoo | hey | nord | github | gitlab | discord | slack | reddit | notion | ...
log_level = "info" # trace | debug | info | warn | error | off; RUST_LOG overrides it
# Mail hosts may be omitted: IMAP defaults to localhost:993 and SMTP to localhost:587.
# imap_host = "localhost"
# smtp_host = "localhost"
@@ -70,31 +71,51 @@ If the mail host settings are omitted, RustBox uses `localhost` with IMAP `993`
Mail-size limits are intentionally separate. `max_attachment_size_mb` applies to each raw uploaded file, while `max_message_size_mb` is checked against the final RFC822/MIME byte stream immediately before SMTP submission. The latter therefore includes message bodies, headers, MIME boundaries, base64 expansion, inline CID parts and OpenPGP transformations. The composer displays only an estimate; the server-side final-MIME check is authoritative.
## Database, sessions and cluster traffic
## Database, cache, sessions and cluster traffic
RustBox 0.1.1 uses one SQL backend for the whole application. `database_backend = "sqlite" | "mysql" | "pgsql"` selects where account data is stored and, by default, where persistent login sessions are stored. SQLite defaults to `data_dir/rustbox.sqlite`; MySQL and PostgreSQL require `database_url`.
RustBox 0.1.2 uses one SQL backend for the whole application. `database_backend = "sqlite" | "mysql" | "pgsql"` selects where account data is stored and, by default, where persistent login sessions are stored. SQLite defaults to `data_dir/rustbox.sqlite`; MySQL and PostgreSQL require `database_url`.
Account data remains isolated per account inside the selected database. Existing 0.1.0 per-user SQLite databases at `data_dir/<user_hash>/db.sqlite` are imported on first access when they are at schema version 46; the source file is retained as `db.sqlite.pre-0.1.1.bak` after a successful import.
Mailbox metadata and cached message bodies are stored in that SQL backend. With a shared MySQL/PostgreSQL database the persistent mailbox cache is therefore shared by all application nodes; Redis is not used for mailbox cache data.
`session_backend = "database"` stores sessions in the selected application database. `session_backend = "redis"` uses Redis instead; Redis Sentinel is supported through the Sentinel settings. For a multi-node deployment the application database itself must be shared MySQL/PostgreSQL, even when Redis stores sessions. Provide the same base64-encoded 32-byte `session_encryption_key` on every node that shares sessions.
The per-user directory `data_dir/<user_hash>/` is not the active account database when MySQL/PostgreSQL is configured. It can contain filesystem-backed data:
- `attachments/` — draft attachments; in a cluster `data_dir` must be mounted from shared storage at the same path on every node;
- `tantivy/` — built-in full-text index; it is single-node only and must be disabled in cluster mode;
- `pgp/` — OpenPGP private-key material; OpenPGP must be disabled in cluster mode;
- legacy `db.sqlite` — migration input only. After a successful 0.1.0 import it is retained as `db.sqlite.pre-0.1.1.bak`.
For a multi-node deployment use a shared MySQL/PostgreSQL database, the same `session_encryption_key` on every node, and shared `data_dir` for draft attachments. RustBox 0.1.2 validates this explicitly with `cluster_shared_data_dir = true`. The built-in Tantivy backend has no cross-node writer coordination, so cluster mode requires `search_index_backend = "disabled"`. SQL-backed metadata/header search remains available; deep full-body Tantivy search is unavailable in cluster mode. An external search/index backend is not implemented in 0.1.2.
`session_backend = "database"` stores sessions in the selected application database. `session_backend = "redis"` uses Redis instead; Redis Sentinel is supported through the Sentinel settings. Redis only replaces session persistence, not the application database or mailbox cache.
```toml
# Default: the whole application uses SQLite under data_dir.
# Single node defaults.
database_backend = "sqlite"
# database_url = "sqlite:///var/lib/rustbox/rustbox.sqlite?mode=rwc"
session_backend = "database"
search_index_backend = "tantivy"
pgp_enabled = true
# Full PostgreSQL backend:
# Multi-node PostgreSQL example:
# database_backend = "pgsql"
# database_url = "postgres://rustbox:secret@db/rustbox"
# session_backend = "database"
# session_backend = "database" # or redis
# session_encryption_key = "<base64-32-byte-key>"
# cluster_mode = true
# cluster_shared_data_dir = true
# data_dir = "/srv/rustbox-shared" # same mounted path on every node
# search_index_backend = "disabled"
# pgp_enabled = false
# Full MySQL backend (MySQL 8.0.13+):
# Multi-node MySQL example (MySQL 8.0.13+):
# database_backend = "mysql"
# database_url = "mysql://rustbox:secret@db/rustbox"
# session_backend = "database"
# session_backend = "database" # or redis
# session_encryption_key = "<base64-32-byte-key>"
# cluster_mode = true
# cluster_shared_data_dir = true
# data_dir = "/srv/rustbox-shared"
# search_index_backend = "disabled"
# pgp_enabled = false
# Optional Redis session persistence; application data still uses database_backend.
# session_backend = "redis"
@@ -107,7 +128,7 @@ session_backend = "database"
# redis_password = "secret"
```
All executable application SQL is centralized by dialect under `src/queries/{sqlite,mysql,pgsql}/queries.rs`. Each engine has one complete baseline in `migrations/{sqlite,mysql,pgsql}/schema.sql`, including the session table. The squashed baseline is schema version 46 and the next schema migration number is V047 for all engines. Redis requires no SQL migration. See `migrations/README.md`.
All executable application SQL is centralized by dialect under `src/queries/{sqlite,mysql,pgsql}/queries.rs`. Each engine has one complete baseline in `migrations/{sqlite,mysql,pgsql}/schema.sql`, including the session table. The squashed baseline is schema version 46 and the next schema migration number is V047 for all engines. Redis requires no SQL migration. See `migrations/README.md` and `docs/DB-AND-CLUSTER-AUDIT-0.1.2.md`.
## Development
@@ -176,7 +197,7 @@ Initialize Git after extracting the release archive:
```bash
git init
git add .
git commit -m "RustBox 0.1.1 release"
git commit -m "RustBox 0.1.2 release"
./scripts/setup-upstream.sh
```