Ticket #1484897 (new Feature Requests)

Opened 7 months ago

Last modified 6 months ago

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.

Change History

in reply to: ↑ description   Changed 7 months ago by centran

I forgot another variable because I had it hard set in my config.

$rcmail_config['smtp_server'] = str_replace('mail.','',$server_url);

Thinking about this. There should be yet another variable and a question in the installer if they want this automatic feature. The variable would have to be something like subdomain and the user would have to be asked in the installer if they require a subdomain for their email(ie you need to login with mail.example.com and not just example.com)

Instead of the str_replace I used the mail. would be replaced with the subdomain variable.

  Changed 7 months ago by till

  • milestone changed from 0.1.1 to later

Don't assign feature requests to 0.1.1.

  Changed 6 months ago by thomasb

  • component changed from Interface improvements to Installer
  • severity changed from normal to minor

RoundCube supports host-specific config files but this is for advanced users and will not be covered by the installer. Also your request looks like a very specific configuration which has to be coded with PHP. The installer is only made for a general setup and will not provide an UI where you can specify which parts of the server name has to be stripped of.

Note: See TracTickets for help on using tickets.