Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
service cyrus-imapd start
sleep 3
toolsdir=`pwd`
while read line
do
domain=$line
kontakte=`kolab list-mailbox-metadata "user/*@$domain" | grep -E "Kontakte|Contact"`
if [[ ! -z "$kontakte" ]]
then
while read line2
do
folder=${line2/Folder /}
echo kolab set-mailbox-metadata "$folder" /shared/vendor/kolab/folder-type contact
kolab set-mailbox-metadata "$folder" /shared/vendor/kolab/folder-type contact
done <<< "$kontakte"
fi
kalender=`kolab list-mailbox-metadata "user/*@$domain" | grep -E "Kalender|Calendar"`
if [[ ! -z "$kalender" ]]
then
while read line2
do
folder=${line2/Folder /}
echo kolab set-mailbox-metadata "$folder" /shared/vendor/kolab/folder-type event
kolab set-mailbox-metadata "$folder" /shared/vendor/kolab/folder-type event
done <<< "$kalender"
fi
done < $toolsdir/domains.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.