From 122f13badd406cf378fb4f57197d27ddebb4d15b Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Mon, 3 Mar 2008 13:38:09 +0100 Subject: [PATCH 1/1] allow early scripts to properly log --- procmail/defines | 2 +- procmail/get-msgid | 8 ++++---- procmail/logging | 9 +++++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/procmail/defines b/procmail/defines index 55508cb..1c55b63 100644 --- a/procmail/defines +++ b/procmail/defines @@ -150,7 +150,7 @@ INCLUDERC=$PMDIR/get-msgid { ORIGINAL_TO="$MATCH" } :0 E * ^Received: -{ LOG="NO ORIGINAL_TO: $MSGID" } +{ LOGLATER="NO ORIGINAL_TO: $MSGID" } :0 *$ ^X-Trained-As:$RE_EXTRACT_HEADER_VALUE diff --git a/procmail/get-msgid b/procmail/get-msgid index 50fbef4..61eca10 100644 --- a/procmail/get-msgid +++ b/procmail/get-msgid @@ -8,14 +8,14 @@ :0 * ^Resent-Message-Id:[ ]*\/[^ ]+ { - LOG="get-msgid: lacking message-id, using resent-message-id...$NL" + LOGLATER="get-msgid: lacking message-id, using resent-message-id...$NL" :0 fw |$FORMAIL -R Resent-Message-ID Message-ID } :0 E { - LOG="get-msgid: lacking message-id, generating one...$NL" + LOGLATER="get-msgid: lacking message-id, generating one...$NL" :0 fw |$FORMAIL -a Message-ID: } @@ -28,7 +28,7 @@ :0 * ! MSGID ?? ^<[^>]+>$ { - LOG="get-msgid: message-id '$MSGID' not enclosed in <>, fixing it...$NL" + LOGLATER="get-msgid: message-id '$MSGID' not enclosed in <>, fixing it...$NL" MSGID="<$MSGID>" } @@ -38,6 +38,6 @@ *$ !^Received: by $RE_MAILRELAYS \(postfix, from userid * MSGID ?? ^<\/[^>]+ { - LOG="get-msgid: missing message ID added by one of our mail relays$NL" + LOGLATER="get-msgid: missing message ID added by one of our mail relays$NL" MSGID="<${MATCH}.MSGID-ADDED>" } diff --git a/procmail/logging b/procmail/logging index a1e199a..d6fc083 100644 --- a/procmail/logging +++ b/procmail/logging @@ -12,8 +12,13 @@ MSGIDDIR=$PMVAR/msgid MASTERLOGFILE="$LOGFILE" LOGFILE="$THISLOGFILE" -LOG="============================================================================== -msgid: $MSGID +LOG="==============================================================================$NL" + +:0 +* LOGLATER ?? . +{ LOG="$LOGLATER" } + +LOG="msgid: $MSGID logfile: $THISLOGFILE_REL date: $DATE (@$OURDATE) from: $FROM -- 2.39.2