Steps to get filters of all accounts

Revision as of 18:40, 10 November 2021 by Ashrivastava (talk | contribs) (Created page with "{{BC|Certified}} __FORCETOC__ <div class="col-md-12 ibox-content"> =Steps to get filters of all accounts= <hr> {{KB|{{ZC}}|{{ZCS 8.8}}|{{ZCS 9.0}}|}} {{WIP}} ====Problem==...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Steps to get filters of all accounts


   KB 24389        Last updated on 2021-11-10  




0.00
(0 votes)


Problem

How to get all filters of all accounts through CLI.

Solution

To get all 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-10



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