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

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 11-05-2009, 09:37 AM
New Member
 
Posts: 4
Question How to search for many messages at once (logical OR)?

I'm using zmmailbox to search for matching email messages, like this:

/opt/zimbra/bin/zmmailbox -z -m someone@example.com search -t message "from:Jim\ to:Tim"

This works. (I think the backslash is there to keep Bash happy) The two conditions between the quotation marks are treated like a logical AND, which is understandable.

This retrieves messages from Jim to Tim. I also want messages from Tim to Jim, and I want a lot more messages with specific FROMs and TOs. My question is: Is there a way to specify a logical OR instead of just an AND? I know it's possible to do by just running a command like this many times with different values and merging them together, but it just takes too long.

I would really like to run something like this:

/opt/zimbra/bin/zmmailbox -z -m someone@example.com search -t message "(from:Jim\ to:Tim) or (from:Tim\ to:Jim) or (from:Fred\ to:Tim) or (from:Tim\ to:Fred)"

Or does anyone have any other thoughts? Thanks!

--
Tim
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.