Steps to get filters of all accounts: Difference between revisions
Ashrivastava (talk | contribs) No edit summary |
Ashrivastava (talk | contribs) No edit summary |
||
Line 4: | Line 4: | ||
=Steps to get filters of all accounts= | =Steps to get filters of all accounts= | ||
<hr> | <hr> | ||
{{KB|{{ | {{KB|{{WIP}}|{{ZCS 8.8}}|{{ZCS 9.0}}|}} | ||
====Problem==== | ====Problem==== |
Latest revision as of 09:10, 12 November 2021
Steps to get filters of all accounts
Problem
How to get all filters of all accounts through CLI.
Solution
To get all filters of all accounts, run:
for i in `zmprov -l gaa`; do echo $i;zmprov -l ga $i zimbraMailSieveScript; done
For example:
user1@example.com # name user1@example.com zimbraMailSieveScript: require ["fileinto", "copy", "reject", "tag", "flag", "variables", "log", "enotify", "envelope", "body", "ereject", "reject", "relational", "comparator-i;ascii- numeric"]; # forward if anyof (address :all :contains :comparator "i;ascii-casemap" ["to"] "user1@example.com") { redirect "user2@example.com"; stop; } user3@example.com # name user3@shri.com zimbraMailSieveScript: require ["fileinto", "copy", "reject", "tag", "flag", "variables", "log", "enotify", "envelope", "body", "ereject", "reject", "relational", "comparator-i;ascii- numeric"]; # test mail if anyof (address :all :contains :comparator "i;ascii-casemap" ["from"] "user1@example.com") { fileinto "Junk"; stop; }
Submitted by: Aditya Shrivastava