![]() Header rules let you check a message header for a string. - Learning Perl, 4th Edition - By biran d foy, Tom Phoenix, Randal L.Recommended book to learn the Perl programming language: - for users who already have some regexp experience.If you have perl-doc installed you can type at a linux shell prompt:.You could use your linux box and it's perl documentation: Here's some sites you might want to check out for information on regular expressions: At this point, I've given you a taste of some of the syntax, but if you're not familiar with regular expressions, you can read one of the many tutorials on the web regarding them. 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 |