Roundcube not login

OS type and version Ubuntu Linux 20.04.5
Webmin version 2.013
Virtualmin version 7.5
Related packages SUGGESTED

Please i have been having the problem for long now. after installing roundcube on my virtualmin i cant login to my account with it but if use the Usermin to log it in it will work. Please i need help on what to do so that i can be signing with roundcube

1 Like

I also struggle for few days with the same issue. First I thought is about Debian 11 incompatibilty, have tried with Ubuntu 22, Debian 10, Rocky 9 and 8 but the result is the same. On each fresh install, Roudcube does not let you login even credentials are good.

What I find out after looking into logs and doing a lot of trial and errors is:

  • when you create a new mail user “name@domain” it also creates an alias “name \ @domain
  • when you try to login into roundcube it checkes “/etc/postfix/virtual” and finds the alias with "" and the result is an error
  • to cofirm the above i created an alias “name2@domain” for “name@domain”. it will connect in roundcube as it finds the right user
  • another way i find out it works is to set your user to "No: in “Primary email address enabled”
    (Edit Users → select user → Email settings) You will be able to login into Roundcube with the user “name@domain” but you will not be able to receive any emails as the user will not be found in user list.

Just to underline the fact that this happens only on fresh install.
I have older Debian 10 updated to latest versions and it works perfect.
The difference I could find is that setting a primary email adddres it makes an alias in “/etc/postfix/virtual” “name-domain”

Hope this helps. Looking forward for a solution on this.

The solution for this is to edit roundcube/config/ and remove mentions of virtuser_file at the end of the file.

The other solution would be to go to System Settings ⇾ Virtualmin Virtual Servers ⇾ Configuration: Defaults for new domains and change Include domain name in usernames option from Yes to Only to avoid a clash. Although, this would only be applied to newly created users.


I confirm. Commenting out those two lines did the trick.


please which of this will i have to edit cause there are two of virtuser_file there

// This key is used to encrypt the users imap password which is stored
// in the session record. For the default cipher method it must be
// exactly 24 characters long.
$config[‘des_key’] = ‘rcmail-!24ByteDESkey*Str’;

// List of active plugins (in plugins/ directory)
$config[‘plugins’] = [

// skin name: folder from skins/
$config[‘skin’] = ‘elastic’;
$rcmail_config[‘virtuser_file’] = ‘/etc/postfix/virtual’;
$config[‘virtuser_file’] = ‘/etc/postfix/virtual’;

comment out both lines

$rcmail_config[‘virtuser_file’] = ‘/etc/postfix/virtual’;
$config[‘virtuser_file’] = ‘/etc/postfix/virtual’;

hi, the second solution worked for me at first, but when i try to login after logging out i get the “login failed” error again

so i’m trying the first option but this is what i got… (don’t know if i’m doing this right)

// let plugins alter smtp connection config
$CONFIG = $rcube->plugins->exec_hook(‘smtp_connect’, [
‘smtp_host’ => $host,
‘smtp_user’ => $user !== null ? $user : $rcube->config->get(‘smtp_user’, ‘%u’),
‘smtp_pass’ => $pass !== null ? $pass : $rcube->config->get(‘smtp_pass’, ‘%p’),
‘smtp_auth_cid’ => $rcube->config->get(‘smtp_auth_cid’),
‘smtp_auth_pw’ => $rcube->config->get(‘smtp_auth_pw’),
‘smtp_auth_type’ => $rcube->config->get(‘smtp_auth_type’),
‘smtp_helo_host’ => $rcube->config->get(‘smtp_helo_host’),
‘smtp_timeout’ => $rcube->config->get(‘smtp_timeout’),
‘smtp_conn_options’ => $rcube->config->get(‘smtp_conn_options’),
‘smtp_auth_callbacks’ => [],
‘gssapi_context’ => null,
‘gssapi_cn’ => null,

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.