[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mail cleanup?



----- Original Message -----
From: "Amos" <a.goo0h@gmail.com>
To: "zimbra-hied-admins" <zimbra-hied-admins@sfu.ca>
Sent: Friday, January 28, 2011 1:52:54 PM
Subject: mail cleanup?
<snip>
Is there a way to push a saved search out to all accounts

Amos


zmmailbox -z -m user@domain.edu createSearchFolder -t message $foldername $query

That is the basic syntax for creating a searchFolder in a user's account. If you wanted to push that out to all users, I would approach like this:

zmprov getAllAccounts > accounts.txt
for i in `cat accounts.txt` ; do echo "sm $i" >> addfolder.zm ; echo "csf -t message $foldername $query" >> addfolder.zm ; done
zmmailbox -z -f addfolder.zm >add.log 2>&1


I used something similar just recently for adding a Calendar to everyone's account.

--
Damion Alexander
Manager of Networks and Systems
Bard College
Annandale-on-Hudson, NY 12504
(845) 758-7225