Converting HTML mail via procmail

All the procmail recipes I found on a quick search failed to handle quoted-printable HTML encodings, regularly used everywhere. And those that had quoted-printable examples used tools no longer maintained - such as mimencode.

The solution is to use Perl directly:

* ^Content-Type: text/html;
* ^Content-Transfer-Encoding: *quoted-printable
| perl -pe 'use MIME::QuotedPrint; $_=MIME::QuotedPrint::decode($_);'
| lynx -dump -force_html -stdin
| formail -i "Content-Type: text/plain; charset=us-ascii"

No comments: