Roundcube¶
The Roundcube Userli plugin creates a Roundcube identity for each alias of a user when they sign in to Roundcube. Users can then send emails from their aliases without setting up identities manually.
The plugin also handles the sign-in: users with two-factor authentication enter their code or use their security key in a second step. Roundcube then uses a webmail credential from Userli for IMAP and SMTP instead of the password. The credential is valid for 12 hours and is revoked on logout. This is required for webmail if app passwords are required with 2FA.
On the Userli host¶
Create an API token with the scope roundcube:
bin/console app:api-token:create --name "Roundcube" --scopes roundcube
On the Roundcube host¶
Install the plugin, either with Composer
(systemli/userli) or by
cloning the repository into the plugins/ directory, and enable it in the
Roundcube configuration:
$config['plugins'] = ['userli' /* , ... */];
Configure it in plugins/userli/config.inc.php (copy from
config.inc.php.dist):
$config['userli_url'] = 'https://users.example.org';
$config['userli_token'] = '<PLAIN_TOKEN>';
$config['userli_ssl_verify'] = true;
Security keys¶
With version 1.1 of the plugin or later, users can sign in with a security key.
Security keys are bound to a domain, so Userli and Roundcube need a common
parent domain, for example users.example.org and mail.example.org. In
Userli, set Security Key Domain to example.org (see
Settings). Userli allows
the origin of the Webmail URL, e.g. https://mail.example.org, by itself.
If Roundcube runs on another host, add its origin to Additional Security Key
Origins.
Keys that users added before the domain was set only work on the Userli host. Users have to add them again. Without a security key that works there, users sign in to webmail with a TOTP or backup code.
Webmail link¶
Set the URL of Roundcube as Webmail URL in Admin → Settings to show a Webmail card to users.