I would start by getting a list of all the accounts with zmprov and output those to a file with
Code:
zmprov gaa > /tmp/allaccounts
Then loop through each with zmmailbox with something like:
Code:
#!/bin/bash
DELFOLDER="/Path/of/folder/to/delete"
for ACCT in $(cat /tmp/allaccounts)
do
echo "zmmailbox -z -m $ACCT df \"$DELFOLDER\"">>/tmp/deletefeed
done
You should definitely test with a subset of accounts before running over the whole mailbox. Note that in the script I wrote I echoed the zmmailbox commands to a file instead of executing them directly. This allows you to look through and make sure the feed looks right or to remove accounts you don't want to touch prior to executing it.
Note that you can try this interactively too to ensure you have the right paths set up. run
Code:
zmmailbox -z -m account_you_want_to_test
you will then be at the zmmailbox prompt. You can get a list of all folders with "gaf" or getallfolders and then do df or deletefolder "/Path/to/folder".