procmail
[Top] [All Lists]

Re: About HTML email recipe in pm-tips

2002-05-12 10:25:02
On Sat, May 11, 2002 at 09:32:00PM +0200, Marco Fioretti wrote:
Hello,

I'd like to convert the body of the HTML messages which I receive to
plain text. I have found a recipe for this in Jari Aalto's pm tips,
(Chapter 12), but I also read in several places that several of these
recipes are badly formatted. Do you know if it works, or have
alternative working recipes to do it? I am not trying it myself yet
because must absolutely install other software first so another job
finishes by monday, but will need it right after, that's why I am 
asking here now.

I was given this recipe by a friend who was given it by some one else.
It works very well and have had no problems with it so far


# Filter out evil html, and leave a message that it is filtered.
# I am forever grateful to Bart Schaefer for this one.
:0
* ^Content-Type: text/html
{
        :0bfW
        | (echo "[html stripped]"; lynx -dump -force_html /dev/fd/0)

        :0ahfw
        | formail -i"Content-Type: text/plain"
}

I hope this helps, one day I have to find the time to rtfm on procmail
understand and be able to write my own .procmailrc files rather than beg
borrow from friends and collegues. :-)

Peace Jim
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail