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

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
blazeking
Outstanding Member
Outstanding Member
Posts: 218
Joined: Fri Sep 12, 2014 11:30 pm

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

Postby blazeking » Tue Aug 25, 2009 5:06 pm

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?


blazeking
Outstanding Member
Outstanding Member
Posts: 218
Joined: Fri Sep 12, 2014 11:30 pm

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

Postby blazeking » Tue Sep 15, 2009 3:08 pm

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?
17125MOlin
Posts: 28
Joined: Fri Sep 12, 2014 11:14 pm

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

Postby 17125MOlin » Fri Oct 23, 2009 9:40 am

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!
blazeking
Outstanding Member
Outstanding Member
Posts: 218
Joined: Fri Sep 12, 2014 11:30 pm

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

Postby blazeking » Fri Oct 23, 2009 10:44 am

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).
17125MOlin
Posts: 28
Joined: Fri Sep 12, 2014 11:14 pm

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

Postby 17125MOlin » Fri Oct 23, 2009 10:50 am

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?
albsallu
Posts: 22
Joined: Sat Sep 13, 2014 12:46 am

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

Postby albsallu » Wed Feb 10, 2010 6:24 am

[quote user="mmorse"]Welcome to the forums,
mkdir /opt/zimbra/info

chown zimbra.zimbra /opt/zimbra/info

su - zimbra

cd info
To get a printout of all your accounts:
zmprov gaa > accounts.txt
or

zmaccts | grep "@" | awk '{print $1}' > accounts.txt

or

 /opt/zimbra/bin/zmaccts | grep 'active' | egrep -v '^W+' | awk '{print $1}'

or



/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">http://wiki.zimbra.com/index.php?title=Exporting_all_addresses>Exporting all addresses - Zimbra :: Wiki
To get a printout of all your distribution lists:

zmprov gadl > alllists.txt

To print out the members for a given distribution list:

zmprov gdl dist-list@domain.com > dist-list.txt
To show if that particular distribution list is a member of other distribution lists:

zmprov gdlm dist-list@domain.com > dist-list-membership.txt
Bug">http://bugzilla.zimbra.com/show_bug.cgi?id=19157>Bug 19157 - Ability to export GAL as a CSV file (admin console)

You can use awk & print to do so from CLI.

For instance:

zmprov gdl dist-list@domain.com | awk 'ORS=","' > list.csv
[/QUOTE]
So in this case, the following code:

[QUOTE]

/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

[/QUOTE]

will get me the username and password that I can use to migrate from one zimbra server to another zimbra server, is that right?
Rk_Raj
Posts: 36
Joined: Sat Sep 13, 2014 2:00 am

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

Postby Rk_Raj » Tue Sep 18, 2012 1:28 am

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.
covolato
Posts: 1
Joined: Sat Sep 13, 2014 3:19 am

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

Postby covolato » Fri Aug 30, 2013 12:55 am

CSV for all distribucion list and respective members:
for i in `zmprov gadl`;do echo -e "
GRUPO: $i, c";zmprov gdl $i|awk -F"zimbraMailForwardingAddress:" '{print $2}'|grep .|awk 'ORS=","';done >>membersByGroups.csv

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 16 guests