Comms Corner 5 - originally published in the December 1995 issue of PCW Plus.

You're now in a position to make a good deal of use of the Internet, using no more than your humble e-mail facilities. To close this particular chapter, we'll now take a look at FTP-mail, a very powerful facility allowing you to download files from the Internet without needing interactive FTP software. FTP stands for File Transfer Protocol.

FTP-mail works on the same principle as the applications discussed last month: you simply send a message containing instructions to a special server, which then acts on them and sends you the results. There are many FTP-mail servers in existence, such as ftpmail@doc.ic.ac.uk, ftpmail@ieunet.ie, ftpmail@ftp.uni-stuttgart.de and bitftp@vm.gmd.de. Choosing one close to home is an environmentally friendly idea, since this will reduce the number of systems that have to relay the data and thus help keep network traffic (bandwidth in Net lingo) to a minimum.

To start with, send a message asking for help (place this single word in the body of the message) to one of the above addresses. This will result in a comprehensive help-file being mailed to you within a few minutes. Each FTP-mail server has subtle variations in command syntax and some support more commands than others, so sticking to one server for all your requests makes for an easier life.

Although the help-file is despatched very quickly, don't expect your FTP request to be dealt with at the same lightning speed. Your job will be queued and you will have to wait until it has worked its way to the top of the virtual pile. Delays of a week are not unusual, but hey, it's all free of charge and happening behind the scenes while you're off-line, so who's complaining? Actually, you may be lucky enough to find a little used server and have your requests carried out within a couple of hours.

Here's an example of a simple FTP-mail file request sent to ftpmail@doc.ic.ac.uk. You might like to send it yourself to prove that it really works.

open ftp.demon.co.uk
cd /pub/cpm/amstrad
mode binary
uuencode
get emu102.com
quit

Let's run through the above commands in some detail:

The open instruction tells the server to contact the site ftp.demon.co.uk, which if you're a keen reader of PCW Plus comms articles, you'll know is a site carrying PCW software.

The cd (change directory) command selects the directory /pub/cpm/amstrad, which is where the PCW programs are stored.

The mode binary command alerts the server that it will be sending binary (eight bit) data as opposed to ASCII (text) data.

The uuencode command tells the server to encode the data prior to sending it, using an encryption method of the same name. For technical reasons, this step is necessary when fetching binary files, but if you were downloading plain text files, it could be omitted.

The get command is the juicy bit. This picks up the file we're after, in this case emu102.com. Keep this file, as you might find it useful next month (he says secretively).

Quit tells the server that our FTP-mail request ends here. The server can now close the connection with ftp.demon.co.uk and go on to process the next person's request.

If all has gone according to plan, you should soon receive confirmation of receipt of your request. This will ultimately be followed by the results of the request itself, easily recognisable by a line close to the top of the message, consisting of begin, followed by a number (probably 600 or 644) and the name of the file you requested. A mass of encoded data will follow, recognisable by an M at the start of each line.

You should now download this file to your PCW and use your favourite word-processor to remove everything before the line containing the word begin (mail header, etc.) and everything after the line containing the word end (signature, etc.). Save the remaining text as a plain ASCII file called EMU102.UUE.

A UU-decoder is needed for the next stage. You can obtain one from PCW-PD by snail-mail, or by sending the following request to an FTP-mail server.

open ftp.demon.co.uk
cd /pub/cpm
mode ascii
get uudec.hex
quit

Follow the instructions contained in the UUDEC.HEX file to remove the superfluous text and then, using HEXCOM from your CP/M master disc, type HEXCOM UUDEC [RETURN] at the CP/M prompt. This will manufacture a copy of UUDEC.COM for you.

You should now type UUDEC EMU102.UUE [RETURN], which will instruct UUDEC to restore EMU102.UUE to a working file. EMU102.COM itself is a self-extracting archive, so if you're curious what's in it, type EMU102 M: [RETURN] and it will unpack itself onto the M-drive.

Some useful hints: it's conventional for each directory at an FTP site to contain an index file called 00-index.txt. Retrieving this file will give you an overview of the files available in that directory and indicate whether further downloads are likely to be of interest. The /pub/cpm and /pub/cpm/amstrad directories at ftp.demon.co.uk are two of the most interesting on the Internet from a PCWer's point of view. Another good point at which to start your investigations is oak.oakland.edu's /pub/cpm directory.

So you see, e-mail isn't just a fantastic way of keeping in touch with the world at large, it's also a marvellously cheap and cheerful way of expanding your software library. A word of warning for FidoNet users, however: the FidoNet big-wigs don't allow any form of message encryption, so you won't be able to take advantage of FTP-mail. Your sysop will be happy to explain why.

If this month's article seems a little more complicated than usual, well, I confess, it is. But I wouldn't have tackled the subject of FTP-mail if I didn't think the advantages far outweighed the seemingly ominous technicalities. Once you've sent a couple of FTP-mail requests, the whole thing will become child's play and you'll be hauling in files from all over the world. To avoid disappointment, read the FTP-mail help file thoroughly and double-check your requests before sending them.

Happy hauling!

__________________________________________________

Below you'll find examples of the job reports sent when an FTP-mail request is received and processed.

Confirmation of receipt of FTP-mail request

From ftpmail@doc.ic.ac.uk Tue Sep 19 16:59:33 1995
Received: from phoenix.doc.ic.ac.uk by xs1.xs4all.nl with SMTP id AA25549
  (5.67b/IDA-1.5 for <ianmacd@xs4all.nl>); Tue, 19 Sep 1995 19:18:47 +0200
Message-Id: <199509191718.AA25549@xs1.xs4all.nl>
Received: from doc.ic.ac.uk by phoenix.doc.ic.ac.uk 
          id <04735-0@phoenix.doc.ic.ac.uk>; Tue, 19 Sep 1995 17:59:33 +0100
To: ianmacd@xs4all.nl
Subject: <FTP EMAIL> response
Date: Tue, 19 Sep 1995 17:59:33 +0100
From: mail responder <ftpmail@doc.ic.ac.uk>
Sender: ftpmail@doc.ic.ac.uk
Status: O

<FTP EMAIL> response
ftpmail has received the following job from you:
      reply-to ianmacd@xs4all.nl
      open ftp.demon.co.uk anonymous ianmacd@xs4all.nl
      cd /pub/cpm/amstrad
      mode binary
      uuencode
      get emu101.com

ftpmail has queued your job as: 129970.4725
Your priority is 1 (0 = highest, 9 = lowest)
Requests to sunsite.doc.ic.ac.uk will be done before other jobs.
There are 22 jobs ahead of this one in the queue.
3 ftpmail handlers available.
To remove send a message to ftpmail containing just:
delete 129970.4725

Your original input was>>
>Return-Path: <ianmacd@xs4all.nl>
>Delivery-Date: Tue, 19 Sep 1995 17:59:29 +0100
>Received: from heron.doc.ic.ac.uk by phoenix.doc.ic.ac.uk with SMTP (PP);
>          Tue, 19 Sep 1995 17:59:22 +0100
>Received: from xs1.xs4all.nl by heron.doc.ic.ac.uk with SMTP (PP)           
>          id <12850-0@heron.doc.ic.ac.uk>; Tue, 19 Sep 1995 17:59:34 +0100
>Received: by xs1.xs4all.nl id AA22760 (5.67b/IDA-1.5 for ftpmail@doc.ic.ac.uk);
>          Tue, 19 Sep 1995 18:59:10 +0200
>From: Ian Macdonald <ianmacd@xs4all.nl>
>Message-Id: <199509191659.AA22760@xs1.xs4all.nl>
>Subject: 
>To: ftpmail@doc.ic.ac.uk
>Date: Tue, 19 Sep 1995 18:59:08 +0200 (MET DST)
>X-Mailer: ELM [version 2.4 PL21]
>Content-Type: text
>Content-Length: 83
>
>open ftp.demon.co.uk
>cd /pub/cpm/amstrad
>mode binary
>uuencode
>get emu101.com
>quit
>
<<End of your input

Confirmation of processing of FTP-mail request

From ftpmail@doc.ic.ac.uk Tue Sep 19 17:25:05 1995
Received: from phoenix.doc.ic.ac.uk by xs1.xs4all.nl with SMTP id AA28710
  (5.67b/IDA-1.5 for <ianmacd@xs4all.nl>); Tue, 19 Sep 1995 19:41:27 +0200
Message-Id: <199509191741.AA28710@xs1.xs4all.nl>
Received: from doc.ic.ac.uk by phoenix.doc.ic.ac.uk 
          id <12067-0@phoenix.doc.ic.ac.uk>; Tue, 19 Sep 1995 18:25:05 +0100
To: ianmacd@xs4all.nl
Subject: ftpmail job completed
Date: Tue, 19 Sep 1995 18:25:05 +0100
From: mail responder <ftpmail@doc.ic.ac.uk>
Sender: ftpmail@doc.ic.ac.uk
Status: RO

<FTP EMAIL> response
Your job was (lines beginning DONE show completed transfers):
      reply-to ianmacd@xs4all.nl
      open ftp.demon.co.uk anonymous ianmacd@xs4all.nl
      cd /pub/cpm/amstrad
      mode binary
      uuencode
 DONE get emu101.com

The ftp log contains:
Connecting to ftp.demon.co.uk
 220-
 220-  Welcome to Demon Internet's ftp archive.
 220-
 220 disabuse.demon.co.uk FTP server (Version wu-2.4(14) GT Fri Jan 13 00:56:16 GMT 1995) ready.
 ---> USER anonymous
 331 Guest login ok, send your complete e-mail address as password.
 ---> PASS <somestring>
 230 Guest login ok, access restrictions apply.
 ---> PWD
 257 "/" is current directory.
 ---> TYPE I
 200 Type set to I.
 ---> CWD /pub/cpm/amstrad
 250 CWD command successful.
 ---> PWD
 257 "/pub/cpm/amstrad" is current directory.
 ---> PORT 155,198,1,40,187,127
 200 PORT command successful.
 ---> RETR emu101.com
 150 Opening BINARY mode data connection for emu101.com (12288 bytes).
 Got 12288 bytes (12288 bytes/sec)
 226 Transfer complete.
 ---> QUIT
 221 Goodbye.
© 1997. Page last updated 31st December 1997