--- lmtp2nntp.c 2001/09/12 13:04:39 1.56
+++ lmtp2nntp.c 2001/09/12 14:34:45 1.57
@@ -244,12 +244,12 @@
{
lmtp2nntp_t *ctx = (lmtp2nntp_t *)_ctx->vp;
- if ((ctx->msg != NULL) &&
- (ctx->msg->cpFid != NULL))
- sprintf(bufptr, "%s[%ld]: %s: ", ctx->progname, (long)getpid(), ctx->msg->cpFid);
+ if ((ctx->msg != NULL) && (ctx->msg->cpFid != NULL)) {
+ sprintf(bufptr, "%s: ", ctx->msg->cpFid);
+ *buflen = strlen(bufptr);
+ }
else
- sprintf(bufptr, "%s[%ld]: ", ctx->progname, (long)getpid());
- *buflen = strlen(bufptr);
+ *buflen = 0;
return L2_OK;
}
@@ -591,7 +591,7 @@
fprintf(stderr, "%s:Error: logging failed to create prefix channel\n", ctx->progname);
exit(ERR_EXECUTION);
}
- if (l2_channel_configure(chPrefix, "timefmt,timezone", "%b %d %H:%M:%S ", "local") != L2_OK) {
+ if (l2_channel_configure(chPrefix, "prefix,timezone", "%b %d %H:%M:%S <%L> lmtp2nntp[%P]: ", "local") != L2_OK) {
fprintf(stderr, "%s:Error: logging failed to configure prefix channel\n", ctx->progname);
exit(ERR_EXECUTION);
}
@@ -1201,12 +1201,14 @@
* RFC1893 3.5 Network and Routing Status X.7.1 Delivery not authorized, message refused
*/
log0(ctx, TRACE, "checking if sender is allowed");
- if ((ctx->option_mailfrom != NULL) &&
- (str_parse(ctx->msg->mail_from, ctx->option_mailfrom) <= 0)) {
- res.statuscode = "550";
- res.dsncode = "5.7.1";
- res.statusmsg = "Delivery not authorized, message refused.";
- CU(LMTP_OK);
+ if (ctx->option_mailfrom != NULL) {
+ log2(ctx, TRACE, "\"%s\" matching against \"%s\"", ctx->msg->mail_from, ctx->option_mailfrom);
+ if (str_parse(ctx->msg->mail_from, ctx->option_mailfrom) <= 0) {
+ res.statuscode = "550";
+ res.dsncode = "5.7.1";
+ res.statusmsg = "Delivery not authorized, message refused.";
+ CU(LMTP_OK);
+ }
}
/* RFC0821 4.2.1. REPLY CODES BY FUNCTION GROUPS 250 Requested mail action okay, completed
|