From: martin f. krafft Date: Wed, 20 Feb 2008 15:41:46 +0000 (+0100) Subject: fix subject decoding X-Git-Url: https://git.madduck.net/etc/mailfilter.git/commitdiff_plain/78c929c35e679d297c2ca9435b2438c8925ba179?ds=sidebyside fix subject decoding --- diff --git a/procmail/defines b/procmail/defines index d0da2ef..2aae636 100644 --- a/procmail/defines +++ b/procmail/defines @@ -133,18 +133,14 @@ INCLUDERC=$PMDIR/get-msgid { SUBJECT=$MATCH + # mimedecode.c: * Disclaimer: We only handle charset of iso-8859-1 :0 - * SUBJECT ?? =\?(iso-8859-1|utf-8)\?\/..[^\?]* + * SUBJECT ?? ^=\?iso-8859-1\?[QB]\?.+\?=$ { + DECODED="`echo Subject: $SUBJECT | mimedecode | iconv -f latin1 -t utf-8`" :0 - * MATCH ?? B\?\/[^\?]* - { BBB=`echo $SUBJECT | mimencode -u` } - - :0 - * MATCH ?? Q\?\/[^\?]* - { QQQ=`echo $SUBJECT | mimencode -u -q` } - - SUBJECT="$QQQ$BBB" + *$ DECODED ?? ^Subject:$RE_EXTRACT_HEADER_VALUE + { SUBJECT=$MATCH } } }