Is there a way enforce 2FA?

Your question

Is there a way to require all users to enable 2FA for their acounts?

I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.

on

Let me read the full 2FA doc to check for enforcement options.

Stalwart lets each user opt in to 2FA from the account manager, but there is no server-wide policy setting that forces every account to enable it. Administrators can provision 2FA on behalf of users by setting the OTP Auth URL directly on an account’s Password credential, but this must be done per account rather than enforced globally.

If you want all users to have it, the practical path is for an admin to set up the OTP Auth URL for each account (via the internal directory’s Account object or the equivalent field in an external directory) and distribute the resulting secret, rather than relying on users to self-enable it.

This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.

Not currently. What an admin can do is set it up for an account directly, by adding the otpAuth URL to the account’s password credential from the web UI or stalwart-cli, and then hand the secret to the user; for a handful of accounts that gets you to the same place. If your users log in through an external identity provider over OIDC, enforce MFA there instead.

Once TOTP is on, IMAP and SMTP clients that can’t do OAuth need app passwords (Two-Factor Authentication | Stalwart).