[Top] [Prev] [Next] [Bottom]




Controlling validation


There are a number of occasions when you may wish to control execution of a validator instance. For example, if a validator cannot operate on a certain kind of data, it makes sense to skip validation of any component holding that kind of data. Alternatively, a validator may only operate on a certain kind of data. In this case it makes sense to only perform validation of components holding that kind of data.

MIMEsweeper provides two directives that can be used to control validation, these are the SkipIf and PerformIf directives.

The following two sections explain how each directive can be used to control validation of VALLEX validator instances.

The SkipIf and PerformIf directives cannot be used with the same validator instance simultaneously.

Using SkipIf

The SkipIf directive can be used to conditionally skip checking by a configured validator instance. The value of the SkipIf directive is an attribute expression. If the attribute expression evaluates to TRUE then checking by the validator instance is skipped for that component. A configuration section can have several SkipIf directives listed.

For example, you may decide to skip lexical analysis of all executable, image and binary files. This is achieved by including three SkipIf directives in instances of the VALLEX validator configuration sections.

[Confidential]
SkipIf=ContainerClass==Executable
SkipIf=ContainerClass==Binary
SkipIf=ContainerClass==Image
ExpressionList=c:\MSW\CONFIG\CONFID.TXT
20=ConfidentialModerate
50=Confidential

During validation, the value of the ContainerClass attribute attached to each component is checked. If the value is found to be Executable, Image or Binary then validation is skipped by this instance of VALLEX.

For more details on the SkipIf directive see page 7-105.

Using PerformIf

The PerformIf directive is used to conditionally perform checking by a configured validator instance. The value of the PerformIf directive is an attribute expression. If the attribute expression evaluates to TRUE then checking by the validator instance is performed for that component. A configuration section can have several PerformIf directives listed.

For example, you may decide to perform lexical analysis on components holding plain text or compound documents only. This is achieved by including two PerformIf directives in instances of the VALLEX validator configuration sections.

[Confidential]
PerformIf=ContainerClass==Text
PerformIf=ContainerClass==Document
ExpressionList=c:\MSW\CONFIG\CONFID.TXT
20=ConfidentialModerate
50=Confidential

During validation, the value of the ContainerClass attribute attached to each component is checked. Validation is only performed if the value is Text or Document.

When performing lexical analysis on compound documents, such as Word documents, it is recommended that you set the MaxWordLength directive to its highest value. See page 7-137 for details.

For more details on the PerformIf directive see page 7-107.

ContainerName attribute values can also be checked using PerformIf and SkipIf. See page 7-85 for a full list.



[Top] [Prev] [Next] [Bottom]



msw.support@mimesweeper.com

Copyright © 1998, Content Technologies Limited. All rights reserved.