Use the set operation to change status of Spam Filtering service, and Spam Filtering preferences for a specified user (Administrator or mailbox owner).
Request Packet Structure
A request XML packet changing Spam Filtering service status and preferences includes the set operation node:
The set node is presented by the SpamFilterGetInputType type (
spamfilter.xsd), and its graphical representation is as follows:
- The filter node is required. It specifies the filtering rule. Data type: SpamassassinFilterType (
- The preferences node is required. It specifies preferences of Spam Filtering service for a specified user. For information on preferences, refer to the Spam Filtering Preferences section. Data type:SpamassassinPreferencesType (
Note: If you want to enable or disable Spam Filtering service without changing preferences, leave the preferences node blank (<preferences/>).
- The enabled node is optional. Specify this node to enable Spam Filtering service for a specified SpamAssassin user. For more information, refer to the Managing Spam Filtering section. Data type: none.
- The disabled node is optional. Specify this node to disable Spam Filtering service for a specified SpamAssassin user. For more information, refer to the Managing Spam Filtering section. Data type: none.
You can retrieve info on users specified by SpamAssassin ID, and users specified by e-mail address in a single packet. Add ID's of users specified by SpamAssassin ID to the filter node of the first set operation, and e-mail addresses of users specified by e-mail address (or 'admin' string) to the filter node of the second set operation.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The set node of the output XML packet is presented by type SpamFilterSetOutputType (
spamfilter.xsd) and structured as follows:
- The result node is required. It wraps the response retrieved from the server. Data type: resultFilterType (
- The status node is required. It specifies the execution status of the set operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the set operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the set operation fails. Data type: string.
- The filter-id node is optional. It holds the filtering rule parameter. For information, refer to the Available Filters section. Data type: anySimpleType.
- The id node is optional. It does not return any data for this operation. Data type: integer.
Changing info of a single user
This request packet enables Spam Filtering service on the server.
If inappropriate options for Administrator were nested in the parameters node of the request packet, the response from the server is as follows:
Changing info for multiple users
This packet requests for deleting incoming spam coming to mailboxes firstname.lastname@example.org and email@example.com. It also enables Spam Filtering service on the mailbox specified by SpamAssassin ID 12.
If mailbox firstname.lastname@example.org was not found on the server, a response from the server can look as follows: