Created
March 19, 2014 22:55
-
-
Save limed/9653173 to your computer and use it in GitHub Desktop.
Create calendar resources in zimbra that is set to forward to a mailman serer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| IAM=`id -un` | |
| if [ "$IAM" != "zimbra" ]; then | |
| echo "You must run this script as the 'zimbra' user. Please 'su - zimbra' first." | |
| exit 1 | |
| fi | |
| randpw(){ < /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16}; echo; } | |
| password=`randpw` | |
| listname=$1 | |
| # Config values | |
| transport='mailman3.mail.corp.phx1.mozilla.com' | |
| ALIASES=" | |
| ${listname}@mozilla.com | |
| ${listname}[email protected] | |
| ${listname}[email protected] | |
| ${listname}[email protected] | |
| ${listname}[email protected] | |
| ${listname}[email protected] | |
| ${listname}[email protected] | |
| ${listname}[email protected] | |
| ${listname}[email protected] | |
| ${listname}[email protected] | |
| " | |
| if [[ -z $listname ]]; then | |
| echo "Usage: ./$0 <listname>" | |
| exit 1 | |
| fi | |
| for name in $ALIASES; do | |
| echo "ccr $name $password displayName '$name mailman mailing list' zimbraCalResType Location zimbraMailTransport smtp:$transport:25"; | |
| done | zmprov |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment