Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have inherited a server that is running some ugly roundcube php interface for mail accounts. I would like to change a domain for specific account to custom domain that I have set up on my DNS. I have added users to system and created aliases in my postfix configuration. In file /usr/local/www/roundcube/config/ I have a line like $rcmail_config['default_host'] = ''; and this is setting all new accounts to have domain in their mails. I also have tried to change this by logging in to this account through roundcube interface and in Settings -> Identies I have E-Mail line that I can't change. I see there is also some mysql database for this roundcube installation. If someone could point me where exactly I should change domain name for specific accounts (not for all accounts, like in the line I quoted above).

share|improve this question
  1. We don't care about your personal opinions regarding the aesthetics of roundcube

Use your favorite editor to open the and change this:

$rcmail_config['default_host'] = '';

to this:

$rcmail_config['username_host'] = '';

From now on you need to type the correct mail-server first. If you have domains which resolve to different mailservers then you should opt to run different instances of roundcube for each mailserver or create a drop down list of mailservers yourself in the application.

share|improve this answer
Sorry, but this didn't help. After changing $rcmail_config['default_host'] = ''; to $rcmail_config['default_host'] = ''; I need to type mail server address on the login page. username_domain was already set to $rcmail_config['username_domain'] = '';. After login in Settings -> Identies I still can't change domain name for account I currently use for login. – Mark Zakred Jul 25 '13 at 7:01
ah wait misread – Lucas Kauffman Jul 25 '13 at 7:12
But form of login is depended on pop/imap server. roundcube it's just web application. Do you want to change header and envelope information? – ALex_hha Jul 25 '13 at 7:53

by default in you find this line like this

$rcmail_config['default_host'] = '';

in this case when you access by http to roundcube it asks for filling user, password and server fields if you change ['default_host'] = ''; to ['default_host'] = 'localhost'; then the server field will be hidden and all users will access and send mails as user@localhost. But if you have many virtual sites and you would like that the server field will be automatically used as the domain name requested of each user in hidden way you've to change

$rcmail_config['default_host'] = '';    


$rcmail_config['default_host'] = '%d';

and be sure that the domain name exists in /etc/hosts

eg : the requested url : user will access as

other variables like %t %d ... are explained in

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.