Get mailbox size via API

P

pstephan1187

Guest
I am building a mail management program on my server and am using the API RPC on Plesk 10.1.1. I am trying to use this to gather the mailbox usage and quota to give the user a graphical display of how much space they have left. Using the API to get the quota (amongst other things) of a mailbox I send the following XML:

<mail><get_info><filter><site-id>1</site-id><name>test</name></filter><mailbox/><mailbox-usage/><forwarding/><aliases/><autoresponder/></get_info></mail>

If I manually set the quota for that mailbox in plesk I will get the quota in bytes which is expected. However, if I change the mailbox quota to "Set the mailbox size as defined by the service provider (100 MB)" I would receive a response of "-1". Under normal circumstances I understand "-1" to mean infinite. Here are my two questions:

1. If the -1 does indeed mean infinite, how come the mailbox is not set to 100MB?
2. If the -1 rather means default size of 100MB, how do I acquire the default service plan mailbox size with the API RPC? I check the documentation and could not find any information on retrieving that info.
 
For what it's worth, -1 seems to mean that the user is using the domain quota and doesn't have a user quota set. Trying to figure out something like this for myself, so please let me know if you ever received an answer to this.
 
Back
Top