Book:OTRS 3.0 - Admin Manual/Chapter 5/14

OTRS has the capability to filter incoming messages, as reflected by incoming messages being sorted automatically into queues, or spam mails being moved into a specific queue. It is irrelevant whether PostMaster.pl or mail accounts are used to get messages into the ticket system. Filter rules can be created through the link "PostMaster Filter" on the Admin page (see Figure 5.49 below).

A filter consists of one or more criteria that must match for the defined actions to be executed on the email. Filter criteria may be defined for the headers or the body of an email, e.g. search for specific header entries or strings in the body, even regular expressions are allowed. All actions for a filter rule are triggered by X-OTRS headers, which are inserted if the filter criteria match. The ticket system evaluates the inserted X-OTRS headers and executes the specific actions. X-OTRS headers can be used to sort an incoming message into a specific queue, change the priority of the message or ignore the message and not deliver it to the system. The Table 5-4 lists the different X-OTRS headers and their meaning.

A name must be specified for every filter rule. Filter criteria can be specified in the section "Filter Condition". Choose via the listboxes for "Header 1", "Header 2" and so on for the parts of the messages where you would like to search, and specify on the right side the values you wish to filter on. In the section "Set Email Headers", you can choose the actions that are triggered if the filter rules match. You can select for "Header 1", "Header 2" and so on to select the X-OTRS-Header and set the associated values (see Figure 5.50 below).

There are additional modules, that can be used to filter incoming messages more specifically. These modules might be useful on larger, more complex systems.