log file name into the reject message & dccm small patch

Vernon Schryver vjs@calcite.rhyolite.com
Fri Dec 20 16:40:33 UTC 2002


> From: Valentin Chopov <valentin@valcho.net>

> Its very difficult to find  the log message with the current info
> from the reject message (especially when you have 80000 rejected messages
>  daily ;) . This is a small patch which puts the path of the
> tmp log file. For example on my sendmail mailog I'll see something like:
>
> Dec 20 10:38:00 mailserver sendmail[35670]: gBKFbt05035670:
> to=<abuse@mydomain.com>, delay=00:00:03, pri=30367, stat=mail
> gBKFbt05035670 from ::ffff:209.236.59.118 rejected by MY-DCC DCC
> log/354/tmp.1RQi9T
>
> I just have to replace "tmp." with "msg." and I can see the rejected
> message log.
> ...

What happens when the "msg." name does not have the same random suffix
as the "tmp." name?  dcc_log_keep() tries to keep the same suffix,
but if other processes are using the log directory, it can be forced
to pick a new and different suffix.

It seems better to record the sendmail queue ID (e.g. "gBKFbt05035670"
in that example) in the DCC log file.  It seems that the default milter
settings include $i (at least in 8.12.7.Beta0), so dccm could snag
it.  The problem with that is it would change the format of dccm log
files.  Do you have suggestion for such a change that would not
inconvenience anyone?   If there is no innocuous place in the log file
to put the sendmail queue ID, would this change be worth changing
the log file version number?

What about recording the I-number of the log file in the syslog message?
It won't change when the log file is renamed.


Vernon Schryver    vjs@rhyolite.com



More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.