I could easily write an entire book on the different kinds of syntax you can use. Perl Regular expressions are quite flexible and powerful. Now the rule will match any combination of upper or lower case that spells "test" surrounded by word breaks of some form. The rule can also be made case-insensitive by adding an i to the end, like this: body LOCAL_DEMONSTRATION_RULE /\btest\b/i Our rule above can be made to not match "testing" or "attest" like so: body LOCAL_DEMONSTRATION_RULE /\btest\b/ In regular expressions a \b can be used to indicate where a word-break (anything that isn't an alphanumeric character or underscore) must exist for a match. The describe statement contains the text which will be placed into the verbose report, if verbose reports are used (this is the default setting for the body, in Spamassassin version 2.5x and upwards). It will match "test" but also "testing" and "attest". Now, this rule is pretty simple as rules go. This rule does a simple case-sensitive search of the body of the email for the string "test" and adds a 0.1 to the score of the email if it finds it. Here is an example rule: body LOCAL_DEMONSTRATION_RULE /test/ĭescribe LOCAL_DEMONSTRATION_RULE This is a simple test rule Body rules also include the Subject as the first line of the body content. If the expression matches anything, the score is added to the grand total spam score. Body rulesīody rules search the body of the message with a regular expression. There is no need to prepend your own rules with LOCAL_ or any other convention. Note: Mailborder custom spam rules are automatically prepended with MC_ when created via the Mailborder GUI.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |