Description ----------- This is a patch for sendmail v8.9.3 that adds extra logging to syslog to include: From: address specified in mail header Subject: of message Message-Id: of message Here is an example of what your logs will look like after the patch. valankar@mydomain.com sends mail to valankar@bogus.edu: Oct 20 21:49:22 mail sendmail[17188]: VAA17188: from=, size=1059, class=0, pri=31059, nrcpts=1, msgid=<20011020214921.A29534@mydomain.com>, efrom=Viraj Alankar , subject=Why are you reading my mail?, proto=ESMTP, relay=[1.2.3.4] Oct 20 21:49:22 mail sendmail[17190]: VAA17188: to=, efrom=Viraj Alankar , subject=Why are you reading my mail?, emsgid=<20011020214921.A29534@mydomain.com>, delay=00:00:00, xdelay=00:00:00, mailer=relay, relay=mail.mydomain.com. [5.6.7.8], stat=Sent (VAA16321 Message accepted for delivery) Here is an example of 'bouncing' a message. valankar@mydomain.com bounces a message to valankar@bogus.edu that was originally from ramjet@killme.net: Oct 20 21:45:48 mail sendmail[17170]: VAA17170: from=, size=7467, class=0, pri=37467, nrcpts=1, msgid=<200110210145.VAA29482@localhost.localdomain>, efrom="Ram Jet" , subject=You're fired, emsgid=, proto=ESMTP, relay=[1.2.3.4] Oct 20 21:45:48 mail sendmail[17172]: VAA17170: to=, efrom="Ram Jet" , subject=You're fired, emsgid=, delay=00:00:00, xdelay=00:00:00, mailer=relay, relay=mail.mydomain.com. [5.6.7.8], stat=Sent (VAA16204 Message accepted for delivery) Requirements ------------ This has been tested with the sendmail that comes with Redhat Linux 6.2 (v8.9.3). It should work on any UNIX however. Setup ----- Compiling from source --------------------- Copy logging.* to sendmail-8.9.3/src/ and run: patch < logging.patch Compile sendmail, and install. Make a BACKUP of your current running sendmail in case there are problems. Note, if you are compiling on RH 6.2, you may have to edit BuildTools/M4/header.m4 and change the line: define(`confLIBSEARCH', `db1 bind resolv 44bsd') to define(`confLIBSEARCH', `db bind resolv 44bsd') I had problems with it being linked with old DB libraries without making this change. Also be sure to get the sendmail SRPM and apply all of Redhat's patches. Using pre-built binaries ------------------------ You can also download compiled binaries for Redhat Linux 6.2 compiled on a 686 from here: http://www.cse.fau.edu/~valankar This binary has all of the Redhat 6.2 sendmail patches applied as well as the logging patch. To install: ldd src/obj.Linux.2.2.16-3smp.i686/sendmail and make sure all libraries are found. If not, you will have to recompile. cp /usr/sbin/sendmail /usr/sbin/sendmail.old /etc/rc.d/init.d/sendmail stop cat src/obj.Linux.2.2.16-3smp.i686/sendmail > usr/sbin/sendmail /etc/rc.d/init.d/sendmail start The 'cat' is to keep the old permissions. Bugs and Suggestions -------------------- Send them to valankar@bigfoot.com