Filtering is the way the request XML packet indicates the object to which an operation will be applied. The request XML packet filters objects using a special <filter> section. Parameters, nested in the filter node are called filtering rule. A filter contains as many different filtering rule types as the number of different parameters nested in the XML presentation of the filter node. A single operation can use only parameters of the same type in the filtering rule.

Note: Please, do not confuse this with Spam Filtering methods. Spam Filtering is made by the tool integrated into Plesk, and this kind of filtering is a specification of the operator.

SpamPatternFilter Filter

The SpamPatternFilter filter is used in add-pattern and del-pattern operations to add or remove patterns. For more information on the operations, refer to the Adding Pattern and Removing Pattern sections. Data type: SpamPatternFilter (spamfilter.xsd). The graphical representation of the filter node is as follows:

image 36692

  • The pattern node is optional. It specifies template of a e-mail address. For information on patterns, refer to the Defining Pattern section. Data type: string.

You can match multiple patterns using this filter as in the following example:


Note: Use the blank filter (<filter/>) to match all patterns.

SpamassassinFilter Filter

The SpamassassinFilter filter is used in get-patterns, get , set, get-allowed-preferences, get-allowed-lists operations. For more information on the operations, refer to the following sections:

Data type: SpamassassinFilter (spamfilter.xsd). The graphical representation of the filter node is as follows:

image 36696

  • The username node is required. It specifies a SpamAssassin user. You can specify e-mail address of a mailbox owner, or the ‘admin’ value. To access server settings of SpamAssassin, Plesk Administrator should set ‘admin’ as a value for this node. Data type: string.
  • The spamfilter-id node is required. It specifies ID of a SpamAssassin user. Data type: integer.

You can filter by either username or spamfilter-id parameters as in the following example:


A single operation does not support different types of parameters for a filtering rule, so the following filter will be considered invalid by Plesk:


filter-id Node

image 34379

If an operation uses filters in a request packet, the filter-id node is nested in a response packet. It returns the filtering rule parameter. If one of the following values was set as a filter rule, it is returned in the filter-id node of the response packet.

  • Address of a mailbox owner, or string ‘admin’
  • ID of a SpamAssassin user
  • Pattern

It is done to trace the request parameters in case of an error. Data type: anySimple.

All operations except for the check possess the filter-id node in the response packet.