Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

whitelist entry created with wrong owner #121

Open
jnorell opened this issue May 27, 2021 · 0 comments
Open

whitelist entry created with wrong owner #121

jnorell opened this issue May 27, 2021 · 0 comments

Comments

@jnorell
Copy link

jnorell commented May 27, 2021

I updated both roundcube plugins and ISPConfig yesterday, and in testing that "everything" works I came across an issue. In roundcube I created a whitelist entry; then in ISPConfig, logged in as the client which created the email account, I went to verify that it showed up and did not see it. If I login as the ISPConfig admin I do see it, so the problem is in the sys_userid and sys_groupid set when the plugin creates the spamfilter_wblist entry.

Here are 2 entries, '[email protected]' was created by the plugin, and '[email protected]' was created in ISPConfig when logged in as the client (also relevant table entries to look up id's, though you could probably just copy the sys_userid, sys_groupid, sys_perm_user and sys_perm_group from the mail_user entry):

MariaDB [dbispconfig]> select * from spamfilter_wblist where email like 'test%';
+-----------+------------+-------------+---------------+----------------+----------------+-----------+----+-----+-----------------+----------+--------+
| wblist_id | sys_userid | sys_groupid | sys_perm_user | sys_perm_group | sys_perm_other | server_id | wb | rid | email           | priority | active |
+-----------+------------+-------------+---------------+----------------+----------------+-----------+----+-----+-----------------+----------+--------+
|         2 |          1 |           1 | riud          | riud           |                |         1 | W  | 336 | [email protected]   |        5 | y      |
|         3 |          2 |           2 | riud          | riud           |                |         1 | W  | 211 | [email protected] |        5 | y      |
+-----------+------------+-------------+---------------+----------------+----------------+-----------+----+-----+-----------------+----------+--------+
2 rows in set (0.001 sec)

MariaDB [dbispconfig]> select mailuser_id, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, email from mail_user where mailuser_id = 660;
+-------------+------------+-------------+---------------+----------------+----------------+-------------------+
| mailuser_id | sys_userid | sys_groupid | sys_perm_user | sys_perm_group | sys_perm_other | email             |
+-------------+------------+-------------+---------------+----------------+----------------+-------------------+
|         660 |          1 |           2 | riud          | riud           |                | [email protected] |
+-------------+------------+-------------+---------------+----------------+----------------+-------------------+
1 row in set (0.001 sec)

MariaDB [dbispconfig]> select * from domain where domain = 'domain.tld';
+-----------+------------+-------------+---------------+----------------+----------------+------------+
| domain_id | sys_userid | sys_groupid | sys_perm_user | sys_perm_group | sys_perm_other | domain     |
+-----------+------------+-------------+---------------+----------------+----------------+------------+
|        17 |          2 |           2 | riud          | ru             |                | domain.tld |
+-----------+------------+-------------+---------------+----------------+----------------+------------+
1 row in set (0.001 sec)

MariaDB [dbispconfig]> select client_id, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, email from client where client_id = 1;
+-----------+------------+-------------+---------------+----------------+----------------+-------------------+
| client_id | sys_userid | sys_groupid | sys_perm_user | sys_perm_group | sys_perm_other | email             |
+-----------+------------+-------------+---------------+----------------+----------------+-------------------+
|         1 |          1 |           1 | riud          | riud           |                | [email protected] |
+-----------+------------+-------------+---------------+----------------+----------------+-------------------+
1 row in set (0.001 sec)

MariaDB [dbispconfig]> select * from sys_group where client_id = 1;
+---------+----------+-------------+-----------+
| groupid | name     | description | client_id |
+---------+----------+-------------+-----------+
|       2 | client123 |             |         1 |
+---------+----------+-------------+-----------+
1 row in set (0.001 sec)

MariaDB [dbispconfig]> select userid, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, username, typ, active, default_group, client_id from sys_user where userid < 3;
+--------+------------+-------------+---------------+----------------+----------------+----------+-------+--------+---------------+-----------+
| userid | sys_userid | sys_groupid | sys_perm_user | sys_perm_group | sys_perm_other | username | typ   | active | default_group | client_id |
+--------+------------+-------------+---------------+----------------+----------------+----------+-------+--------+---------------+-----------+
|      1 |          1 |           0 | riud          | riud           |                | admin    | admin |      1 |             1 |         0 |
|      2 |          1 |           1 | riud          | riud           |                | client123 | user  |      1 |             2 |         1 |
+--------+------------+-------------+---------------+----------------+----------------+----------+-------+--------+---------------+-----------+
2 rows in set (0.001 sec)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant