Ftpmail is an email->ftp gateway.  You mail requests to a user (eg:
ftpmail).  This causes q.pl to be called which checks the request and
sticks it in a queue.  dq.pl then parses the queue and does the ftp
transfers that the job specifies mailing back the files that were
transfers.  As various things happen notes are writen in the
ftpmail log file.  

It is all writen in perl and sends responses using either mail or by
directly calling sendmail.  When using sendmail MIME support is
available.

If a transfer fails for a fatal reason then it is dequed and the user
is emailed.  If it fails for a non-fatal reason (such as timeout on
connect) then it will be requeued to try later (the next time dq.pl is
called).  Once a transfer (get|dir|ls) has succeeded it is marked as
DONE and will be skipped.  All other commands will still be obeyed.  A
job will only be tried for a fix number of times, then rejected.

For user level details read the help file.

If the file motd is present then its contents are inserted at
the start of any responses.

ARCHIVES
--------
This packages is available from:
	file://src.doc.ic.ac.uk/packages/ftpmail/
	http://src.doc.ic.ac.uk/packages/ftpmail/
	gopher://src.doc.ic.ac.uk/1/packages/ftpmail/

	file://grasp.univ-lyon1.fr/pub/unix/mail/tools/ftpmail/

        file://ftp.sterling.com/mail/ftpmail/


UPGRADING
---------

See README.upgrade.


WHERE SERVERS ARE
-----------------

See the WWW file: http://src.doc.ic.ac.uk/ftpmail-servers.html
or FTP file://src.doc.ic.ac.uk/packages/ftpmail/ftpmail-servers.txt
for details about where ftpmail servers are running.


TO INSTALL
----------

Create an account called 'ftpmail', the home directory of ftpmail is
where all the scripts will be installed and subdirectories of it form
the queues.

Edit config.pl to reflect your local details.  (If you
change the default site also edit help.)  The auth file is
just a series of regexps, so a line of just dot would allow all email
addresses to use ftpmail.

Once you have edited the above files run inst.pl.  inst.pl
will create the ftpmail directories based on values in
config.pl and copy in various files.  Its a bit of a
hack.

At src.doc.ic.ac.uk I only allow requests to be submitted via email.
The ftpmail account is not present on any general machine, just on the
main mail gateway .  On that I use the PP .mailfilter script mechanism
to cause any mail delivered to that ftpmail to invoke q.pl. But
anything that causes q.pl to be run on the input request will do.
Under sendmail create ~ftpmail/.forward containing:
|"/public/ic.doc/ftpmail/q.pl || exit 75"
(Or similar.)

The file crontab contains a suggested cron entry that should be run as
the user  ftpmail.  This calls dq.pl that dequeues the entries and
runs them.  dq.pl should run forever once started.  But as I am a
paranoid person I call it every half hour just to be safe.

Note that mail sent is sent by ftpmail not ftpmail-request.  ftpmail
does other tricks to prevent mail loops forming.  I tried running with
mail being sent by ftpmail-request and ftpmail-request aliases to me.
I found that most of the traffic to ftpmail-request is from people who
submit jobs by replying to ftpmail responses in order to submit new
jobs.

SOCKET.PH && SOLARIS 2.x
------------------------
Although there is a socket.ph in this distribution you should really
use the one generated by h2ph when installing perl.  Socket.ph is
architecture specific so the socket.ph I use is unlikely to work unless
you are on a Sparc running Sunos 4.1.x.

Unfortunetly the sys/socket.ph generated on Solaris 2.x by perl's h2ph is
incorrect so you will have to install socket.ph-solaris from this distribution
as /usr/local/lib/perl/sys/socket.ph (or whereever appropriate on your
system).

THANKS
------
Thanks to all those who suggested improvements.  Also special thanks
to Christophe.Wolfhugel@hsc-sec.fr for all his work on mime
and the new queing system which formed the basis for some of the new code.

WORKERS
-------
If you want to help develope ftpmail then there is now a mailing list:
	ftpmail-workers@doc.ic.ac.uk
To subscribe email to:	ftpmail-workers-request@doc.ic.ac.uk
a message like:
	Subject: add me
	
	subscribe ftpmail-workers Your Full Name Here

COPYRIGHT
---------
Writen by Lee McLoughlin <lmjm@doc.ic.ac.uk>

You can do what you like with this except claim that you wrote it or
give copies with changes not approved by Lee.  Neither Lee nor any other
organisation can be held liable for any problems caused by the use or
storage of this package.



SPECIAL NOTE June 1997:
-----------------------

As I no longer run an ftpmail service it is harder for me to test/develope
new features.  So the 'part' command which you'll find in the source is
untested.
