6

New Roundcube identities get a '@localhost' domain part for their Email address. That is kind of useless. I would rather have Roundcube take the Apache HTTP host (minus a possible 'www.'), since my users will use 'their' associated domain for getting to the Roundcube interface. How can I configure this?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Arne
  • 813
  • 4
  • 12
  • 22

4 Answers4

6

Found the solution to my problem. In the main config of roundcube (/var/lib/roundcube/config/main.inc.php) you can set the mail_domain variable:

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

There are multiple placeholders, but %d will use the web server domain, which is fine for me.

Arne
  • 813
  • 4
  • 12
  • 22
  • 1
    In the current version (1.1.3), it would be `$config['mail_domain'] = '%d';` in the file `roundcube/config/config.inc.php`. – mivk Oct 31 '15 at 18:12
4

Look here:

    grep -nR -B9 mail_domain defaults.inc.php
    440-
    441-// This domain will be used to form e-mail addresses of new users
    442-// Specify an array with 'host' => 'domain' values to support multiple hosts
    443-// Supported replacement variables:
    444-// %h - user's IMAP hostname
    445-// %n - http hostname ($_SERVER['SERVER_NAME'])
    446-// %d - domain (http hostname without the first part)
    447-// %z - IMAP domain (IMAP hostname without the first part)
    448-// For example %n = mail.domain.tld, %t = domain.tld
    449:$config['mail_domain'] = '';

So, you could add

$config['mail_domain'] = '%d';

to your roundcube/config/config.inc.php file. (not to the defaults.inc.php file which may be overwritten by upgrades)

mivk
  • 3,446
  • 29
  • 31
METAJIJI
  • 141
  • 4
0

In "WHM Home » Server Configuration » Tweak Settings", under the "Mail" tab, you can disable the other Webmail clients by ensuring the following options are not selected:

"Enable Horde Webmail" "Enable SquirrelMail webmail"

Or you can directly login using the below URLS:

server:2095/3rdparty/roundcube/

server:2096/3rdparty/roundcube/

If proxy sub-domains are enabled, the following URLs, using the "webmail." sub-domain, will also go directly to Roundcube; replace "domain" with your cPanel account domain name:

webmail.domain:2095/3rdparty/roundcube/

webmail.domain:2096/3rdparty/roundcube/

user9744
  • 711
  • 2
  • 8
  • 10
0

this is an old thread but you should be able to set the server name using this command

dpkg-reconfigure roundcube-core

In my case I have isp3config, my server is set up as debian.example.com, my two sites are example.com and example.net.

When it asks for the server name I put in debian.example.com, if you leave it blank it will ask you the server on the log in page.

Patrick Mevzek
  • 3,130
  • 2
  • 20
  • 30