Results 1 to 5 of 5

Thread: [SOLVED] New Mailbox Filter to users from zmmailbox

  1. #1
    Atauhalpa Pierrie Bulling Guest

    Default [SOLVED] New Mailbox Filter to users from zmmailbox

    I want create a new Mailbox filter to users from zmmailbox, but this error is show in shell.
    zmmailbox -m user1 -v -a admin -p "passwordzimbra" afrl --first "namefilter" active any contains "@teste.com.br" fileinto "/inbox/TESTE"
    ERROR: zclient.CLIENT_ERROR (unknown keyword: contains)

  2. #2
    jholder's Avatar
    jholder is offline Former Zimbran
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    20

    Default

    Quote Originally Posted by Atauhalpa Pierrie Bulling View Post
    I want create a new Mailbox filter to users from zmmailbox, but this error is show in shell.
    zmmailbox -m user1 -v -a admin -p "passwordzimbra" afrl --first "namefilter" active any contains "@teste.com.br" fileinto "/inbox/TESTE"
    ERROR: zclient.CLIENT_ERROR (unknown keyword: contains)
    I think that's supposed to be:
    Code:
    zmmailbox -m admin -v -a admin -p "passwordzimbra" afrl --first "namefilter" active any header "from" contains "@teste.com.br" fileinto "/TEST"
    Special thanks to super mario for helping me with this

    jh

  3. #3
    jishaashok is offline Starter Member
    Join Date
    Feb 2010
    Posts
    2
    Rep Power
    5

    Thumbs up

    1. If you have the filters written to a file, [filename Filters], you can run the following to add the filter rules to the account : ( Put these in a file, and run the script)
    ------------------------------------------------------------------------------------------
    #!bin/bash
    exec < Filters

    while read line
    do
    zmmailbox -z -m user@domain.com addFilterRule $line
    done
    ------------------------------------------------------------------------------------------

    2. To export filters from already existing account, run :

    zmmailbox -z -m olduser@domain.com getFilterRules >> Filters

    (Do this first)
    ------------------------------------------------------------------------------------------

    3. You might need to add the mailboxes first [before step 1]. For that, put the list of mailboxes you require into a file "mailbox_list" . The list would look like

    /Inbox/Billing
    /Inbox/Support
    /Inbox/New
    /Inbox/New/ABCD

    To create the folders, run this as user zimbra :

    for i in `cat mailbox_list`; do zmmailbox -z -m user@domain cf $i; done

    ------------------------------------------------------------------------------------------------------------

  4. #4
    jishaashok is offline Starter Member
    Join Date
    Feb 2010
    Posts
    2
    Rep Power
    5

    Default

    Quote Originally Posted by jholder View Post
    I think that's supposed to be:
    Code:
    zmmailbox -m admin -v -a admin -p "passwordzimbra" afrl --first "namefilter" active any header "from" contains "@teste.com.br" fileinto "/TEST"
    Special thanks to super mario for helping me with this

    jh
    Do make sure that the filter rules added does not contain spaces. Example :

    The following rule would give error becaue of the space between the words "Alert: New Mail"

    "Rule_1" active any header "subject" contains "Alert: New Mail from" fileinto "Inbox/New" stop

    I have tried adding black slashes to escape the spaces, but they do not work.

    You just have to be satisfied with using only one word in the Subject. Better option is to create filter rule using the "To" and "From".

  5. #5
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Thank you for your posting ... The original OP posted in 2007 so Zimbra has come a long way since then with respect to its functionality in zmmailbox. Would be grateful in the future to open a new thread and post your ideas and examples.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 210
    Last Post: 01-17-2012, 01:19 AM
  2. Restore mail to another user's mailbox
    By zaf in forum Administrators
    Replies: 4
    Last Post: 02-08-2008, 08:26 AM
  3. How to erase messages from users mailbox
    By Eyfi in forum Administrators
    Replies: 6
    Last Post: 06-28-2007, 08:55 AM
  4. Bad Filter Stops Incoming Email
    By soxfan in forum Administrators
    Replies: 0
    Last Post: 03-08-2007, 09:02 AM
  5. zmmailbox create filter on the command line
    By alimovz in forum Administrators
    Replies: 1
    Last Post: 01-29-2007, 02:55 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
  •