Not sure if this is the correct forum to put this. Since everyone here has helped me out so much I figure I will donate a bash script that I use here to help me archive users that no longer used.
What the script does:
1) Resets a users account with a random password
2) Activates the account
3) Creates a full dump of the account in .tgz format and copies it to a backup folder
4) Uses imapsync to sync the contents of the account to an account called userarchive with a folder named after the user.
5) Closes the account.
This allows me to archive users email in a central account so I can go back to the old users and search for emails. Also, it does make a full dump of the account in case I need to restore it in the future. All these processes are non destructive. It will not delete the old account, that is left up to you.
1) Imapsync imapsync | freshmeat.net
2) A little bash script knowledge to edit some of the variables.
3) Create an account to store the archived email
Under the zimbra user account run
sh userarchive.sh firstname.lastname@example.org