Difference between revisions of "Roundcube"

From Organic Design wiki
(Deleting users: comment last)
(Deleting users: script usage)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{stub}}
 
{{stub}}
 +
 +
== Configuration ==
 +
One important configuration option is to ensure that ''login_lc'' is set to '''2''' which ensures that both the user and domain parts of logins are forced to lower case.
  
 
== Deleting users ==
 
== Deleting users ==
There's [https://github.com/roundcube/roundcubemail/blob/master/bin/deluser.sh a script] for deleting users, if that fails, here's the manual way.
+
There's [https://github.com/roundcube/roundcubemail/blob/master/bin/deluser.sh a script] for deleting users
 +
<source lang="bash">
 +
sudo -u www-data ./deluser.sh --host=localhost [--dry-run] USERNAME
 +
</source>
  
Deleting is done by user ID which is found in the ''users'' table, you can then delete the user as follows. In the following example we're using ID 1, you can also use the ''IN (ID,ID,ID...)'' syntax to deal with multiple at once.
+
If there's problems such as duplicate user rows, here's the manual way. Deleting is done by user ID which is found in the ''users'' table, you can then delete the user as follows. In the following example we're using ID 1, you can also use the ''IN (ID,ID,ID...)'' syntax to deal with multiple at once.
 
<source lang="mysql">
 
<source lang="mysql">
 
DELETE FROM cache WHERE user_id = 1;
 
DELETE FROM cache WHERE user_id = 1;

Latest revision as of 21:27, 18 June 2022

Cone.png This article or section is a stub. Stubs are articles that have not yet received substantial attention from the authors. They are short or insufficient pieces of information and require additions to further increase the article's usefulness. The project values stubs as useful first steps toward complete articles.


Configuration

One important configuration option is to ensure that login_lc is set to 2 which ensures that both the user and domain parts of logins are forced to lower case.

Deleting users

There's a script for deleting users

sudo -u www-data ./deluser.sh --host=localhost [--dry-run] USERNAME

If there's problems such as duplicate user rows, here's the manual way. Deleting is done by user ID which is found in the users table, you can then delete the user as follows. In the following example we're using ID 1, you can also use the IN (ID,ID,ID...) syntax to deal with multiple at once.

DELETE FROM cache WHERE user_id = 1;
DELETE FROM contactgroups WHERE user_id = 1;
DELETE FROM contacts WHERE user_id = 1;
DELETE FROM identities WHERE user_id = 1;
DELETE FROM users WHERE user_id = 1;
; DELETE FROM contactgroupmembers WHERE contactgroup_id IN (SELECT contactgroup_id FROM contactgroups WHERE user_id = 1);

The last one is commented because we don't need it for OD, but some instances may need it