I'm trying to setup a script that syncs accounts on our network edition with a standard community edition as a way of archiving accounts of people who no longer work with us.

I'm not having an issue using imapsync to sync the accounts, the only thing is the folders that have been shared with the user are also being sync'd, I believe I can use a --exclude command with imapsync to not sync certain folders, and I can input the folders manually each time, but I'd rather have it automated so when I run the script it checks the account for shared folders which is then excludes, is there a cli command I can use to just list the folders within an account that are shared to them?