A Roundcube plugin for Userli:
-
Login with two-factor authentication: the plugin checks the password and, for users with 2FA, asks for the TOTP or backup code in a second step. Userli then issues a webmail credential, which Roundcube uses for IMAP and SMTP instead of the password. It is valid for 12 hours; the Roundcube session ends with it. Logging out revokes it. With a Userli version without the webmail login endpoint, the plugin keeps logging in with the password.
-
Alias identities: at login, the plugin creates a Roundcube identity for each alias of the user.
- Clone this repository into your Roundcube plugins directory
- Copy
config.inc.php.disttoconfig.inc.phpand configure your API settings - Enable the plugin in your Roundcube configuration
Edit config.inc.php with your userli API settings:
$config['userli_url'] = 'https://your-api.example.org';
$config['userli_token'] = 'your-api-token';
$config['userli_ssl_verify'] = true;This plugin includes a comprehensive unit test suite. To run the tests:
# Install dependencies
composer install
# Run tests
composer test
# Or run PHPUnit directly
./vendor/bin/phpunit
# Run tests with verbose output
./vendor/bin/phpunit --verbose
