MINIX 1.5.0 Programmer's Manual, man(1c) version 1.2.

# .INTRO
Introduction to this manual.

     Section 1c of the Minix Programmer's Manual describes the UUCP suite
and other commands used for communication between sites.  There are three
types of entry:

1.   General discussions of UUCP topics, such as Diallers, Directories,
     Protocols, and States and Statistics.
2.   Specific descriptions of UUCP files and commands.
3.   Brief summaries of related programs (eg. mail, news).

# Diallers
Diallers used by UUCP.

     A dialler, in this context, is a function that negotiates with the
outside world and if successful, returns a file descriptor connected to 
some external device or site.  This UUCP has three diallers, called 'ACU',
'PAD' and 'direct'.   The ACU dialler negotiates with modems, the PAD
dialler negotiates with Packet Assembler/Disassemblers, and the direct
dialler negotiates with direct connections (in effect, simply opens a
device file).

     Some UUCPs accept external dialler programs, but this one does not.
Diallers must be compiled into uucico and cu, and their names added to the
internal table of dialler functions; a relatively straightforward process.

# Directories
Directories used by UUCP.

     UUCP uses five main directories:

     /usr/lib/uucp                      - LIBDIR
     /usr/spool/uucp                    - SPOOLDIR
     /usr/spool/uucp/.XQTDIR            - XQTDIR
     /usr/spool/uucppublic              - PUBDIR
     /usr/spool/uucppublic/receive      - PICKDIR

     LIBDIR is used for the main UUCP binaries and databases, and SPOOLDIR
for transient work, data, lock files, and the public log files.  Note that
non-UUCP programs, such as Kermit, may also maintain lock files in this
directory.  .XQTDIR is a subdirectory of SPOOLDIR used by uuxqt.

     PUBDIR and PICKDIR are the directories into which files from other sites
are transferred; they are usually the tops of directory trees.  For security
reasons PUBDIR is usually the only directory which is accessible to external
sites; PICKDIR is a subdirectory of PUBDIR which is used by the uupick and
uuto programs.

# Protocols
Protocols used by UUCP.

     The 'conversation level' protocol of UUCP frames each message with
^P and ^@.  If the communications link cannot handle ^@, then ^J can be
used in lieu by recompiling uucico.

     The common UUCP data transfer protocols are 'e', 'f', 'g', 't', and 'x'.

     The 'e' protocol is proprietary to AT&T, and requires the ability to
send and receive zero length packets.  It works on Datakit, but not over TCP.

     The 'f' protocol is intended for use over (fairly) reliable links, since
it checksums only entire files, but it does not require a full 8-bit datapath
(or null bytes).  It is therefore suitable for X.15 networks, and this UUCP in
fact includes a simple PAD dialler.

     The 'g' protocol is the UUCP standard, supported by all implementations,
and is based on Greg Chesson's original packet-protocol work.  It is discussed
further in the accompanying documentation.

     The 't' protocol is a streaming protocol using all 8-bits, with no flow
control.  It is very similar to the 'e' protocol, but doesn't require zero-
length packets, and should therefore run over just about any transport that
gives reliable end-to-end delivery.  The 't' code was written by Rick Adams
and is public domain.

     The 'x' protocol is again AT&T proprietary, and is said to be 'flakey'.

     There are three protocols installed in this package, 'f', 'g', and 't'.
Adding more protocols is simply a matter of writing the necessary routines
and including them in the main protocol table.

# States
UUCP States and Error Messages.

*##* denotes a message indicating success.

Initialise program

Enter state machine

Initialise state machine

B - Get site details	(getsystem())		logmsg 01, errmsg 01,03,07,09,12
(MASTER)

C - Check site details	(checksystem())		logmsg 01, errmsg 03,07,09,11
(MASTER)		(checktime())		logmsg 08,15,16,26

D - Call the site	(connect())		logmsg 01, errmsg 01,02,03,07,09
(MASTER)					logmsg 02,11,13,*19*
						stsmsg 01

E - Log on to site	(logon())		logmsg 03,*24*
(MASTER)					stsmsg 02,03

F - Initialise i/o	(ioinit())		logmsg 01, errmsg 10

G - Negotiate access	(sysminit())		logmsg 05,06,14,15,*20*
  check spool directory	(scandir())		logmsg 01, errmsg 03,07,09
			(syssinit())		logmsg 05,06,14,15,*20*

H - Start up protocol	(pktinit())		logmsg 12

J - Get work		(getmtask())		logmsg 01, errmsg 01
			(getstask())		logmsg *21*

R - Execute task	(recvf())		logmsg 01, errmsg 01,03,07,09		
S			(sendf())		logmsg 08,09,*10*,22,23
U			(runuucp())

Q - Negotiate hangup	(sysbreak())		
  check spool directory	(scandir())		logmsg 01, errmsg 03,07,09

V - Shut down protocol	(pktend())

W - End access		(sysend())		logmsg *18*

X - Revert i/o		(ioend())		logmsg 01, errmsg 10

Y - End call		(callbreak())

Z - Quit state machine

Wrap up program

# Statistics
Call and traffic statistics files used by UUCP.

     The files R_stat and L_stat are used by uucp, uux, and uucico to
accumulate call and traffic statistics by job number; uustat then analyses
the records to produce broader statistics.  Uucp and uux initialise a record
in R_stat for each call, and a record in L_stat for each site; uucico then
updates these records whenever a call is made.  R_stat and L_stat are not
ASCII files, but contain records whose structures are defined in uucp.h.

     If R_stat and L_stat do not exist, uucp and uux will not create them, nor
will uucico produce error messages.  To enable traffic accounting, 'touch' the
files /usr/lib/uucp/R_stat and L_stat; they should have permissions 0644 and
be owned by uucp.

    The R_sub and L_sub files are also non-ASCII data files, but they are
generated and updated by uusub, from data in the LOGFILE and SYSLOG.  They
contain call and traffic statistics for individual sites.  While any user
can view the R_sub and L_sub files, only root or uucpadm can update them.

# .XQTDIR
Uuxqt home directory:   - /usr/spool/uucp/.XQTDIR

     This is used by uuxqt for files needed by, or produced by, the current
uuxqt command.  Uuxqt's access to this directory is controlled by a lock file
in SPOOLDIR.

# LIBDIR
Program directory:       - /usr/lib/uucp

     Most of the UUCP binaries are stored in /usr/lib/uucp (LIBDIR), although
some (eg. uucp) have links into a directory on the usual search path.  LIBDIR
is also used for the semi-permanent UUCP data files, and for those files
requiring a degree of security.  While the world may have access to the spool
directory, LIBDIR should be well protected.

     This directory contains the following data files:

          Uuxqt commands        - L-cmds
          Known devices         - L-devices
          Phone dialcodes       - L-dialcodes
          Link status           - L_stat
          Connection statistics - L_sub
          Known remote sites    - L.sys
          Request status        - R_stat
          Traffic statistics    - R_sub
          Sequence file         - SEQF
          Count checks          - SQFILE
          System UUCP name      - SYSTEMNAME
          Access control        - USERFILE

     If uustat or uusub are aborted during a stat or sub file update, files
of type TM.xxxx may be left in this directory.

# PICKDIR
Uuto/uupick directory:  - /usr/lib/uucppublic/receive

     The directory /usr/lib/uucppublic/receive (PICKDIR) is the top of
a directory tree used by the uuto and uupick programs.  These programs
provide a simplified user interface to uucp by transferring files between
standard directories (PICKDIR/remote_site/local_user) in the PUBDIR tree.

     Typically, the structure of directories under the PICKDIR is of the
form user/site; a subdirectory for each local user, with each subdirectory
in turn containing subdirectories for the remote systems which have sent files
to that particular user.

# PUBDIR
Public directory:       - /usr/spool/uucppublic

     The directory /usr/spool/uucppublic (PUBDIR) and its subdirectories is
usually the only system area for which UUCP has write permission; thus it
is the main staging point for file transfers into the system.  This feature
is emphasised by the '~' notation; UUCP expands the path ~/usr to PUBDIR/usr,
which simplifies the use of PUBDIR as a destination.

    Note that the notation ~usr expands not to PUBDIR/usr, but to $HOME/usr,
and that the '~' notation is not understood by the shell.

# SPOOLDIR
Spool directory:         - /usr/spool/uucp

     The directory /usr/spool/uucp (SPOOLDIR) contains the public working
files for UUCP.  A list of these files is:

Work files              - C.xxxx
Data files              - D.xxxx
Execute files           - X.xxxx
Temporary files         - TM.xxxx
Lock files              - LCK.xxxx
                        - LCK..dev
		        - LCK..sys
		        - LCK.file
                        - LCK.directory
Status files            - STST.xxxx
Log files               - LOGFILE
                        - ERRLOG
                        - FOREIGN
Audit file              - AUDIT
Transfer data           - SYSLOG

     SPOOLDIR also contains the subdirectory .XQTDIR, used by uuxqt
for scratch files.

# L-cmds
Uuxqt commands          - L-cmds
Format of contents:       command site, site, ...
Typical contents:         mail    mole, vole

     This file contains a list of the commands that remote sites may run
using uuxqt.  Command names are assumed to start at the beginning of the
line; other names on the same line are assumed to be those of sites.  If
there is only one name on a line, it is taken to be a command that any
remote site may use.  Comment lines, which start with '#', are permitted.

     If any line starts with the string 'PATH' the rest of the line is
taken to be the path to be searched for all commands; if there is no
PATH line, the default compiled into uuxqt is used.

     If L-cmds is missing or empty or unreadable uuxqt will not execute
any commands.

# L-devices
Known devices           - L-devices
Format of contents:       device dataport dialport speed dialler token
Typical contents:         mole   tty1     hy24     2400  ACU     \T

     This file lists the devices available and their characteristics.
Comment lines, which start with #, are permitted.  The device entries in
column three of L.sys are used to index into column one of this file, but
are otherwise ignored.  The first five fields must be present in some form,
but the token field is optional.

     The dataport entry is the device (normally in /dev) used for data,
while the dialport can either be a separate device used for dialling, which
is now rare, or some specific dialler attribute.  Normally for an ACU
dialler it would be the type of modem, while for a PAD dialler it might be
a port number.  An unused dialport entry must contain the place-holder '-'.

     The speed entry is the speed at which the connection should be
made.  If the entry is 'Any' then the speed from L.sys will be used;
if that is also 'Any' then the connection will fail.

     The dialler entry contains the method of connection to a remote system;
this uucico recognises three names: 'direct' for direct lines, 'ACU' for
modem lines, and 'PAD' for Packet Assembler/Dissassemblers.  As L-devices
is scanned, the appropriate dialling method is used for each line matching
the current L.sys entry.  Thus depending on the ordering of L-devices,
different methods of communication will be used for a given system.

     The token entry is mainly used for dialcode translation.  If the
token "\T" is used, then the L-dialcodes file is checked for possible
code-to-number conversions.  If the token is "\D", or is missing, then
the phone number string is passed to the dialler unchanged.

     For cu to connect to a line, rather than call a site by name, the first
column must have the entry 'Direct'; any type of dialler can be used.

# L-dialcodes
Dialling codes          - L-dialcodes
Format of contents:       site      code
Typical contents:         volephone  123456789

     This file contains matching pairs of strings and numbers: it allows
uucico to convert alphabetic codes in the phone field of L.sys to phone
numbers.  Comment lines, which start with '#', are permitted.  L-dialcodes
is mostly used to increase security; L.sys can be widely read, but with
limited access to L-dialcodes the actual phone numbers can remain private.

     If an L.sys entry contains both a code and a number, the code must
start the string, or it will not be converted.

# L_stat
L_stat - link status file

     This file is a companion to R_stat, recording calls by site.  An
absent L_stat is not considered to be an error, even if R_stat exists.  For
enabling traffic accounting, see 'Statistics'.  The record format is:

     site_name call_time success_time status

where:

     site_name     is the name of the remote site
     call_time     is the time of the last call
     success_time  is the time of the last successful call
     status        is the status code of the last result

     For a list of possible status messages, see the entry for uustat.

# L_sub
L_sub - connection statistics file

     This file records call failure rates for each site. Only calls
initiated by the local site are recorded.  It is maintained by uusub,
from data in the LOGFILE and in SYSLOG.  The record format is:

     site_name #calls #ok last_time #dev #login #nack #other

where:

     site_name     is the name of the remote site
     #call         is the total number of calls
     #ok           is the number of successful calls
     last_time     is the time of the last call
     #dev          is the number of times that a line was not available
     #login        is the number of times that login failed
     #nack         is the number of times that the session failed
     #other        is the balance of failures, eg: "wrong time to call"
     
     This file is created at the first use of the uusub -a option.

# L.sys
L.sys                   - known remote sites
Format:                   site times dev,proto speed phone_number chat_script
Typical:                  #: owned by Waistcoats Ltd.
                          mole Any   ACU,eg    9600  1234567890   "" \r ogin:

     This file is the central list of sites for UUCP.  It gives the names of
all the sites known to UUCP, and how and when they can be reached.  Comment
lines, which start with '#', are permitted.  If a site line is preceded by a
comment line whose second character is ':', the comment line is taken by uuname
to be a description of the site.  Because of the way that workfiles are named,
site names must be unique in the first seven characters.

     The times field is of the form:

     Any|Never|Wk|Su|Mo|Tu|We|Th|Fr|Sa[start-stop[,retry][|....]

where start and stop are four-digit 24hr. times and retry is decimal minutes.
Note that an actual '|' is used to separate repeated time entries, which are
used when different days have different valid calling times. Wk is the code
for Mon-Fri.

     The device type is simply an index into the first column of the 
L-devices file; it can be a generic name, such as 'ACU', or specific
to the system.  Uucico will try each line of the given type in turn,
starting from the top of the L-devices file, until a connection is
made or there are no more valid lines.

     The protocol field is optional, and gives a list of protocols
(e, f, g, t, x etc.) to be used with the site.  When the local site calls
out this list is compared with that given by the remote site, and the first
protocol to match is used.  This uucico has the 'f', 'g', and 't' protocols
installed; more can be added by linking in the appropriate driver and adding
it's name to the Protolst array.  The default protocol, which is understood
by every UUCP, is 'g'.  When a remote site calls, this field is ignored and
any of the locally-available protocols may be used.

     The speed field is the speed at which the connection should be made.  If
the entry is 'Any' then the speed from L-devices will be used; if that is also
'Any' then the connection will fail.

     The phone number field may contain a alphabetic dialcode: if the token
field of the appropriate entry in L-devices contains "\T", uucico will look
up the equivalent number in L-dialcodes, and make the substitution.  Note
that the phone string is passed to the modem otherwise unchanged; uucico
doesn't understand the usual '=' (wait for dialtone) or '-' (1 sec. pause)
characters, although the modem may.  If the number field contains both a
dialcode and actual digits, the dialcode must be at the start of the field,
or it will not be converted.

     The chat script is a sequence of expect/send pairs, with "" being 
an empty string.  Strings separated by - form sub-pairs, in which the 
second string is sent after a timeout; if an expect string in the main
sequence is not found, the login fails.  The separator -- sends \r.
The following escape codes can be used in the L.sys sign-on string:

        EOT:            /* EOT - must be sole item in field */
        BREAK:          /* BREAK - must be sole item in field */
	\d, \D:		/* delay two seconds */
        \c, \C:		/* don't output CR at end of string */
	\r, \R, \m, \M:	/* carriage return */
	\n, \N:		/* newline */
	\b, \B:		/* backspace */
	\t, \T:		/* tab */
	\s, \S:		/* space character */
	\nnn:           /* octal character code */

     Entries can be continued over several lines for readability: a continued
entry is indicated by '\' as the last character on a line.

# R_stat
R_stat - request status file

     The records in this file are all initialised by uucp or uux; if the file
not exist, it will not be created.  When uucico runs a job, if R_stat exists
uucicio updates the appropriate record with the job's final status.  An absent
R_stat file is not considered to be an error; for enabling traffic accounting,
see 'Statistics'.  The record format is:

     job_number user site_name command_time status_time status

where:

     job_number    is the job number
     user          is the name of the user running the job
     site_name     is the name of the remote site
     command_time  is the time the command was given (ie. to uucp)
     status_time   is the time the status byte was set (ie. uucico ran)
     status        is a status code for the result

     For a list of possible status messages, see the entry for uustat.

# R_sub
R_sub - traffic statistics file

     This file records the number of files and bytes send and received
from each site, when the local system is in Master role.  It is maintained
by uusub, from data in the LOGFILE and in SYSLOG.  The record format is:

     site_name files_sent bytes_sent files_received bytes_received

     This file is created at the first use of the uusub -a option.

# SEQF
Sequence file           - SEQF
Format of contents:       count
Typical contents:         0001

     This file contains the current four-digit sequence number, 1-9999.
It is used by uucp, uucico, uux and uuxqt; if there is no SEQF, then the
first program to need a number will create and initialise the file.

     Some mailers also use this file for message counts.  It is probably
better to run a separate message count file if possible, to avoid problems
with different file-locking mechanisms.

# SQFILE
Count checks            - SQFILE
Format of contents:       site count date_time
Typical contents:         mole 100 Jan 1 00:00:01 1990

     This file contains a list of the sites for which call counts are
being maintained.  Comment lines, which start with '#', are permitted.
A non-existent SQFILE is not considered to be an error.

     To start call counting for a given site, add a line to the SQFILE
containing only the remote site's name at the start of the line.  If
a site is added to the local SQFILE, then the local site name must
be added to the remote site's SQFILE, or communication will cease.

     The SQFILE is updated by uucico on each call with the time of the
last conversation, and the current conversation count.

# SYSTEMNAME
System UUCP name        - SYSTEMNAME
Format of contents:       UUCP_name
Typical contents:         vole # at mole's

     This file is usually found in the directory /usr/lib/uucp, but may be
placed elsewhere.  It contains an ASCII string which is the name UUCP uses
for the local system, and (optionally) a description of the system.  The
super-user can use 'uuname -S name' to initialise or change the local name.

     Because of the way that workfiles are named, all system names are
significant only in the first seven characters, and should not contain
a digit.  Note that to enter a description, '#' must be escaped ('\#').

# USERFILE
Access control          - USERFILE
Format of contents:       user,site callback_flag pathnames
Typical contents:         ,mole /

     The USERFILE controls access to local files, over and above the limits set
by normal Unix permissions.  It controls access by local users, and by remote
systems.  If the file does not exist, UUCP will assume that anything goes.
Entries have the following form:

  username, systemname [c] pathlist

     The username is the login name of a local user or remote system.  The
systemname is the name of a system.  The pathlist is a list of paths for which
access is permitted, separated by blanks.  Comment lines, starting with '#',
are permitted.

     Uucico makes at least two passes over the USERFILE, checking it first on 
startup, and then on each file transfer.  The startup check looks for a valid
username and/or systemname, and the subseqent checks look for a valid path; in
both cases, a line with an empty name matches all names.

     An entry such as:

     ,localsite /

allows all local users access to all directories, subject of course to any
Unix permissions.  This line will be needed in almost all USERFILES.

     An entry such as:

      uucp,  /usr/spool/uucp /usr/spool/uucppublic

allows access to UUCP's spool and public directories by anyone logged in as
uucp.  This is important, firstly because remote mailers put data and command
files in /usr/spool/uucp ready for transfer by uuxqt, and secondly because the
UUCP suite runs setuid `uucp'; with no entry for the local site, in some
circumstances these permissions then become the default settings.

     When matching site and user names with USERFILE entries uucico continues
to check entries until either it matches both names, or the file ends.  However,
whenever it finds a partial match, the username with an empty site field or the
sitename with an empty user field, it updates the valid access path accordingly.
Thus a high security path setting for the majority of users can be relaxed for
specific sites/usernames.  The priority of the types of entry, lowest first,
is 1) , 2) username, 3) ,sitename 4) username,sitename.

     If the callback flag, 'c' is present then no files will be transferred
when the remote system logs in; instead, the local system will call back.  This
is an effective security check, but if both systems have the callback flag set,
no file transfer will ever take place.

     Uucp makes one pass over the USERFILE, in LOCAL mode only, checking access
to the destination file.

     Uuxqt makes one pass over the USERFILE for each file it needs, using the
local site name and username by default, but otherwise the site and user name
from the current command file.

# AUDIT
Audit file              - AUDIT
Format of contents:       as LOGFILE
Typical contents:         as LOGFILE

     This file contains any debugging messages produced when uucico -x# is
used in slave mode.

# C.xxxx
Work files              - C.xxxx
Format of name:           C.site grade sequence_number
Typical name:             C.moleA1234

     These files contain instructions for uucico.  The default grade is 'n'
for files created by uucp, and 'A' for files created by uux.  Uucico
processes files in the order A-Za-z.  The standard work file entries are:

     Send from local to remote:
     S full_source_file dest_file sender options data_file mode notify [mailbox]

     Request from remote to local:
     R source_file full_dest_file sender options [mailbox]

     Request multiple files (run remote uucp):
     X source_afn full_dest_path sender options [mailbox]

     Any other entry is ignored, and the current workfile is abandoned.

# D.xxxx
Data files              - D.xxxx
Format of name:           D.site grade job_number
Typical name:             D.volen5678

     These contain data waiting to be transferred by uucico, or command
files for uux waiting to be moved to the appropriate site and renamed.
All data files have the grade 'n', except for remote uux command files
which have 'X', and remote uucp command files which have 'R' or 'S'.

# ERRLOG
Log file                - ERRLOG
Format of contents:       ASSERT ERROR (program) pid (date time) error
Typical contents:         ASSERT ERROR (uucico) pid:30 (Jan 1 00:00:01 1990) \
                          STAT FAILED (0)

   This file contains all the ASSERT status messages except those produced
by uucico -x#.  The formats of all the status messages are given below.

/*
 * ERRLOG file entries
 *
 * Format of entries: ASSERT ERROR (program) pid (date time) error
 * Only the error fields are given here.
 */
00:  "NULL MSG" /* Empty message */
01:  "ARG COUNT (num)" /* A system file has too few (_num_) fields */
02:  "BAD DEVICE ENTRY entry (0)" /* _entry_ in L-devices is incorrect */
03:  "BAD DIRECTORY dir (0)" /* uucico cannot open _dir_ */
04:  "BAD UID (0)" /* (uid) is not defined in /etc/passwd */
05:  "BAD WRITE (0)" /* uucico cannot write to remote line or device */
06:  "CANNOT GET SEQLOCK (0)" /* uucico cannot create LCK.SEQF
07:  "CAN'T OPEN file (0)" /* uucico cannot open _file_ */
08:  "LINK ERROR (0)" /* uuxqt cannot link an execute file to /usr/spool/uucp/.XQTDIR
09:  "STAT FAILED file (0)" /* uucico cannot access _file_ */
10:  "STAT FAILED (0)" /* uucico cannot change the stty modes of the active port */
11:  "SYSTAT OPEN FAIL (0)" /* uucico cannot open an STST file */
12:  "TOO FEW LOG FIELDS (num)" /* L.sys has too few (_num_) fields */
13:  "TOO MANY LOCKS (max)" /* uucico cannot create a lock file, limit (_max_) */

# FOREIGN
Log file                - FOREIGN
Format of contents:     Unknown site site!user (date time)
Typical contents:	Unknown site mole!uucp (Jan 1 00:00:01 1990)

     If this file exists, uucico will refuse all logins from sites not
in L.sys, and will record the attempted logins in this file.  Note that
this is in addition to any access permissions given by USERFILE, and to
the normal local operating system permissions.

# LCK.xxxx
Lock files              - LCK..sys
		        - LCK..dev
		        - LCK.file
                        - LCK.directory
Format of name:           LCK..site name
                          LCK..device name
                          LCK.AUD for the AUDIT file
		          LCK.LOG for the LOGFILE file
                          LCK.LSTAT for the L_stat file
                          LCK.LSUB for the L_sub file
                          LCK.RSTAT for the R_stat file
                          LCK.RSUB for the R_sub file
                          LCK.SEQ for the SEQF file
                          LCK.SQ for the SQFILE file
                          LCK.XQT for the XQTDIR directory
Typical name:             LCK..japan
		          LCK..tty1
		          LCK.LOG
Format of contents:       pid program_name user_name
Typical contents:         0123 uucp mole        # program uucp, run by mole

     These files contain the pid of the process holding the lock, and are
used to limit access to finite resources such as sites, devices, and logs.

     Programs normally remove any locks that they have set, even when
interrupted by a signal, but in some circumstances lock files can be left in
place.  In that case the normal operation of UUCP will be disrupted, and the
lock files will have to be removed either by the administrator.

     If uucico ends a session with an error flag set, it will clear the
lock file of the device it has been using, but (depending on the type of
error) may leave the lock file for the remote site in place.

# LOGFILE
Log file                - LOGFILE
Format of contents:       site!user (date time) (id pid task) status \
                          detail
Typical contents:         mole!uucp (Jan 1 00:00:01 1990) (U 30 0) OK \
                          (startup)

     This is the main log for UUCP, and contains a record of every major
action of uucp, uucico, uux and uuxqt.  The id identifies the program
which wrote the line: U is uucp, C is uucico, X is uux, and Q is uuxqt.

     Note that there are two types of status messages, ASSERT and STATUS.
The former are due to local system problems, and the latter due to uucp
transaction problems.  The ASSERT messages generally bring the whole
process to a halt, and are logged in the ERRLOG.  The STATUS messages
are entered in the LOGFILE, and generally allow the current transfer
to continue.

     The formats of all the various status messages are given below.

/*
 * LOGFILE file entries
 *
 * Format of contents: site!user (date time) (id pid task) status detail
 * Only the detail fields are given here.
 */
00:  "NULL MSG" /* Empty message */
01:  "ASSERT ERROR" /* Assert error; full description in ERRLOG */
02:  "AUTODIAL (dev: Interrupted system call)" /* Modem on _dev_ in use */
03:  "BAD LOGIN/PASSWORD" /* Login to remote machine failed */
04:  "BAD READ" /* uucico cannot read/write to a device */
05:  "BAD SEQUENCE CHECK" /* SQFILE numbers do not match */
06:  "CALLBACK REQUIRED" /* Remote system requires callback */
07:  "CANNOT CALL (SYSTEM STATUS)" /* An unexpired status file exists for the system */
08:  "COPY FAILED (cannot copy TM file)" /* File transfer failed */
09:  "COPY FAILED (reason not given by remote)" /* File transfer failed */
10:  "COPY (SUCCEEDED)" /* File transfer succeeded */
11:  "FAILED (call to sys)" /* Call to _sys_ failed in the modem or the login script */
12:  "FAILED (conversation complete)" /* Call failed after successful startup */
13:  "FAILED (startup)" /* Call failed in conversation level exchanges */
14:  "HANDSHAKE FAILED (LCK)" /* A remote lock file exists for this system */
15:  "LOCKED (call to sys)" /* Already in contact with _sys_ */
16:  "NO CALL (MAX RECALLS)" /* Reached maximum number of call attempts */
17:  "NO CALL (RETRY TIME NOT REACHED)" /* Retry time not reached */
18:  "OK (conversation complete dev time)" /* Session ok using _dev_, _total_time_ */
19:  "OK (DIAL dev number time)" /* Dial ok using _dev_, _pbone_number_, _dialling_time_ */
20:  "OK (startup)" /* Protocol matched ok */
21:  "REQUEST (command)" /* Work request _command_ sent or received */
22:  "REQUEST (remote access to path/file denied)" /* Work request refused */
23:  "REQUEST (cannot create TM file)" /* Work request refused */
24:  "SUCCEEDED (call to sys)" /* Call to _sys_ succeeded */
25:  "TIMEOUT (sys)" /* _sys_ did not answer within set time */
26:  "WRONG TIME TO CALL" /* Outside time limits in L.sys */

# STST.xxxx
Status files            - STST.xxxx
Format of name:           STST.site_name
Typical name:             STST.vole
Format of contents:       pid status attempts unix_time retry_interval site \
                          message
Typical contents:         0123 0 1 600000000 3300 vole \
                          DIAL FAILED

     These files contain information on the status of the most recent
conversation with the remote site.  They remain in place after some forms
of error, and prevent further access to the named site by uucico.  The
contents of the fields are:

     Pid                Pid of process owning STST file
     Status             Always 0 in this implementation
     Attempts           Number of attempts made to contact the site
     Unix time          Time of last attempt, in seconds from 1 Jan 70
     Retry interval     Number of seconds required between attempts
     Site               Site being called
     Message            Status of last attempt

The formats of all the various messages are given below:

/*
 * STST file entries
 *
 * Format of contents: status attempts unix_time retry_interval message site
 * Only the message fields are given here.
 */
00:  "NULL MSG"         /* Empty message */
01:  "DIAL FAILED"      /* The remote site did not answer */
02:  "LOGIN FAILED"     /* The login sequence failed */
03:  "TALKING"          /* Conversation in progress */

# SYSLOG
System transfer data    - SYSLOG
Format of contents:       site!user status (date time) (id pid task) \
                          direction bytes / secs:ticks [proto] dev
Typical contents:         vole!abc S (Jan 1 00:00:01 1990) (U 30 1) \
                          -> 100 / 1:0 secs [g] tty1

     This file contains traffic statistics, and is updated by uucico at
the end of each successful file transfer.  The contents are self-explanatory,
but due to a bug in the Minix 1.5 kernel transfer times will always be zero
when the 'f' or 't' protocol is used.

     Depending on the system, a tick may be 1/60 or 1/100 sec.

# TM.xxxx
Temporary files         - TM.xxxx.xxx
Format of name:           TM.sequence_number.task_number
Typical name:             TM.3456.000

     These files hold incoming data during actual file transfers by uucico;
if uucico cannot move incoming files to the correct directory, they remain
as TM files in the SPOOLDIR.

Temporary files         - TM.xxxx
Format of name:           TM.pid
Typical name:             TM.3456

     These are used by various programs in the UUCP suite to hold temporary
data.  Files with names TM.pid.[1234] are generated by the mail program.

# X.xxxx
Execute files           - X.xxxx
Format of name:           X.site grade sequence_number
Typical name:             X.moleX9012

     These files are generated by uux, and contain commands for uuxqt. The
grade is always X.  Each line of a workfile must start with a specific
identifying character; comment lines, starting with '#', are ignored.
Valid characters are:

     U - user line
     Format: U user site, where user and site define the requester

     F - required file line
     Format: F uuxfile realfile, where uuxfile is the uux generated name
          and realfile is the original name (without path information).
     
     I - standard input line
     Format:  I filename, where "<" or "_" is used to redirect input
          into uux.  If no standard input is given, /dev/null is used.

     O - standard output line
     Format:  O filename site, where ">" is used to redirect output.
          If no standard output is given, /dev/null is used.

     R - flag to mark uux -a option
     Format: R username, notify username by mail on completion, rather
          than notify the actual user, which is the default.

     B - flag to mark uux -b option
     Format: B, send input to user when the command exit status is error.

     N - flag to mark uux -n option
     Format: N, do not notify user of the command exit status.

     M - flag to mark uux -s option
     Format: M filename, write the command exit status into file filename.

     Z - flag to mark uux -z option
     Format: Z, do not notify user if the command succeeds.

     C - command line 
     Format:  C command [args], where command is to have the shell PATH
          prepended before being executed by "sh -c".

The lines may be written in any order, and only the U and C lines are
essential.  There may be only one instance of each type of line, except
for F lines, of which there may be several.  Uuxqt moves the input files
to /usr/spool/.XQTDIR before running the command.

# modemcap
modemcap - modem capabilities database

     This file is a form of termcap for modems, and is used by the 
dial(3) package.  For more information, see the documentation of
that package.

     For cu or uucico to dial out, there must be a modem name in the
last column of L-devices matching an entry in modemcap; which in turn
should match the physical modem on the port.

     The modemcap database is usually made generally available in /etc.

# cu
Command:        cu - call a Unix system
Syntax:         cu [-b] [-c] [-e] [-h] [-l line] [-o] [-s speed] [-t] [-x #]
		[number|site]
Flags:          -b #            Set bits to #
                -c              Clear high bit		
                -e              Set even parity
                -h              Emulate half-duplex (not installed)
                -l line         Use the given direct line
                -o              Set odd parity
                -s speed        Use the given speed
                -t              Convert CR=>CRLF (not installed)
                -x #            Set diagnostic level, 12 maximum
                number          Call the given number
                site            Call the given site
Examples:       cu vole                 # call vole using L.sys, L-devices
                cu -ltty2 -s2400        # connect to DIR tty2 at 2400 baud

     Cu is very rudimentary as far as communications go, but it can be used
to exercise most of UUCP's own data files, such as L.sys, L-devices,
and L-dialcodes.  It is therefore quite useful for debugging.

     Cu has a limited series of escape codes to run commands on the local
system and to move (ASCII) files between two systems.  The escape codes are:

   ~.                   quit cu
   ~?                   list escapes
   ~!                   escape to a shell
   ~!cmd                run cmd here, put output here
   ~$cmd                run cmd here, put output there
   ~~                   send ~ to remote
   ~%>:file             divert received data to file
   ~%>:                 end diversion
   ~%put from [to]      put a file to the remote
   ~%take from [to]     take a file from the remote
   ~%cd [dir]           change local directory - dir defaults to $HOME
   ~%break              send BREAK to remote
   ~%debug              toggle diagnostic output
   ~l                   show line ioctl structure
   ~t                   show terminal ioctl structure

     Commands starting with % (except for break and debug) run on the remote
site, and depend on commands such as echo, cat and stty being available there.

     Cu shares device locking, as well as data files, with uucico; if
the site name option is used, then cu will not call out if the remote
site has a lock file in the spool directory.  If called without a site
name cu uses only those L-devices entries which have "Device" in the
first field; it then checks the device lock files to ensure that the
actual line chosen is free.

     Cu does not use any of the UUCP log or status files.

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/L-devices
            /usr/lib/uucp/L-dialcodes
            /usr/lib/uucp/SYSTEMNAME
            /etc/modemcap

# uucheck
Command:        uucheck - check the UUCP files and permissions.
Syntax:         uucheck [-v] [-x #]
Flags:          -v      Verbose mode, check all directories and files
                -x #    Set diagnostic level, 12 maximum
Examples:       uucheck         # check USERFILE, L-cmds and L.sys entries

     Uucheck inspects the entries in the USERFILE and in L-cmds, and reports
on the access they give to any external systems.  It also does a limited
amount of checking of the validity L.sys entries.  With the -v option uucheck
searches for all the UUCP files that might exist, and gives an fstat(2) report
if they are found.

     For uucheck to state 'does not exist' is often not a real problem; the file
either may not be needed, or may be generated spontaneously by UUCP when
required.  If uucheck marks a missing file as 'essential', then you should try
and understand why; that may well indicate that something is actually wrong.

     Uucheck's scan of L.sys is fairly limited, but it should catch the
more obvious errors.  Uucheck does not look at L-devs at all, so the
L.sys -> L-devs interaction is not checked.

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/USERFILE

# uucico
Command:        uucico - file transport program for UUCP.
Syntax:         uucico [-r role] [-s sys] [-x diags]
Flags:          -r #    Set uucico's startup role (1 - Master, 0 - Slave)
                -s sys  Call site sys
                -S sys  Call site sys, regardless of time
                -T      Reverse the default message termination byte, ^@ <-> ^J
                -U      Reverse the default 'run uuxqt' flag setting
                -x #    Set diagnostic level, 12 maximum
Examples: uucico -x12 -smole    # call mole with full diagnostics

     Uucico is the workhorse of UUCP, carrying out the tasks that uucp
and uux put in the spool directory, and also responding to logins from
other sites.  It deals with the whole range of communications, dialling,
file transfer protocols, and actual files and their permissions.  It is
normally called by cron at fixed intervals, or by uusched, but can equally
easily be called as a normal program.

     Since it is the shell invoked by the uucp login, uucico normally
starts up in Slave role.  If started in Master role by the -r1 option
it must also be given a site (-sname) to call; -s automatically starts
the program in Master role.  The -S option is equivalent to -s, but no
checks are made for an STST file or a valid L.sys 'time' field.  The -T
option may be needed when calling out through a link that cannot tolerate
nulls, when the uucico has null as the default message terminator.

     Most systems run uusched at intervals from cron: this program scans the
SPOOLDIR, and starts up uucico with the appropriate arguments if necessary.
Since uucico is a resource hog, the number of uucico's running at one time
may need to be limited.  If a maximum number is set at compile time, uucico
will try to establish a lock file in /usr/spool/uucp on startup.  If no lock
is free, uucico will shut down again, and will have to be restarted by some
other agency.

     In the same way, there may not be space in memory for uucico to exec
uuxqt, and for uuxqt in turn to exec a large program such as rmail; a
compile-time option sets uucico's default behaviour, (run/do not run uuxqt
before terminating), and the -U flag reverses this behaviour at run-time.

     If the file FOREIGN exists, uucico will accept logins only from sites
explicitly listed in L.sys.

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/L-devices
            /usr/lib/uucp/L-dialcodes
            /usr/lib/uucp/L_stat
            /usr/lib/uucp/R_stat
            /usr/lib/uucp/SEQF
            /usr/lib/uucp/SQFILE
            /usr/lib/uucp/SYSTEMNAME
            /usr/lib/uucp/USERFILE
            /usr/spool/uucp/AUDIT
            /usr/spool/uucp/ERRLOG
            /usr/spool/uucp/FOREIGN
            /usr/spool/uucp/LOGFILE
            /etc/modemcap

# uuclean
Command:        uuclean - remove expired files from spool directory
Syntax:         uuclean [-d dir] [-m [fn]] [-n [#]] [-p pre] [-s sys]
                        [-w [warn]]
Flags:          -d dir   Clean /usr/spool/uucp/dir not spool directory
                -m fn    Send mail to the deleted files' owner, or to a file
                -n #     Remove files older than # hours - default 72 hours
                -p pre   Remove only files with the specified prefix
                -s sys   Remove only files for site sys
                -w fn    Warn of overage files, do not remove. If a filename
                         is given the warnings are sent there, not to stdout.
Examples: uuclean -n0 -pLCK     # remove all unused LCK files

     On larger systems the spool directory gets quite cluttered, and uuclean
is usually run automatically by cron to clear out decayed files.  By default
it removes all overage files except for the various log files and SYSLOG.  The
warning messages go to the standard output, unless a filename is added to the
-w option.

     Uuclean will not remove a LCK or STST file which does not contain a pid,
or which contains a pid for a running process.  (It execs ps(1) to get a list
of the current valid pids).  It will never remove files whose name starts
with '.' or "o.", or whose name is LOGFILE, ERRLOG, AUDIT, FOREIGN or SYSLOG.

     If run by someone other than root or uucpadm, it will accept no arguments,
and act as if it had been given the arguments -n0 -pLCK.  This is to enable
unused lock files to be removed by ordinary users.

# uucp
Command:        uucp - UNIX system to UNIX system copy
Syntax:         uucp [options] frompath!fromfile topath!tofile
Flags:          -c      Do not link or copy data source file (default)
                -C      Force copy of data source file
                -d      Make all necessary directories (default)
                -f      Do not make intermediate directories
                -g gde  Set grade gde of workfile, lower sent earlier
		-j	Print UUCP job number on stderr
                -m fn   Notify sender (or file) by mail on completion
                -n usr  Notify recipient by mail o/c copy
                -r      Do not call uucico, spool the job
                -s fn   Use file fn as spool directory
                -x #    Set diagnostic level, 12 maximum
Examples: uucp  -m /tmp/old rmtsite!/tmp/new # copy /tmp/old here to /tmp/new
                                             # to /tmp/new there, and send
                                             # mail back on completion 

     Uucp has the same command format as the ordinary file copy command,
except that notation is needed to identify remote machines.  The technique
used is the 'bang path', in which sites are described by the route taken
to reach them from the local machine.  If 'here' connects to 'there', and
'there' connects to 'yonder', then a file on 'yonder' is addressed as
there!yonder!file by someone on 'here'.  From other machines, of course,
it will have a different address.  In principle, uucp can be used to move
files between any machines between which there is a known path, but do not
bet on it.  Largely for security reasons uucp transfers are often fairly
restricted; the most you can usually do is move files in and out of a
machine's PUBDIR (/usr/spool/uucppublic).

     Since PUBDIR is used a lot by uucp, it has it's own notation, '~/'.
A filename starting with '~/' will have the path /usr/spool/uucppublic
prepended.  If the filename starts with ~user, however, ~user is replaced
by that user's $HOME directory.  Uucp will also accept simple regular
expressions (ie. *, ?, [], -, ^, !) to match input file names in the same
way as the shell.  However, uucp will not recursively descend directories
looking for files; to do this, use uuto.

     If uucp is given a local input file which is not world-readable, the
file is spooled regardless of the -c flag.  This is done so that uucico,
which runs with uucp as its owner, can later access the file.

     The operation of the -j flag is reversed if the environment variable
JOBNO exists; uucp then reports the UUCP job number by default.

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/L_stat
            /usr/lib/uucp/R_stat
            /usr/lib/uucp/SEQF
            /usr/lib/uucp/SYSTEMNAME
            /usr/lib/uucp/USERFILE
            /usr/spool/uucp/LOGFILE

# uulog
Command:        uulog - print information from UUCP LOGFILE
Syntax:         uulog [-s sys] [-u usr]
Flags:          -m      Page the output, '\n' continues, EOF quits
                -n fn   Print information from file fn (default NEWSLOG)
                -s sys  Print information on site sys
                -u usr  Print information on user usr
                -y #    Print information younger than # hours
Examples: uulog -u mole -s vole    # print LOGFILE entries for user mole
                                   # on site vole

     By default, uulog prints the whole file /usr/spool/uucp/LOGFILE.  The
various options provide a more selective approach; -s and -u print only lines
that concern the given site or user, and if both user and site are given, then
only lines containing both names together are printed.  Since the LOGFILE may
be long, the -y option shows only the more recent entries.

     Since systems related to UUCP have their own logfiles, the -n option can
be used to set the name of the input file.  Without a filename, the -n option
defaults to the NEWS logfile.  (The -s, -u and -y options generally work only
with the UUCP logfile itself).

     Files: /usr/spool/uucp/LOGFILE

# uuname
Command:        uuname - list site names, or initialise local UUCP name
Syntax:         uuname [-S] [-lv]
Flags:          -S name         Change the local system name (root only)
                -l              Print the name of the local system
                -v              Verbose listing
Examples:       uuname          # print the names of all the sites in L.sys

     The uuname -S option is used to initialise or change the local site's
name; it must be run by root.  With no options, uuname lists all the sites
given in L.sys; the -l option gives the name of the local site.

     The -v option gives a description of each name, if one is available. The
description of the local site follows the site name itself, which is usually
stored in /usr/lib/uucp/SYSTEMNAME.  Descriptions of remote sites are stored
as comment lines in L.sys.  An L.sys line starting with '#:' is assumed to be
a description of the site whose actual L.sys entry is the line following.

     Because of the way that workfiles are named, all site names are
significant only in the first seven characters, and should not contain a
digit.  Since the L.sys name is used in uucico's startup sequence it must be
the exact name by which the remote system is known; so for practical purposes,
site names cannot be more than seven characters long.

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/SYSTEMNAME

# uupick
Command:        uupick - get files placed in user's PICKDIR by uuto
Syntax:         uupick
Flags:		-P      Get files from directory PUBDIR/user
                -s sys  Check files from sys only 
                -u user Check files arrived for user (root only)
                -x #    Set diagnostic level, 12 maximum
Examples: uupick        # inspect and dispose of files in PICKDIR

    Uupick is a convenient way of scanning a user's PICKDIR subdirectory for
files, and moving the files out of PICKDIR to where they are needed.  It is
an interactive program; it presents each file one at a time, in the format
"File filename, # bytes from site sitename ?" and waits for user input.
Possible responses are:

    *     - give a command summary
    d     - delete the current file
    m     - move the current file to the current directory
    m dir - move the current file to the directory dir
    p     - print the current file to the screen
    q     - quit uupick

     Files are found in a series of sub-directories of the form:

     /usr/spool/uucppublic/receive/user/site/*

where user is the current user, and site a specific remote site.  The
files and any subdirectories are moved between machines by an ordinary
uucp process, but the programs uupick and uuto share a directory naming
convention that simplify transfers without burdening the user.

     If PICKDIR contains several levels of subdirectories, uupick will
try to build a matching structure based on the user's current directory.
This means that the user's current directory must be writeable by uucp,
which owns all the PICKDIR files.

     Uupick uses 'mv' to actually do the work, so local files with write
permissions will be overwritten.

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/SYSTEMNAME

# uusched
Command:        uusched - invoke uucico
Syntax:         uusched [-s sys] [-u #] [-x #]
Flags:          -s sys  Run uucico on sys only
                -u #    Set the uucico diagnostic level, 12 maximum
                -x #    Set the uusched diagnostic level, 12 maximum
Examples: uusched       # clear all work waiting in SPOOLDIR

     Uusched is normally run from cron; it scans the SPOOLDIR for work
files, and then executes 'uucico -s site' for all the sites with work
outstanding.  The starting site is randomised to prevent one site hogging
all the resources.

     If uusched is itself called with the '-s site' option, then it will
look only for workfiles for the named site.

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/SYSTEMNAME
            /usr/spool/uucp/LOGFILE

# uuschk
Command:        uuschk - check the UUCP call statistics files
Syntax:         uuschk [-d sys] [-f file] [-s]
Flags:          -d sys          Delete sys from R_sub, L_sub and L_stat
		-d #		Set the R_stat status of job # to killed
                -f file         Show one of R_stat, L_stat, R_sub, or L_sub
                -s              Sort R_sub and L_sub entries
Examples: uuschk                # show all entries in R_stat etc.

     Uuschk is intended for maintenance and set-up use only.  It is a quick
way of checking that the (non-ASCII) data files contain the sort of
information that they should.  All options except for '-f' are limited to
the root and uucpadm logins.

     Since uusub won't remove sites in R_sub and L_sub that it can't find
in L.sys, uuschk can delete these entries, and any matching entries in L_stat.

     Since uustat won't kill an R_stat entry unless the file exists in the
SPOOLDIR, uuschk can set the status of any entry in R_stat to "KILLED".

     Uuschk is not a part of the standard UUCP suite.

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/L_stat
            /usr/lib/uucp/L_sub
            /usr/lib/uucp/R_stat
            /usr/lib/uucp/R_sub
            /usr/lib/uucp/SYSTEMNAME

# uustat
Command:        uustat - UUCP status enquiry and job control
Syntax:         uustat [ckrjmMp] [u usr] [s sys] [o #] [y #] [q]
Flags:          -c #    Remove R_stat and L_stat entries older than # hours
                -k #    Kill UUCP job #, removing command and data files
                -r #    Rejuvenate job #, touching command and data files
                -j      Report the status of all the current user's UUCP jobs
                -j #    Report the status of job #
                -j all  Report the status of all jobs
                -o #    Report the status of all jobs older than # hours
                -y #    Report the status of all jobs younger than # hours
                -s sys  Report the status of all jobs for sys
                -u usr  Report the status of all jobs for usr
                -m sys  Report the status of sys
                -m all  Report the status of all sites
                -M sys  As -m, but including last successful connection time
                -p      Show the ps(1) output for all lock file pids
                -q      Report the numbers of command and data files, the
                        time of the oldest and youngest file queued, and the
                        creation time of any lock file, for each site in L.sys.
Examples: uustat        # report the status of all the current user's jobs

     Uustat displays job status, or cancels or rejuvenates jobs.  Only the
root and uucpadm logins can alter jobs that they do not own.  Option output
formats are:

     -j - job-number user remote-site command-time status-time status
     -m - remote-site status-time status
     -M - remote-site status-time success-time status
     -p - standard ps(1) output line 
     -q - site #jobs #files earliest_file latest_file lock_file

     If the -q option is used, and the latest file is more than 24 hours
old, or a lock file is more than 24 hours old, the entry is marked with '**".

     Possible status messages are:

     STATUS UNKNOWN: SYSTEM ERROR
     LOCAL CAN'T CREATE TEMP FILE
     CAN'T COPY TO LOCAL DIRECTORY
     LOCAL ACCESS TO FILE DENIED
     REMOTE CAN'T CREATE TEMP FILE
     CAN'T COPY TO REMOTE DIRECTORY
     REMOTE ACCESS TO FILE DENIED
     BAD UUCP COMMAND GENERATED
     CAN'T EXECUTE UUCP
     JOB IS QUEUED
     COPY FAILED
     COPY (PARTIALLY) SUCCEEDED
     COPY FINISHED, JOB DELETED
     DONE (WORK HERE)
     JOB KILLED (INCOMPLETE)
     JOB KILLED (COMPLETE)

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/L_stat
            /usr/lib/uucp/R_stat
            /usr/lib/uucp/SYSTEMNAME

# uusub
Command:        uusub - monitor a UUCP network
Syntax:         uusub [-a sys] [-c sys] [-d sys] [-u #] [-flr]
Flags:          -a sys  Add sys to the network
                -c sys  Poll sys
                -d sys  Delete sys from the network
                -u #    Collect statistics for the last # hours
                -f      Flush connection statistics
                -l      Report the connection statistics
                -r      Report the traffic statistics
Examples: uusub -c all -u 24    # Poll all named sites, collect
                                # the last day's statistics
          uusub                 # update statistics

     Uusub collects traffic statistics on a list of sites; only root
and uucpadm can use options other than -l or -r.  Sites are added to
the list with the -a option, and removed with -d; since the list is used
to poll sites, only sites named in L.sys can be added.  Each time uusub
is run with the -u # option, data from the last period is flushed.  The
data for connections is kept in /usr/lib/uucp/L_sub, and that for traffic
in /usr/lib/R_sub.  The -c option will poll only sites named in R_sub and
L_sub, ie. not all those sites which are known to L.sys.

     The output from the -r option is of the form:

     site       sfile    sbyte    rfile    rbyte
     mole       99       999999   88       888888
     vole       1        11       2        22

     The sfile and sbyte column show the files and data sent by the remote
site in the period specified by the -u option, or since the site was
added to the list.  The rfile/rbyte columns show the data sent to the
remote site.

     The output from the -l option is of the form:

     site    #calls #ok ok_time     #dev #login #nack #other
     mole    99     89  (1/1-00:01) 1    2      3     4 

     The statistics cover the period specified by the -u option.

     #ok is the number of successful calls made to the remote site
     ok_time is the time of the last successful call
     #dev is the number of times that a line was not available
     #login is the number of times that login failed
     #nack is the number of times that the session failed
     #other is the balance of failures, eg: "wrong time to call"

     If the sysname "all" is used with the -c option all sites in the 
list are polled.  This is typically done once every 24 hours from cron.

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/L_sub
            /usr/lib/uucp/R_sub
            /usr/lib/uucp/SYSTEMNAME

# uuto
Command:        uuto - send files to PICKDIR
Syntax:         uuto  filename site!user
Flags:		-P      Send files to directory PUBDIR/user
                -m      Notify sender of successful transfer
                -p      Force spooling of data source file
                -x #    Set the diagnostic level, 12 maximum
Examples: uuto foo vole\!usr   # send foo to vole!PICKDIR/usr/site/foo

     Uuto is a convenient way of sending files, since UUCP can generally
move files only into and out of the PUBDIR on remote machines.  Although
it uses very long filenames (PICKDIR is /usr/spool/uucppublic/receive)
it shares standard conventions with uupick, so that together they form
a simple menuing system for UUCP.

     Uuto is actually just a front-end for uucp; it parses its arguments,
then passes them to the real uucp program.  If given a directory as the
input path it proceeds recursively down into any subdirectories, asking
the user for confirmation of transmission for each new subdirectory.
Individual files are sent without equivocation.

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/SYSTEMNAME

# uux
Command:        uux - send commands to a remote site
Syntax:         uux [options] site!command [i/o control]
Flags:          -       Use standard input to uux on local system
                -a usr  Notify usr by mail on completion of command
                -b      Send uuxqt input to user if the command fails
                -c      Do not link or copy data source file (default)
                -C      Force a copy of data source file
                -g gde  Set grade gde of workfile, lower sent earlier
                -j      Print UUCP job number on stderr
                -n      Do not notify initiator of command status
                -p      Use standard input, the same as '-'
                -r      Do not call UUCICO, queue the job
                -s fn   Write the command output status into file fn
                -x #    Set the diagnostic level, 12 maximum
                -z      Do not notify initiator if command succeeds
Example: uux vole!remote_task \> !local_file # local output from remote task
         uux -p vole!remote_task <local_file # local input to remote task

     Uux sends a command to a remote site, first gathering input files from
other sites if necessary, and then sends the output to whatever site is
required.  By default, the initiator is always notified by mail of the
the remote command exit status, but various uux options can change this.

     Files are described by a 'bang path' notation similar to that used by
uucp.  Filenames without a '!' or with a leading '!' are assumed to be on
the local system; uux accepts the '~' (PUBDIR) notation, but not '.' or '..'
or shell-type wildcards.  Uux's command line parser is not infinitely wise;
it will accept '<' or '>' only as the last entries on the command line.
However, it does a certain amount of checking to ensure the validity of
the command file it produces.  In particular, the '~usr' notation won't
work for remote files, as uux cannot know the remote HOME directory name.

     Uux accepts a limited number of special characters in remote commands:

     >    Redirect output to next filename
     <    Redirect input from next filename
     ()   Ignore '!' in filenames inside brackets
     ;    Run a sequence of programs
     |    Pipe output to input 

These special characters must be insulated from the local shell by quotation
marks or escapes.

     Note that the number of commands that uuxqt is permitted to run is
likely to be very restricted for security reasons; often only mail and news
are allowed.  (The commands are listed in the remote site's L-cmds file).

     Uux creates work files in the local spool directory, which after
transmission by uucico become execution files, X.xxxx, in the remote spool
directory.  These files contain all the information needed for a daemon,
uuxqt, to run the required command.  Each line of an execution file starts
with a specific identifying character.  Valid characters are:

     U - user line
     F - required file line
     I - standard input line
     O - standard output line
     R - flag to mark uux -a option
     B - flag to mark uux -b option
     N - flag to mark uux -n option
     M - mailbox file, from uux -s option
     Z - flag to mark uux -z option
     C - command line 

The lines may be written in any order, and only the U and C lines are
essential.  There may be only instance of each type of line, except for
F lines, of which there may be several.  Comment lines, starting with '#',
are permitted.

     Not all versions of uuxqt understand all these flags - uuxqt seems much
less standardised than the rest of the UUCP suite.  In particular, the Z line
seems to mean 'Do not send success status to user' in some versions, and
'Send success status to user' in others.  This makes no difference to uux,
which simply sets the flag, but to avoid a flood of unwanted messages this
version of uuxqt can be adapted to either approach.

     Uuxqt runs the command only when the commands issued by uux have
assembled all the required files on the remote site, and itself uses the
spool directory /usr/spool/uucp/.XQTDIR.

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/L_stat
            /usr/lib/uucp/R_stat
            /usr/lib/uucp/SEQF
            /usr/lib/uucp/SYSTEMNAME
            /usr/spool/uucp/LOGFILE

# uuxqt
Command:        uuxqt - execute a command from a remote site
Syntax:         uuxqt [-x #] [-s sys]
Flags:          -s sys  Execute work for sys only
                -x #    Set the diagnostic level, 12 maximum
                -Z      Reverse the action of the Z line

     Uuxqt is normally run only by uux or uucico.  On startup it checks
the spool directory for X.xxx workfiles generated by uux, and then for
each file checks that the required files (those listed on F lines) are
available.  If all the files are present uuxqt moves them to the directory
/usr/spool/uucp/.XQTDIR and executes the required command; it then builds
uucp command files as required to transmit any output or mail files.

     For security reasons possible commands are restricted to those listed
in /usr/lib/uucp/L-cmds.

     There seem to be two approaches to uuxqt command status reporting and
the N and Z flags.  In the first, uuxqt reports good and bad status by default,
with N turning off all reports and Z turning off good reports.  In the other
case uuxqt reports only bad status by default, with N still turning off all
reports but the Z flag now turning on good reports.  This uuxqt is configured
to use the first method by default.  This can be changed at compile time by
the #define GOODREP, or at run time by the -Z option.

     Files: /usr/lib/uucp/L.sys
            /usr/lib/uucp/L-cmds
            /usr/lib/uucp/L_stat
            /usr/lib/uucp/R_stat
            /usr/lib/uucp/SEQF
            /usr/lib/uucp/SYSTEMNAME
            /usr/lib/uucp/USERFILE
            /usr/spool/uucp/LOGFILE

# umail rmail
Command:        umail - Remote Mail Delivery Agent
Syntax:         umail [-c config] [-d] [-i inputfile] [-n] user
Flags:          -B      Use SMTP protocol (AmoebaNET)
                -c cfg  Use cfg as the configuration file
                -d      Debug mode
                -i fn   Use fn as the input message file
                -n      Run the Transport Agent at once
                user    Recipient: any legal UUCP or Internet mail-address
Example: umail rmt!usr < msg   # send file msg to user usr at site rmt

     Umail is a semi-intelligent mail transporting program which knows about
about Internet addresses and mail address routing to other sites.  Umail
doesn't itself handle message input, but takes messages from files or from
local mailers such as mail(1) via standard input.  Umail then rewrites the
message address in a standard format (RFC-822) and passes the result to the
appropriate transport agent (eg. UUCP) for transmission.

     Networking programs like uucico(1M) execute the rmail(1) command to
deliver an incoming message to a local user, or to forward the message on
to another site.  If umail is linked to 'rmail' (restricted mail) then it
will perform these Remote Mailer functions.

    On startup, umail reads the file /usr/lib/umail.cf which contains details
of the working environment, routing tables, and so on.

     For more detailed information, see the umail.doc file.

     This program is not part of the UUCP package.

# wmail lmail
Command:        wmail - Local Mail Delivery Agent
Syntax:         wmail [-Qepqrv] [-f mailbox] 
                wmail [-Qdvt] [-i inputfile] [-s subject] user 
                lmail [-Qv] [-i inputfile] user
Flags:                  Used to read mail:
                -Q      Do not read system or user .mailrc at startup
                -e      Check for the presence of mail only
                -f fn   Use fn as the mailbox
                -p      Print all messages without stopping
                -q      Quit on interrupt
                -r      Print mail in reverse order (not used in Minix)
                        Used to send mail:
                -Q      Do not read system or user .mailrc at startup
                -d      Run Remote Mailer at once
                -i fn   Use fn as the input message file
                -t      Include all addressees in the To: line (default ON)
                -s subj Use subj as the Subject: line
                -v      Verbose mode
                user    Recipient's address
Example: wmail rmt!usr          # write to user usr at site rmt

     W-MAIL is a program that can be used to either read or create email
messages.  Since it knows how to deliver mail only to users within the
originating site, if it is given an address for a remote site it passes
the message to the Remote Mailer, usually rmail(1), for forwarding.

     W-MAIL itself is often used to generate the messages that it delivers,
but if the Remote Mailer finds an incoming message addressed to a local user,
then it passes the message to the Local Mail Delivery Agent (usually 'lmail')
for delivery.

     W-MAIL can thus be called in three ways:

     For reading mail:    wmail [-Qepqrv] [-f mailbox] 
     For sending mail:    wmail [-Qdvt] [-i inputfile] [-s subject] user ... 
     For delivering mail: lmail [-Qv] [-i inputfile] user ... 

     When W-MAIL is called without a user argument, it reads the contents of
the current users's mailbox and displays a message summary.  This consists
of one line for each message giving the sequence number, the sender's name,
the size of the message, its creation date, and its subject.  W-MAIL then
prompts with the current message number, and waits for the user's response.
A list of the available commands can be requested by typing '?'.

     When the program is called with a user argument, it is assumed that
a message is to be sent to that user.  If the program is called as 'lmail',
then the message is simply delivered to the (local) recipient.  Otherwise,
W-MAIL prepends a postmark to the message body, of the form:

     From <user> <date> 
     To: <addressee> 
     Subject: <subject of message> 
     <empty line> 

     (The To: and Subject: lines are optional.)

W-MAIL then appends a signature file if required, and either delivers the
message locally or passes it to a Remote Mailer, depending on the address.

     If errors occur during local delivery, the message is stored in a 
dead.letter file so that it can be resent later.  If an environment variable
DEADLETTER is defined, it will be used as the dead.letter file name.

     On startup W-MAIL attempts to read a system configuration file (usually
/usr/lib/wmailrc), and a user configuration file ($HOME/.mailrc).  The
program's default settings (eg. editors, signatures) can be customised quite
easily via these two files.

     For more detailed information, see the wmail.doc file.

     This program is not part of the UUCP package.

# wnews rnews
Name:           WNEWS - Minix NEWS package
Commands:       rnews       - spool incoming articles
                unbatch     - process spooled articles
                inews       - post articles locally or remotely
                control     - implement NEWS control messages
                sendbatch   - batch articles for transmission
                expire      - dispose of old news articles
                pnews       - create an article (front end to inews)
                checknews   - report if news available

     WNEWS is a suite of programs, those listed above, which process incoming
and outgoing Usenet news articles.  It is essentially a 'B-news lookalike',
which has been simplified for use on small Minix systems.  It is too extensive
to discuss fully here, but since it often uses UUCP for data transport, its
capabilities will be summarised.

     Each site reading Usenet news is connected to one or more 'news feeds',
which supply the site with new news articles and accept new news articles from
it.  Articles thus propagate across the net by a 'flooding' algorithm, enhanced
by 'backbone' sites which carry heavy traffic across or between countries.

     Each news feed keeps lists of those new articles which have not been sent
to dependant sites, and intermittently runs 'sendbatch'; firstly to collect all
the unsent articles into a few, large, data files and secondly to use 'uux' to
run 'rnews' on the receiving sites, with the data files as arguments.  News
articles are thus transmitted as normal data files, and can be sent by any
available means, not only UUCP.

     Since unbatching puts a heavy load on the system, when run by 'uuxqt' the
WNEWS 'rnews' simply spools the incoming data files, renaming them and storing
them in the directory spool/news/.rnews.  Once off-line, 'rnews -U' can be
used to run 'unbatch', which unpacks the spooled files, and 'inews' which posts
any extracted news.  'inews' in turn may call the program 'control', which
deals with messages intended for automatic news administration.  'inews' keeps
a single copy of a news file, and links it to files in subdirectories to
provide an indexing system.  That is, message 19 to comp.os.minix would be
found in the file /usr/spool/news/comp/os/minix/19.  'inews' adds news items
with no sub-directory to the group 'junk', if that directory exists.

     News batches are usually compressed with a 16-bit compress that the
standard PC Minix compress cannot handle.  However, a program to uncompress
16-bit compressed files in limited memory has been posted to the net.

     A full news feed runs to tens of megabytes per day; fortunately, sites
can select the groups they wish to receive.  A lot of data still accumulates,
however, and 'expire' is used to dispose of outdated news articles, either by
deleting or archiving them.

     While 'inews' can be used to post news articles directly, it is awkward
to use.  'Pnews' is an editing interface to 'inews', with a command structure
similar to 'mailx' (and wmail).  It can be used either to reply to current
articles, or to post entirely new ones.

     'Checknews' simply reports whether there is unread news available, by
comparing /usr/lib/news/active and $HOME/.newsrc.

     Once posted locally, news is read via newsreaders such as 'readnews',
'vnews', or 'tass'.  These often include some of the functionality of 'pnews'.

     WNEWS uses a number of data files in /usr/lib/news, such as 'active',
'sys', 'newsgroups', and 'distributions'.  It also maintains various log files,
also kept in /usr/lib/news.  For more detail on these files, and on the WNEWS
suite, see the wnews.doc file.

     This program is not part of the UUCP package.

# tass
Command:        tass - Visual threaded Usenet news reader 
Syntax:         tass [-b] [-u] [-f newsrc-file] [newsgroups]
Flags:          -b      Turns on the TASS_BACKWARDS option.
                -f fn   Use the indicated file 'fn' instead of $HOME/.newsrc.  
                -u      Run Tass in update mode.

     Tass is a full screen threaded Usenet newsreader.  It has three reading
levels: the newsgroup selection page, the group index page and the article
viewer.  Use the 'h' (help) command to view a list of the commands available
at a particular level; the help screen shown changes with the level.

     On startup Tass will show a list of the newsgroups found in $HOME/.newsrc,
and an arrow will point to the first newsgroup.  Move the arrow by using either
the terminal arrow keys, or 'j' and 'k'.  Control-D will page down, control-U
will page up.  You can enter a newsgroup by pressing RETURN. 

     The TAB key may be used to advance to the next newsgroup with unread
articles and enter it; TAB from the newsgroup index page will progress through
unread articles.  After having read all of the new articles in a group, TAB will
then advance to the next newsgroup with unread articles. 

     To track message threads, Tass keeps an index for each group in the file
/usr/spool/news/.tindex, or in the user's $HOME directory.  The file
$HOME/.newsrc lists the news groups read by the individual user, and the
messages already read in each group.
 
     For more detailed information, see the Tass help screens.

     This program is not part of the UUCP package.
