packages icon

ftpq, release 1.04, 17 July 2001
================================

This is a stable release of ftpq, which is a utility for queueing
ftp transactions whilst not connected to the network. On connection, ftpq can
be invoked in "run" mode to process the jobs automatically.

See the man page, the CHANGELOG and TODO file, and the COPYING file.

How it works
============

Four modes:  add, delete, list, run.

Add mode:    creates a spool file containing host, user and file
             details for later processing in run mode.

Delete mode: lets you delete selected, or all spooled jobs. You can only
             delete your own jobs unless you run "ftpq delete" as root.

List mode:   lists jobs currently in the spool directory. You can only
             view your own jobs, unless you run "ftpq list" as root.

Run mode:    processes all jobs. Only sends jobs that are readable by the
             process: typically this means just your own, unless you run
             as root.


Platforms
=========

Various versions tested on:

* Red Hat Linux 6.1 with a 2.4.6 kernel (glibc2), 486-DX4/120.
* SuSE Linux 4.2 with a 2.0.38 kernel (libc5), 486-DX2/66.
* SunOS 5.5.1 on a sun4u Ultra-Enterprise.
* FreeBSD - included in latest distributions in ports section.
* HP-UX - v0.12 available as a port. One user reported compilation difficulty. 

Reported to work on:

* SuSE Linux 7.0 

Installation
============

1. Edit src/ftpq.h, and change SPOOLDIR if required. Currently /tmp/ftpq.
2. Make sure that this directory exists, with full permissions for users.
3. Run "./configure" in the base directory. Try "./configure --help" if you
   need to set options such as installation directory.
4. Type "make" to build the executable.
5. Type "make install" to install the program (ftpq) and the man page (ftpq.1).
   Note that you must have rights to write to the installation directory. You
   probably want to run "make install" as root.

The intention is that ftpq be run automatically on connection, in the
same way that sendmail -q and fetchmail are often run.

To run automatically, find your ip-up.local file (or whatever is run on
connection) and add appropriate lines. Mine currently looks like this:

	/usr/bin/fetchmail -f /etc/ppp/fetchmailrc 
	/usr/sbin/sendmail -q 
	/bin/date > /var/log/ftpqlog
	/usr/local/bin/ftpq run -v >> /var/log/ftpqlog
	echo -e "\a" > /dev/tty10

This runs fetchmail, sendmail and ftpq sequentially, and beeps when
all transfers are complete. The file /var/log/ftpqlog is created on
each connection, and has a timestamp and the verbose output of ftpq
written to it.

That's it - see the man page for usage details.

Config file
===========

You can set up a config file to store often-used parameters.
Valid switches: -h -P -u -p -a -d
Section names are enclosed in square brackets. Switches must be specified
as one per line, with a space between the switch and its value. A line
that doesn't match a switch/value pair (a blank line, an invalid switch
or a new section title) marks the end of that section.

Example:

[MyWeb]
-h my.web.server
-u my.login
-p my.password

[WorkFTP]
-h my.work.server
-u work.login
-p work.password
-d /my/work/directory

You can then run:

ftpq add -c MyWeb index.html
ftpq add -c MyWeb -d images *.png
ftpq add -c WorkFTP *.dat

Command line options take precedence, irrespective of order. Directory 
parameters do NOT combine, so:

ftpq add -c WorkFTP -d data file.dat

is probably not what you want, which is:

ftpq add -c WorkFTP -d /my/work/directory/data file.dat

Bug reporting
=============

If you come across any bugs, please send me as much detail as you have:

* OS / platform
* Compiler / C library version
* Command line (hide your passwords!)
* Output and error messages

I'm interested in platform-specific compile failures, although you'll
probably have to find a solution yourself as I don't have access to many
systems.

I'm also interested in suggestions for improvements and potential
security holes.

Mark Tranchant
ftpq@tranchant.freeserve.co.uk