From: martin f. krafft Date: Fri, 29 Feb 2008 13:36:51 +0000 (+0100) Subject: gracefully handle local message without orig-to X-Git-Url: https://git.madduck.net/etc/mailfilter.git/commitdiff_plain/6b23ffe717416a4cf7ae4a11d7ae0a7cd66ef770?ds=sidebyside gracefully handle local message without orig-to --- 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" }