Results 1 to 5 of 5

Thread: Query External LDAP from Zimlet

  1. #1
    Join Date
    Sep 2006
    Location
    Illinois
    Posts
    374
    Rep Power
    9

    Default Query External LDAP from Zimlet

    Anyone know where I can find a JSP sample that shows how to query an external LDAP server.

    We're looking to write a Zimlet that would query an external LDAP and build a new email with the TO: built from the returned data.

    Thanks,
    Matt

  2. #2
    Join Date
    Mar 2009
    Location
    Georgia
    Posts
    3
    Rep Power
    6

    Default

    Almost three years on and no reply? Bummer.
    I'm trying to do the same thing except we have multiple domains and a variety of mail servers. Our intranet application can easily present a consolidated list of addresses with checkboxes for peeps to select as recipients, but I can't figure out how to get the information from the zimlet into the TO field.
    I found this (http://www.zimbra.com/forums/zimlets...ted-email.html) This seems ideal since the TO field is already in the browser and ready to be tinkered with. I just can't get it to populate. I've tried the ultra-simple, ultra-obvious choice... onclick="document.getElementById('zv__COMPOSE_to_c ontrol').value=LIST_OF_ADDRESSES;
    But that seems to be ultra-wrong.

    Any help would be greatly appreciated. Thank you!
    mf

  3. #3
    Join Date
    Nov 2007
    Location
    Detroit, MI
    Posts
    67
    Rep Power
    7

    Default

    You can query any ldap via an integrated .JSP file..

    Code:
    <%@ page import="com.sun.jndi.ldap.*" %>
    ...
    ...
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory" );
    env.put("java.naming.ldap.version", "3");
    env.put( Context.PROVIDER_URL, "ldap://" + ldapServerName + "/" );
    env.put( Context.SECURITY_AUTHENTICATION, "simple");
    env.put( Context.SECURITY_PRINCIPAL, rootdn );
    env.put( Context.SECURITY_CREDENTIALS, rootpass );
    Then call your own Zimlet .jsp via a JavaScript method to get the results.

    Hope this helps!
    -Rob

  4. #4
    Join Date
    Mar 2009
    Location
    Georgia
    Posts
    3
    Rep Power
    6

    Default

    Aye, but that's part of the problem. We have an exchange server that provides LDAP info for some employees. We have other employees that use SquirrelMail and others still that use their own office system. We do, however, have what amounts to an enterprise phonebook which stores contact info on everyone in a database, just not an x.500 or ldap database.

    So, my hope/goal is to build a zimlet that displays a form that will allow users to search for and select recipients and have that form (enter pixie dust) populate the to/cc/bcc fields of an email. The pixie dust or how to get the zimlet form data into the fields is why I'm here.

    I suppose my next alternative would be to create an ldap server and populate/maintain it using our phonebook as the source. Again, I truly appreciate everyone's time and attention. If I get this worked out, I will surely post my solution here. Thank you!!!
    mf

  5. #5
    Join Date
    Nov 2007
    Location
    Detroit, MI
    Posts
    67
    Rep Power
    7

    Default

    I'd look at possibly creating an application outside of Zimbra to do your searching, then create a simple Zimlet to bring up that application in an HTML iframe when you click on it. Just a thought.. Good luck!

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 10:06 AM
  2. Replies: 8
    Last Post: 08-07-2008, 06:18 AM
  3. [SOLVED] Install Problem in Ubuntu 6.06 Server
    By xtimox in forum Installation
    Replies: 16
    Last Post: 03-27-2008, 10:36 AM
  4. External LDAP Problem
    By facerw in forum Installation
    Replies: 7
    Last Post: 05-08-2007, 05:29 AM
  5. Post instsallation problems
    By Assaf in forum Installation
    Replies: 14
    Last Post: 01-29-2007, 11:38 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
  •