How to zimbra add account to distribution list
In this tutorial, How do I use 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 list
The syntax, create distribution lists command line from root accountsu - zimbra -c "zmprov adlm distribution_name@example.com huupv@example.com"
My bash script for zimbra add account to distribution list as below:
#!/bin/bash#Author: HuuPV#Add member to DLecho -n "Input distribute name, pls (Ex: dl01@mail.huuphan.local): "read DLecho -n "Input account add to distribute name, pls (Ex: huupv@mail.huuphan.local): "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
Comments
Post a Comment