LuKreme: Thanks for your reply. There's much useful information there. I'll look into writing a PERL script from within BBEdit, as you suggest. I'm interested in removing only the gobbledygook text into which Mail renders attached or embedded graphics, not the (legible) content of the e-mail message itself. I've already looked over formail's man page, and will give that option a try. As for MIMEdefang and other MIME-aware tools, they look pretty formidable and beyond my needs (not to mention my comprehension).
Regards, shirasagi On Jan 4, 2011, at 5:24 PM, LuKreme wrote: > The trouble is, those MIME lines are BOUNDARIES, so they exist at the > beginning and end of each MIME part. Also, the message is marked as > multipart. If you simply delete the content of the mime part and the ending > boundary, you will effectively destroy the message from being properly read > by most programs. > > I don't have specific recommendations as the tools to do this sort of > manipulation on messages are 1) command-line tools or libraries 2) tricksy 3) > dangerous. > > I would start over with thinking about exactly what the problem is you're > trying to solve (personally, I don't want to keep emails without keeping all > their contents, but that's not to say that others might feel differently). > > Just as an example, if your actual need is that you want a mbox of just plain > text emails without HTML, attachments, or any 'extraneous' data, then I would > pipe the mbox through formail -s procmail and call a simple procmail recipe > that called the command-line web browser links (or lynx) with a -dump option. > I use to do this automatically for HTML email back 15 years ago or so. > > There is MIMEdefang, which is a tool designed to work with sendmail (or > sendmail replacements that support milters, like postfix) and also demime > which may or may not help. But as I said, these are low level tools designed > to be used by people who really REALLY know what they are doing and I don't > recommend them. And they are beyond the scope of this list. > > SHort answer: other than writing a perl script that you execute from within > BBEdit anything other than simply deleting the data lines is likely to screw > up the mbox file. Deleting the data lines should not alter the messages other > than to remove all encoded content. Be aware that some emails will ONLY be > encoded content, however. It is possible you will lose the entire body of the > message doing this, depending on how the messages were encoded. -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
