From 7304c1c5451f92503e7fc20cc034d38821e22eb6 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Tue, 30 Mar 2010 08:06:37 +0200 Subject: [PATCH] log encoded subjects --- procmail/defines | 3 ++- procmail/logging | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/procmail/defines b/procmail/defines index 07482cd..bb07680 100644 --- a/procmail/defines +++ b/procmail/defines @@ -158,12 +158,13 @@ INCLUDERC=$PMDIR/get-msgid :0 *$ ^Subject:$RE_EXTRACT_HEADER_VALUE { - SUBJECT=$MATCH + SUBJECT="$MATCH" :0 * SUBJECT ?? =\?.+\?[QBqb]\?.+\?= { SUBJECT="`PERL_UNICODE=S perl -MEncode=decode -e \"print decode(\\\"MIME-Header\\\", \\\"$SUBJECT\\\") . \\\"\n\\\";\"`" + SUBJECT_ENCODED="$MATCH" } } diff --git a/procmail/logging b/procmail/logging index 19cbc4d..ac4b8dc 100644 --- a/procmail/logging +++ b/procmail/logging @@ -43,6 +43,10 @@ from: $FROMEMAIL ($FROM) original-to: $ORIGINAL_TO subject: $SUBJECT$NL" +:0 +* SUBJECT_ENCODED ?? . +{ LOG="subject-enc: $SUBJECT_ENCODED$NL" } + TRAP="DESTFILE=\"\${LASTFOLDER#$BASE/}\"; /usr/bin/lockfile -4 -r50 -l180 $PMVAR/lock; trap \"echo >> '$THISLOGFILE'; -- 2.39.5