Hello!
I'm trying to write a script to run nightly (or weekly) to override any user-set retention policies for the Inbox and Sent items.

So far, I've go this (Please excuse the rem's):

Code:
array=( $(zmprov -l gaa | grep -v "hamaccount" | grep -v "spamaccount" | grep -v "galsync") )
for i in "${array[@]}"
do
echo $i
zmsoap -z -m $i FolderActionRequest/action @id="2" @op="retentionpolicy" retentionPolicy/keep ../purge/policy @lifetime="60d" @type="user"
zmsoap -z -m $i FolderActionRequest/action @id="5" @op="retentionpolicy" retentionPolicy/keep ../purge/policy @lifetime="60d" @type="user"
done
This pulls a list of email accounts with zmprov -l gaa, strips it of any accounts with 'hamaccount', 'spamaccount', or 'galsync' in the name, then dumps the remaining list into an array. From there, it goes through each array and applies the two zmsoap commands to it.

This is all well and good, until someone makes a subfolder within their inbox or sent items and changes the policy for that folder.

Some searching has shown that certain zmsoap commands can be used with "recursive=false"- but I have had no luck adding "recursive=true" to this command. I'm thinking I may be able to have the script pull a list of every folder within IDs 2 and 5 and then apply the attribute from there, but it sounds messy- and I don't know how to do that!

Any input would be greatly appreciated.