GFI Software

Welcome to the GFI Software community forum! For support please open a ticket from https://support.gfi.com.

Home » GFI User Forums » Kerio Connect » Custom spam rule (automated adding many domains to block)
Custom spam rule [message #149764] Thu, 20 May 2021 07:33 Go to next message
Devil-xGen is currently offline  Devil-xGen
Messages: 2
Registered: May 2021
I want to create custom rules for spam control in Configuration > Content Filter > Spam Filter > Custom rules. But my problem is a lot of domains to add (i.e. hundred or more)
How can I make one rule for all domains for example listing them through a delimiter (i.e. , ; whitespace etc)? For example Header - From, Type - contains domain, Content - domain1, domain2, domain3. Or strictly 1 rule 1 domain?
Re: Custom spam rule [message #149772 is a reply to message #149764] Fri, 21 May 2021 18:41 Go to previous message
j.a.duke is currently offline  j.a.duke
Messages: 239
Registered: October 2006
Quote:
I want to create custom rules for spam control in Configuration > Content Filter > Spam Filter > Custom rules. But my problem is a lot of domains to add (i.e. hundred or more)
How can I make one rule for all domains for example listing them through a delimiter (i.e. , ; whitespace etc)? For example Header - From, Type - contains domain, Content - domain1, domain2, domain3. Or strictly 1 rule 1 domain?
Take 3 (the forum ate my first two attempts):

While there isn't a way, from within the Connect Admin interface to do this, you could stop Connect and update the mailserver.cfg file with the needed entries, then restart Connect.

A better way, I believe, to accomplish this is to create your own custom SpamAssassin config file. You could name it Z-Blocked_Domains. On my Mac server, they live in /usr/local/kerio/mailserver/plugins/spamserver/spamassassin/ rules.

A good tutorial on writing SpamAssassin rules can be found on this forum here: Custom SpamAssassin scores and rules (Write your own rules and block the crap)

Personally, I use both methods. For quick testing the effectiveness of a particular block, I'll put it into Admin/Spam Filter/Custom Rules. For longer term use, I'll add them to a SpamAssassin rule file. I use the rule files for both blocking and allowing things. Somewhat easier to manage as I can add comments and delimit sections for each account (e.g. #JAD Rules).

I'm not a SpamAssassin expert by any stretch, but this works for me.

Cheers,
Jon
Previous Topic: Migrating to new HW. Should we switch to Linux?
Next Topic: date
Goto Forum:
  


Current Time: Sat Apr 01 09:12:57 CEST 2023

Total time taken to generate the page: 0.03540 seconds