Results 1 to 5 of 5

Thread: List all accounts on a given MailHost?

  1. #1
    Join Date
    Jul 2007
    Posts
    17
    Rep Power
    8

    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

  2. #2
    Join Date
    Jul 2007
    Posts
    17
    Rep Power
    8

    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?

  3. #3
    Join Date
    Sep 2005
    Posts
    47
    Rep Power
    10

    Default

    Hmmm.... no other way to do this? OK, that'll work, but seems like zmaccts ought to display that information.....

  4. #4
    Join Date
    Jul 2007
    Posts
    17
    Rep Power
    8

    Default

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

    zmprov sa zimbraMailHost=host.name.com

  5. #5
    Join Date
    Sep 2010
    Posts
    1
    Rep Power
    5

    Default

    Dear friends, I am using Zimbra 7.2.2

    I used this command as root to get all accounts on the given mail host:

    /opt/zimbra/bin/zmprov sa -v zimbraMailHost=mail1.mydomain.com | grep zimbraMailDeliveryAddress > /home/Accts_On_Mail1.txt

    this command copied the results in a txt file at the following path:

    /home/Accts_On_Mail1.txt

    Subsequently you may use excel skills to split columns and get desired accounts list.

    Regards.

Similar Threads

  1. Replies: 0
    Last Post: 12-28-2010, 08:43 AM
  2. Some mail being deferred
    By chreestopher in forum Installation
    Replies: 8
    Last Post: 05-02-2008, 02:42 AM
  3. Zimbra servers shut down every morning at 3am
    By snsparrish in forum Administrators
    Replies: 2
    Last Post: 08-06-2007, 02:00 PM
  4. 4.53: tomcat is not running
    By michaeln in forum Administrators
    Replies: 41
    Last Post: 06-13-2007, 07:42 PM
  5. Can't send or receive mails from Zimbra
    By ppurama in forum Administrators
    Replies: 4
    Last Post: 11-14-2005, 10:17 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
  •