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:

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

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>