Message header

The Message header condition can be used within a rule to specify message header name and/or value that, once met, will trigger the program to process the rule and perform the associated action(s).

What are message headers?

If you’re not sure what message headers are, first have a look at this short explanation.

To add the Message header condition, expand the Field context menu within the Conditions tab and choose Message header (Fig. 1.).

Choosing the Message header condition.
Fig. 1. Choosing the Message header condition.

There are two factors (Fig. 2.) that need to be configured within this condition:

  • Operator – defines how the condition will be executed. The execution method may only be set to true.

    For this particular condition, the operator may be set to trigger the action if a given message header:

  • Value – here you define the expected value (text pattern) of the condition that will trigger the rule to apply the action.

Configuring the Message header condition.
Fig. 2. Configuring the Message header condition.

Info

Note that the Message header condition lets you provide only one text pattern for header name or header value. To search for more than one header name or header value, create another condition and connect the conditions appropriately. Learn more

Operator: matches name pattern

If you choose the matches name pattern operator, you can define a text pattern to be searched for in message headers and matched to their names.

To start, click the Edit button. In the pop-up window that opens, choose the desired search condition (Fig. 3.):

  • equals – to meet this condition, header names need to meet the exact text pattern you provide in the Pattern text field next.
  • contains – to meet this condition, header names can be a part of your text pattern.
  • starts/ends with – to meet this condition, header names need to begin or end with your text pattern.
  • matches regular expression - to meet this condition, header names need to match your regular expression pattern. If you want to learn more about regular expressions and their syntax, have a look at this Knowledge Base article.

Choosing the condition for the header name search.
Fig. 3. Choosing the condition for the header name search.

Next, in the textbox under Pattern, manually enter the string (text pattern) to be searched for or use one of the predefined header names (e.g. Return-Path, From, etc.) by clicking the down-arrow icon and selecting a header name from the list (Fig. 4.).

Selecting a predefined header name to be searched for from the list.
Fig. 4. Selecting a predefined header name to be searched for from the list.

Finally, click OK to add your condition.

Operator: matches value pattern

If you choose the matches value pattern operator, you can define a text pattern to be searched for in message headers and matched to their values.

To do it, proceed similar as above. Since there’s no limited set of header values, this time you can only enter the string (text pattern) to be searched for manually (Fig. 5.).

Specifying header value search condition and pattern.
Fig. 5. Specifying header value search condition and pattern.

Operator: matches name and value pattern

If you choose the matches name and value pattern operator, you can define text patterns to be searched for in message headers to match both their names and values. For your condition to work, both strings (text patterns) must apply to the same message header.

To configure the condition, proceed similar as above. In the pop-up window that opens, specify search conditions and text patterns for both header name and header value (Fig. 6.).

Specifying header name and value search conditions and patterns.
Fig. 6. Specifying header name and value search conditions and patterns.

See next

Message type – this article describes how to configure the Message type condition.

In this article

Was this information useful?