Domain level thresholds

Nov 26, 2019
13
3
8
We are looking at replacing our ancient incoming email gateway cluster with a PMG cluster. A requirement for us is the ability of our clients to set custom block/accept/quarantine/tag thresholds so we're looking at ways of doing this.

It looks like it will be possible by inserting some rules in the mail filter to handle emails to a specific domain and block/accept/tag/quarantine based on spam level. These rules would need replicating for each domain with custom settings which may result in tens of thousands of rules in the system. Will this many rules cause issues with performance?

Our plan is to manage the custom rules via the API so we can build a module for our control panel which clients will use. From looking at the API it looks like rules can only be accessed or updated by using the rule ID. Is there any way to search rules via the API to get the ID of a rule with a specified name? It seems overkill to have to download all of the rules via the API just to get the ID, especially if there are many thousands of them.

Thanks.
 
It looks like it will be possible by inserting some rules in the mail filter to handle emails to a specific domain and block/accept/tag/quarantine based on spam level. These rules would need replicating for each domain with custom settings which may result in tens of thousands of rules in the system. Will this many rules cause issues with performance?
The rules are cached into memory when pmg-smtp-filter starts - so if in doubt make sure your PMG nodes have enough memory.
Regarding the tens of thousands of rules - I'm not aware of anyone running into any limitations - however I've also never done a benchmark with that many rules - but let us know how it works out!

Is there any way to search rules via the API to get the ID of a rule with a specified name?
No - you need to fetch '/config/ruledb/rules' - but you can cache that.

I hope this helps!