webmail roundcube with sqlite : possible to change settings for all email users ?

Markif

Well-Known Member
Nov 9, 2016
55
7
133
Toulouse
cPanel Access Level
Root Administrator
Hello

There are default settings in
/usr/local/cpanel/base/3rdparty/roundcube/config/config.inc.php
and
/usr/local/cpanel/base/3rdparty/roundcube/config/defaults.inc.php
but if I don't make a mistake they are only used for creating a new user sqlite db
/home/USER/etc/DOMAIN/EMAIL.rcube.db

Is it possible to change some options in already existing sqlite db profiles without loosing what the mailusers have already set in it.
For example : changing the default language
without having to go in all webmail interfaces :)

I've found treads about this but it applies to the time where it was a mysql database, but I did not find examples for sqlite db
I've seen there is a script to "rebuild" the sqlite db, but does this not erase what user has already put in it ?

Thanks !
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,307
2,240
363
cPanel Access Level
Root Administrator
Hey there! I don't have any ready-made tools to perform that type of work. Since each user has a unique profile, this is typically done at the user level.

You may find the following article helpful for working with SQLite databases in general while you explore solutions for this issue: https://support.cpanel.net/hc/en-us/articles/1500008228681-Working-with-SQLite-databases

If you'd like to see such a feature in a future version of cPanel, please feel free to submit a feature request using the link in my signature.
 

Markif

Well-Known Member
Nov 9, 2016
55
7
133
Toulouse
cPanel Access Level
Root Administrator
Thanks for the link.
The language data is stored in the "users" table of the sqlite db.
witch has a simple structure

If "preferences" is a serialized array,
the "language" field, is separate and directly accessible.
So this did work

Seems I can't include code here, so a link to a simple script as base
CPanelChangeLanguageAllRoundcubeUsers.php
 
  • Like
Reactions: cPRex