Valentin Chopov
valentin@valcho.net
Fri Dec 20 15:46:11 UTC 2002
Hi,
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.
I'm sure this can be done better but this is working or me ;)
Thanks,
Val
Here is the patch:
---cut---
*** dccm.c Fri Dec 20 09:23:56 2002
--- dccm.c.new Fri Dec 20 09:42:51 2002
***************
*** 2108,2114 ****
{
WORK *wp;
REPLY std_reply, *reply;
! # define REJ_REPLY_PAT "mail %s from %s rejected by %s DCC"
char rp_str[sizeof(REJ_REPLY_PAT)
+sizeof(wp->id)+sizeof(wp->clnt_str)
+sizeof(DCC_BRAND)+80];
--- 2108,2114 ----
{
WORK *wp;
REPLY std_reply, *reply;
! # define REJ_REPLY_PAT "mail %s from %s rejected by %s DCC %s"
char rp_str[sizeof(REJ_REPLY_PAT)
+sizeof(wp->id)+sizeof(wp->clnt_str)
+sizeof(DCC_BRAND)+80];
***************
*** 2188,2194 ****
} else {
snprintf(rp_str, sizeof(rp_str), REJ_REPLY_PAT,
wp->id, wp->clnt_str,
! wp->dcc_ctxt->srvr_brand);
parse_reply(reply, rp_str);
}
}
--- 2188,2194 ----
} else {
snprintf(rp_str, sizeof(rp_str), REJ_REPLY_PAT,
wp->id, wp->clnt_str,
! wp->dcc_ctxt->srvr_brand, wp->log_nm);
parse_reply(reply, rp_str);
}
}
---cut---
==
Valentin S. Chopov, CCNP
Sys/Net Admin
SEI Data Inc.
E-Mail: valentin@valcho.net
==
More information about the DCC
mailing list