Account Security Management
Overview
Account Security allows users to manage authentication and encryption settings for their mail account. This includes password changes, two-factor authentication (2FA/TOTP), and encryption-at-rest configuration.
Required Permissions
For the Account Security feature to be available, your mail server administrator must enable the following permissions in the Stalwart Mail Server configuration:
Core Security Permissions
| Permission | Description | Required |
|---|---|---|
| Manage account passwords | Allows users to change their password | ✓ Yes |
| Retrieve specific account information | Allows viewing current account details and settings | ✓ Yes |
| Modify user account information | Allows updating user profile and account settings | ✓ Yes |
| Authenticate | Required for authentication operations | ✓ Yes |
| Manage encryption-at-rest settings | Allows managing encryption configuration | ✓ Yes |
Features by Permission
Password Management
- Requires:
Manage account passwords+Modify user account information - Allows users to securely update their email password
Two-Factor Authentication (2FA/TOTP)
- Requires:
Authenticate - Allows enabling/disabling TOTP-based two-factor authentication
- Generates recovery codes for account recovery
Encryption-at-Rest
- Requires:
Manage encryption-at-rest settings - Allows users to enable encryption for stored data
Troubleshooting
"Account security management is not available for this mail server"
This error appears when one or more required permissions are disabled. To resolve this:
-
Contact your mail server administrator to verify the following permissions are enabled:
- Manage account passwords (On)
- Retrieve specific account information (On)
- Modify user account information (On)
- Authenticate (On)
- Manage encryption-at-rest settings (On)
-
Check Stalwart Configuration: Administrators can enable these permissions in the Stalwart Mail Server admin panel under user account capabilities.
-
For OAuth users: If using OAuth authentication, ensure the OAuth client has been granted the necessary scopes for account management.
Admin Configuration
To enable Account Security features as an administrator:
- Log in to the Stalwart Mail Server admin panel
- Navigate to Accounts or Permissions
- Ensure the following are set to On:
Manage account passwordsRetrieve specific account informationModify user account informationAuthenticateManage encryption-at-rest settings
- Save and reload the configuration
API Endpoints (Stalwart Server)
The following Stalwart API endpoints support account security operations:
GET /account/auth- Retrieve 2FA and app password statusPOST /account/auth- Update authentication settings (add/remove TOTP, app passwords)GET /account/crypto- Retrieve encryption-at-rest settingsPOST /account/crypto- Update encryption configurationPATCH /principal/{id}- Update user principal (password, display name)