Why do you need to *replace* the message with its filtered version?

At  5:18 PM EST on March 21 Mike Schiraldi sent off:
> I don't know. It would be nice to press the key bound to <filter> and type,
> like, 
> perl -pe 's/<.*?>//g'
> to remove all HTML tags from a message.

It's practically a necessity before replying.  Here's something from my
.muttrc that saves me a lot of time:

# Despite the name, stripmime.pl is really for deHTMLization.
macro index "H" "|/home/reid/bin/stripmime.pl >> /var/spool/mail/reid"
 
i.e. it makes a copy that goes in my inbox, and ends up threaded right below
the original.  If you wanted (I don't) you could add automatic deletion of the
original.

The only problem is that it goes to my inbox even if the original is in a
different folder.  Is there a trick to fix that?  I'm joining the thread late,
so is that the real problem?  In any case it would be useful for mutt to be
able to write the current folder into an environment variable or file.

It's not a big deal for me because practically all of my nonspam HTML mail is
supposed to be in my inbox.

(I know I shouldn't be saving read mail in /var, but I'm lazy.)

> Or 
> tr A-Za-z N-ZA-Mn-za-m
> to rot13 a message. Of course, that'd mess up the headers, but you could
> stash it in a script that took care of them:

# From Rich Lafferty [EMAIL PROTECTED]
macro pager \er "|tr A-Za-z N-ZA-Mn-za-m | less\n" "Derot-13."

Works right in the pager!  Incredibly convienient, and don't you know
that saving decrypted messages to disk is a security risk?

> You could even write a script to remove people's S/MIME signatures when they
> sign messages they post to the mutt list.

Sounds like a job for procmail.  If want to see the sigs first and then remove
them, then pipe them through an editing script.  You could even run the whole
folder through the filter as a cron job.

-- 
I went to a bookstore and asked the saleswoman, "where's the self-help
section?"  She said if she told me, it would defeat the purpose.
  - Jack Handey
Robert I. Reid <[EMAIL PROTECTED]>     http://astro.utoronto.ca/~reid/
PGP Key: http://astro.utoronto.ca/~reid/pgp.html

Reply via email to