Update packaging/rustbox.toml

This commit is contained in:
gru committed 2026-10-31 14:37:07 +01:00
1 parent 778091c35b
commit 377e3d7620
1 file changed
+64 -117
+64 -117
View File
@@ -1,68 +1,39 @@
# RustBox 0.1.2 - packaged production configuration (DEB/RPM)
#
# The active values below intentionally keep the existing package profile.
# Alternative storage/cluster examples are provided at the end of this file
# and are fully commented out, so they do not change the default package setup.
# RustBox 0.2.0 - packaged production configuration (DEB/RPM)
# -----------------------------------------------------------------------------
# Server
# -----------------------------------------------------------------------------
host = "0.0.0.0"
port = 3001
environment = "production"
data_dir = "/var/lib/rustbox"
log_dir = "/var/log/rustbox"
log_level = "warning"
log_level = "warn"
# Database, sessions and "remember me".
# With no database/session backend keys configured, the whole application uses
# SQLite at data_dir/rustbox.sqlite; sessions are stored in that database.
cluster_shared_data_dir = false
search_index_backend = "tantivy"
database_backend = "sqlite"
session_backend = "database"
cluster_mode = false
session_timeout_hours = 72
remember_me_enabled = true
remember_me_days = 30
# -----------------------------------------------------------------------------
# Mail endpoints
# -----------------------------------------------------------------------------
imap_host = "localhost"
imap_port = 993
smtp_host = "localhost"
smtp_port = 587
tls_enabled = true
# This packaged profile intentionally keeps certificate verification disabled.
# For remote production mail servers, tls_verify = true is recommended.
tls_verify = false
# Size limits in MiB.
max_attachment_size_mb = 50
max_message_size_mb = 100
# -----------------------------------------------------------------------------
# ManageSieve
# -----------------------------------------------------------------------------
sieve_port = 4190
sieve_tls_mode = "none"
sieve_allow_insecure_auth = true
sieve_timeout_secs = 10
# -----------------------------------------------------------------------------
# Mailbox/UI defaults
# -----------------------------------------------------------------------------
default_junk_folder = "Spam"
default_theme = "system"
default_interface_skin = "apple-mail"
# -----------------------------------------------------------------------------
# Reverse proxy and outgoing mail
# -----------------------------------------------------------------------------
trusted_proxies = "127.0.0.1,::1"
outgoing_headers = []
# -----------------------------------------------------------------------------
# OpenPGP
# -----------------------------------------------------------------------------
pgp_enabled = true
pgp_wkd_enabled = true
pgp_hkp_enabled = false
@@ -71,95 +42,71 @@ pgp_network_timeout_secs = 10
pgp_max_key_bytes = 1048576
pgp_allow_private_export = true
# =============================================================================
# OPTIONAL CONFIGURATION EXAMPLES
# =============================================================================
# Do not enable more than one conflicting example at the same time.
# Copy/uncomment only the keys required by the selected profile.
#
# session_encryption_key must represent the same 32-byte key on every node that
# shares the configured SQL database or Redis session backend. Keep it secret and outside source control.
# Blob storage is independent from database_backend. This default preserves the
# single-node package behavior. PostgreSQL/MySQL may use this local filesystem
# backend too when cluster_mode=false.
[storage]
backend = "filesystem"
path = "/var/lib/rustbox/blobs"
shared = false
request_timeout_secs = 30
connect_timeout_secs = 5
max_retries = 3
retry_timeout_secs = 60
# Local Tantivy is single-node only. Cluster deployments must use opensearch or disabled.
[search]
backend = "local_tantivy"
path = "/var/lib/rustbox/search"
index_prefix = "rustbox"
required = false
request_timeout_secs = 10
worker_interval_secs = 2
worker_batch_size = 100
worker_max_attempts = 12
# -----------------------------------------------------------------------------
# Profile A: standalone SQLite application database (default package behavior)
# -----------------------------------------------------------------------------
# No extra keys are required. The equivalent explicit configuration is:
# database_backend = "sqlite"
# session_backend = "database"
# cluster_mode = false
#
# RustBox stores account data and sessions in data_dir/rustbox.sqlite and
# creates/uses the local session encryption key for this single-node setup.
# -----------------------------------------------------------------------------
# Profile B: PostgreSQL application database (data + database sessions)
# -----------------------------------------------------------------------------
# database_backend = "pgsql"
# database_url = "postgres://rustbox:change-me@127.0.0.1/rustbox"
# session_backend = "database"
# cluster_mode = false
# session_encryption_key = "BASE64_32_BYTE_KEY"
# -----------------------------------------------------------------------------
# Profile C: MySQL application database (data + database sessions; MySQL 8.0.13+)
# -----------------------------------------------------------------------------
# database_backend = "mysql"
# database_url = "mysql://rustbox:change-me@127.0.0.1/rustbox"
# session_backend = "database"
# cluster_mode = false
# session_encryption_key = "BASE64_32_BYTE_KEY"
# -----------------------------------------------------------------------------
# Profile D: Redis sessions, single application node (account data stays in database_backend)
# -----------------------------------------------------------------------------
# session_backend = "redis"
# redis_url = "redis://127.0.0.1:6379/"
# cluster_mode = false
# session_encryption_key = "BASE64_32_BYTE_KEY"
#
# If Redis requires authentication, include credentials in redis_url or use the
# supported Redis password configuration for your deployment.
# -----------------------------------------------------------------------------
# Profile E: Redis Sentinel sessions for multiple RustBox nodes
# -----------------------------------------------------------------------------
# Cluster nodes must also share the main application database.
# data_dir must be a shared filesystem mounted at the same absolute path on every node.
# database_backend = "pgsql"
# database_url = "postgres://rustbox:change-me@db.internal/rustbox"
# session_backend = "redis"
# cluster_mode = true
# cluster_shared_data_dir = true
# search_index_backend = "disabled"
# pgp_enabled = false
# redis_sentinel_nodes = ["sentinel-a:26379", "sentinel-b:26379", "sentinel-c:26379"]
# redis_sentinel_master = "mymaster"
# redis_sentinel_password = "sentinel-secret"
# redis_password = "redis-secret"
# session_encryption_key = "BASE64_32_BYTE_KEY"
# -----------------------------------------------------------------------------
# Profile F: PostgreSQL application database shared by a RustBox cluster
# data_dir must be shared and mounted at the same absolute path on every node.
# Cluster example: PostgreSQL + S3-compatible storage + OpenSearch
# -----------------------------------------------------------------------------
# database_backend = "pgsql"
# database_url = "postgres://rustbox:change-me@db.internal/rustbox"
# session_backend = "database"
# cluster_mode = true
# cluster_shared_data_dir = true
# search_index_backend = "disabled"
# pgp_enabled = false
# session_backend = "database" # or redis
# session_encryption_key = "BASE64_32_BYTE_KEY"
# cluster_mode = true
# pgp_enabled = false
#
# [storage]
# backend = "s3"
# bucket = "rustbox"
# region = "eu-central-1"
# endpoint = "https://s3.example.net" # optional for AWS S3
# path_style = false
# allow_http = false
# request_timeout_secs = 30
# connect_timeout_secs = 5
# max_retries = 3
# retry_timeout_secs = 60
#
# [search]
# backend = "opensearch"
# urls = ["https://opensearch.example.net:9200"]
# index_prefix = "rustbox"
# required = true
# username = "rustbox"
# password = "change-me"
# worker_interval_secs = 2
# worker_batch_size = 100
# worker_max_attempts = 12
#
# In this shape data_dir is not required as persistent node state.
# -----------------------------------------------------------------------------
# Profile G: MySQL application database shared by a RustBox cluster
# data_dir must be shared and mounted at the same absolute path on every node.
# Cluster blob alternative: shared POSIX/NFS/CephFS/GlusterFS
# -----------------------------------------------------------------------------
# database_backend = "mysql"
# database_url = "mysql://rustbox:change-me@db.internal/rustbox"
# session_backend = "database"
# cluster_mode = true
# cluster_shared_data_dir = true
# search_index_backend = "disabled"
# pgp_enabled = false
# session_encryption_key = "BASE64_32_BYTE_KEY"
# [storage]
# backend = "filesystem"
# path = "/mnt/rustbox-shared"
# shared = true
#
# `shared=true` is an operator assertion that every RustBox node sees the same
# filesystem. It is not suitable for local Tantivy; use OpenSearch/disabled search.