Roundcube Community Forum

 

changing mail host > no contacts

Started by turbo, October 31, 2025, 09:07:20 PM

Previous topic - Next topic

turbo

Hello,
using RC-1.6.0 I have to change the mail host for our users. I did this in the config file and in the database. Login was ok and all mailfolders with messages are shown. So far so good. What is missing is the addressbook. It is the build-in addressbook.  Reverting back to the "old" mail host, all contacts are there.

Anyone had this situation and know how to get the addressbook back when changing the mail host ?

Thank you.

SKaero

In the "users" table in the database you should see a record for each user for the old mail host and one for the new mail host (value is stored in the "mail_host" column) you'll need to update the old user account records to the new mail host so the correct contacts are shown.

turbo

#2
Thank you SKaero for the quick reply.
After inspecting the contacts table I noticed that each contatct has it's user_id set. Later I noticed also when scrolling down the user table, that RC had created a new user with the new mail host after login. I didn't expected that, as I had changed the mail_host in the following order:

1. changed mail_host in the config file
2. changed mail_host in db to the one in the config file
3. logged in

Never expected that a new user would be created, as the same (old) user had now already an entry matching the new mail_host.
Maybe one should disable beforehand the option in the config file (if set) to create a new user automatically. Would that prevent this behavior ?

I still have to change the mail_host, having quite a few users and the chance to accidentally delete the wrong user ......  Ok, making a backup of the RC-db is self explanatory.

Interestingly, changing the username and logging in does not create a new user entry.



SKaero

If you changed the mail_host in the database before you logged in it shouldn't have created a new user since it looks for that match to find a user record. Turning off the "auto_create_user" if it can't find a matching username and mail host the login will fail.