delete an email by messageID from all mailboxes

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Posts: 3
Joined: Mon Sep 19, 2016 2:53 pm

delete an email by messageID from all mailboxes

Postby quelquecosa » Tue Sep 20, 2016 3:00 pm

Every day, I send an email with a cron from the account to all the email accounts in my company, using sendmail command. This account is only used to send these messages.

My user's mailboxes are getting filled with these emails rather quickly.
I am looking for a way to delete them every week, also via cron.

This is what I have so far:

1) Run command /opt/zimbra/libexec/zmmsgtrace -s
This outputs the messageID of every email sent from this account
An example of output is: Message ID ''
I assume is the Message ID.

2) I run the command zmmailbox -z deleteMessage to delete this email by MessageID from ALL THE USERS' mailboxes.

...However, this does not work. Any other command I can use to delete the message from all user's mailboxes?

Thank you.

User avatar
Elite member
Elite member
Posts: 1304
Joined: Mon Apr 18, 2016 8:18 pm
Location: France - Earth
ZCS/ZD Version: ZCS FLOSS - 8.8.15 Mutli servers

Re: delete an email by messageID from all mailboxes

Postby DualBoot » Tue Sep 20, 2016 7:09 pm

if you have a Zimbra 8.X.X you can do that without a cron.
Using filter => into folder_bob
Using retention policy => folder_bob
The Guy - DualBoot

PostMaster - WikiMaster - SysAdmin
"Free Your Mind. Think Open Source"
Zetalliance Member -

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 18 guests