Roundcube not login

SYSTEM INFORMATION
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.
Cheers.

The solution for this is to edit roundcube/config/config.inc.php 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.

3 Likes

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

Thanks!

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.
// YOUR KEY MUST BE DIFFERENT THAN THE SAMPLE VALUE FOR SECURITY REASONS
$config[ā€˜des_keyā€™] = ā€˜rcmail-!24ByteDESkey*Strā€™;

// List of active plugins (in plugins/ directory)
$config[ā€˜pluginsā€™] = [
ā€˜virtuser_fileā€™,
ā€˜archiveā€™,
ā€˜zipdownloadā€™,
];

// 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.