Checking Status of Spam Filtering Service

Use the check operation to check if the Spam Filtering service is installed on the server and allowed by Plesk license.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving status of Spam Filtering service on the server includes the check operation node:

<packet version="1.6.7.0">
<spamfilter>
  <check/>
</spamfilter>
</packet>

 

The check node graphical representation is as follows:

 

Note: The interactive schema navigator for all request packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_input.svg.

 

Response Packet Structure

The check node of the output XML packet is presented by type SpamFilterCheckOutputType (spamfilter.xsd) and structured as follows:

Note: The interactive schema navigator for all response packets is available here: http://plesk.github.io/api-schemas/1.6.8.0/agent_output.svg.

  • The result node is required. It wraps the response retrieved from the server. Data type: resultType (common.xsd).
  • The status node is required. It specifies if the Spam Filtering service is installed on the server and allowed by Plesk license. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is returns the error code if the check operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the check operation fails. Data type: string.
 

Samples

Request packet sample

The packet retrieving status of Spam Filtering service looks as follows:

<packet version="1.6.7.0">
<spamfilter>
  <check/>
</spamfilter>
</packet>

Response:

<packet version="1.6.7.0">
<spamfilter>
   <check>
<result>
      <status>ok</status>
</result>
   </check>
</spamfilter>
</packet>

 

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:

<packet version="1.6.7.0">
<spamfilter>
<check>
   <result>
      <status>error</status>
      <errcode>1006</errcode>
      <errtext>Permission denied.</errtext>
   </result>
</check>
</spamfilter>
</packet>

 

If the SpamAssassin service was not found on the server, the response is as follows:

<packet version="1.6.7.0">
<spamfilter>
<check>
   <result>
      <status>error</status>
      <errcode>1026</errcode>
      <errtext>Component is not installed.</errtext>
   </result>
</check>
</spamfilter>
</packet>
 

Leave your feedback on this topic here

If you have questions or need support, please visit the Plesk forum or contact your hosting provider.
The comments below are for feedback on the documentation only. No timely answers or help will be provided.