RETURN action

<< Click to Display Table of Contents >>

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

RETURN action

Returns to the previous (caller) table and continues processing with the next rule.

Description

This action returns message processing to the previous (caller) table and continues processing with the next rule.

Format

<action name="return" />

The "name" attribute:

The name attribute contains the action name: name="return".

Please note:
You cannot use this action in the main table.

Examples:

<?xml version="1.0" encoding="utf-8"?>
<filter name="Message filter" version="1.0">
 <comment>Message filter.</comment>
 
 <table name="main">
   <rule enabled="1">
     <comment>
       Processing of messages from the mail.ru,
       yandex.ru detectors in the yandex table.
     </comment>
     <match>
       <c name="detector" value="mail.ru, yandex.ru" />
     </match>
     <action name="jump" value="yandex"/>
   </rule>
 
   <rule enabled="1">
     <action name="drop" />
   </rule>
 </table>
 
 <table name="yandex">
   <comment>
     The table processes messages from the mail.ru,
     yandex.ru detectors.
   </comment>
 
   <rule enabled="1">
     <comment>
       Discard messages larger than 100 Kb.
     </comment>
     <match>
       <c name="size" op=">" value="100K"/>
     </match>
     <action name="drop" />
   </rule>
 
   <rule enabled="1">
   <comment>
     Returning to the main table for further processing.
   </comment>
   <action name="return" />
   </rule>
 </table>
</filter>

<?xml version="1.0" encoding="utf-8"?>
<filter name="main filter" version="1.0">
 
 <table name="main">
 
   <rule enabled="1">
     <match ...> ... </match>
     <action ...> ... </action>
   </rule>
 
   <rule name="spam" enabled="1">
     <match ...> ... </match>
     <action name="jump" value="spam"/>
   </rule>
 
   <rule enabled="1">
     <action name="drop" />
   </rule>
 
 </table>
 
 <table name="spam">
   <rule enabled="1">
     <match ...> ... </match>
     <action ...> ... </action>
   </rule>
 
   <rule enabled="1">
     <match ...> ... </match>
     <action ...> ... </action>
   </rule>
 
   <rule name="return-to-main" enabled="1">
     <action name="return" />
   </rule>
 
 </table>
</filter>

In this example, the main table processes some message. The second processing rule is named spam: if the message matches this rule's criteria, it is passed over for further processing to the second spam table.

If the message processing in the spam table is not aborted by foregoing rules, the return-to-main rule returns it for further processing to the main table starting with the rule the follows the spam rule.