From: martin f. krafft Date: Tue, 30 Mar 2010 06:06:37 +0000 (+0200) Subject: log encoded subjects X-Git-Url: https://git.madduck.net/etc/mailfilter.git/commitdiff_plain/7304c1c5451f92503e7fc20cc034d38821e22eb6 log encoded subjects --- 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';