- Step 1: To check distribution lists name exists or not!
- Step 2: To create distribution lists from file.
- Step 3: Running zimbra auto create distribution lists bash script from root account.
- zimbra some service are not running
- How to install and configure zimbra multi server
- How to Restrict Sending to Distribution list in zimbra mail
zimbra auto create distribution listsThe syntax create distribution lists command line from root account
su - zimbra -c "zmprov cdl [email protected]"To create distribution lists from file. For example, I’m created list_distribute.txt in /tmp folder as below:
Zimbra auto create distribution lists full script. Bash script for distribution lists name as below:
[[email protected] opt]# cat zimbra_Distribute.shThe content zimbra_Distribute.sh as below:
#!/bin/bashRunning zimbra auto create distribution lists bash script from root account.
# Author: Phan Van Huu
# My site: www.huuphan.com and www.devopsskills.info
while read count
Check_DL=$(su - zimbra -c "zmprov gadl | grep $count")
if [ $? == 0 ]
# To check distribution lists name exists or not!
echo "$count Exists!"
# To create distribution list
su - zimbra -c "zmprov cdl $count"
done < $List_DL
[[email protected] opt]# ./zimbra_Distribute.shThe output as below: