Re: Create a rule for utf8 subject

udi M <[email protected]> Sun, 11 Oct 2015 12:03:16 +0300
Newsgroups gmane.mail.procmail
Organization tau
Message-ID <[email protected]>

On 06/10/15 14:22, Penguinfriend wrote:
> Hi
>
> I wonder if anybody have a solution for the following example
>
> :0
> * ^Subject:.*PGPKEY
> $DEFAULT
>
> if the Subject line is coded like this will never be a hit
>
> =?UTF-8?B?............=?=
>
> How do I handle this so I will get a hit in the relevant case
>


There are two type of codes marked by  ?q?   or  ?b?  (I don know the diff)
anyway, I do:


:0 w
* SUBJ ?? ?=\?(iso-8859-1|windows-1251|utf-8)\?\/..[^\?]*
{
     :0
     * MATCH ?? B\?\/[^\?]*
{ Bmsg=`echo $MATCH | mimencode -u` }


:0
     * MATCH ?? Q\?\/[^\?]*
{ Qmsg=`echo $MATCH | mimencode -u -q` }


--udi