Proxmox Mail Gateway - User Blocklist

liszca

Well-Known Member
May 8, 2020
84
1
48
24
I am uncertain how to use the Blocklist. I tried to block mails but I feel like I am doing it wrong:
1764947095066.png

What is the pulldown menu for and whats the relation to the other position (below) where I can also put e-Mail addresses?
 
Last edited:
In dropdown list first write your user mail address. Then add blocking (or welcome) sender address via add button.
this would mean for this user mail the another email will be blocked or allowed?

can this be done for domains also?
 
@liszca via SSH:

Code:
# 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
 
Last edited:
Is this a shared database or a separate one for each node in a cluster configuration? After clearing a lot of unnecessary records, I noticed that some records remained on the second cluster node.
pmgsh get /nodes/localhost/status | grep insync
200 OK
"insync" : 1,
 
Last edited:
@Dep1911

It’s a separate database on each node.

Since my command only modifies the local database on that specific node and does not trigger any synchronization between cluster members, the changes were not propagated. That’s why some records were still present on the second cluster node.

Unfortunately, I don’t have deeper insight into how this is handled internally in a clustered setup beyond that behavior. Maybe someone from the Proxmox team could clarify how this is supposed to work in a proper cluster configuration.