Results 1 to 6 of 6

Thread: Collecting COS via Zimbra Soap

  1. #1
    fishhead2567 is offline New Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    4

    Default Collecting COS via Zimbra Soap

    I have been attempting over the last few days to determine a user's COS from search results so I can get aggregate COS Data. I have tried using SearchDirectoryRequest, and SearchAccountsRequest. I have also tried GetAllCos and then doing searches seeded with the COS ID, but nothing works.

    Searching for all users using SearchDirectory, SearchAccounts, or even getAllAccounts only returns COS data for those users who have a COS specifically defined, not for users who use the default COS for their domain. They also do not appear to return what domain the user is a part of.

    If I attempt to get all COS ID's using GetAllCosRequest, then I do a search using zimbraCOSId=[value], again only users who's COS ID is explicitly set in the admin interface are returned.

    I would like to avoid running one query per user, as this is highly inefficient. But, so far, all I can think to do is

    Get All Acounts
    Foreach:
    getAccountInfo for this account
    excract COS from the response, and aggregate this way

    This seems highly inefficient. Is there any other search path?

  2. #2
    stalker is offline Special Member
    Join Date
    Mar 2011
    Posts
    131
    Rep Power
    4

    Default

    I am having same problem. Did you get the solution?

  3. #3
    fishhead2567 is offline New Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    4

    Default Solution

    It appears as if I did. Unfortunately, Zimbra does not provide the data I wanted in query results, so I used my solution suggested in the first post. I queried getallcos and getalldomains and stored them in python dictionaries. Then i took each user one by one and sorted them by splitting their domain name from their account like soandso@domain.com .

    I used the domains to cross reference the COS table, if the user didnt have one supplied, I used the domain default COS. The end result is a dictionary of domains with a dictionary of COS's used by that domain inside with a dictionary of users in there.

    It's a bit of pain, but there isn't really any other good way.

    To use python, you can use URL lib since zimbra doesn't publish the necessary service descriptions to use a SOAP client. I also used BeautifulSoup's BeautifulStoneSoup to parse the XML. It's awesome.

  4. #4
    stalker is offline Special Member
    Join Date
    Mar 2011
    Posts
    131
    Rep Power
    4

    Default

    Alright. Got you.

    BTW do to know how can I fetch COS of current logged in user?

  5. #5
    fishhead2567 is offline New Member
    Join Date
    Apr 2011
    Posts
    3
    Rep Power
    4

    Default Nope

    No, sorry =/

  6. #6
    stalker is offline Special Member
    Join Date
    Mar 2011
    Posts
    131
    Rep Power
    4

    Default

    Quote Originally Posted by fishhead2567 View Post
    No, sorry =/
    Alright. Thank You!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. fatal: parameter "smtpd_recipient_restrictions"
    By Robin in forum Administrators
    Replies: 8
    Last Post: 12-22-2010, 05:48 AM
  2. Old Backup stay in TO_DELETE status and no clearing..
    By bartounet in forum Administrators
    Replies: 0
    Last Post: 10-05-2010, 07:40 AM
  3. Major Issue - 5.0RC2 NE to 5.0GA NE failed
    By DougWare in forum Installation
    Replies: 7
    Last Post: 01-06-2008, 09:56 PM
  4. Cleanup after many upgrades
    By tobru in forum Installation
    Replies: 1
    Last Post: 12-23-2007, 09:21 AM
  5. 3.1 on FC4 problems
    By cohnhead in forum Installation
    Replies: 8
    Last Post: 05-26-2006, 11:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •