📄️ Overview
Directories are a critical component of the system, serving as the central repository for user account information. These directories contain essential details such as user accounts, passwords, email addresses, and other user-specific settings. The primary functions of directories include:
📄️ Internal
The internal directory handles crucial tasks such as authenticating credentials (usernames and passwords), validating email addresses, and storing various user-specific settings like disk quotas and group memberships. Using an internal directory is suitable for environments where Stalwart is the primary system for email management and no external user management systems are in place. 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. This offers a straightforward and integrated approach to user management.
📄️ SQL Database
Stalwart Mail Server supports using popular SQL database systems such as mySQL, PostgreSQL, and SQLite as a directory server. This allows you to leverage an existing SQL database to handle tasks such as authentication, validating local accounts, and retrieving account-related information.
📄️ LDAP Server
Stalwart Mail Server supports retrieving account information from an LDAP directory such as OpenLDAP or Active Directory. This allows you to leverage an existing LDAP directory to handle tasks such as authentication, validating local accounts, and retrieving account-related information.
📄️ OpenID Connect
Stalwart Mail Server can be configured to authenticate users against a third-party OpenID Connect (OIDC) provider. This allows Stalwart to delegate user authentication to an external identity provider, integrating seamlessly with an existing identity management system. Common third-party OIDC providers include services like Google, Microsoft, or any OpenID Connect-compliant identity provider.
📄️ In-memory
In small setups or for testing purposes, you can use the in-memory directory type to define users and groups directly in the configuration file.
📄️ SMTP and IMAP
When running the standalone version of Stalwart SMTP, it is possible to use an external SMTP, LMTP or IMAP server as a "virtual" directory. This allows you to delegate authentication and address validation to a third-party mail server.