Error Handling and Rule Validation |
Error handling If an error is found in the line with a Rule, the error is logged and the Rule is ignored. Moreover, when Lookup is used, the error is handled according to the OnError parameter value (set for the data source or overridden directly in the Lookup). Note that Lookup values and values of certain variables are not handled immediately - they are parsed when they must be used. Thus, errors in these elements can be detected only during message processing (when a Rule with an error is ignored). Moreover, if during rule analysis a Lookup expression returns incorrect results, all the results are rejected and ignored (even if some of the results are correct). Rule validation To validate Rules, run drweb-maild module with special command line options that specify different properties of a message and the plug-in outputs to console all the settings from the Rule that are to be applied to the message. Available parameters are listed in the Command line parameters section (the Module Specific Parameters subsection). Example of a Rule validation command: $ ./drweb-maild --auth In this example, processing of a message with a flag of successful sender authorization (auth) is emulated. Other message parameters are not specified. In the output, you can view all the settings that are applied to the message by the matching Rules (this example shows users of what type will receive notifications in each of the message check result, the message is checked with all connected plug-ins and reports are generated in the HTML format). |