Connect. Communicate. Collaborate. Securely.

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

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?

Example:

  • 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!

Thanks
  •  
Vink

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/10_kerio_admin.cf.
SA rulesets are OR-ed by design.
  •  
TorW

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/local_custom_ruleset.cf 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.
  •  
satzinger

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

Thank You
Previous Topic: NEW WAYS FOR TECH SUPPORT
Next Topic: Solved -- KOFMSP.DLL missing?
Goto Forum:
  


Disclaimer:
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: Mon Aug 21 08:23:36 CEST 2017

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