procmail
[Top] [All Lists]

Re: demiming, was Body check failing?

2017-10-31 07:18:29
On 2017-10-31 11:21, John Levine wrote:
In article <77E64DD8-C903-4F63-99BC-4A659F631FE2(_at_)kreme(_dot_)com> you 
write:
On Oct 30, 2017, at 12:03 AM, @lbutlr <kremels(_at_)kreme(_dot_)com> wrote:

I am now matching the subject against the UTF-8 string for each word.

how would I convert "=?UTF-8?B?IEdhcmFnZSBNb3Rpb24=?=" into decoded ascii using 
only pipe-able comand line tool?

Here's the usual way.

# put demimed headers into $HEADER
:0 Hi
HEADERS=| formail -fXsubject -Xfrom |perl -MEncode -ne 'print 
encode("UTF8",decode("MIME-Header",$_))'

If you prefer to do it in "pure procmail",
then create an "UTF-8" variant of:

https://rvtol.home.xs4all.nl/procmail/ -> b64_demo.rc
https://rvtol.home.xs4all.nl/procmail/inc/b64.inc
https://rvtol.home.xs4all.nl/procmail/inc/b64.inc.inc

-- Ruud
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)rwth-aachen(_dot_)de
https://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>