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

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 03-09-2010, 10:04 AM
Active Member
 
Posts: 30
Default [SOLVED] How to get distribution list members through LDAP

Hello Everyone,

We are using zimbra 6.0.5.

I have a project to gather ldap information from Zimbra. Specifically to find the members of a given distribution list and avail it via a webpage. Here's what I was going to do.

At first, I was using the
ldapsearch -x -v -H 'ldap://hostname' -D 'uid=peter,ou=people,dc=mydomain,dc=com' -b 'ou=people,dc=somedomain,dc=com' "objectClass=zimbraDistributionList" zimbraMailForwardingAddress -W | less

Just to get the query to work right. But I'm finding that "zimbraMailForwardingAddress" is not a valid attribute or there's something wrong with with my query that the objects I'm getting do not have this attribute.

In any case, this attribute shows when I do zmprov gdl dist-list@somedomain.com, but when I use ldapsearch it doesn't show.

I was just trying to get this core function working before beginning developing the PHP portion using PHP LDAP libs. But because I can't get this to work, I'm considering whether there is a way for PHP to get console output so that I can render it on a web-page instead of using LDAP.

I would prefer to use the LDAP solution as I think it's a more elegant solution, but if not I'll just scrape off data from the console if possible. Would anyone know whether my LDAP query is wrong, or if it's not would there be a way for PHP to grab the output of cli commands so I can put them on a website? Thanks.

p
Reply With Quote
  #2 (permalink)  
Old 03-09-2010, 10:32 AM
Moderator
 
Posts: 7,928
Default

Have a look at the schema under /opt/zimbra/openldap/etc/openldap/schema/zimbra.schema.
__________________
Reply With Quote
  #3 (permalink)  
Old 03-09-2010, 10:52 AM
Moderator
 
Posts: 1,554
Default

working fine for me in 5.x, have you tried binding as the ldap admin? maybe you don't have rights to see it in 6.x
Reply With Quote
  #4 (permalink)  
Old 03-09-2010, 01:41 PM
Active Member
 
Posts: 30
Default

Does not appear to be working in 6. Can anyone help?
Reply With Quote
  #5 (permalink)  
Old 03-09-2010, 02:01 PM
Advanced Member
 
Posts: 192
Default

Try connecting as user zimbra (uid=zimbra,cn=admins,cn=zimbra)

Get the zimbra ldap password by running:
Code:
zmlocalconfig -s | grep zimbra_ldap_password
Reply With Quote
  #6 (permalink)  
Old 03-10-2010, 08:05 AM
Active Member
 
Posts: 30
Default

Thanks, that worked.
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.