Zimbra Tips : How To Add Subject Information on Message Trace

Posted by

Update 30 May 2022

Add utf-8 decode support. The guidance refer to this link: Decode Subject Email MIME Header RFC 2047

The tracing tools on Zimbra only display Message-ID, sender, and recipient. Many of our client or even me 🙂 need to know what the subject from an email that has been sending. A few days ago, my boss found the script that can display subject on zmmsgtrace.

The original script has been modified to display the subject. You can find modification script from here : https://github.com/imanudin11/script/blob/master/zmmsgtrace

Install dependencies

Ubuntu

apt-get install libencode-hanextra-perl -y

CentOS

yum install perl-Encode-HanExtra -y

To display the subject, you should enable subject information in the log as mentioned in this guidance : adding-subject-and-attachment-information-on-the-log-zimbra. Then, you can replace default zmmsgtrace. Perform the following command as root

cp /opt/zimbra/libexec/zmmsgtrace /opt/zimbra/libexec/backup.zmmsgtrace
curl -k https://raw.githubusercontent.com/imanudin11/script/master/zmmsgtrace > /opt/zimbra/libexec/zmmsgtrace

The following is an example on my server

Message ID '2045709166.99.1541433231183.JavaMail.zimbra@imanudin.net'
Subject 'Testing Subject on zmmsgtrace'
admin@imanudin.net -->
        admin@imanudin.net
  Recipient admin@imanudin.net
  Nov  5 15:53:51 - myzimbra.imanudin.net (10.148.0.3) --> 127.0.0.1:10026 (127.0.0.1:10026) status sent
  Nov  5 15:53:51 - myzimbra --> myzimbra.imanudin.net:7025 (10.148.0.3:7025) status sent

Good luck and hopefully useful 🙂

Source : https://github.com/imanudin11/script

15 comments

  1. I’m having a login problem, please help me
    warning: hostname mail.doamin does not resolve to address xx.xx.xx.xx
    Dec 9 19:52:15 mail postfix/smtpd[122362]: connect from unknown[1xx.xx.xx.xx]

  2. Use of uninitialized value in concatenation (.) or string at ./zmmsgtrace line 605, line 525709.

    Zimbra 8.8.12

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.