Restoring filter script

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
myzamri
Posts: 20
Joined: Tue Mar 28, 2017 2:46 am

Restoring filter script

Post by myzamri »

My zimbra is zimbra OSE 8.8.9

I have this code to restore my users' filter and run as user zimbra

Code: Select all

#!/bin/bash
for file in *
do
StrFilter=`cat "$file"`
Acc=`echo $file | cut -d "/" -f5`
zmprov ma $Acc zimbraMailSieveScript "'$StrFilter'"
echo "Process filter $Acc"
done
echo "All filter has been import successfully"
I ran this script with no error but when I go to preferences -> filter, an error popped out with this error: method:

Code: Select all

[unknown]
msg:	parse error: parsing Sieve script
code:	service.PARSE_ERROR
detail:	soap:Sender
trace:	qtp66233253-8758:1536485470984:5f4a41d14f52b501
request:	

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Header><context xmlns="urn:zimbra"><userAgent xmlns="" name="ZimbraWebClient - FF61 (Linux)" version="8.8.9_GA_3019"/><session xmlns="" id="164"/><account xmlns="" by="name">me@example.com</account><format xmlns="" type="js"/><csrfToken xmlns="">0_bfe463fd07687b814c8b602b26cbdfd863aae27e</csrfToken></context></soap:Header><soap:Body><GetFilterRulesRequest xmlns="urn:zimbraMail"/></soap:Body></soap:Envelope>
What is wrong?
Post Reply