1. If you have the filters written to a file, [filename Filters], you can run the following to add the filter rules to the account : ( Put these in a file, and run the script)
------------------------------------------------------------------------------------------
#!bin/bash
exec < Filters
while read line
do
zmmailbox -z -m
user@domain.com addFilterRule $line
done
------------------------------------------------------------------------------------------
2. To export filters from already existing account, run :
zmmailbox -z -m
olduser@domain.com getFilterRules >> Filters
(Do this first)
------------------------------------------------------------------------------------------
3. You might need to add the mailboxes first [before step 1]. For that, put the list of mailboxes you require into a file "mailbox_list" . The list would look like
/Inbox/Billing
/Inbox/Support
/Inbox/New
/Inbox/New/ABCD
To create the folders, run this as user zimbra :
for i in `cat mailbox_list`; do zmmailbox -z -m user@domain cf $i; done
------------------------------------------------------------------------------------------------------------