Retrieving Allowed Lists

Use the get-allowed-lists operation to types of lists available for a specified user (mailbox owner or Administrator). For information on types of lists, refer to the Types of Server List and Types of Lists Available for Mailbox Owner sections.

In this chapter:

Request Packet Structure

Response Packet Structure

Samples

 

Request Packet Structure

A request XML packet retrieving available types of lists includes the get-allowed-lists operation node:

<packet version="1.4.2.0">
<spamfilter>
<get-allowed-lists>
...  
</get-allowed-lists>
</spamfilter>
</packet>

 

The get-allowed-lists node is presented by the SpamFilterGetAllowedListsInputType 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-lists operation, and e-mail addresses of users specified by e-mail address (or 'admin' string) to the filter node of the second get-allowed-lists operation.

<get-allowed-lists>
<filter>
... 
</filter>
</get-allowed-lists>
 
<get-allowed-lists>
<filter>
... 
</filter>
</get-allowed-lists>
 

Response Packet Structure

The get-allowed-lists node of the output XML packet is presented by type SpamFilterGetAllowedListsOutputType (spamfilter.xsd) and structured as follows:

RetAllowedLists

  • 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-lists operation. Data type: string. Allowed values: ok | error.
  • The errcode node is optional. Is returns the error code if the get-allowed-lists operation fails. Data type: integer.
  • The errtext node is optional. It returns the error message if the get-allowed-lists operation fails. Data type: string.
  • The filter-id node is optional. It holds the filtering rule parameters. 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 list node is optional. It holds types of lists available for the specified SpamAssassin user. Data type: string.

Note: list types are separated by the <list> tag.

 

 

Samples

Retrieving types of lists available for a single user

This request packet retrieves available types of server lists.

<packet>
<spamfilter>
   <get-allowed-lists>
      <filter>
         <username>admin</username>
      </filter>
   </get-allowed-lists>
</spamfilter>
</packet>

Response:

<packet>
<spamfilter>
   <get-allowed-lists>
   <result>
      <status>ok</status>
      <filter-id>admin</filter-id>
      <list>black</list>
      <list>white</list>
   </result>
   </get-allowed-lists>
</spamfilter>
</packet>

 

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

<packet>
<spamfilter>
<get-allowed-lists>
   <result>
      <status>error</status>
      <errcode>1026</errcode>
      <errtext>Component is not installed.</errtext>
      <filter-id>admin</filter-id>
   </result>
</get-allowed-lists>
</spamfilter>
</packet> 
Retrieving types of lists available for multiple users

This packet retrieves types of lists available for mailboxes mybox@site.com and my@site.com.

<packet>
<spamfilter>
   <get-allowed-lists>
      <filter>
         <username>mybox@site.com</username>
         <username>my@site.com</username>
      </filter>
   </get-allowed-lists>
</spamfilter>
</packet>

Request (if mailbox mybox@site.com was not found on the server):

<packet>
<spamfilter>
   <get-allowed-lists>
 
   <result>
      <status>error</status>
      <errcode>1013</errcode>
      <errtext>Mailbox does not exist.</errtext>
      <filter-id>mybox@site.com</filter-id>
   </result>
 
   <result>
      <status>ok</status>
      <filter-id>my@site.com</filter-id>
      <list>black</list>
      <list>white</list>
      <list>unblack</list>
      <list>unwhite</list>
   </result>
 
   </get-allowed-lists>
</spamfilter>
</packet>
 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.