From cfe663608f803381baba0f83e392fb6270f266b6 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Fri, 13 Mar 2009 07:47:48 +0100 Subject: [PATCH 1/1] properly mime-decode subject lines --- procmail/defines | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/procmail/defines b/procmail/defines index bdc3167..e10d302 100644 --- a/procmail/defines +++ b/procmail/defines @@ -136,14 +136,10 @@ INCLUDERC=$PMDIR/get-msgid { SUBJECT=$MATCH - # mimedecode.c: * Disclaimer: We only handle charset of iso-8859-1 :0 - * SUBJECT ?? =\?iso-8859-1\?[QBqb]\?.+\?= + * SUBJECT ?? =\?.+\?[QBqb]\?.+\?= { - DECODED="`echo Subject: $SUBJECT | mimedecode | iconv -f latin1 -t utf-8`" - :0 - *$ DECODED ?? ^Subject:$RE_EXTRACT_HEADER_VALUE - { SUBJECT=$MATCH } + SUBJECT="`PERL_UNICODE=S perl -MEncode=decode -e \"print decode(\\\"MIME-Header\\\", \\\"$SUBJECT\\\") . \\\"\n\\\";\"`" } } -- 2.39.5