How to make subject lines appear in maillog

LOCAL_CONFIG
Klog syslog
HSubject: $>+CheckSubject

LOCAL_RULESETS
SCheckSubject
R$*     $: $(log Subject: $1 $) $1

Make sure that the blank spaces after R$8 is a tab and not 4 spaces.

Build the macro

    m4 sendmail.mc > sendmail.cf

Restart sendmail

/etc/init.d/sendmail restart

You should now start to see the subject as a separate line in the log. Use the unique id to find the subject line

sendmail[21030]: w182kQTv021030: Subject:test123

 

Leave a Reply

Your email address will not be published. Required fields are marked *