TAG Condition

<< Click to Display Table of Contents >>

Navigation:  Event and Object Analysis > Capture Results Filtering > Filtration Basics > Rules > Criteria and Conditions >

TAG Condition

Checks if a tag is set and its counter value (see "TAG Action").

Description

This condition checks if a tag exists and the value if the tag’s counter.

If the tag is missing, the condition is not met.

Format

<с name="tag" op="<operation>" value="<compare value>" />

The "name" attribute:

The name attribute specifies the name of the condition: name="tag".

The "op" attribute:

The op="..." attribute specifies the check criteria:

"eq", = or ==

The condition is considered true if the counter value IS EQUAL TO the specified number

"ne", != or <>

The condition is considered true if the counter value IS NOT EQUAL TO the specified number

"lt" or <

The condition is considered true if the counter value IS LESS THAN the specified number

"gt" or >

The condition is considered true if the counter value IS GREATER THAN the specified number

"le" or <=

The condition is considered true if the counter value IS LESS THAN OR EQUAL TO the specified number

"ge" or >=

The condition is considered true if the counter value IS GREATER THAN OR EQUAL TO the specified number

exist

The condition is considered true if the tag exists (has been already set for this object)

If the op attribute is omitted, "exist" is used by default. For the "exist" operation, the value attribute is optional.

The "value" attribute:

The value="..." attribute specifies the number to compare to the tag counter value.

Example:

<c name="tag" tag="SPAM" op="exist" />

or

<c name="tag" tag="SPAM" />

The condition is considered true if the tag "SPAM" is set for the object.

<c name="tag" tag="SPAM" op="eq" value="1" />

The condition is considered true if the tag "SPAM" is set for the object, and its counter value is equal to 1.

<c name="tag" tag="SPAM" op=">" value="1" />

The condition is considered true if the tag "SPAM" is set for the object, and its counter value is greater than 1.

<c name="tag" tag="SPAM" op=">=" value="3" />

The condition is considered true if the tag "SPAM" is set for the object, and its counter value is greater than or equal to 3.

Example:

Drop messages marked with the SPAM tag with the value greater than 1.

<?xml version="1.0" encoding="utf-8"?>
<filter name="Message filter" version="1.0">
 <comment>Message filter.</comment>
 
 <table name="main">
   <rule enabled="1">
     <match>
       <c name="tag" tag="SPAM" op=">" value="1" />
     </match>
     <action name="drop" />
   </rule>
 
 </table>
</filter>