NOTE!! Using this patch on a public production mail server may violate users' privacy
because Subject: header
is certainly part of the message's PRIVATE CONTENT!
It cannot be considered as metadata like, say, Received headers can!

If you have GNU tools, the whole process (extract source, apply patch, compile) could go
like this:

The purpose of the added configuration option LogSubjectHeader should be self-explanatory.
It takes a boolean value (default is True).
If you want to turn off Subject logging, do not edit
your sendmail.cf directly, but add the following to the "source" M4
sendmail.mc.

define(`confLOG_SUBJECT_HEADER', `False')dnl

Then just rebuild the sendmail.cf and install it as appropriate.

NOTE: If the envelope has multiple recipients, one log entry similar to this will be emitted for each recipient:

The second feature provided by this tiny patch is extremely exotic and it is likely
that not many people will ever need it.
Hence Sendmail does not provide it by default. However, some larger sites
may have similar problems as mine did.

The problem is that certain multiplexing hardware devices and latency checking hosts behave very stupidly
and it is not always possible to do anything to fix them. They might go through the following sequence periodically:

To allow certain known crazy hosts to make these "null connections" without each of them getting logged,
you can define a class {NullConnOkay} and add desired fully qualified host names into it.
Hosts in that class do not cause log entries like the one above. I think the cleanest way
to define such a class is to use an external file in which you enumerate the hosts.
Add the LOCAL_CONFIG stuff after the MAILER entries in your sendmail.mc.