Author Topic: Config - mail host %s and lost address book  (Read 1547 times)

Offline salamalejkum

  • Newbie
  • *
  • Posts: 1
Config - mail host %s and lost address book
« on: October 25, 2016, 06:07:51 AM »

I have some servers and I want centralised e-mail login page.

In actual config I have a list with e-mail, password and server list.

From config:

Code: [Select]
$config['default_host'] = array('','');
But I want autoselect server:

Code: [Select]
$config['default_host'] = '%s';
Code: [Select]
(// 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)

And it works but users lost their address book (empty).. When I switched back to default_host with servers list and users can access to their address book again..

How I can fix this issue?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,347
Re: Config - mail host %s and lost address book
« Reply #1 on: October 25, 2016, 09:33:30 AM »
It sounds like what %s resolves to is probably different from what you had hardcoded. in the users table in your roundcube database there is a col called mail_host. for all the existing users update the value in that field to be what ever %s works out as rather than what it is now.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦