Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: gregharkins on October 26, 2016, 09:58:06 AM

Title: Default Domain Name
Post by: gregharkins on October 26, 2016, 09:58:06 AM
I have just installed 1.2.2 and all it working great.
we have been able to brand it as our past installs was set u


I have having a huge issue getting the default domain to be part of the log in process

we had the old system set up so user only had to enter name and password
USER
PASSWORD

now no matter what settings i change it makes me enter
USER@DOMAIN.COM
PASSWORD

I have tried the %d and %z in various spots but nothing it working

where is the exact location i need to set the domain at so i can get it working the way it did before the upgrade
Title: Re: Default Domain Name
Post by: JohnDoh on October 26, 2016, 10:30:19 AM
which config option are you setting to '%d'? it should be `$config['username_domain']` and make sure you do it in config.inc.php not in defaults.inc.php
Title: Re: Default Domain Name
Post by: gregharkins on October 26, 2016, 11:52:15 AM
I do not have the `$config['username_domain']` setting min my config file
so i added it as show below, but it still doesnt work
im forced to put in the @domain.com to be able to log in



// The mail host chosen to perform the log-in.
// Leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld
$config['default_host'] = 'localhost';
$config['username_domain'] = '%d';
Title: Re: Default Domain Name
Post by: gregharkins on October 26, 2016, 11:54:01 AM
im running 1.2.2 not sure if that makes a difference for the fields
Title: Re: Default Domain Name
Post by: gregharkins on October 26, 2016, 12:50:47 PM
I got it but had to use the domainname.com instead of the variable
Title: Re: Default Domain Name
Post by: freeland on November 05, 2016, 06:23:52 AM
Restart Apache (service apache2 restart) after changes in config.inc.php .

Quote from: gregharkins on October 26, 2016, 12:50:47 PM
I got it but had to use the domainname.com instead of the variable

QuoteAnd if you want a drop-down list like it's explained in the comments you need something like this:

$config['default_host'] = array('mail.example.com', 'webmail.example.com', 'ssl://mail.example.com:993');
In order to show nice labels instead of the host names in the drop-down box write it this way:

$config['default_host'] = array(
  'mail.example.com' => 'Default Server',
  'webmail.example.com' => 'Webmail Server',
  'ssl://mail.example.com:993' => 'Secure Webmail Server'
);
https://github.com/roundcube/roundcubemail/wiki/Configuration