I spent far too long today figuring out how to convert text/html to text/plain, whether the top level content type is text/html, multipart/alternative, multipart/related, or multipart/mixed. My specific application was wanting to offer a daily digest email of my blog entries, each one of which is generated in HTML format. Both Yahoo Groups and Mailman can only digest plaintext messages. My solution uses procmail, with munpack breaking apart the message and then Lynx replacing URLs with placeholders “[1]” and adding a references section at the bottom. The existing alternative, demime, loses too much information in the conversion process because it strips away hrefs. By contrast, here’s a sample downconverted message using my procmail script:
My message.
–<
Posted by Dan Kohn to [1]Dan Kohn's Blog at 6/16/2002 7:29:23 PM
Powered by [2]Blogger ProReferences
It’s amazing how much time one can spend on a little .procmailrc. But, through the magic of open source and Google, others can hopefully find this and take advantage of my wasted afternoon.
Spiro | 08-Aug-03 at 11:48 pm | Permalink
Hi,
1. where to find munpack for linux for download?
thank you,
Spiro