Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-04-2007, 08:08 AM
Starter Member
 
Posts: 2
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)
Reply With Quote
  #2 (permalink)  
Old 06-08-2007, 07:01 PM
Former Zimbran
 
Posts: 5,606
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
Reply With Quote
  #3 (permalink)  
Old 02-05-2010, 11:59 AM
Starter Member
 
Posts: 2
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

------------------------------------------------------------------------------------------------------------
Reply With Quote
  #4 (permalink)  
Old 02-05-2010, 12:04 PM
Starter Member
 
Posts: 2
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".
Reply With Quote
  #5 (permalink)  
Old 02-05-2010, 02:29 PM
Moderator
 
Posts: 7,928
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.
__________________
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.