Steps to get filters of all accounts

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Steps to get filters of all accounts


   KB 24389        Last updated on 2021-11-12  




0.00
(0 votes)

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

Verified Against: ZCS 8.8, 9.0 Date Created: 2021-11-10
Article ID: https://wiki.zimbra.com/index.php?title=Steps_to_get_filters_of_all_accounts Date Modified: 2021-11-12



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Jump to: navigation, search