Basically, Zimbra and Postfix have fundamental similarities. Zimbra uses Postfix as the main engine Mail Transport Agent (MTA). So in this article it is not much different from how to add an Email Subject in Zimbra which I have been written before. In this post, i will explain easy add email subject in postfix log.
By default Postfix only capture ‘from’ and ‘to’ details in the log file (/var/log/maillog).
Step #1 Open main.cf Postfix Configuration
First, with our favourit editor, open postfix configuration.
vim /etc/postfix/main.cf
Add this line parameter header_checks
.
header_checks = regexp:/etc/postfix/header_checks
The result, like this. Focus just in line header_checks
.
Step #2 Create file /etc/postfix/header_checks
vim /etc/postfix/header_checks
Add this line code.
/^Subject:/ WARN
And then, postmap.
postmap /etc/postfix/header_checks
Restart Service Postfix
Last step, restart postfix service.
systemctl restart postfix
postfix reload
Just it, a short article about add email subject in postfix log. I hope it is useful. Please feel free for comment.