Can we add members to a distribution list from a .csv file (as CLI)
Can we add members to a distribution list from a .csv file (as CLI)
You can import lists on the Zimbra server using
Put that into a script and you are done.Code:zmprov adlm dl@zimbraserver.com user@mail.com
You can use "zmprov rdlm" to easily remove mail addresses from the list as well.
Christian
Thansk for the reply..
can i import a csv file as a whole into this script instead of typing addresses
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
why not just do :-
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:#!/bin/bash while read X do zmprov adlm dl@zimbraserver.com ${X} done < file.csv
Code:cat file.csv | awk -F, '{ print $1 }' | xargs -i zmprov adlm dl@zimbraserver.com {}
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...
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
Thanks chh,uxbod..
shall give a try ..
There are currently 1 users browsing this thread. (0 members and 1 guests)