Adding Subject Lines to Postfix Logs

After trawling logs from users who give you a time and a recipient when they deal with this recipient quiet a lot is a pain…so i asked for the subject of the email only to notice its not there (new to this postfix malarkey) – so quick google and this enables the subject in the logs

Firstly, edit the main.cf file and enable or add the following line:

header_checks = regexp:/etc/postfix/header_checks

Next, create the /etc/postfix/header_checks file if its not already there and add the following line:

/^subject:/ INFO

Reload/restart Postfix and send a test message.

Postfix reload

Then

Postfix stop && postfix start

All done.

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.