Author Topic: All Settings of the Roundcube Webmailer  (Read 1342 times)

Offline Andreji

  • Newbie
  • *
  • Posts: 9
All Settings of the Roundcube Webmailer
« on: February 16, 2023, 08:56:04 AM »
Hello Forum,

is there any possibilty to save all settings of the webmailer, so thet I'm able to export and use them in all may other acconts?

Best regards
Andreji

Offline Dmitry42

  • Full Member
  • ***
  • Posts: 232
Re: All Settings of the Roundcube Webmailer
« Reply #1 on: February 16, 2023, 10:14:33 AM »
As I know RC use database for this. So you can work with DB tables. But I think there is no special software or scripts for RC - just your fantasy and experience.

I think it can be
`preferences` longtext from TABLE `users`

Quote
-- Table structure for table `users`

CREATE TABLE `users` (
 `user_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
 `username` varchar(128) BINARY NOT NULL,
 `mail_host` varchar(128) NOT NULL,
 `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
 `last_login` datetime,
 `failed_login` datetime,
 `failed_login_counter` int(10) UNSIGNED,
 `language` varchar(16),
 `preferences` longtext,
 PRIMARY KEY(`user_id`),
 UNIQUE `username` (`username`, `mail_host`)
) ROW_FORMAT=DYNAMIC ENGINE=INNODB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
« Last Edit: February 16, 2023, 10:21:33 AM by Dmitry42 »

Offline Dmitry42

  • Full Member
  • ***
  • Posts: 232
Re: All Settings of the Roundcube Webmailer
« Reply #2 on: February 16, 2023, 10:41:57 AM »
Its look like:

Query:  MariaDB [roundcube]> select preferences from users where username = 'user1@domain.com';

Quote
a:1:{s:11:"client_hash";s:16:"l2ecgI1lDAJbvzhE";}

or like this

Quote
a:9:{s:6:"layout";s:10:"widescreen";s:4:"skin";s:7:"elastic";s:17:"collapsed_folders";s:125:"&test&&shared&&SHARED%2F%26BBIERQQ%2BBDQETwRJBDgENQ-&&SHARED%2FINBOX&&SHARED%2Fshared&";s:17:"message_threading";a:1:{s:9:"INBOX/123";b:0;}s:11:"drafts_mbox";s:26:"&BCcENQRABD0EPgQyBDgEOgQ4-";s:9:"sent_mbox";s:34:"&BB4EQgQ,BEAEMAQyBDsENQQ9BD0ESwQ1-";s:9:"junk_mbox";s:54:"&BB0ENQQ2BDUEOwQwBEIENQQ7BEwEPQQwBE8- &BD8EPgRHBEIEMA-";s:10:"trash_mbox";s:26:"&BCMENAQwBDsENQQ9BD0ESwQ1-";s:11:"client_hash";s:16:"0TmN1nwRgAuCGWkA";} |

depend from user settings.

So if you want do it - you can connect to DB and apply changes in table for all exists users;
« Last Edit: February 16, 2023, 10:45:27 AM by Dmitry42 »

Offline Dmitry42

  • Full Member
  • ***
  • Posts: 232
Re: All Settings of the Roundcube Webmailer
« Reply #3 on: February 16, 2023, 10:59:44 AM »
For example
1. Take preferences:

select preferences from users where username = 'user1@domain.com';

Quote
+---------------------------------------------------+
| preferences                                       |
+---------------------------------------------------+
| a:1:{s:11:"client_hash";s:16:"l2ecgI1lDAJbvzhE";} |
+---------------------------------------------------+
1 row in set (0.001 sec)

2. Set preferences to all :

update users set preferences='a:1:{s:11:"client_hash";s:16:"l2ecgI1lDAJbvzhE";}';

Quote
Query OK, 1 row affected (0.001 sec)
Rows matched: 1  Changed: 1  Warnings: 0