Results 1 to 8 of 8

Thread: Distribution list

  1. #1
    indu is offline Active Member
    Join Date
    Dec 2007
    Posts
    36
    Rep Power
    7

    Default Distribution list

    Can we add members to a distribution list from a .csv file (as CLI)

  2. #2
    chh
    chh is offline Advanced Member
    Join Date
    May 2006
    Posts
    196
    Rep Power
    9

    Default

    You can import lists on the Zimbra server using
    Code:
    zmprov adlm dl@zimbraserver.com user@mail.com
    Put that into a script and you are done.
    You can use "zmprov rdlm" to easily remove mail addresses from the list as well.

    Christian

  3. #3
    indu is offline Active Member
    Join Date
    Dec 2007
    Posts
    36
    Rep Power
    7

    Default Dl

    Thansk for the reply..
    can i import a csv file as a whole into this script instead of typing addresses

  4. #4
    chh
    chh is offline Advanced Member
    Join Date
    May 2006
    Posts
    196
    Rep Power
    9

    Default

    Hi,

    I currently have no access to our script so I cannot copy it (and it is very simple still)

    What it does is read 2 text files with an email address in each line.
    One is for addresses to be added and one for those removed.
    Theses addresses are simply used as arguments for the commands from my post above.

    Christian

  5. #5
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    why not just do :-

    Code:
    #!/bin/bash
    
    while read X
    do
      zmprov adlm dl@zimbraserver.com ${X}
    done < file.csv
    Dependant on how many fields are in your CSV file you may need to parse them first. So if two fields you could do :-

    Code:
    cat file.csv | awk -F, '{ print $1 }' | xargs -i zmprov adlm dl@zimbraserver.com {}

  6. #6
    indu is offline Active Member
    Join Date
    Dec 2007
    Posts
    36
    Rep Power
    7

    Default Please

    Can you please tell me how to populate them to the zimbra?
    is it like after creating a csv file with zmprov adlm dl@zimbraserver.com user@mail.com with each user on a new line & then populating the list to as zmprov <filename.csv???
    Am sorry coz we are new to zimbra admin...

  7. #7
    chh
    chh is offline Advanced Member
    Join Date
    May 2006
    Posts
    196
    Rep Power
    9

    Default

    Simply use the script from uxbox which will do what you need.

    The csv file will look like that:
    Code:
    user1@mail.com
    user2@mail.com
    user@address.com

  8. #8
    indu is offline Active Member
    Join Date
    Dec 2007
    Posts
    36
    Rep Power
    7

    Default Thankyou

    Thanks chh,uxbod..
    shall give a try ..

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Listing Distribution List Members
    By rwjblue in forum Administrators
    Replies: 8
    Last Post: 05-06-2014, 09:20 PM
  2. Replies: 4
    Last Post: 01-29-2008, 08:43 PM
  3. "replay as" distribution list question
    By redbaron in forum Administrators
    Replies: 0
    Last Post: 09-05-2007, 04:18 AM
  4. Reply To for Distribution List
    By alivebyscience in forum Administrators
    Replies: 3
    Last Post: 10-28-2006, 10:35 AM
  5. Orphaned alias for a distribution list
    By area in forum Administrators
    Replies: 0
    Last Post: 09-17-2006, 08:22 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
  •