Carlos wrote regarding '[SLE] Removing attachements from stored mails' on Thu, Oct 14 at 07:56:
Pine has a nice feature (a bit hidden) that allows removing an attachement from any loaclly stored email in a mbox folder, leaving a text like this:
| [ Part 2: "Deleted Attachment" ] | | [ The following attachments were DELETED when this message was saved: ] | [ A Application/X-GUNZIP segment of about 1,422,562 bytes, ]
However, the name of the attachement is lost. I once wrote a little app to delete the attachement (I only got to beta status), but I lost it time ago, or at least i can not find it. I'd have to redo it, and it could only remove, not save the file.
I wonder if such a thing does exist? Or if some other mail program can do the trick? Perhaps formail, but no idea how (yes, I have read the man).
Like Patrick "almost" said, you can just hit "v" to view the components of a file, and then you can use the other message manipulation things to manipulate the attachments. For example, "d" will delete a message part (which could be an attachment), "s" wil save, "t" will tag parts so you can use ";" to do something to several attachments. Etc.
Even a library for programmers would help a bit.
Perl has some pretty nice MIME email handling components. The Email::MIME and Email::MIME::Attachment::Stripper modules are particularly relevent. :) --Danny