[RCU] Multiple domains

Kyle Wheeler kyle-roundcube at memoryhole.net
Fri May 2 06:32:12 CEST 2008

On Thursday, May  1 at 10:41 PM, quoth Kanwar Ranbir Sandhu:
> I want to use one roundcube install for multiple domains, and allow 
> users to only enter their names (i.e. before the '@').  Right now 
> I'm testing with two domains I use for the family.

I do that; it's pretty easy, once you figure it out, but it's not 
really an obvious trick.

> I next tried to use host specific config files.  I enabled 
> 'include_host_config', and created a file name 
> 'thesandhufamily.inc.php'.  In that, I set the following:

I've never played with that... I prefer things I can read all at once.

Here's what I do:

$vdomainmapping = array(
         'domain1.com' => 'domain1.com',
     'www.domain1.com' => 'domain1.com',
         'domain2.com' => 'domain2.com',
     'www.domain2.com' => 'domain2.com',
if (isset($vdomainmapping[$_SERVER['HTTP_HOST']])) {
     $rcmail_config['username_domain'] = $vdomainmapping[$_SERVER['HTTP_HOST']];
} else {
     $rcmail_config['username_domain'] = '';

Hope that helps!

Testing can show the presence of errors, but not their absence.
                                                      -- E. W. Dijkstra
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 204 bytes
Desc: not available
URL: <http://lists.roundcube.net/pipermail/users/attachments/20080501/c835f5f7/attachment-0001.sig>
-------------- next part --------------
List info: http://lists.roundcube.net/users/

More information about the users mailing list