Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Multiple Entries in Custom Rules (add more than one value in custom rules)

Messages: 42
Karma: 0
Send a private message to this user
Does anybody know if it is possible to add more than one substring in a custom rule?


  • Header: From
  • Type: contains substring
  • Content: cash (or) credit (or) card ......

By being able to "or" the enties it would make it so much easier to add some rules!


Messages: 32
Karma: 3
Send a private message to this user
Header rules (e.g. From) are stored in mailserver.cfg and I doubt they can be OR-ed.
Body rules are stored in SpamAssassin ruleset plugins/spamassassin/rules/
SA rulesets are OR-ed by design.

Messages: 769
Karma: 9
Send a private message to this user
You can write your own SpamAssassin rules and put them in any file ending in .cf in plugins/spamassassin/rules. When the kerio-connect daemon restarts, SpamAssassin will read the custom ruleset from your new file and act on it.

We have gathered all our custom SA rules and whitelists in two separate files which we back up regularly.

Here's how you write the SpamAssassin rule for your example:

header		CUSTOM_CC	From=~ /cash|credit|card/i
describe	CUSTOM_CC	Possible credit card spam/fraud
score		CUSTOM_CC	2.5

Save this in e.g. /plugins/spamassassin/rules/ and restart the kerio service or daemon. This will do a case-insensitive search in From: headers and assign the mail an additional score of 2.5 if a match is found. There's a lot of sites on the net describing how to write SA rules. You can have a large number of rules in the same config file.

Messages: 42
Karma: 0
Send a private message to this user
Great information, I will try that.

Thank You
Next Topic: Solved -- KOFMSP.DLL missing?
Goto Forum:

Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Sun Oct 22 21:09:25 CEST 2017

Total time taken to generate the page: 0.00361 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.