Skip to main content

Getting started

Stalwart Mail Server is an open-source mail server solution with JMAP, IMAP4, and SMTP support and a wide range of modern features. It is written in Rust and aims to be secure, fast, robust and scalable.

Choosing a package

Stalwart Mail server is distributed as a single binary that includes JMAP, IMAP, and SMTP servers and also as standalone packages for those who need only one of these servers:

  • All-in-one Mail Server: A single binary that bundles JMAP, IMAP, and SMTP servers. This version is for those who need a complete, out-of-the-box solution.
  • JMAP Server: Standalone package containing only the JMAP server.
  • IMAP Server: Standalone package containing IMAP and JMAP server.
  • SMTP Server: Standalone package for those needing only an SMTP server.

Choosing storage backends

When installing Stalwart Mail server you will be asked to specify a backend for each one of the four store types:

  • Data store: Where email metadata, folders, and various settings are stored. Essentially, it contains all the data except for large binary objects (blobs).
  • Blob store: Used for storing large binary objects such as emails, sieve scripts, and other files.
  • Full-text search store: Dedicated to indexing for full-text search, enhancing the speed and efficiency of text-based queries
  • Lookup store: A key-value storage used primarily by the SMTP server and anti-spam components. It stores sender reputation information, bayesian classifier models, greylist data, message reply tracking and other similar data.

The following table summarizes the supported backends available for each store type:

Data storeBlob storeFull-text storeLookup store
RocksDB
FoundationDB
PostgreSQL
MySQL / MariaDB
SQLite
S3/MinIO
Filesystem
ElasticSearch
Redis
In-memory
Note

Be aware that changing the database backend at a later time will require migrating your data.

Choosing an authentication backend

A database or directory server is required for authentication, validating local accounts, and obtaining account-related information such as names, group membership or disk quotas. Available options are:

  • Internal: An internal directory that is automatically created and managed by Stalwart Mail server. It uses the same database backend as the data store.
  • LDAP: LDAP servers, including OpenLDAP and Active Directory.
  • SQL: SQL databases, including PostgreSQL, MySQL and SQLite.
Note
  • When the internal directory is used, Stalwart Mail Server manages all user-related data within its own system. In this setup, all account management tasks, such as creating new user accounts, updating passwords, and setting quotas, are performed directly within Stalwart Mail Server.
  • When an external LDAP or SQL directory is utilized, all user account management must be performed within that external system. Stalwart Mail Server will rely on this external directory for authentication and user information but will not have the ability to directly modify user details.