Post by Jude DaShiellI wonder, can mutt be used to strip all images and toss them in the
trash and strip all image attachments and toss them in the trash then
make remaining text viewable in mutt? Some of us with this kind of
capability could save lots of disk space.
I had the same thought in a job where people kept sending me
large documents I didn't want. Or at least, I wanted text-only
versions of their content. So I wrote http://raf.org/textmail/
which lets you selectively replace non-text attachments with
text-only versions or just delete attachments. It can
dramatically reduce your mailbox size, either as email arrives
(with procmail) or it can be applied to an existing mbox file. It
can probably be used via mutt as a filter but I've always run it
via procmail.
I also had procmail filters that removed all the email signatures
and legal notices that end up accounting for 95% of most
work-related email conversations but that's something that needs
to be constantly tweaked according to the signatures you
encounter.
Here's the usage message for textmail. I haven't used it in a
while and it depends on lots of external programs to do the
translations. I hope they all still work. :-)
These days, I save the attachments I need and then manually
delete attachments from the message in the view attachments menu.
cheers,
raf
usage: textmail [options]
options:
-h - Print the help message then exit
-m - Print the manpage then exit
-w - Print the manpage in html format then exit
-r - Print the manpage in nroff format then exit
-M - Output in mailbox format (mboxrd)
-T - Output in raw mail format (for smtp)
-W - Don't replace MS Word attachments with text
-E - Don't replace MS Excel attachments with csv
-H - Don't replace HTML attachments with text
-R - Don't replace RTF attachments with text
-P - Don't replace PDF attachments with text
-U - Don't translate winmail.dat attachments
-L - Don't reduce appledouble attachments
-I - Don't delete image attachments
-A - Don't delete audio attachments
-V - Don't delete video attachments
-X - Don't delete MS Windows executable attachments
-B - Don't recode text that was base64-encoded
-S - Don't replace spaces in filenames with underscores
-Z - Do translate signed content (discards signatures)
-O - Delete all application/octet-stream attachments
-! - Delete all application/* attachments
-D hdrs - Delete headers (list of header prefixes and filenames)
-K types - Keep attachments (list of mimetypes and filenames)
-f - On translation error, keep translation, not original
-? - Print paths of helper applications then exit