delete an email by messageID from all mailboxes

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
quelquecosa
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 root@correo.azucarcolombia.com 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 root@correo.azucarcolombia.com
This outputs the messageID of every email sent from this account
An example of output is: Message ID '201609200920.u8K9K1mc064692@correo.azucarcolombia.com'
I assume 201609200920.u8K9K1mc064692@correo.azucarcolombia.com is the Message ID.

2) I run the command zmmailbox -z deleteMessage 201609200920.u8K9K1mc064692@correo.azucarcolombia.com 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
DualBoot
Elite member
Elite member
Posts: 1073
Joined: Mon Apr 18, 2016 8:18 pm
Location: Earth
ZCS/ZD Version: ZCS FLOSS - 8.7.11 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"
april.org
Zetalliance Member - zetalliance.org

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 5 guests