Re: MIME headers in Procmail

"David W. Tamkin" <[email protected]>
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
John Levine wrote:

> I could do something like this:
>
> :0 c
> | formail -xsubject |perl -Mencode -ne 'print encode("UTF8",decode("MIME-Header",$_))'>  /tmp/junk$$
>
> SUBJ=`cat /tmp/junk$$`
>
> but, uh, bletch.

Then wouldn't the foillowing do the job?  (Sorry, not sure how my mailer 
will wrap this, so I have to break the line in a way to get sane results.)

:0
SUBJ=| formail -xsubject |perl -Mencode -ne \
  'print encode("UTF8",decode("MIME-Header",$_))'

> and then do matches like
>
> * SUBJ ?? pattern

as you said?

At least you wouldn't have that nasty temp file.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.