Powered by Blogger.

Adding Subject and Attachment Information on the log Zimbra 8.5/8.6

There are some users asking about the email whether their email has been sent or not. For tracking email, i am usually using zmmsgtrace command that has been provided by Zimbra for tracking purpose. The command zmmsgtrace has been given enough information for tracking, but some users wanna more specific such as subject or attachment who has been sent.
For adding subject and attachment information on the log, i am adding header check for every email sending/receive. The following is what i do at my Zimbra 8.5/8.6
# Create file custom_header_check as user Zimbra
1.su - zimbra
2.vi /opt/zimbra/conf/custom_header_checks
Fill with the following line :
/^Subject:/ WARN Subject :
/filename=\"?(.*)\"?$/ WARN Document Attachment
# Modify zimbraMtaHeaderChecks for include custom_header_checks
1.zmprov ms `zmhostname` zimbraMtaHeaderChecks "pcre:/opt/zimbra/conf/postfix_header_checks, pcre:/opt/zimbra/conf/custom_header_checks"
2.zmprov mcf zimbraMtaBlockedExtensionWarnRecipient FALSE
# Reload Postfix Zimbra
1.postfix reload
The following is example subject and attachment information in the log Zimbra.
Jan 9 15:16:36 mail postfix/cleanup[12069]: 5664C63400E: warning: header Subject: Attachment Training from mail.example.com[10.10.10.2]; from=<ahmad@example.com> to=<example@gmail.com> proto=ESMTP helo=<mail.example.com>: Subject :
Jan 9 15:16:36 mail postfix/cleanup[12069]: 5664C63400E: warning: header Content-Disposition: attachment; filename="Training Mikrotik.pdf" from mail.example.com[10.10.10.2]; from=<ahmad@example.com> to=<example@gmail.com> proto=ESMTP helo=<mail.example.com>: Document Attachment
Good luck and hopefully useful 😀
Source :
    Blogger Comment
    Facebook Comment