Generally, at least in the latest machines, attachments can be viewed directly with your mailer. The key-strokes in pine, elm and mutt for displaying a list of attachments is v. Move along the list and hit the Return key to display/view the attachment.
If that does not work, follow the instructions below.
The key to save an attachment in pine, elm and mutt is s Give the
name of the file you want to save your attachment, if you do not
like/want the default name.
Reading saved attachments
The first thing you need to know is how the attachment got saved. Some mailers convert it directly to a "regular" file that does not need any more processing. So, assuming that you have save your attachment in a file called att.txt do
file att.txtThat will tell you what type of file att.txt is. Then view it accordingly (e.g. xv or display for gif, jpeg, png files, xdvi for DVI files, gs for PostScript files, etc). If the file is MIME encoded follow the steps below.
Assuming your attachment is saved in att.txt, and the result of the file command tells you that it is a MIME encoded file, do the following:
mimencode -u -o att1 att.txtThat will decode your MIME file and write the output into a file called att1. Now you can follow the steps above, that is, use the file command on att1 to find the type of file, and use the appropriate program to view it.