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/main.inc.php
I have a line like $rcmail_config['default_host'] = 'mail.domain.com';
and this is setting all new accounts to have @mail.domain.com
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).

- 73
- 3
- 8
2 Answers
- We don't care about your personal opinions regarding the aesthetics of roundcube
Use your favorite editor to open the main.inc.php
and change this:
$rcmail_config['default_host'] = 'mail.domain.com';
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.

- 16,880
- 9
- 58
- 93
-
Sorry, but this didn't help. After changing `$rcmail_config['default_host'] = 'mail.domain.com';` 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 07:01
-
ah wait misread – Lucas Kauffman Jul 25 '13 at 07:12
-
1But 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 07:53
by default in main.inc.php 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'] = '';
to
$rcmail_config['default_host'] = '%d';
and be sure that the domain name exists in /etc/hosts
eg : the requested url : http://virtualsite1.com user will access as user@virtualsite1.com
other variables like %t %d ... are explained in main.inc.php