CLI zmmboxsearch (Cross mailbox search): Difference between revisions

(Adding category)
No edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==<font size="4" color="#00007f" face="Arial"> ''' zmmboxsearch (Cross mailbox search) ''' </font>==
{{BC|Certified}}
__FORCETOC__
<div class="col-md-12 ibox-content">
=CLI zmmboxsearch (Cross mailbox search)=
{{KB|{{ZC}}|{{ZCS 7.0}}|{{ZCS 6.0}}|}}
{{Archive}}{{WIP}}{{Article Infobox|{{admin}}|{{ZCS 7.0}}|{{ZCS 6.0}}|{{ZCS 5.0}}}}
For the most recent information on this CLI, including syntax and description, see [http://www.zimbra.com/docs/ne/latest/administration_guide/A_app-command-line.20.1.html ZCS Administrator's Guide Network Edition > Appendix A Command-Line Utilities].


<font size="3" color="#000000" face="Arial">  <font size="3" color="#000000" face=""Times New Roman""> '''zmmboxsearch''' </font>  is the CLI command used to search across mailboxes. You can search across mailboxes to find messages and attachments that match specific criteria and save copies of these messages to a directory.</font>
=ZCS 6.0.x=
==zmmboxsearch==
The CLI command '''zmmboxsearch''' is used to search across mailboxes. You can search across mailboxes to find messages and attachments that match specific criteria and save copies of these messages to a directory.


===<font size="3" color="#00007f" face="Arial"> ''' Syntax ''' </font>===
===Syntax===
zmmboxsearch {-m <arg>} {- q <arg>} [-o <arg>] [-l <arg>] [-d <arg>] [options]


<font size="3" color="#000000" face=""Times New Roman""> '''  zmmboxsearch -q <querystring}> -m <mailboxids> -s <server> [-d directory]  ''' </font>
===Description===
 
{|style="width:100%" border="1" cellpadding="5" cellspacing="0"
===<font size="3" color="#00007f" face="Arial"> ''' Description ''' </font>===
! align="left" bgcolor="tan" |Long Name
 
! align="left" bgcolor="tan" |Short Name
{| border="1" cellpadding="8"
! align="left" bgcolor="tan"|Description
|+
|-
|-
| valign="middle" |
|style="background=white" |<nowiki>--dir</nowiki>
<font size="3" color="#00007f" face="Arial"> ''' Long Name ''' </font>
|<nowiki>-d</nowiki>
| valign="middle" |
|'''<arg>''' Directory to write the messages to. If none is specified, then only the headers are fetched. Files names are generated in the form '''RESULTNUM_ACCOUNT-ID_ MAILITEMID'''.
<font size="3" color="#00007f" face="Arial"> ''' Short Name''' </font>
| valign="middle" |
<font size="3" color="#00007f" face="Arial"> ''' Description ''' </font>
|-
|-
| valign="top" |
|<nowiki>--help</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> --dir (optional) </font>
|<nowiki>-h</nowiki>
| valign="top" |
|Displays help information
<font size="3" color="#000000" face=""Times New Roman""> -d </font>
| valign="top" |
<font size="3" color="#000000" face="Arial">  <font size="3" face=""Times New Roman""><arg></font>  Directory to write the messages to. If none is specified, then only the headers are fetched. Files names are generated in the form <font size="3" color="#000000" face=""Times New Roman"">'''RESULTNUM_ACCOUNT-ID_ '''</font><font size="3" color="#000000" face=""Times New Roman"">'''MAILITEMID.'''</font></font>
|-
|-
| valign="top" |
|<nowiki>--limit</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> --limit (optional) </font>
|<nowiki>-l</nowiki>
| valign="top" |
|Sets the limit for the number of results returned. The default is 25.
<font size="3" color="#000000" face=""Times New Roman""> -l </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Sets the limit for the number of results returned. The default is 25.</font>
|-
|-
| valign="top" |
|<nowiki>--mbox</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> --mbox </font>
|<nowiki>-m</nowiki>
| valign="top" |
|'''<arg>''' Comma-separated list of mailboxes to search. UIDs or email-address or /SERVER/MAILBOXID or <nowiki>*</nowiki>.
<font size="3" color="#000000" face=""Times New Roman""> -m </font>
| valign="top" |
<font size="3" color="#000000" face="Arial">  <font size="3" face=""Times New Roman""><arg></font>  Comma-separated list of mailboxes to search. UIDs or email-address or /SERVER/MAILBOXID or *.</font>
|-
|-
| valign="top" |
|<nowiki>--offset</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> --offset (optional) </font>
|<nowiki>-o</nowiki>
| valign="top" |
|'''<arg>''' Specify where the hit list should start. The default is 0.
<font size="3" color="#000000" face=""Times New Roman""> -o </font>
| valign="top" |
<font size="3" color="#000000" face="Arial">  <font size="3" face=""Times New Roman""><arg></font>  Specify where the hit list should start. The default is 0.</font>
|-
|-
| valign="top" |
|<nowiki>--query</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> --query </font>
|<nowiki>-q</nowiki>
| valign="top" |
|'''<arg>''' The query string for the search.
<font size="3" color="#000000" face=""Times New Roman""> -q </font>
| valign="top" |
<font size="3" color="#000000" face="Arial">  <font size="3" face=""Times New Roman""><arg> </font> The query string for the search.</font>
|-
|-
| valign="top" |
|<nowiki>--server</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> --server </font>
|<nowiki>-s</nowiki>
| valign="top" |
|'''<arg>''' Mail server hostname. Default is the localhost.
<font size="3" color="#000000" face=""Times New Roman""> -s </font>
| valign="top" |
<font size="3" color="#000000" face="Arial">  <font size="3" face=""Times New Roman""><arg></font>  Mail server hostname. default is the localhost.</font>
|-
|-
| valign="top" |
|<nowiki>--verbose</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> --verbose (optional) </font>
|<nowiki>-v</nowiki>
| valign="top" |
|Request that the status message print while the search is being executed
<font size="3" color="#000000" face=""Times New Roman""> -v </font>
| valign="top" |
<font size="3" color="#000000" face="Arial"> Request that the status message print while the search is being executed.</font>
|}
|}


===<font size="3" color="#00007f" face="Arial"> ''' Example ''' </font>===
===Examples===
The following example is to do a cross-mailbox search in the inbox folder of two different mailboxes on the specified server and put a copy of the message in to the specified directory.
 
zmmboxsearch -m user1@yourdomain.com,user2@yourdomain.com -q “in:inbox” -d /var/tmp
 
Here is an example that includes results for the phrase "vacation rental" in the message body:
 
zmmboxsearch -m user1@yourdomain.com,user2@yourdomain.com -q “content:(\"vacation rental\")” -d /var/tmp
 
Here is "vacation rental" in the Inbox:
 
zmmboxsearch -m user1@yourdomain.com,user2@yourdomain.com -q “in:inbox content:(\"vacation rental\")” -d /var/tmp
 
"vacation rental" in the Inbox from Thom:
 
zmmboxsearch -m user1@yourdomain.com,user2@yourdomain.com -q “in:inbox from:Thom content:(\"vacation rental\")” -d /var/tmp
 
=ZCS 5.0.x=
*[http://www.zimbra.com/docs/ne/5.0.19/administration_guide/A_app-command-line.18.18.html#1268684 ZCS Administrator's Guide Network Edition 5.0 > Appendix A Command-Line Utilities > zmmboxsearch]
 
=ZCS 4.5.x=
*[http://www.zimbra.com/docs/ne/4.5.10/administration_guide/A_app-command-line.14.13.html#1173981 ZCS Administrator's Guide Network Edition 4.5 > Appendix A Command-Line Utilities > zmmboxsearch]


<font size="3" color="#000000" face="Arial"> The following example is to do a cross-mailbox search in the inbox folder of two different mailboxes on the specified server and put a copy of the message in to the specified directory.</font>


<font size="3" color="#000000" face=""Times New Roman""> '''  zmmboxsearch -q “in:inbox” -m user1@yourdomain.com,user2@yourdomain.com -d / var/tmp ''' </font>
{{Article Footer|ZCS 6.0|5/3/2006}}


[[Category:Command Line Interface]]
[[Category:Command Line Interface]]
[[Category:ZCS 7.0]]
[[Category:ZCS 6.0]]

Latest revision as of 16:04, 11 July 2015

CLI zmmboxsearch (Cross mailbox search)

   KB 1491        Last updated on 2015-07-11  




0.00
(0 votes)
Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 7.0 Article ZCS 7.0 ZCS 6.0 Article ZCS 6.0 ZCS 5.0 Article ZCS 5.0


For the most recent information on this CLI, including syntax and description, see ZCS Administrator's Guide Network Edition > Appendix A Command-Line Utilities.

ZCS 6.0.x

zmmboxsearch

The CLI command zmmboxsearch is used to search across mailboxes. You can search across mailboxes to find messages and attachments that match specific criteria and save copies of these messages to a directory.

Syntax

zmmboxsearch {-m <arg>} {- q <arg>} [-o <arg>] [-l <arg>] [-d <arg>] [options]

Description

Long Name Short Name Description
--dir -d <arg> Directory to write the messages to. If none is specified, then only the headers are fetched. Files names are generated in the form RESULTNUM_ACCOUNT-ID_ MAILITEMID.
--help -h Displays help information
--limit -l Sets the limit for the number of results returned. The default is 25.
--mbox -m <arg> Comma-separated list of mailboxes to search. UIDs or email-address or /SERVER/MAILBOXID or *.
--offset -o <arg> Specify where the hit list should start. The default is 0.
--query -q <arg> The query string for the search.
--server -s <arg> Mail server hostname. Default is the localhost.
--verbose -v Request that the status message print while the search is being executed

Examples

The following example is to do a cross-mailbox search in the inbox folder of two different mailboxes on the specified server and put a copy of the message in to the specified directory.

zmmboxsearch -m user1@yourdomain.com,user2@yourdomain.com -q “in:inbox” -d /var/tmp

Here is an example that includes results for the phrase "vacation rental" in the message body:

zmmboxsearch -m user1@yourdomain.com,user2@yourdomain.com -q “content:(\"vacation rental\")” -d /var/tmp

Here is "vacation rental" in the Inbox:

zmmboxsearch -m user1@yourdomain.com,user2@yourdomain.com -q “in:inbox content:(\"vacation rental\")” -d /var/tmp

"vacation rental" in the Inbox from Thom:

zmmboxsearch -m user1@yourdomain.com,user2@yourdomain.com -q “in:inbox from:Thom content:(\"vacation rental\")” -d /var/tmp

ZCS 5.0.x

ZCS 4.5.x


Verified Against: ZCS 6.0 Date Created: 5/3/2006
Article ID: https://wiki.zimbra.com/index.php?title=CLI_zmmboxsearch_(Cross_mailbox_search) Date Modified: 2015-07-11



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search