# Switch to the postgres system user
root@PMG8-CT:~$ sudo -i -u postgres
# Connect to the PostgreSQL database "Proxmox_ruledb"
postgres@PMG8-CT:~$ psql -d Proxmox_ruledb
# Check existing entries for the wildcard email *@wrongmail.tld
Proxmox_ruledb=# SELECT *
FROM userprefs
WHERE pmail = '*@wrongmail.tld';
-- Expected result:
-- pmail | name | data | mtime
-- -------------------+------+------+
-- *@wrongmail.tld | WL | | 1738588725
-- *@wrongmail.tld | BL | | 1738588725
-- (2 rows)
# Delete all matching entries for *@wrongmail.tld
Proxmox_ruledb=# DELETE
FROM userprefs
WHERE pmail = '*@wrongmail.tld';
-- Output:
-- DELETE 2
# Exit psql
Proxmox_ruledb=# \quit
# Return to the original shell user
postgres@PMG8-CT:~$ exit
# Logout from the system
# logout