Difference between revisions of "King0770-Notes-Nuking everything in a folder"

Line 1: Line 1:
{{BC|Community Sandbox}}
<div class="col-md-12 ibox-content">
=King Notes nuking everything in a folder=
{{KB|{{Unsupported}}|{{ZCS 7.0}}||}}
Line 27: Line 32:
[[Category:Community Sandbox]]
{{Article Footer|Zimbra Collaboration 7.0|04/16/2014}}

Revision as of 10:03, 12 July 2015

King Notes nuking everything in a folder

   KB 3434        Last updated on 2015-07-12  

(0 votes)

This comes up once in a while in support; someone has thousands or millions of items in a folder, and they need to nuke the folder now.

Usually, the command to nuke everything in a folder is:

zmmailbox -z -m user01@domain.com ef /MyStuff

However, if the folder actually has "millions" of items in it, you may be inclined to remove 100 items at a time, and let the script run until all the items are removed.



for msg in `zmmailbox -z -m user01@domain.com search -l 100 "in:MyStuff" | grep conv | awk '{ print $2 }' | sed -e 's/^-//'`
echo "Removing "$msg""
zmmailbox -z -m user01@domain.com dm $msg

Notable bugs:

Verified Against: Zimbra Collaboration 7.0 Date Created: 04/16/2014
Article ID: https://wiki.zimbra.com/index.php?title=King0770-Notes-Nuking_everything_in_a_folder Date Modified: 2015-07-12

Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search