Migrate filter rules from one user to another user

Revision as of 09:13, 25 August 2021 by Heera Singh Koranga (talk | contribs) (Created page with "{{BC|Certified}} __FORCETOC__ <div class="col-md-12 ibox-content"> =How to migrate filter rules from one user to another user?= <hr> {{KB|{{WIP}}|{{ZCS 9.0}}|{{ZCS 8.8}}|{{ZCS...")

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

How to migrate filter rules from one user to another user?


   KB 24345        Last updated on 2021-08-25  




0.00
(0 votes)

Problem

How to migrate filter rules from one user to another user?


Solution

These are the steps to export and import filter rules.

1) Export exiting filter rules of a user and save into a file.

zmprov -l ga UserA@DOMAIN.COM zimbraMailSieveScript > /tmp/filter_rules.txt  


2) Prepare the output file "/tmp/filter_rules.txt".

sed -i -e "1d" /tmp/filter_rules.txt 
sed -i -e 's/zimbraMailSieveScript: //g' /tmp/filter_rules.txt


3) Check required folders' path for the filter rules.

cat /tmp/filter_rules.txt | grep 'fileinto ' 

Example:

zimbra@mail:~$ cat /tmp/filter_rules.txt | grep 'fileinto '
    fileinto "TestEmail/TEST2";
    fileinto "User5";
    fileinto "Admin";
zimbra@mail:~$


4) Import prepared filter rules on another user.

zmprov ma UserB@DOMAIN.COM zimbraMailSieveScript "`cat /tmp/filter_rules.txt`"  


5) Create all required folders for the imported filter rules from the step 3.

zmmailbox -z -m UserB@DOMAIN.COM cf -V message /"FolderName"

Example:

zmmailbox -z -m UserB@DOMAIN.COM cf -V message /"User5" 


Submitted by: Heera Singh Koranga
Verified Against: Date Created:
Article ID: https://wiki.zimbra.com/index.php?title=Migrate_filter_rules_from_one_user_to_another_user Date Modified: 2021-08-25



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