Remove All Emailed Contacts

Revision as of 00:28, 15 August 2010 by Richardteachout (talk | contribs) (changed category)

Here is a simple script I used to remove all the "/Emailed Contacts" folders for all the users on the system. We in-advertedly left the Automatic adding of contacts enabled in our COS (Admin GUI under CoS -> Preferences) And after disabling it, we needed to remove all the emailed contacts, so our GAL would work properly. Here is my quick script on how I did it.


if [ `whoami` != "zimbra" ]; then
        echo "You must be the zimbra user to run this script."
                exit 0

for i in `zmprov -l gaa`
	echo "Emptying the - /Emailed Contacts - folder for $i"
	zmmailbox -z -m $i emptyFolder "/Emailed Contacts"
Jump to: navigation, search