Deleting a message sent to all accounts

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Posts: 27
Joined: Fri Sep 12, 2014 10:38 pm

Deleting a message sent to all accounts

Postby bsaxon » Wed Nov 05, 2008 4:07 pm

I am trying to delete several messages that were sent to our entire company via a distribution list.
How would I go about this?
I've tried using methods described in these posts with no luck:
far as I can tell, deleting a message using "zmmailbox" requires using the message ID that can be found using "zmmboxsearch," which appears to be unique to the message in that particular account. For example: id="91c5acad-8760-4829-a2db-5c8fcba82243:825"
Where as, I can also get a message ID by looking at the message's source, which has the same ID across all accounts for the same message. For example: ""
Any suggestions?
I am basically trying to delete the same message from several accounts b/c the person has sent 30something 5MB messages to 700 accounts and I am running out of disk space as a result.

Elite member
Elite member
Posts: 1633
Joined: Fri Sep 12, 2014 10:39 pm

Deleting a message sent to all accounts

Postby bdial » Wed Nov 05, 2008 8:33 pm

if you're confident that searching for the specific subject, sender, maybe even date would fetch the right e-mail, couldn't you just script it. Like the logic being
1. use zmprov gaa to get a list of all accounts

2. loop through that list, executing zmmboxsearch to find the message

3. use cut to grab the id from the output of zmmoboxsearch

4. use zmmailbox to delete the message from the account.
Posts: 27
Joined: Fri Sep 12, 2014 10:38 pm

Deleting a message sent to all accounts

Postby bsaxon » Thu Nov 06, 2008 11:14 am

Okay - I've found the following to address by original need:
1) Bug/Feature Request to add this ability to Zimbra: Bug 24798 – RFE: Locate and delete messages from multiple mailboxes
2) Script to remove message based on subject: King0770-Notes - Zimbra :: Wiki
3) And this Ajcody-User-Management-Topics - Zimbra :: Wiki
Using the script from #2 along w/ a list of email accounts, I was able to effectively go through all accounts and delete a particular message.
But now, I have a new question. After doing this, I didn't notice a significant difference in disk space usage.
When someone sends a 10MB message to hundreds of accounts on the server, how is the disk usage effected? Is it 10MB * the number of accounts? Or does Zimbra do something more efficient for storing the message? I can't figure out how I wasn't able to see any change in disk usage after scanning lots of accounts and large messages.
User avatar
Posts: 13
Joined: Tue Feb 19, 2019 12:45 am

Re: Deleting a message sent to all accounts

Postby Ghosto » Tue Feb 19, 2019 12:48 am

Do some changes. Thats my script:

Return to “Administrators”

Who is online

Users browsing this forum: fnortech and 13 guests