In this tutorial, How to zimbra add account to distribution list by bash script. I’m written bash script for add account to distribution list.
You may reading link as below:
- 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 add account to distribution listThe syntax create distribution lists command line from root account
su - zimbra -c "zmprov adlm [email protected] [email protected]"
My bash script how to zimbra add account to distribution list as below:
#!/bin/bash#Author: HuuPV#Add member to DLecho -n "Input distribute name, pls (Ex: [email protected]): "read DLecho -n "Input account add to distribute name, pls (Ex: [email protected]): "read ACCheck_Member_DL=$(su - zimbra -c "zmprov gdl $DL | grep '\b$AC'")if [ $? == 0 ]thenecho "$AC member exists in $DL"elseecho "Add member $AC to $DL Distribute List"su - zimbra -c "zmprov adlm $DL $AC"fi
The result, running bash script from root account