From fee46c0b872c559d451a7b4be486febda6ca7388 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 17 Jun 2010 21:10:27 +0400 Subject: [PATCH] * Some fixes about new metrics system (may be incomplete) --- doc/rspamd.texi | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/doc/rspamd.texi b/doc/rspamd.texi index 91dda2734..29e309541 100644 --- a/doc/rspamd.texi +++ b/doc/rspamd.texi @@ -365,7 +365,7 @@ sections: @item Classifiers section - section where you define your classify logic @item Modules section - a set of sections that describes module's rules (in fact these rules should be in lua code) -@item Factors section - a section where you can set numeric values for symbols +@item Metrics section - a section where you can set weights of symbols in metrics and metrics settings @item Logging section - a section that describes rspamd logging @item Views section - a section that defines rspamd views @end itemize @@ -386,11 +386,6 @@ So common structure of rspamd.xml can be described this way: ... ... - - - 0.1 + + test_metric + reject + MIME_HTML_ONLY 1.1 - + @end example -Note that you basically need to add factor when you add additional rules. The -decision of weight of newly added rule basically depends on its importance. For +Note that you basically need to add symbols to metric when you add additional rules. +The decision of weight of newly added rule basically depends on its importance. For example you are absolutely sure that some rule would add a symbol on only spam messages, so you can increase weight of such rule so it would filter such spam. But if you increase weight of rules you should be more or less sure that it @@ -592,7 +589,7 @@ rspamd.xml.sample. In most cases it is reasonable to change them for your mail system, for example increase weights of some rules or decrease for others. Also note that default grow factor is 1.0 that means that weights of rules do not depend on count of added symbols. For some situations it useful to set grow -factor to value more than 1.0. Also by modifying factors it is possible to +factor to value more than 1.0. Also by modifying weights it is possible to manage static multiplier for dynamic rules. @section Workers configuration. @@ -769,16 +766,14 @@ Internal normalization of statfile weight works in this way: @item @math{R_{score} = max} when @math{W_{statfile} > max} @end itemize -The final result weight would be: @math{weight = R_{score} * W_{factor}}. +The final result weight would be: @math{weight = R_{score} * W_{weight}}. Here is sample classifier configuration with two statfiles that can be used for spam/ham classifying: @example - - -1.00 - 1.00 + WINNOW_HAM + WINNOW_SPAM ... - @@ -804,7 +799,7 @@ spam/ham classifying: In this sample we define classifier that contains two statfiles: @emph{WINNOW_SPAM} and @emph{WINNOW_HAM}. Each statfile has 100 megabytes size (so they would occupy 200Mb while classifying). Also each statfile has maximum -weight of 3 so with such factors (-1 for WINNOW_HAM and 1 for WINNOW_SPAM) the +weight of 3 so with such weights (-1 for WINNOW_HAM and 1 for WINNOW_SPAM) the result weight of symbols would be 0..3 for @emph{WINNOW_SPAM} and 0..-3 for @emph{WINNOW_HAM}. @@ -834,14 +829,12 @@ attribute. So module configuration is done in @code{param = value} style: - @end example @noindent The common parameters are: @itemize @bullet @item symbol - symbol that this module should insert. -@item metric - a metric in which this module shoul work. @end itemize But each module can have its own unique parameters. So it would be discussed furhter in detailed modules description. Also note that for internal modules you -- 2.39.5