Roundcube Community Forum

 

Losing user data when changing username_domain

Started by cneilley, April 02, 2024, 09:17:15 AM

Previous topic - Next topic

cneilley

I am having an issue with new user accounts having their primary identity be created as "username@mail.example.com" when previously they were being created as "username@example.com"

It does not matter so much for authentication to the mail server, as we just look to the username, but it is confusing end users.

I am aware that username_domain should be set to "example.com" to fix this, but when I do, all older accounts lose all of their preferences and data.

I checked the mysql database and see that if I change the mail_host to example.com instead of mail.example.com for the user, I am logged in as the user_id (no new user is created on login), but my settings are gone and my contacts and collected addresses are all missing.

Is there a field other than the user_id that ties this information to the account that I can manually change to get the current users working seamlessly with their data while also having new accounts be created the way I want them?

Thank you,
Cam

JohnDoh

To change the domain used for the user's default identity you want to change the `mail_domain` config option.

`username_domain` is used for login only and the mail_host field in the database is populated based on `imap_host`
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

cneilley

Quote from: JohnDoh on April 02, 2024, 03:56:29 PM
To change the domain used for the user's default identity you want to change the `mail_domain` config option.

`username_domain` is used for login only and the mail_host field in the database is populated based on `imap_host`

This was the answer, thank you.