Sharing in Zimbra is an incredibly useful collaboration feature. We have customers with more than 40K shared email folders; users report sharing enhances productivity and streamlines workflow processes.
Broken shares can cause performance issues, slow web client loading and sometimes even prevent a user with broken shares from logging in to the web client. (If User A shares a folder tree with User B, and then User A leaves the company and User A’s account is deleted, User B’s account now has a string of “broken” shares.)
So, it’s important to remove “broken” shares periodically. If users have only a handful of shares, users can keep things clean on their own. But we host customers where a typical user can have more than 40K (forty thousand) folders as a result of sharing folder trees from multiple other users and where each folder tree can contain hundreds of subfolders.
Further, if you are doing a system-to-system migration, you can get mountpoint creation errors if things aren’t neat and tidy.
In all of these cases, it is not practical to expect users to manage broken share cleanup on their own.
To help, we developed a script that leverages a technique from a Zimbra wiki page. Our script, run on any mailstore (ideally in a screen or tmux session!), will identify all of the broken shares in a Zimbra system (single- or multi-server), generate a report, and then create a separate script an administrator can run that will delete all of the broken shares automagically.
Our script, run CPU and IO “nicely” during the workday on a busy mailstore that normally runs at about 75% of CPU capacity, took about 30 minutes to parse through some 850 accounts where 32 users had 95 broken shares. Of course, your mileage may vary.
We’ve made improvements to the script for 2026 and are releasing it under an MIT open source license.
The script, MCE_OP2_broken_shares_checker.sh is available on our GitHub Migration Software Preparations repo.
If you’d like help dealing with your broken shares, or any other Zimbra housekeeping tasks, please just fill out the form and we’ll be back in touch!
Hope that helps,
L. Mark Stone
Mission Critical Email LLC
14 October 2025
30 May 2026 – Script updated to check inbound, outbound and ACL checks separately, and to release under an MIT License.
The information provided in this blog is intended for informational and educational purposes only. The views expressed herein are those of Mr. Stone personally. The contents of this site are not intended as advice for any purpose and are subject to change without notice. Mission Critical Email makes no warranties of any kind regarding the accuracy or completeness of any information on this site, and we make no representations regarding whether such information is up-to-date or applicable to any particular situation. All copyrights are reserved by Mr. Stone. Any portion of the material on this site may be used for personal or educational purposes provided appropriate attribution is given to Mr. Stone and this blog.
