Results 1 to 4 of 4

Thread: Adding Members to a distribution list through batch!

  1. #1
    roberth is offline Starter Member
    Join Date
    Jul 2007
    Posts
    1
    Rep Power
    7

    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?

  2. #2
    Krishopper is offline Dedicated Member
    Join Date
    Dec 2006
    Location
    Minneapolis MN
    Posts
    775
    Rep Power
    9

    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.

  3. #3
    jason is offline Senior Member
    Join Date
    May 2007
    Location
    AZ, USA
    Posts
    55
    Rep Power
    7

    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?

  4. #4
    y@w's Avatar
    y@w
    y@w is offline Moderator
    Join Date
    Jan 2008
    Posts
    658
    Rep Power
    8

    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".

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 13
    Last Post: 07-20-2007, 03:21 AM
  2. Is it started or not
    By kwelipatton in forum Installation
    Replies: 10
    Last Post: 03-28-2006, 11:11 PM
  3. Replies: 13
    Last Post: 10-31-2005, 04:22 PM
  4. Replies: 18
    Last Post: 10-30-2005, 09:12 PM
  5. Certify Error on (re)install
    By rodrigoccurvo in forum Installation
    Replies: 4
    Last Post: 09-23-2005, 09:04 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
  •