CentOS 8.x postfix log email Subject in maillog
From Notes_Wiki
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:
- Edit /etc/postfix/main.cf and uncomment below line:
- header_checks = regexp:/etc/postfix/header_checks
- Edit /etc/postfix/header_checks and append
- /^Subject:/ WARN
- Run postmap and restart postfix
- postmap /etc/postfix/header_checks
- systemctl restart postfix
- 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