3/17 Hi, I'm looking for a mail filter that strips everything except the
flat ASCII text. All that mime type thing, HTML tags, jpg attachments,
etc, are all not worth having. I want to pipe a piece of mail through
it, so it should know the mail header as opposed to just get rid of
everything in between '<' and '>'. Thanks!
\-if you are tall enough, mailagent. --psb
\_ awk is your friend
\_ Would sed be actually easier for this case, or no?
Something like 's/<.*>//g'? (not exactly correct, but close)
\_ no. tags can span multiple lines.
\_ I pipe everything through a perl script, but not for the same
reason you do. You could easily write something that did
everything you want and more but you'd probably end up with your
own version of something that already exists anyway. I've never
looked at mailagent as suggested by psb. procmail and perl do it
for me for now. I read and reply with mh if it matters to you.
\_ That's exactly my point. I can spend the time writing a
customized filter or searching for one already written
by someone else. Ugh... It's looking more like I'll need
to write one myself. HTML mail is just annoying and evil.
But I have a feeling that the days of 100% pure flat ASCII
email are gone. -too old to change
\-mailagent has a perl escape and does some of the harder
parsing fo ryou. --psb
\_ I figured it was something like that. I just pipe all the
html-ized crap through lynx and if lynx can't deal with it,
then I just skip it and go on. Got a URL for mailagent?
\_ Ok, found it. The docs say it stops at the first match
which will break some of my filtering. Does mailagent
do anything that procmail doesn't? |