3.3 KiB
RustBox validation
Release source checks:
- one root Cargo package (
Cargo.tomlat repository root); - no
backend/application directory; - no separate
frontend/directory; - no
.tsor.tsxsource files; - no Node/Bun/Next/React build dependency;
- UI files live under
src/web/and are embedded into the Rust executable; - mail endpoints are configuration-owned; the login request contains only email/password/session preference;
- authenticated mail routes reuse the resolved session connection profile;
- CSS is built by Cargo
build.rsfromsrc/web/css/manifest.txt; - no CSS gradients and no Unicode pseudo-icons in the browser UI;
- all UI action icons are served from the embedded SVG sprite;
dev.shruns the root Cargo package;- native release build outputs
target/release/rustbox; UPSTREAM_BASErecords the consumed Oxi backend revision;- upstream tooling maps Oxi
backend/deltas into RustBox's flat paths and never imports Oxi frontend source.
Full release gate on a host with Rust/Cargo and dependency access:
./scripts/build-release.sh
The release script runs formatting validation, locked tests, Clippy with warnings denied, and a locked release build before accepting the binary.
Roundcube contacts and identities migration
The migration is a standalone Python administration tool: scripts/migrate_roundcube.py. It does not start RustBox and is not exposed by the application UI/API.
By default it reads RustBox database settings from RUSTBOX_CONFIG or /etc/rustbox/rustbox.toml, recognizes database_backend = "sqlite" | "mysql" | "pgsql", and uses database_url. For SQLite without database_url, it follows RustBox behavior and uses data_dir/rustbox.sqlite.
CLI values can override the target independently with --config, --target-backend and --target-url. The Roundcube source is MySQL and can be supplied either as --roundcube-url or as --roundcube-host, --roundcube-port, --roundcube-database, --roundcube-db-user and --roundcube-db-password.
The default mode migrates every matching Roundcube user. RustBox accounts must already be provisioned so their isolated table prefixes exist in rustbox_accounts. Unmatched users are skipped and reported. A single account can be selected with --roundcube-account.
Dependencies:
python3 -m pip install pymysql
# additionally only for a PostgreSQL RustBox target:
python3 -m pip install 'psycopg[binary]'
Recommended dry run using the active RustBox config:
./scripts/migrate_roundcube.py \
--roundcube-url 'mysql://roundcube:secret@127.0.0.1/roundcube' \
--dry-run
Run the migration:
./scripts/migrate_roundcube.py \
--roundcube-url 'mysql://roundcube:secret@127.0.0.1/roundcube'
Example with explicit Roundcube connection fields and an overridden MySQL RustBox target:
./scripts/migrate_roundcube.py \
--config /etc/rustbox/rustbox.toml \
--target-backend mysql \
--target-url 'mysql://rustbox:secret@db/rustbox' \
--roundcube-host rc-db \
--roundcube-database roundcube \
--roundcube-db-user roundcube \
--roundcube-db-password secret
Use --roundcube-prefix rc_ when Roundcube uses prefixed table names. The migration is idempotent for practical reruns: contacts are matched by email and identities by their stable identity fields before insert/update.