Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am looking for a command-line tool for Unix (ideally, available in a Debian / Ubuntu package) for extracting all MIME parts from a multipart email message (or the body from a singlepart with an interesting content-type, for that matter).

I have been using the mimeexplode tool which ships with the Perl MIME::Tools package, but it's not really production quality (the script is included as an example only, and has issues with what it regards as "evil" character sets) and I could certainly roll my own script based on that, but if this particular wheel has already been innovated, perhaps I shouldn't.

share|improve this question
    
Via another question I came across pldaniels.com/ripmime which looks very nice, but it's not available as an Ubuntu package as far as I can tell. –  tripleee Jun 11 '12 at 5:52
add comment

3 Answers 3

The mu project seems to include a mu-extract command that looks as if it might do what you want. And it appears to be available as an Ubuntu package already.

NB: I haven't actually used this tool myself.

share|improve this answer
    
sudo apt-get install maildir-utils && mu extract -a <file> –  Richard Hansen Sep 20 '13 at 20:35
add comment

munpack from mpack worked for me

Ubuntu:

sudo apt-get install mpack
munpack -f mime-attachments-file
share|improve this answer
add comment
  • mpack tools, and munpack
  • GNU base64 decoder
  • mimedecode
  • mha-decode
  • UUDeview
  • OpenSSL

You even didn't tried to find answer

share|improve this answer
1  
-1 I am familiar with all of these except mha-decode and mimedecode, and at least none of the others accept an email message as input, and produces its attachments as output. I will take a look at mha-decode and mimedecode, still. –  tripleee Mar 29 '12 at 17:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.