Email server logs serve as the backbone of effective system administration. By default, Zimbra mail server logs do not include email SUBJECTs in the logs. Therefore, we have to do tuning so that email SUBJECT can be read properly in the log. In this short article we will discuss How to Add Subject in Zimbra Log.
A log provides a comprehensive record of all email activity. And also offers knowledge about the sending and receiving status of emails. Whether mail status sent, bounce, reject, discard or something else.
Here is some step to add Subject in Zimbra log.
Create Custom Header Check to Add Subject.
As user Zimbra, create file custom_header_check.
su - zimbra
vi /opt/zimbra/conf/custom_header_checks
Add with following command.
/^Subject:/ WARN
/^subject:/ WARN
/filename=\"?(.*)\"?$/ WARN
Check the contents of the file with the ‘cat
‘ command.
Put custom_header_checks into zimbraMtaHeaderChecks
zmprov ms `zmhostname` zimbraMtaHeaderChecks "pcre:/opt/zimbra/conf/postfix_header_checks, pcre:/opt/zimbra/conf/custom_header_checks"
zmprov mcf zimbraMtaBlockedExtensionWarnRecipient FALSE
Confirm with this command.
zmprov gs `zmhostname` zimbraMtaHeaderChecks
Reload Postfix
Last step, reload postfix for implementation change configuration.
postfix reload
Testing Sending Email
To see what change in zimbra log, we can test sending email. and look out zimbra log.
Dec 6 21:18:34 mail postfix/cleanup[1659873]: 7CCC242AE43: warning: header Subject: Test from mail-pl1-f172.google.com[209.85.214.172]; [email protected] [email protected] proto=ESMTP helo=
That is short article How to Add Subject in Zimbra Log. I hope it is useful. Please feel free for comment
credit: imanudin.net