Retrieving Available Spam Filtering Preferences
Use the get-allowed-preferences operation to retrieve Spam Filtering preferences available for a specified user (mailbox owner or Administrator). For information on Spam Filtering preferences available for a specified user, refer to the Spam Filtering Preferences section.
Request Packet Structure
A request XML packet retrieving available Spam Filtering preferences includes the get-allowed-preferences operation node:
The get-allowed-preferences node is presented by the SpamFilterGetAllowedPreferencesInputType type (spamfilter.xsd
), and its graphical representation is as follows:
- The filter node is required. It specifies the filtering rule. Data type: SpamassassinFilterType (
spamfilter.xsd
).
Remarks
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 get-allowed-preferences operation, and e-mail addresses of users specified by e-mail address (or 'admin' string) to the filter node of the second get-allowed-preferences operation.
Response Packet Structure
The get-allowed-preferences node of the output XML packet is presented by type SpamFilterGetAllowedPreferencesOutputType (spamfilter.xsd
) and structured as follows:
- The result node is required. It wraps the response retrieved from the server. Data type: ResultFilterType (
common.xsd
). - The status node is required. It specifies the execution status of the get-allowed-preferences operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the get-allowed-preferences operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the get-allowed-preferences 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.
- The preference node is optional. It holds Spam Filtering preferences available for the specified SpamAssassin user. Data type: string.
Note: preferences are separated by the <preference> tag.
Samples
Retrieving Spam Filtering preferences available for a single user
This request packet retrieves Spam Filtering service preferences available for Administrator.
Response:
If the SpamAssassin service is restricted by Plesk licence key, or a user does not have access to SpamAssassin management, the response is as follows:
Retrieving Spam Filtering preferences available for a mailbox and a SpamAssissin user
This request packet retrieves Spam Filtering preferences available for mailbox mybox@site.com, and SpamAssassin user with ID 7.
Response:
Retrieving Spam Filtering preferences available for multiple mailboxes
This request packet retrieves Spam Filtering preferences available for mailboxes mybox@site.com and my@site.com.
Response: