Skip to main content

Posts

Showing posts from August, 2019

How to Enable logging of Email’s Subject Line in Postfix Maillog ?

By default Postfix MTA only capture ‘From’ and ‘To’ details in the log file (/var/log/maillog). There are some scenarios where we want that email’s subject should be capture in the maillog. This will very useful for email administrators when performing troubleshooting of problems related with email. There are simple steps to enable logging of the email subject in postfix maillog.

We are assuming that postfix is already up and running and will make below changes.
Step:1 Edit ‘/etc/postfix/main.cf’ file & uncomment below line:
#header_checks = regexp:/etc/postfix/header_checksStep:2 Append the below line in ‘/etc/postfix/header_checks’ [at the bottom]
/^Subject:/ WARNStep:3 Run postmap to apply the new configuration in /etc/postfix/header_checks
[root@server1 ~]# postmap /etc/postfix/header_checksStep:4 Restart or Reload the postfix server
[root@server1 ~]# systemctl restart postfix [root@server1 ~]# postfix reloadStep:5 Login to your Roundcube webmail and send an test with the subj…