Zimbra Collaboration Suite expunge old messages

Armitage318 used Ask the Experts™
Hi, I use Zimbra Collaboration Suite (8.8.7 version, open source edition).
I manage one domain with about 50 mailboxes.
I need to "purge" messages on some mailbox (eg. delete messages older than last year).
I cannot use global retention policy, because I need to take action only on few users.
How can I do this?
Thank you!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fractional CTO
Distinguished Expert 2018
One way to do this is to write a script to emulate IMAP4 protocol to access mailboxes in a list of users you provide.

Then retrieve (LIST) messages for each user + look at dates.

Then delete the message ids which match your date criteria.

You might also pose your question to Zimbra + ask if you can simply delete physical files from disk + Zimbra will correctly recover all indexes. Likely this is true + best ask Zimbra, before you brute force change any disk files.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial