Sign up ×  My saved-messages and sent-mail "folders" (actually
Unix MBX files) are huge because of attachments, most of which
I've saved to disk anyway.  I want to keep the messages, but
replace the attachment w/ a text file saying "Attachment
removed: /full/path/to/attach.txt".  How do I do this?  I'm
using Alpine, but any tool that does this for Unix MBX is fine.
Alpine does let me delete attachments from emails, but I can't
replace them w/ a text file. Notes:    • I realize I can save
the message to a file and edit the file using emacs, but that's
kludgey and probably messes up "Content-Length" headers and
stuff.    • I also realize I can forward the message, with
headers, to myself after removing the attachment. Again,
kludgey.    • I don't think Alpine lets me add attachments to
stored mail (unless I want to send it somewhere [which messes up
headers]), so I can't delete the big attachment and add a
smaller one.    • I realize I could write a Perl script to do
this, but hoping for an existing well-tested