Roundcube Community Forum

 

Config - mail host %s and lost address book

Started by salamalejkum, October 25, 2016, 06:07:51 AM

Previous topic - Next topic

salamalejkum

Hello,

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:

$config['default_host'] = array('server1.example.com','server2.example.com');

But I want autoselect server:

$config['default_host'] = '%s';

(// 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?

JohnDoh

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