10.2  RECEIVING FILES


If somebody sends you a uuencoded file through the mail, you'll have to 
go through a couple of steps to get it into a form you can actually use.  
If you are using the simple mail program, go into mail and type 
 
     w # file.name
 
where # is the number of the message you want to transfer and file.name 
is what you want to call the resulting file.  In pine, call up the 
message and hit your O key and then E.  You'll then be asked for a file 
name. In elm, call up the message and hit your S key.  You'll get 
something that looks like this: 
 
     =file.request
 
Type a new file name and hit enter (if you hit enter without typing a 
file name, the message will be saved to another mail folder, not your 
home directory). 

In all three cases, exit the mail program to return to your host system's 
command line. Because the file has been encoded for mail delivery, you 
now have to run a decoder.  At the command line, type 
 
     uudecode file.name
 
where file.name is the file you created while in mail. Uudecode will 
create a new, uncompressed binary file.  In some cases, you may have to 
run it through some other programs (for example, if it is in "tar" form), 
but generally it should now be ready for you to download to your own 
computer (on which you might then have to run a de-compressor program 
such as PKUNZIP).

Now if somebody sends you a MIME attachment, retrieving the attachment is 
simple.  In both pine and elm, you'll be asked if you want to save the 
attachment to a file.  If you answer by hitting your y key, you'll be 
asked for a file name to save it under (or just hit enter to save it 
under the default name suggested by the computer).  You can now retrieve 
the file by exiting mail and then using the techniques listed in Chapter 
4 for downloading Usenet files.

All this brings up a related issue. Say somebody sends you a plain old 
e-mail message that you want to transfer to your own computer (as 
opposed to an encoded file).  Assuming you're connected to a Unix public-
access site, and that the message is straight ASCII, you have a couple of 
options. 

The quick and dirty way is to start your computer's screen-capture or 
logging function before you open the message.  Then call up the message 
and, when done, stop the logging, and the file's saved to your computer.

That method's good if you only want to transfer one message.  But what if 
you want to save several messages to a single file (a bunch of items from 
a mailing list, say)?  Then you might want to save them to a file on your 
public-access site first and then download that.  

If you use the Pine mail program, open up the message and then hit your e 
key.  You'll be asked to enter a file name in your home directory.  Once 
done, go to the next message and repeat the process.  When finished, 
you'll have a single large file in your home directory for downloading. 
Note that when you do this, Pine will mark the message for deletion, so 
if you want to keep it in your mailbox (to reply, perhaps), answer N when 
you exit pine and are asked if you want to delete the marked files.  

If you use elm, instead, hit your s key, either within the message or 
with the cursor on its entry in the message menu.  You'll get something 
that looks like this:

     =jdoe

which comes from the e-mail address of the sender. If you hit enter, 
you'll save the message to a file called jdoe in your Mail directory.  If 
you want to save it to a differently named file in your home directory, 
hit your backspace key once and then type in the file name you want (but 
without the equal sign).  As in pine, the messages will be marked for 
deletion, so keep that in mind if you want to retain them in your 
mailbox.

In either case, you can now download the file, again using the comands 
discussed in Chapter 4 for retrieving similarly collected Usenet 
messages.