Home > bash > Extract e-mail attachments

Extract e-mail attachments

Problem

You have a file that contains not only the e-mail text but the attachments too in encoded form. How to extract those attachments easily?

Solution

One way is to use mpack:

$ sudo apt-get install mpack
$ munpack email.eml

Or, you can also use uudeview:

$ sudo apt-get install uudeview
$ uudeview email.eml
Categories: bash Tags: , , , ,
  1. Paulus
    April 29, 2011 at 04:22

    Thanks, that was very useful and worked like a charm.

  1. No trackbacks yet.

Leave a comment