Login Roundcube. Multiple VirtualHost on 1 VPS

Ubuntu 18.04 LTS
Virtualmin 7.2-1

Hello, I have 3 virtual hosts in the same VPS, each with a public domain.
I installed Roundcube in 2 of them, everything works OK, but I found the following, I can login with any username valid for email from any of the domains, I want to configure each Roundcube to work only with the users of its domain.
Thank you can help me.
Thank you

roundcube by defaults connects to localhost. so any localhost user can connect, that’s normal.

you need to configure each roundcube’s config/config.inc.php file for this. read the file, lots of hints there, and there’s also username_domain option which might provide helpful to limit logins…

1 Like

Hi, thank you for you answer.
I have tried with the following:

$config[‘session_domain’] = ‘’;
$rcmail_config[‘session_domain’] = ‘’;
(also tried separately)

but I have not managed to separate only the users of the domain that I define to login

probably configure these variables :
$config[‘default_host’] (eg. use virtual server domain)
$config[‘username_domain’] (eg. use virtual server domain, so no other-domain users can connect).

that should do, but haven’t tried it tbh.

Thanks for your time.
I solved it with this:

$config[‘username_domain’] = ‘mydomain.com’;
$config[‘username_domain_forced’] = true;

(edit config.inc.php file for domain or subdomain)

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