Extract an email attached files from linux command line

To extract all attached object that may exist in an e-mail file (e.g., emailName.eml) an application called munpack can be used.

To install this application (I’ve used an Ubuntu/Debian environment)

$ sudo apt-get update
$ sudo apt-get install mpack

The usage is very easy:

$ munpack -f mime-attachments-file