Chapter 13
Compliance, Storage & Ops
Admin:
#pSystem
Storage Engines (SQLite, MS SQL Server, PostgreSQL 18), Clustering & Updater
SharpMailserver cleanly separates structured metadata and full-text indexes from SHA-256 deduplicated, Zstandard-compressed MIME blobs (-62% disk footprint). Choose freely among three first-class SQL engines with zero Redis, Elasticsearch, or Kafka dependencies.
Operational Tip & Architecture Note
Before applying any in-place update, the built-in 1-Click Updater (#pSystem) cryptographically verifies the SHA-256 digest against SHA256SUMS.txt while strictly preserving appsettings.Production.json, TLS certificates, and mailbox data.
Sample Storage Configuration in appsettings.Production.json
Choose 'Sqlite' (single node), 'SqlServer' (Windows / Azure SQL), or 'Postgres' (Linux HA cluster).
{
"Storage": {
"Provider": "SqlServer",
"ConnectionString": "Server=sql01.intern;Database=SharpMail;Integrated Security=True;TrustServerCertificate=True;",
"BlobDirectory": "D:\\SharpMailserverData\\blobs"
}
}
Settings, Default Values & Best Practices
| Setting / Location | Description | Default Value | Production Best Practice |
|---|---|---|---|
SQLite WAL (Storage:Provider = Sqlite) |
Zero-config embedded database running in Write-Ahead-Logging (WAL) mode with built-in FTS5 search and zero external daemons. | Standard für Einzelserver |
Ideal for single-node deployments up to ~250 active mailboxes on local SSD/NVMe storage (never place SQLite WAL files on network SMB/NFS shares!). |
Microsoft SQL Server (SqlServer) |
First-class Microsoft.Data.SqlClient engine for SQL Server 2019-2025, Express, Docker, and Azure SQL with sp_getapplock clustering and zero-addon search. | READ_COMMITTED_SNAPSHOT auto |
Top choice for Windows Server infrastructure: works out of the box even on SQL Server Express without requiring OS Full-Text Search add-ons. |
PostgreSQL 18 (Postgres) |
High-throughput active-active cluster engine leveraging LISTEN/NOTIFY (< 2 ms push), UNLOGGED tables, and pg_try_advisory_lock. | Empfohlen für Linux-Cluster |
Reference engine for 500 to 100,000+ mailboxes and multi-node Active-Active Linux/Kubernetes clusters. |
1-Klick-System-Updater (#pSystem) |
Checks /api/releases/latest, verifies SHA-256 checksums, stages binaries, and restarts the Windows Service or systemd unit seamlessly. | SHA-256-geprüft |
Trigger 1-click updates directly from #pSystem (or via install.sh --update / MSI wizard) with automatic reconnect once the new version boots. |