[SOLVED] global blacklist is not working

mac.linux.free

Renowned Member
Jan 29, 2017
296
37
68
48
blacklist is sadly not working for me

root@mgw2:~# pmgdb dump
Found RULE 6 (prio: 99, in, active): Whitelist
FOUND FROM GROUP 3: Whitelist
OBJECT 2: mail@fromthisdomain.com
OBJECT 38: xx.xx.xx.xx
FOUND ACTION GROUP 17: Accept
OBJECT 30: accept message
Found RULE 4 (prio: 98, in, active): Blacklist
FOUND FROM GROUP 2: Blacklist
OBJECT 39: block@email.com
OBJECT 1: nomail@fromthisdomain.com
OBJECT 37: city
FOUND TO GROUP 2: Blacklist
OBJECT 39: block@email.com
OBJECT 1: nomail@fromthisdomain.com
OBJECT 37: city
FOUND ACTION GROUP 18: Block
OBJECT 31: block message
Found RULE 2 (prio: 96, in, active): Block Viruses
FOUND WHAT GROUP 9: Virus
OBJECT 22: active
FOUND ACTION GROUP 19: Quarantine
OBJECT 32: Move to quarantine.
FOUND ACTION GROUP 20: Notify Admin
OBJECT 33: notify __ADMIN__
Found RULE 3 (prio: 96, out, active): Virus Alert
FOUND WHAT GROUP 9: Virus
OBJECT 22: active
FOUND ACTION GROUP 18: Block
OBJECT 31: block message
FOUND ACTION GROUP 20: Notify Admin
OBJECT 33: notify __ADMIN__
FOUND ACTION GROUP 21: Notify Sender
OBJECT 34: notify __SENDER__
Found RULE 1 (prio: 93, in, active): Block Dangerous Files
FOUND WHAT GROUP 8: Dangerous Content
OBJECT 16: content-type=application/javascript
OBJECT 17: content-type=application/x-executable
OBJECT 15: content-type=application/x-java
OBJECT 14: content-type=application/x-ms-dos-executable
OBJECT 18: content-type=application/x-ms-dos-executable
OBJECT 19: content-type=message/partial
OBJECT 20: filename=.*\.(vbs|pif|lnk|shs|shb)
OBJECT 21: filename=.*\.\{.+\}
FOUND ACTION GROUP 15: Remove attachments
OBJECT 28: remove matching attachments
Found RULE 5 (prio: 90, in, active): Modify Header
FOUND ACTION GROUP 13: Modify Spam Level
OBJECT 26: modify field: X-SPAM-LEVEL:__SPAM_INFO__
Found RULE 12 (prio: 87, in+out, inactive): Block Multimedia Files
FOUND WHAT GROUP 6: Multimedia
OBJECT 5: content-type=audio/.*
OBJECT 6: content-type=video/.*
FOUND ACTION GROUP 15: Remove attachments
OBJECT 28: remove matching attachments
Found RULE 9 (prio: 82, in, active): Block Spam (Level 10)
FOUND WHAT GROUP 12: Spam (Level 10)
OBJECT 25: Level 10
FOUND ACTION GROUP 18: Block
OBJECT 31: block message
Found RULE 8 (prio: 81, in, active): Quarantine/Mark Spam (Level 5)
FOUND WHAT GROUP 11: Spam (Level 5)
OBJECT 24: Level 5
FOUND ACTION GROUP 14: Modify Spam Subject
OBJECT 27: modify field: subject:SPAM: __SUBJECT__
FOUND ACTION GROUP 19: Quarantine
OBJECT 32: Move to quarantine.
Found RULE 7 (prio: 80, in, active): Quarantine/Mark Spam (Level 3)
FOUND WHAT GROUP 10: Spam (Level 3)
OBJECT 23: Level 3
FOUND ACTION GROUP 14: Modify Spam Subject
OBJECT 27: modify field: subject:SPAM: __SUBJECT__
FOUND ACTION GROUP 19: Quarantine
OBJECT 32: Move to quarantine.
Found RULE 10 (prio: 70, out, active): Block outgoing Spam
FOUND FROM GROUP 2: Blacklist
OBJECT 39: block@email.com
OBJECT 1: nomail@fromthisdomain.com
OBJECT 37: city
FOUND WHAT GROUP 10: Spam (Level 3)
OBJECT 23: Level 3
FOUND ACTION GROUP 18: Block
OBJECT 31: block message
FOUND ACTION GROUP 20: Notify Admin
OBJECT 33: notify __ADMIN__
FOUND ACTION GROUP 21: Notify Sender
OBJECT 34: notify __SENDER__
Found RULE 11 (prio: 60, out, inactive): Add Disclaimer
FOUND ACTION GROUP 22: Disclaimer
OBJECT 35: disclaimer

please help

I need black and whitelist functionality on port 25 and 26 though this is a gateway for multiple customers.

Thank you.
 
I notice two things for the first 2 rules (Whitelist and Blacklist):
* both only have direction 'in' (they only work on inbound mail (port 25) and not port 26) -> change the direction to in&out
* for the blacklist you have a from and a to object (with the same addresses inside) - I guess you might want to remove the to-object

I hope this helps!
 
  • Like
Reactions: mac.linux.free
I notice two things for the first 2 rules (Whitelist and Blacklist):
* both only have direction 'in' (they only work on inbound mail (port 25) and not port 26) -> change the direction to in&out
* for the blacklist you have a from and a to object (with the same addresses inside) - I guess you might want to remove the to-object

I hope this helps!

Thank you very much. I´m trying the first setting now.
For the blacklist setting - I need to block one receiver so the to-object is hopefully correct.
 
If you need to block all mails to one receiver then you need to remove the from object
(if you have set both 'from' and 'to' then only mails from that mail and to that mail are blocked)

The service is called 'pmg-smtp-filter' (but it should reload the rule database when you change it without an explicit restart)
 
thank you it worked...I had to do 2 separate rules one for in and one for out to block an email-adress in both directions.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!