Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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).

share|improve this question

2 Answers 2

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

share|improve this answer
  1. 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.

share|improve this answer
    
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 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

Your Answer

 
discard

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.