Wait Sets Not Working

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
DaveSmash
Posts: 6
Joined: Tue Mar 06, 2018 1:44 am

Wait Sets Not Working

Postby DaveSmash » Fri Apr 13, 2018 7:46 pm

I am trying to an AdminWaitSet to monitor all mailboxes and notify users on new messages, etc. I am using the following to create the wait set:

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Header>
      <context xmlns="urn:zimbra">
         <authToken>0_90f732...30363b</authToken>
         <userAgent name="MyAppName"/>
      </context>
   </soap:Header>
   <soap:Body>
      <AdminCreateWaitSetRequest defTypes="all" all-accounts="1" xmlns="urn:zimbraAdmin"/>
   </soap:Body>
</soap:Envelope>


I get a valid response with an id and a seq number. Then I use those to try to check the wait set with this:

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Header>
      <context xmlns="urn:zimbra">
         <authToken>0_363a4...0363b</authToken>
         <userAgent name="MyAppName"/>
      </context>
   </soap:Header>
   <soap:Body>
      <AdminWaitSetRequest waitSet="WaitSet-0aa85e38-17fc-4500-a714-3c5fccc6ed6b" seq="0" block="1" xmlns="urn:zimbraAdmin" />
   </soap:Body>
</soap:Envelope>


But that blocks forever and never gives me a result, even when I send email to a user. When I look at the Linux console, I see:

2018-04-13 15:33:03,251 INFO [Timer-Zimbra] [] session - WaitSet sweeper: 1 active WaitSets (0 accounts) - 1 sets with blocked callbacks

So why are 0 accounts affected when I am trying to monitor all of the accounts? As a test, I try to set up a wait set for a single user (I have tried this approach, and also using a delegate token and the account of the user):

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Header>
      <context xmlns="urn:zimbra">
         <authToken>0_90f732...30363b</authToken>
         <userAgent name="MyAppName"/>
      </context>
   </soap:Header>
   <soap:Body>
      <AdminCreateWaitSetRequest defTypes="all" all-accounts="0" xmlns="urn:zimbraAdmin">
         <add>
            <a id="myuser@mydomain.com" />
         </add>
   </soap:Body>
</soap:Envelope>


When I try this, I get an error 2018-04-13 15:42:37,067 WARN [qtp1595953398-26773:https:https://mail.mydomain.com:7071/service/admin/soap] [name=zimbra;ip=10.57.24.1;port=57553;ua=MyAppName;] SoapEngine - handler exception
com.zimbra.common.service.ServiceException: permission denied: can not access account myuser@mydomain.com. If I'm using the admin token, why can't I access the user's account? If I'm using the delegate token for the user, why can't the user access his own account? Any help would be appreciated!


Return to “Developers”

Who is online

Users browsing this forum: No registered users and 1 guest