Author Topic: Little tip (or mistake?) for not entering domain names  (Read 2050 times)

Offline nabab

  • Newbie
  • *
  • Posts: 1
Little tip (or mistake?) for not entering domain names
« on: February 12, 2010, 06:27:50 AM »
Hi,

I thought I'd post it here in case someone has the same problem than I had.

If you have installed roundcube on a server with several domains and all domains can access it through an aliased subdomain like webmail.mydomain.net (or whatever subdomain name)

e.g. in Apache:
Code: [Select]
ServerName webmail
ServerAlias webmail.*

And that you don't want your IMAP users to enter their domain name each time, you can put this line in the main.inc.php:
Code: [Select]
$rcmail_config['username_domain'] = substr($_SERVER['HTTP_HOST'],strpos($_SERVER['HTTP_HOST'],'.')+1);
and your user can just enter his/her username without @mydomain.net

Couldn't figure out a configuration parameter allowing me to do this... Is there?

Thanks,

Thomas