Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: davidvanlionhead on May 04, 2010, 08:54:57 AM

Title: Automatic domain name in username_domain
Post by: davidvanlionhead on May 04, 2010, 08:54:57 AM
I have altered main.inc.php to support automatic username_domain based on the HTTP_HOST:

if (preg_match("/cube\.(.+\.[a-z]+)/i",$_SERVER["HTTP_HOST"],$m)) {
   $rcmail_config['username_domain'] = $m[1];
}

This translates cube.mydomain.com to mydomain.com as the username_domain. The user only has to fill in the part before the '@' sign. This works automaticilly for all domains of the form 'cube.'

Just a quick fix.
Title: Automatic domain name in username_domain
Post by: zhylninc on May 10, 2010, 08:48:26 PM
$hostStr = $_SERVER['HTTP_HOST'];
$wPos = strPos($hostStr, '.')+1;
$rcmail_config['username_domain'] = substr($hostStr,$wPos);
this?
Title: Automatic domain name in username_domain
Post by: Hosana on May 14, 2010, 01:45:30 AM
According to my opinion you can get the Domain name here  at cheap cost by getting account in this site http://www.goresellers.com/  as a reseller ..
My friend got reseller account in this site & she got hosting services at cheap cost & got fine solution ..
Title: Automatic domain name in username_domain
Post by: Hosana on May 14, 2010, 01:46:02 AM
According to my opinion you can get the Domain name here  at cheap cost by getting account in this site http://www.goresellers.com/  as a reseller ..
My friend got reseller account in this site & she got hosting services at cheap cost & got fine solution ..