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 06-03-2011, 01:38 PM
Intermediate Member
 
Posts: 23
Default ZMProv command to dump all e-mail addresses

Hi,
We use a list of all e-mail addresses on our mail filter as the first line against spam. While I usually remember to update that list everytime I add a Zimbra user, I sometimes forget.

Would there be a zmprov command that can export all e-mail addresses in all the domains, plus the alias addresses, and the distribution list e-mail addresses (not the contents of them).

Thanks
Reply With Quote
  #2 (permalink)  
Old 06-04-2011, 01:58 AM
fyd fyd is offline
Elite Member
 
Posts: 373
Default

Quote:
Originally Posted by cpaul_carling View Post
Would there be a zmprov command that can export all e-mail addresses in all the domains, plus the alias addresses, and the distribution list e-mail addresses (not the contents of them).
Hi paul,

'su - zimbra' and

get all email addresses on server - $ zmprov -l gaa
get all domains on server - $ zmprov -l gad
get all accounts under a domain - $ zmprov -l gaa domain.com

All distribution lists on server can be found with $ zmprov gadl
and if you need details on a DL try this one $ zmprov gdl <DLname>

Aliases can be found by looking into 'zimbraMailAlias' field of each mail address.
su - zimbra
$ zmprov ga account@domain.com zimbraMailAlias

now search alias of each accounts on server with a loop
$ for i in `zmprov -l gaa` ; do zmprov ga $i zimbraMailAlias ; done (this will take a while, if an account doesn't have any alias set it the particular result will be blank. Just write the results to a file if the list is too long)

Check '$ zmprov help account' for various switches.
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.