Difference between revisions of "CLI zmmsgtrace"

(High Fidelity Document Preview For 8.5+)
 
(11 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==<font size="4" color="#00007f" face="Arial"> ''' zmmsgtrace ''' </font>==
+
{{BC|Certified}}
 +
__FORCETOC__
 +
<div class="col-md-12 ibox-content">
 +
=CLI zmmsgtrace=
 +
{{KB|{{ZC}}|{{ZCS 8.0}}|{{ZCS 7.0}}|}}
 +
{{WIP}}
  
<font size="3" color="#000000" face="Arial"> This command is used to trace an email message that was sent or received within the last 30 days.</font>
+
==zmmsgtrace==
 +
This command is used to trace an email that was sent or received. So if you want to track a particular user's emails for the day, you can use this. It can filter emails by the sender's ID, recipient's ID, time, source host and/or destination host.
  
===<font size="3" color="#00007f" face="Arial"> ''' Syntax ''' </font>===
+
=ZCS 8 and 7=
  
<font size="3" color="#000000" face=""Times New Roman""> '''  zmmsgtrace -i|-s|-r|-F <message_id>  ''' </font>
+
zmmsgtrace is available for versions 7.1.1 and above, and all releases of 8.x.
  
===<font size="3" color="#00007f" face="Arial"> ''' Description ''' </font>===
+
===Syntax===
 +
zmmsgtrace [options] [<mail-syslog-file>...]
  
{| border="1" cellpadding="8"
+
===Description===
|+
+
{|style="width:100%" border="1" cellpadding="5" cellspacing="0"
 +
! align="left" bgcolor="tan" |Long Name
 +
! align="left" bgcolor="tan" |Short Name
 +
! align="left" bgcolor="tan"|Description
 
|-
 
|-
| valign="middle" |
+
|style="background=white" |<nowiki>--help</nowiki>
<font size="3" color="#00007f" face="Arial"> ''' Long Name ''' </font>
+
|<nowiki></nowiki>
| valign="middle" |
+
|Shows the help for the usage options for this tool.
<font size="3" color="#00007f" face="Arial"> ''' Short Name''' </font>
 
| valign="middle" |
 
<font size="3" color="#00007f" face="Arial"> ''' Description ''' </font>
 
 
|-
 
|-
| valign="top" |
+
|style="background=white" |<nowiki>--id</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> '''  --help  ''' </font>
+
|<nowiki>-i</nowiki>
| valign="top" |
+
|Message ID. Case sensitive regex.
<font size="3" color="#000000" face=""Times New Roman""> '''  -h  ''' </font>
 
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> Shows the help for the usage options for this tool.</font>
 
 
|-
 
|-
| valign="top" |
+
|style="background=white" |<nowiki>--sender</nowiki>
| valign="top" |
+
|<nowiki>-s</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> '''  -i  ''' </font>
+
|Sender address. Case insensitive regex.
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> Message ID. </font>
 
 
|-
 
|-
| valign="top" |
+
|style="background=white" |<nowiki>--recipient</nowiki>
| valign="top" |
+
|<nowiki>-r</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> '''  -s  ''' </font>
+
|Recipient address. Case insensitive regex.
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> Sender address. </font>
 
 
|-
 
|-
| valign="top" |
+
|style="background=white" |<nowiki>--srchost</nowiki>
| valign="top" |
+
|<nowiki>-F</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' -r ''' </font>
+
|Source host, using hostname or IP. Case insensitive regex.
| valign="top" |
 
<font size="3" color="#000000" face="Arial"> Recipient address. </font>
 
 
|-
 
|-
| valign="top" |
+
|style="background=white" |<nowiki>--desthost</nowiki>
| valign="top" |
+
|<nowiki>-D</nowiki>
<font size="3" color="#000000" face=""Times New Roman""> ''' -F ''' </font>
+
|Destination host, using hostname or IP. Case insensitive regex.
| valign="top" |
+
|-
<font size="3" color="#000000" face="Arial"> From Times in YYYYMMDD (hhmmss) format.</font>
+
|style="background=white" |<nowiki>--time</nowiki>
 +
|<nowiki>-t</nowiki>
 +
|Start, end times in YYYYMM[DD[HH[MM[SS]]]] format
 +
|-
 +
|style="background=white" |<nowiki>--year</nowiki>
 +
|<nowiki></nowiki>
 +
|File year if no YYYY in file
 +
|-
 +
|style="background=white" |<nowiki>--nosort</nowiki>
 +
|<nowiki></nowiki>
 +
|Do not sort @ARGV files by mtime
 +
|-
 +
|style="background=white" |<nowiki>--debug</nowiki>
 +
|<nowiki></nowiki>
 +
|Verbose output useful for debugging
 +
|-
 +
|style="background=white" |<nowiki>--man</nowiki>
 +
|<nowiki></nowiki>
 +
|Display the entire man page. Contains useful examples.
 +
|}
 +
 
 +
===Examples===
 +
 
 +
'''If you get command not found, then it's because zmmsgtrace is in /opt/zimbra/libexec/ and not in /opt/zimbra/bin . Just run the following as the zimbra user to following the examples below instead [https://bugzilla.zimbra.com/show_bug.cgi?id=99042 RFE 99042]:
 +
 
 +
~/libexec/zmmsgtrace
 +
Show a trace of all messages in '/var/log/zimbra.log':
 +
 
 +
$ zmmsgtrace
 +
 
 +
Show a trace of all messages in '/var/log/zimbra.log' by sender matching the word 'phil':
 +
 
 +
$ zmmsgtrace -s phil
 +
 
 +
Show a trace of messages sent by 'phil.pearl' between '20130917' and '20130921' in '/var/log/zimbra.log.1.gz' and '/var/log/zimbra.log':
 +
 
 +
# note: a '.' (period) in a regex matches any character
 +
$ cd /var/log
 +
$ zmmsgtrace zimbra.log.1.gz zimbra.log \
 +
            -sender 'phil\.pearl' -srchost localhost -time 20130917,20130921
 +
 
 +
Find any email sent by an email address starting with 'p' to anyone at 'example.com' in all files matching /var/log/zimbra*:
 +
 
 +
# note: this regex can match more than desired!
 +
$ zmmsgtrace -s '^p' -r '@example.com' /var/log/zimbra*
 +
 
 +
# this regex is more specific - recipient ending in "@example.com"
 +
$ zmmsgtrace -s '^p' -r '@example\.com$' /var/log/zimbra*
 +
 
 +
=ZCS 6.0=
 +
*6.0 does not have the CLI zmmsgtrace
 +
 
 +
 
 +
=ZCS 5.0=
 +
 
 +
===Syntax===
 +
zmmsgtrace {-i|-s|-r|-F} <message_id>
 +
 
 +
===Description===
 +
{|style="width:100%" border="1" cellpadding="5" cellspacing="0"
 +
! align="left" bgcolor="tan" |Long Name
 +
! align="left" bgcolor="tan" |Short Name
 +
! align="left" bgcolor="tan"|Description
 +
|-
 +
|style="background=white" |<nowiki>--help</nowiki>
 +
|<nowiki>-h</nowiki>
 +
|Shows the help for the usage options for this tool.
 +
|-
 +
|style="background=white" |<nowiki></nowiki>
 +
|<nowiki>-i</nowiki>
 +
|Message ID.
 +
|-
 +
|style="background=white" |<nowiki></nowiki>
 +
|<nowiki>-s</nowiki>
 +
|Sender address.
 +
|-
 +
|style="background=white" |<nowiki></nowiki>
 +
|<nowiki>-r</nowiki>
 +
|Recipient address.
 +
|-
 +
|style="background=white" |<nowiki></nowiki>
 +
|<nowiki>-F</nowiki>
 +
|From Times in YYYYMMDD (hhmmss) format.
 +
|-
 +
|style="background=white" |<nowiki></nowiki>
 +
|<nowiki>-D</nowiki>
 +
|dest_ip/host
 +
|-
 +
|style="background=white" |<nowiki></nowiki>
 +
|<nowiki>-t</nowiki>
 +
|start, end times in YYYYMMDD (hhmmss) format
 
|}
 
|}
 +
 +
 +
=ZCS 4.5=
 +
*[http://www.zimbra.com/docs/ne/4.5.10/administration_guide/A_app-command-line.14.21.html#1114432 ZCS Administrator's Guide Network Edition > Appendix A Command-Line Utilities > zmmsgtrace]
 +
 +
=Related Articles=
 +
*[[Finding messages]]
 +
 +
 +
{{Article Footer|ZCS 6.0, 5.0, 4.5|5/3/2006}}
  
 
[[Category:Command Line Interface]]
 
[[Category:Command Line Interface]]
 +
[[Category:ZCS 6.0]]

Latest revision as of 16:08, 11 July 2015

CLI zmmsgtrace

   KB 1496        Last updated on 2015-07-11  




0.00
(0 votes)


zmmsgtrace

This command is used to trace an email that was sent or received. So if you want to track a particular user's emails for the day, you can use this. It can filter emails by the sender's ID, recipient's ID, time, source host and/or destination host.

ZCS 8 and 7

zmmsgtrace is available for versions 7.1.1 and above, and all releases of 8.x.

Syntax

zmmsgtrace [options] [<mail-syslog-file>...]

Description

Long Name Short Name Description
--help Shows the help for the usage options for this tool.
--id -i Message ID. Case sensitive regex.
--sender -s Sender address. Case insensitive regex.
--recipient -r Recipient address. Case insensitive regex.
--srchost -F Source host, using hostname or IP. Case insensitive regex.
--desthost -D Destination host, using hostname or IP. Case insensitive regex.
--time -t Start, end times in YYYYMM[DD[HH[MM[SS]]]] format
--year File year if no YYYY in file
--nosort Do not sort @ARGV files by mtime
--debug Verbose output useful for debugging
--man Display the entire man page. Contains useful examples.

Examples

If you get command not found, then it's because zmmsgtrace is in /opt/zimbra/libexec/ and not in /opt/zimbra/bin . Just run the following as the zimbra user to following the examples below instead RFE 99042:

~/libexec/zmmsgtrace

Show a trace of all messages in '/var/log/zimbra.log':

$ zmmsgtrace

Show a trace of all messages in '/var/log/zimbra.log' by sender matching the word 'phil':

$ zmmsgtrace -s phil

Show a trace of messages sent by 'phil.pearl' between '20130917' and '20130921' in '/var/log/zimbra.log.1.gz' and '/var/log/zimbra.log':

# note: a '.' (period) in a regex matches any character
$ cd /var/log
$ zmmsgtrace zimbra.log.1.gz zimbra.log \
            -sender 'phil\.pearl' -srchost localhost -time 20130917,20130921

Find any email sent by an email address starting with 'p' to anyone at 'example.com' in all files matching /var/log/zimbra*:

# note: this regex can match more than desired!
$ zmmsgtrace -s '^p' -r '@example.com' /var/log/zimbra*
# this regex is more specific - recipient ending in "@example.com"
$ zmmsgtrace -s '^p' -r '@example\.com$' /var/log/zimbra*

ZCS 6.0

  • 6.0 does not have the CLI zmmsgtrace


ZCS 5.0

Syntax

zmmsgtrace {-i|-s|-r|-F} <message_id>

Description

Long Name Short Name Description
--help -h Shows the help for the usage options for this tool.
-i Message ID.
-s Sender address.
-r Recipient address.
-F From Times in YYYYMMDD (hhmmss) format.
-D dest_ip/host
-t start, end times in YYYYMMDD (hhmmss) format


ZCS 4.5

Related Articles


Verified Against: ZCS 6.0, 5.0, 4.5 Date Created: 5/3/2006
Article ID: https://wiki.zimbra.com/index.php?title=CLI_zmmsgtrace 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