Results 1 to 6 of 6

Thread: [SOLVED] How to get distribution list members through LDAP

  1. #1
    peter76 is offline Active Member
    Join Date
    Apr 2008
    Posts
    30
    Rep Power
    7

    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

  2. #2
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Have a look at the schema under /opt/zimbra/openldap/etc/openldap/schema/zimbra.schema.

  3. #3
    bdial's Avatar
    bdial is offline Moderator
    Join Date
    Jul 2007
    Location
    Baltimore
    Posts
    1,649
    Rep Power
    11

    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

  4. #4
    peter76 is offline Active Member
    Join Date
    Apr 2008
    Posts
    30
    Rep Power
    7

    Default

    Does not appear to be working in 6. Can anyone help?

  5. #5
    Hivos's Avatar
    Hivos is offline Advanced Member
    Join Date
    Aug 2009
    Location
    The Hague -- The Netherlands
    Posts
    214
    Rep Power
    5

    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

  6. #6
    peter76 is offline Active Member
    Join Date
    Apr 2008
    Posts
    30
    Rep Power
    7

    Default

    Thanks, that worked.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Listing Distribution List Members
    By rwjblue in forum Administrators
    Replies: 8
    Last Post: 05-06-2014, 09:20 PM
  2. Distribution list members from external directory
    By freebsdboy in forum Migration
    Replies: 0
    Last Post: 07-15-2008, 12:26 PM
  3. Distribution list members from external directory
    By freebsdboy in forum Administrators
    Replies: 0
    Last Post: 07-10-2008, 02:16 PM
  4. Distribution List Members
    By danny.sierra@omtech.net in forum Administrators
    Replies: 0
    Last Post: 01-11-2008, 06:53 AM
  5. Ldap Search Distribution List
    By jlhs5 in forum Administrators
    Replies: 0
    Last Post: 10-20-2006, 12:15 PM

Posting Permissions

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