Results 1 to 4 of 4

Thread: About filter rules

  1. #1
    Desler is offline New Member
    Join Date
    May 2014
    Posts
    5
    Rep Power
    1

    Question About filter rules

    Hi! I use ZCS 8.0.6 and I have a some question about filter rules.

    How can I run the existing filter rule from command line? With zmmailbox I can create, modify or get filter rules, but not to run it.

    My task is this: I need script for periodically check all mailboxes for mails with specific subject and from specific address, and delete if messages older than n days.
    It seems to me that filter rule is most easy way to perform this job, but unfortunately I could not find anything in the documentation about commands to run the filters task.

  2. #2
    ccelis5215 is offline Elite Member
    Join Date
    Jun 2011
    Location
    Caracas Venezuela
    Posts
    470
    Rep Power
    4

    Default

    hi Desler,

    You can do your task using in two ways:

    1.- Script using zmmailbox to search and delete messages based in you criteria.
    2.- Using filter to move messages to a folder and then applying retention to the folder.

    Let us know if you need more details.

    ccelis

  3. #3
    Desler is offline New Member
    Join Date
    May 2014
    Posts
    5
    Rep Power
    1

    Default

    Quote Originally Posted by ccelis5215 View Post
    hi Desler,

    You can do your task using in two ways:

    1.- Script using zmmailbox to search and delete messages based in you criteria.
    2.- Using filter to move messages to a folder and then applying retention to the folder.

    Let us know if you need more details.

    ccelis
    1. Unfortunately it is very slow option. When I try to use deleteConversation and deleteMessage this commands took a one or two seconds per one message.
    Maybe I do something wrong but I use this syntax:
    zmmailbox -z -m <account> deleteConversation <conversation_id>
    zmmailbox -z -m <account> deleteMessage <message_id>
    And as far as I know there is no way to simultaneously delete messages using this commands. Or it is wrong?
    I have a very big number of letters to use deleteConversation and deleteMessage if they deleting one message per iteration.

    2. My problem is that I need to use the filter not from GUI. I want to run filter from the command line. Because I hane many user accounts and want to apply filter to all users.
    I can create filter by using:
    zmmailbox -z -m <account> afrl <my_filter>
    My question - how I can run this filter from command line?

  4. #4
    Desler is offline New Member
    Join Date
    May 2014
    Posts
    5
    Rep Power
    1

    Default

    SOLVED! May it be interesting to others. There is way to run filter rule from command line:

    zmsoap -z -m <account> -f <file with request>

    File with request is in xml format and using ApplyFilterRules SOAP Command:

    <ApplyFilterRulesRequest xmlns="urn:zimbraMail">
    <filterRules>
    <filterRule name="my_filter_rule"/>
    </filterRules>
    <query>in:"inbox" OR in:"Trash"</query>
    </ApplyFilterRulesRequest>

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Export filter rules
    By armitage318 in forum Administrators
    Replies: 4
    Last Post: 05-28-2014, 03:03 AM
  2. Filter Rules
    By 1729 in forum Administrators
    Replies: 0
    Last Post: 09-24-2008, 11:50 AM
  3. Filter rules do not work
    By eka in forum Zimbra Connector for Outlook
    Replies: 7
    Last Post: 08-29-2007, 10:32 AM
  4. Filter Rules
    By phoenix in forum Administrators
    Replies: 10
    Last Post: 03-09-2006, 12:12 AM
  5. possible bug with filter rules
    By psuter in forum Administrators
    Replies: 1
    Last Post: 11-22-2005, 08:52 AM

Posting Permissions

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