The message store is designed to be largely self-sufficient, requiring minimal maintenance from administrators. Stalwart Mail Server runs different maintenance tasks that periodically deletes expired keys, blobs and compacts logs. This task helps manage storage space by removing data objects that are no longer needed.
However, there might be situations when an administrator needs to initiate this process manually, perhaps to immediately free up storage space or troubleshoot storage-related issues. In these cases, Stalwart Mail Server provides a CLI command called
$ stalwart-cli -u https://jmap.example.org server database-maintenance