From 6b23ffe717416a4cf7ae4a11d7ae0a7cd66ef770 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 29 Feb 2008 14:36:51 +0100 Subject: [PATCH] gracefully handle local message without orig-to --- procmail/defines | 1 + procmail/normalise | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/procmail/defines b/procmail/defines index 2aae636..754ba49 100644 --- a/procmail/defines +++ b/procmail/defines @@ -148,6 +148,7 @@ INCLUDERC=$PMDIR/get-msgid *$ ^X-Original-To:$RE_EXTRACT_HEADER_VALUE { ORIGINAL_TO="$MATCH" } :0 E +* ^Received: { LOG="NO ORIGINAL_TO: $MSGID" } :0 diff --git a/procmail/normalise b/procmail/normalise index b205694..bd8d0a7 100644 --- a/procmail/normalise +++ b/procmail/normalise @@ -1,5 +1,6 @@ -# add hostname if missing +# add hostname if missing, but only if ORIGINAL_TO is not empty :0 +* ORIGINAL_TO ?? . * ! ORIGINAL_TO ?? @ { ORIGINAL_TO="$ORIGINAL_TO@$HOSTNAME" } -- 2.39.5