Enable Subject Logging in Sendmail Maillog

10:39 PM

This article is not much documented in internet, but I have confirmed it works if we follow the below instructions.
To enable subject logging in maillog, open "sendmail.mc" in your favourite editor ( I prefer vi) and add following lines in it and save it. You may add it at the bottom of sendmail.mc file or somewhere before MAILER definitions (choice is yours).
dnl # Log Subjects in email logs
LOCAL_CONFIG
Klog syslog
HSubject: $>+CheckSubject
 
LOCAL_RULESETS
SCheckSubject
R$*     $: $(log Subject: $1 $) $1
The last line is very crucial. After R$* press tab key. Then after $: press space key.
After log there is a space key, after Subject: there is a space key after $1 there is a space key. After closing bracket there is a space key before $1.
Rebuild the sendmail configuration or restart sendmail.
You should be now able to find subject in sendmail logs:
Jul 18 02:57:25 iadjbvtlmail04p sendmail[7080]: p6I7nWsp007080: Subject:Your.application.for.Personal.Technology.Expert.at.Support.com

You Might Also Like

0 comments

Contact Form

Name

Email *

Message *

Translate

Wikipedia

Search results