Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: [SOLVED] Looking for reporting output of names, accounts, lists, alias, etc.

  1. #11
    Join Date
    May 2008
    Location
    California!
    Posts
    226
    Rep Power
    7

    Default

    I'm trying to get a list of accounts WITHOUT an alias. I can list all accounts, and list accounts with aliases (with scripts in this forum post), but anyone know of a way to compare those two lists to create one?

  2. #12
    Join Date
    May 2008
    Location
    California!
    Posts
    226
    Rep Power
    7

    Default

    Ok, now I'm trying to get a csv exported of 3 columns: e-mail, first name, last name. The closest I get is from:

    zmprov gaa -v | grep -e name -e sn -e givenName | awk 'ORS=","' > all_accounts.csv

    But there's a lot of extra "junk" in the output. Anyone know how to get what I'm looking for?

  3. #13
    Join Date
    Nov 2007
    Posts
    28
    Rep Power
    8

    Default

    Mike or anyone,

    I'm having permission difficulties.
    "zimbra:/Users/zimbra zimbra$ zmprov gdl pga@pubgroup.com > dist-list.txt
    su: dist-list.txt: Permission denied"

    I'm in the user "zimbra" directory?

    Any assistance appreciated!

  4. #14
    Join Date
    May 2008
    Location
    California!
    Posts
    226
    Rep Power
    7

    Default

    The "Zimbra directory" is owned by root, so you won't be able to put files in that folder as the user Zimbra. As the Zimbra user, run this:

    mkdir ~/tmp
    zmprov gdl pga@pubgroup.com > ~/tmp/dist-list.txt

    Your file will be output to /opt/zimbra/tmp (on a default Linux Zimbra install).

  5. #15
    Join Date
    Nov 2007
    Posts
    28
    Rep Power
    8

    Default

    Blazeking,

    Thanks for the quick reply. I am on an Mac OSX (10.4) server.

    I get this when I run that command:
    zimbra:/Users/zimbra zimbra$ mkdir ~/tmp
    mkdir: /opt/zimbra/tmp: Permission denied

    Obviously, I'm a newbie on the command line. Is there a specific directory I need to be when running this?

  6. #16
    Join Date
    Oct 2009
    Posts
    22
    Rep Power
    6

    Default

    Quote Originally Posted by mmorse View Post
    Welcome to the forums,

    Code:
    mkdir /opt/zimbra/info
    chown zimbra.zimbra /opt/zimbra/info
    su - zimbra
    cd info
    To get a printout of all your accounts:
    Code:
    zmprov gaa > accounts.txt
    or
    Code:
    zmaccts | grep "@" | awk '{print $1}' > accounts.txt
    or
    Code:
     /opt/zimbra/bin/zmaccts | grep 'active' | egrep -v '^\W+' | awk '{print $1}'
    or
    Code:
     /opt/zimbra/openldap/bin/ldapsearch -LLL -x -D"`/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_userdn | \
           awk '{print $3}'`" -w"`/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_password | \
           awk '{print $3}'`" -H `/opt/zimbra/bin/zmlocalconfig ldap_url | \
           awk '{print $3}'` $* | \
           grep ^mail | \
           awk '{print $2}' | \
           sort > zimbra_recipients.list
    Exporting all addresses - Zimbra :: Wiki

    To get a printout of all your distribution lists:
    Code:
    zmprov gadl > alllists.txt
    To print out the members for a given distribution list:
    Code:
    zmprov gdl dist-list@domain.com > dist-list.txt
    To show if that particular distribution list is a member of other distribution lists:
    Code:
    zmprov gdlm dist-list@domain.com > dist-list-membership.txt
    Bug 19157 - Ability to export GAL as a CSV file (admin console)
    You can use awk & print to do so from CLI.
    For instance:
    Code:
    zmprov gdl dist-list@domain.com | awk 'ORS=","' > list.csv
    So in this case, the following code:
    /opt/zimbra/openldap/bin/ldapsearch -LLL -x -D"`/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_userdn | \
    awk '{print $3}'`" -w"`/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_password | \
    awk '{print $3}'`" -H `/opt/zimbra/bin/zmlocalconfig ldap_url | \
    awk '{print $3}'` $* | \
    grep ^mail | \
    awk '{print $2}' | \
    sort > zimbra_recipients.list
    will get me the username and password that I can use to migrate from one zimbra server to another zimbra server, is that right?

  7. #17
    Join Date
    May 2011
    Location
    Chennai Madras
    Posts
    36
    Rep Power
    4

    Default How to get display name of email account

    Hi,

    How to get a report on all email accounts with their Display names ie, first, middle, last name etc.,

    which need to get as a csv file to open in excel and manipulate.
    Last edited by Rk_Raj; 09-18-2012 at 12:39 AM.

  8. #18
    Join Date
    Aug 2013
    Posts
    1
    Rep Power
    2

    Default

    CSV for all distribucion list and respective members:

    Code:
    for i in `zmprov gadl`;do echo -e "\nGRUPO: $i, \c";zmprov gdl $i|awk -F"zimbraMailForwardingAddress:" '{print $2}'|grep .|awk 'ORS=","';done >>membersByGroups.csv

Similar Threads

  1. [SOLVED] error on creating short email alias
    By stock99 in forum Administrators
    Replies: 1
    Last Post: 12-27-2007, 09:47 PM
  2. Replies: 13
    Last Post: 10-18-2007, 10:39 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
  •