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 Display Modes
  #1 (permalink)  
Old 07-26-2007, 03:45 PM
Starter Member
 
Posts: 1
Default Adding Members to a distribution list through batch!

Is there a way to add a whole bunch of members through a batch using a text file? I need to create several distribution lists and then add hundreds if not thousands of members to these list. Any ideas?
Reply With Quote
  #2 (permalink)  
Old 07-26-2007, 06:50 PM
Advanced Member
 
Posts: 195
Default

You can use zmprov and redirect a text file as input. For example, create a file called commands.txt

addDistributionListMember list@domain.com member@domain.com

with a line for each member for each list you with to create.

Once you've done that, as the zimbra user you can run "zmprov < commands.txt" and it will execute those commands all in one run.

You can use "zmprov help list" for other distribution list commands.
Reply With Quote
  #3 (permalink)  
Old 07-16-2008, 05:53 PM
Senior Member
 
Posts: 53
Default

Where do I store the text file for the command to pick it up? I have not found this in the manuals. Anyone know?
Reply With Quote
  #4 (permalink)  
Old 07-16-2008, 09:08 PM
y@w y@w is offline
Moderator
 
Posts: 395
Default

Quote:
Originally Posted by Krishopper View Post
You can use zmprov and redirect a text file as input. For example, create a file called commands.txt

addDistributionListMember list@domain.com member@domain.com

with a line for each member for each list you with to create.

Once you've done that, as the zimbra user you can run "zmprov < commands.txt" and it will execute those commands all in one run.

You can use "zmprov help list" for other distribution list commands.
With a text file with the users each on their own line you can also do something like this:

Code:
for each in `cat file.txt`; do zmprov addDistributionListMember list@domain.com $each; done
A little less efficient from a performance standpoint, but easier to "code".
__________________
DataSync Suite

What a n00b!
Reply With Quote
Reply


Thread Tools
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.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0