Roundcube missing contacts after changing IP address of the server

If you have a working installation of Roundcube and for some reason change your IP address the result is missing address book entries of all users.

If in the configuration file config/main.inc.php the line:
$rcmail_config[‘default_host’] = ‘10.10.200.1’;
is changed to some other IP address (for instance 192.168.10.1) the result is missing address book entries.

In fact, entries are not missing but Rouncube shows only entries for the users with current ‘default_host’ IP address. This means that you have two entries for each user with a different ‘default_host’ field. How to fix it?

First, delete all newly created entries with the new default_host:
old: 10.10.200.1, new: 192.168.10.1.

# mysql -u roundcubeuser -proundcubepass
mysql> use roundcube
mysql> delete from users where mail_host=’192.168.10.1′;
Query OK, 60 rows affected (0.07 sec)

Now change all remained entries with the new default_host:

mysql> update users set mail_host=’192.168.10.1′ where mail_host=’10.10.200.1′;
Query OK, 105 rows affected (0.08 sec)
Rows matched: 105  Changed: 105  Warnings: 0

Now you have your address book back.

Leave a Comment

Your email address will not be published. Required fields are marked *

To Resolve this issue at just 5$ from ServerExpert

https://serverexpert.io/

For Hosting please visit Hostingwebsite.io

You have Successfully Subscribed!

Open chat