CentOS 8.x postfix log email Subject in maillog

From Notes_Wiki
Revision as of 03:02, 30 March 2022 by Saurabh (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Home > CentOS > CentOS 8.x > CentOS 8.x email servers > CentOS 8.x postfix > CentOS 8.x postfix log email Subject in maillog

To log email subjects in maillog (Very useful during troubleshooting) use:

  1. Edit /etc/postfix/main.cf and uncomment below line:
    header_checks = regexp:/etc/postfix/header_checks
  2. Edit /etc/postfix/header_checks and append
    /^Subject:/ WARN
  3. Run postmap and restart postfix
    postmap /etc/postfix/header_checks
    systemctl restart postfix
  4. Look at /var/log/maillog for subject in the logs

Refer:



Home > CentOS > CentOS 8.x > CentOS 8.x email servers > CentOS 8.x postfix > CentOS 8.x postfix log email Subject in maillog