Results 1 to 10 of 10

Thread: Backup/Export User Mail Filters

  1. #1
    jstlouis is offline Intermediate Member
    Join Date
    May 2008
    Posts
    18
    Rep Power
    7

    Default Backup/Export User Mail Filters

    Hi everyone,

    I was wondering if there was a way to export/backup the user's mail filter rules for each mailbox?

    If there is a command-line tool or possibly a script to export/import this, that would be great.

    I would like to export filter rules for about 7 user's from a ZCS 5.0.10 install to a ZCS 5.0.14 install, to save them the hassle of having to re-create.


    Thanks in advance!

  2. #2
    jstlouis is offline Intermediate Member
    Join Date
    May 2008
    Posts
    18
    Rep Power
    7

    Default

    One more question, what about Saved Searches, can those be exported/backed up?

  3. #3
    reinhard is offline Trained Alumni
    Join Date
    Feb 2009
    Location
    Vienna, Austria
    Posts
    86
    Rep Power
    6

    Default

    Is there a solution for this issue?
    Code:
                         <\***/>
    Reinhard             ( . . )
    -------------------ooO--U--Ooo----

  4. #4
    mlanner is offline Special Member
    Join Date
    Nov 2007
    Location
    Berkeley, CA
    Posts
    115
    Rep Power
    7

    Default

    Same question here. Anyone?

  5. #5
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,483
    Rep Power
    56

    Default

    Dump the user account with zmprov and you'll find the filters in there.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  6. #6
    reinhard is offline Trained Alumni
    Join Date
    Feb 2009
    Location
    Vienna, Austria
    Posts
    86
    Rep Power
    6

    Default

    Thats it :-)

    Thanks
    Code:
                         <\***/>
    Reinhard             ( . . )
    -------------------ooO--U--Ooo----

  7. #7
    balusss is offline Active Member
    Join Date
    Aug 2008
    Location
    bangalore
    Posts
    44
    Rep Power
    6

    Default

    hi phoenix,

    is there a way i export/backup the mail filters in zdesktop?

  8. #8
    remedy is offline Starter Member
    Join Date
    Jan 2010
    Posts
    1
    Rep Power
    5

    Default

    Quote Originally Posted by phoenix View Post
    Dump the user account with zmprov and you'll find the filters in there.
    OK so how to you import the same said exported filters back into a new zimbra instance?

  9. #9
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,483
    Rep Power
    56

    Default

    Quote Originally Posted by remedy View Post
    OK so how to you import the same said exported filters back into a new zimbra instance?
    You use zmprov to recreate the filter.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  10. #10
    unc0nnected is offline Intermediate Member
    Join Date
    May 2014
    Posts
    23
    Rep Power
    1

    Default

    Solution here


    So first you want to export your mail rules from user A by doing this:

    zmprov ga user@test.com zimbraMailSieveScript > /opt/backup/xferMailFilters.sh

    now you need to import them into another user so go and edit this new mailFilters.sieve file and change the top 2 lines from this

    #Name user@test.com

    zimbraMailSieveScript: require ["fileinto", "reject", "tag", "flag"];
    to this

    #!/bin/bash

    if [[ $1 ]];

    then

    zmprov ma $1 zimbraMailSieveScript 'require ["fileinto", "reject", "tag", "flag"];
    and add this to the very end of the file

    '

    else

    echo "You forgot to enter a user - Syntax: xferMailFilters.sh user@whatever.com"

    fi


    chmod your new script to 755 or add a +x to it and then run it with the username you want to xfer these files over to as your first variable. You can use this logic and add onto this to make a script that will export from one user($1) and xfer to another ($2) but that's out side of what I need right now so I'll leave that one up to you You can ignore the if then stuff if you just want to do this once, we setupt his script so we can import a template set of filters for every new user

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 02-03-2011, 07:01 AM
  2. zmamavisdctl stopped and won't restart
    By alto in forum Installation
    Replies: 2
    Last Post: 04-18-2008, 12:41 AM
  3. [SOLVED] Mailserver down when send file attach of 50Mb
    By ZMilton in forum Administrators
    Replies: 20
    Last Post: 04-10-2008, 11:44 AM
  4. My Zimbra server down ... please help :)
    By frankb in forum Administrators
    Replies: 2
    Last Post: 12-12-2007, 11:29 AM
  5. Fedora Core 3, Clean Install - Not working!
    By pcjackson in forum Installation
    Replies: 17
    Last Post: 03-05-2006, 07:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •