Cleaning up extra users added by mistake to the user whitelist and blacklist

fargotto48

New Member
Dec 16, 2024
4
0
1
Hello. I have PMG for servicing 3 domains.

I played with the settings to understand the logic of the working programm.
But I accidentally added extra users not related to the domain and now I can't delete them. What should I do to delete this?
 

Attachments

  • primer.png
    primer.png
    29.4 KB · Views: 19
Check if the following entries are present in the Blacklistinside Who Objects sub-section under Mail Filter section and then remove them if needed.
 
Check if the following entries are present in the Blacklistinside Who Objects sub-section under Mail Filter section and then remove them if needed.
No.

I wouldn't ask such a stupid question if it were that easy.

Most likely there is some configuration file via SSH
 
Been digging,
can see the lines to delete with:
Code:
pmgsh get /quarantine/quarusers

can list empty list.
Code:
pmgsh get /quarantine/whitelist --pmail *@wrongmail.tld
200 OK


cannot delete
Code:
pmgsh delete /quarantine/whitelist --pmail *@wrongmail.tld
400 Parameter verification failed.
address: property is missing and it is not optional

Any psql magic to apply?

--edit--
Found it myself, with a little support of ChatGPT ;-)

Code:
root@PMG8-CT:~$ sudo -i -u postgres
postgres@PMG8-CT:~$ psql -d Proxmox_ruledb
psql (15.10 (Debian 15.10-0+deb12u1))
Type "help" for help.

Proxmox_ruledb=# SELECT * FROM userprefs WHERE pmail = '*@wrongmail.tld';
    pmail    | name | data |   mtime
-------------+------+------+------------
 *@wrongmail.tld | WL   |      | 1738588725
 *@wrongmail.tld | BL   |      | 1738588725
(2 rows)

Proxmox_ruledb=# DELETE FROM userprefs WHERE pmail = '*@wrongmail.tld';
DELETE 2
Proxmox_ruledb=# \quit
postgres@PMG8-CT:~$ exit
logout

And bob's your uncle!
 
Last edited:
  • Like
Reactions: artveli