Ticket #1484897 (new Feature Requests)
Config/Installer change for same domain login
| Reported by: | centran | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | later |
| Component: | Installer | Version: | 0.1-stable |
| Severity: | minor | Keywords: | |
| Cc: |
Description
I have a feature request to add to the installer script. This will allow users to have 1 RoundCube web folder but allow for multiple domains logins WITHOUT asking for the domain name; It will detect the domain automatically. Of course this is only useful for those who login into RoundCube on the same domain name as their mail domain.(which I believe most would do)
This is how I got this to work on my server. You need to add the following variable.
$server_url = $_SERVER['SERVER_NAME'];
Then you can change the following variables.
$rcmail_config['default_host'] = $server_url;
$rcmail_config['username_domain'] = str_replace('mail.','',$server_url);
Since my smtp login requires a subdomain of mail I had to append it. Perhaps the installer script can detect this eloquently and add a str_replace if a subdomain is used otherwise just use the new $server_url variable.
Provided the user has RoundCube running on the same domain name as their mail this will eliminate the need for users to enter the domain name. For users with multiple domains, this will allow one RoundCube install and will not pester mail users with other domain names since it will be detected by what url they use.
