Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-23-2010, 06:53 PM
Junior Member
 
Posts: 6
Question How to send standard share message or createMountPoint for other user by admin

Hi, I'm fresh in Zimbra and try to integrate it with our other system by using the zclient java api.

I want to sync our hr system to zimbra admin's address book and share the address book to every authed user. I know I need to ModifyFolderGrant for admin's ZMailBox address book folder and CreateMountpoint for every user's ZMailBox. By GUI I can send standard message when share an address book, but how to do it in API ?

I don't know user's password, only have the admin password. How to get user's ZMailBox to CreateMountpoint for them.
Reply With Quote
  #2 (permalink)  
Old 11-24-2010, 03:17 AM
Advanced Member
 
Posts: 236
Default

Zmmailbox - Zimbra :: Wiki

...or you can share it via a distribution list
Reply With Quote
  #3 (permalink)  
Old 11-24-2010, 04:01 AM
Junior Member
 
Posts: 6
Default

Thanks for your reply.

I just want every user can access the entire componey address book through zimbra, and can find any one easily.

Maybe share address book is a better choice.

Here's my code fragment
Code:
String SoapURL = "https://192.168.68.129:7071" + AdminConstants.ADMIN_SERVICE_URI;

SoapProvisioning sp = new SoapProvisioning();
sp.soapSetURI(SoapURL);
sp.soapAdminAuthenticate(AdminName, AdminPasswd);

ZAuthToken zat = sp.getAuthToken();
ZMailbox zmb = ZMailbox.getByAuthToken(zat, SoapURL);
ZFolder currzf = zmb.getFolderById("123");
zmb.modifyFolderGrant(currzf.getId(), ZGrant.GranteeType.usr, account.getName(), "r", null);  // shared foder to every authed user
But when I try to create mount point
Code:
zmb2.createMountpoint("1", currzf.getName(), ZFolder.View.contact, ZFolder.Color.defaultColor, "", null, "admin@zimbra-test.com", ZMailbox.SharedItemBy.BY_ID, currzf.getId());
I should get the zmb2 ZMailBox object by other authenticated user token. How to do it when I already authenticated as admin ?
Reply With Quote
  #4 (permalink)  
Old 11-24-2010, 12:04 PM
Advanced Member
 
Posts: 236
Default

Ok then, but if it's just for your company, why not use the Global Address List?

I thought you were trying to share a list of miscellaneous contacts.
Reply With Quote
  #5 (permalink)  
Old 11-24-2010, 05:22 PM
Junior Member
 
Posts: 6
Default

It looks like Global Address List can only access through search.

It cannot have hierarchy structure, maybe ?
Reply With Quote
  #6 (permalink)  
Old 11-24-2010, 07:36 PM
Project Contributor
 
Posts: 9
Default

1st, I don't know how to use soap for provisioning & admin function.

Correct me if I'm wrong. You need to share address book to all uses, right?
You can do that by
1) GAL (as you mention above) or
2) Shared address book, maintain by few admins with write permission

For option 1,
Can use galsync (search in forum & wiki). But you need a way how to sync that from your HR system. That's hardest part. I think you got it done.
Then you can combine this method with option 2.

For option 2, normal address book sharing.
You can just share, create mount point and grant with read or rw permission to shared address book. Can use zmmailbox cmd from CLI. I dont know how to use SOAP.

a) create address book in one of admin or user account that can manage address book. Or use galsync method above.
b) share, mount and grant via zmmailbox
can just share to distribution list.
can just do this one time, user will always see the shared addressbook.
c) maintain / update your addressbook

just sharing
./keris
Reply With Quote
  #7 (permalink)  
Old 11-24-2010, 10:28 PM
Junior Member
 
Posts: 6
Default

Hi, keris
Thanks very much for your reply.

I think I will choice option2. Share address book allow my users access our company structure in their address book. I can get it work with zmmailbox cmd. But I think a production powerful like Zimbra should have an SOAP API way to finish this job. So ......

Or there is any method to send a standard share email to shared user like what the GUI did ?
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.