Revision as of 21:09, 26 August 2010 by Glenno (talk | contribs) (Deciphering zmstat charts)

Attention.png - This article is NOT official Zimbra documentation. It is a user contribution and may include unsupported customizations, references, suggestions, or information.

Bulk delete items from all users matching query via zmmailbox

Suppose you have the following scenario:

We have an administrative assistant who left the company ( She had created reoccurring appointments on several people's calendars which now cannot be removed. Restoring the administrative assistant's account is not an option since she was removed a while back and our oldest backup doesn't contain her account. Any suggestions on how to remove the appointments?

As an administrator, you can script zmmailbox to search all accounts for appointments with an organizer of, and then delete those appointments.

# tested on ZCS 6.0.8

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

# change query below to what you want to match
# the example searches for a body matching "Organizer:"

# change to search the type of items you want to match
# types are: message,conversation,contact,appointment,document,task,wiki

for acct in `zmprov -l gaa`
# if you want to search specific accounts, use the for loop below
# for acct in "99@test2.test" "100@test2.test" "101@test2.test" "102@test2.test" "103@test2.test"
  echo "Searching account $acct..."
  ITEMS=`zmmailbox -z -m $acct search -t $type "$query" | awk '{ if (NR>4 && NF) {print $2}}' | tr '\n' ,`
  if [ -n "$ITEMS" ]; then
    echo " Deleting item(s) " $ITEMS
    # Remove echo after verifying the search results
    echo zmmailbox -z -m $acct di $ITEMS

Credit to: King0770-Notes-Removal_of_Bad_Contact_Address

Deciphering zmstat charts

MySQL: InnoDB Buffer Pool Hit Rate

In general, should stay above 995.


Innodb bad.png


Innodb better.png


Innodb perfect.png

Mailboxd: Minor Garbage Collection Time and Mailboxd: Major Garbage Collection Time

If the GC time starts getting over a few percent, especially repeatedly, then it's something that users will notice.

Jump to: navigation, search