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 08-15-2011, 02:28 PM
Intermediate Member
 
Posts: 17
Default List all accounts on a given MailHost?

Hello All,

I know I can query a given user account and determine which mailstore it is installed on by running:

zmprov ga <accountname> | grep zimbraMailHost

Does anyone know a way I can easily get a listing of all the accounts on a particular mail host? It does not look like there is a simple zmprov way to do this, so I am guessing this will require some sort of ldapsearch command looking for all the particular accounts.

Any suggestions are much appreciated.

- Steven
Reply With Quote
  #2 (permalink)  
Old 08-15-2011, 02:46 PM
Intermediate Member
 
Posts: 17
Default

Well, I have a result, but to make it useful will require some scripting and formating -- it is a start though.

If I run this command:

ldapsearch -H ldap://x.x.x.x:389 -w ********** -D uid=zimbra,cn=admins,cn=zimbra -x "(&(objectClass=zimbraAccount) (mail=*))" zimbraMailHost zimbraMailDeliveryAddress

It runs through every email account and outputs:

# christine, people, domain.com
dn: uid=christine,ou=people,dc=domain,dc=com
zimbraMailDeliveryAddress: christine@domain.com
zimbraMailHost: server.domain.com

Reading this into a perl array and outputting a list in the format I want will work.

Anyone got an easier method?
Reply With Quote
  #3 (permalink)  
Old 11-09-2011, 11:08 AM
Active Member
 
Posts: 46
Default

Hmmm.... no other way to do this? OK, that'll work, but seems like zmaccts ought to display that information.....
Reply With Quote
  #4 (permalink)  
Old 11-09-2011, 11:11 AM
Intermediate Member
 
Posts: 17
Default

Actually I heard back from zimbra support and here the way to do this is:

zmprov sa zimbraMailHost=host.name.com
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.