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-10-2010, 09:35 AM
Active Member
 
Posts: 30
Default [SOLVED] How to List the Distribution List that Users are a Member of

Hello Everyone,

First, I want to say thank you for all the help on my previous thread:
How to get distribution list members through LDAP (on v6.0.5)

It worked very well. My next question is how would I ask LDAP to return the distribution lists that a user is a member of?

For instance, given peter@domain.com, I want to find out what distribution lists that is a member of. And that happens to be a member of admins@domain.com, staff@domain.com, maintenance@domain.com, etc...

I was doing using this:
ldapsearch -x -v -H 'ldap://hostname' -D 'uid=zimbra,cn=admins,cn=zimbra' -b 'ou=people,dc=domain,dc=com' -W | less

To just see what attributes there are that might tell me this, but I cannot find anything. Thank you.

Peter

Last edited by peter76; 03-11-2010 at 08:12 AM..
Reply With Quote
  #2 (permalink)  
Old 03-11-2010, 08:14 AM
Active Member
 
Posts: 30
Default What would be the equivalent ldap search to return the output of "zmprov gam user@dom

What would be the equivalent ldap search to return the output of "zmprov gam user@domain"?

I have the other way around already. This is the only piece missing now.

p
Reply With Quote
  #3 (permalink)  
Old 03-11-2010, 09:05 AM
Moderator
 
Posts: 7,928
Default

Code:
ldapsearch -x -v -H 'ldap://your.zcs.server' -D 'uid=zimbra,cn=admins,cn=zimbra' -b 'uid=distributionlistname,ou=people,dc=zimbra,dc=domain' '(&(zimbraMailForwardingAddress=*))' -W
__________________
Reply With Quote
  #4 (permalink)  
Old 03-11-2010, 09:14 AM
Active Member
 
Posts: 30
Default

Hello uxbod, thanks for that reply, but wouldn't that return the zimbraMailForwardingAddress attribute?

That's not what

zmprov gam user@domain returns...

At this point, I just need to know given a single email address, what distribution list is it a member of which could be many.

p
Reply With Quote
  #5 (permalink)  
Old 03-11-2010, 09:22 AM
Moderator
 
Posts: 7,928
Default

Grrrr Give me a minute then
__________________
Reply With Quote
  #6 (permalink)  
Old 03-11-2010, 09:35 AM
Moderator
 
Posts: 7,928
Default

Code:
ldapsearch -x -v -H 'ldap://fqdn.zcs.server' -D 'uid=zimbra,cn=admins,cn=zimbra' '(&(objectClass=zimbraDistributionList)(zimbraMailForwardingAddress=user@domain.com))' zimbraMailAlias -W
__________________
Reply With Quote
  #7 (permalink)  
Old 03-12-2010, 11:19 AM
Loyal Member
 
Posts: 86
Default

The admin GUI has a "Member Of" tab for individual accounts.

The tab displays the name of the distribution lists the member belongs to.
Reply With Quote
  #8 (permalink)  
Old 03-12-2010, 01:08 PM
Moderator
 
Posts: 7,928
Default

The OP is attempting to obtain the information via LDAP for portal integration; hence they mentioned zmprov
__________________
Reply With Quote
  #9 (permalink)  
Old 03-15-2010, 03:42 PM
Active Member
 
Posts: 30
Default

That worked, by the way. Thank you.
Reply With Quote
  #10 (permalink)  
Old 05-04-2010, 06:21 AM
Junior Member
 
Posts: 7
Default

is there anyway to do this WITHOUT ldap??
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.