BSD 4_4 release
[unix-history] / usr / src / usr.bin / uucp / SMM.doc / uucpimpl / implement.ms
index a775a73..845edc5 100644 (file)
-.\"    @(#)implement.ms        4.1 (Berkeley) %G%
+.\" Copyright (c) 1986, 1993
+.\"    The Regents of the University of California.  All rights reserved.
 .\"
 .\"
-.RP
-.TM 78-1273-5 39199 39199-11
-.ND October 31, 1978
-.if \n(TN>0 .FS
-.if \n(TN>0 * On internship from Department 9444.
-.if \n(TN>0 .FE
+.\" This module is believed to contain source code proprietary to AT&T.
+.\" Use and redistribution is subject to the Berkeley Software License
+.\" Agreement and your Software Agreement with AT&T (Western Electric).
+.\"
+.\"    @(#)implement.ms        8.1 (Berkeley) 6/8/93
+.\"
+.ds UU UUCP
+.ds Uu U\s-2UCP\s+2
+.ds uu \s-2UUCP\s+2
 .TL
 .TL
-Uucp Implementation Description
-.AU "MH 2C-572" 3126
-.ie \n(TN>0 D. A. Nowitz\s-2\u*\d\s+2
-.el D. A. Nowitz
+Installation and Operation of \*(UU
+.br
+4.4BSD Edition
+.AU
+D. A. Nowitz
+.AI
+AT&T Bell Laboratories
+Murray Hill, New Jersey 07974
+.AU
+Carl S. Gutekunst
+.AI
+Communications Software Research and Development
+Pyramid Technology Corporation
+Mountain View, California 94039
 .AB
 .AB
-.PP
-Uucp is a series of programs designed to permit communication
+\*(Uu is a series of programs designed to permit communication
 between
 between
-UNIX
-systems using either dial-up or hardwired communication
-lines.
-This document gives a detailed implementation
-description of the current (second)
-implementation of uucp.
+.UX
+systems using a variety of communications links.
+\*(Uu provides batched, error free file transfers and remote command
+execution.
+It is well suited for tasks such as electronic mail, public news networks,
+and software distribution, particularly when only slow,
+low-cost communication links are available (e.g., 1200 baud dial-up).
 .PP
 .PP
-This document is
-for use by an administrator/installer of the system.
-It is not meant as a user's guide.
+This document describes the 4.3BSD version of \*(Uu.
+This is a distant but direct descendent of the ``second implementation''
+of \*(Uu developed by D. A. Nowitz at AT&T Bell Laboratories.
+A number of other \*(Uu versions are in common usage; these are discussed
+only to the extent that they affect administration of 4.3BSD systems.
+.LP
+Revised August 24, 1986
 .AE
 .AE
-.CS 12 5 15
-.SH
-Introduction
 .LP
 .LP
-Uucp is a series of programs designed to permit communication between
-.UX
-systems using either dial-up or
-hardwired communication lines.
-It is used for file transfers and remote command execution.
-The first version of the system was designed and implemented
-by M. E. Lesk.\s-2\u1\d\s+2
-.FS
-1 M. E. Lesk and A. S. Cohen,
+.OH 'Installation and Operation of UUCP''SMM:14-%'
+.EH 'SMM:14-%''Installation and Operation of UUCP'
+.ne 5
+.NH
+\*(UU OVERVIEW
+.PP
+\*(Uu is a batch-type operation.
+Users issue commands that are queued in a spool directory for processing
+by background daemons.
+.LP
+\fIUucp\fP (UNIX-to-UNIX Copy) and \fIuux\fP (UNIX-to-UNIX Execution)
+provide the user interface to \*(Uu.
+.I Uucp
+has syntax and semantics similar to the standard
 .UX
 .UX
-Software Distribution by Communication Link,
-.ie \n(TN>0 TM-77-1274-3, TM-77-8234-5.
-.el private communication.
-.FE
-This paper describes the current (second) implementation
-of the system.
-.LP
-Uucp is a batch type operation.
-Files are created in a spool directory for processing
-by the uucp demons.
-There are three types of files used for the execution
-of work.
-.I Data\ files
-contain data for transfer to remote systems.
-.I Work\ files
+utility \fIcp\fP(1), with the added ability to prefix filenames with
+system names.
+Similarly, \fIuux\fP mimics the conventions of \fIsh\fP(1), and allows
+commands to be prefixed with system names.
+.LP
+\fIUucico\fP (Copy-In, Copy-Out) is the primary \*(Uu daemon.
+It processes the requests queued by \fIuucp\fP and \fIuux\fP,
+initiates calls to remote systems, transfers files, and forks other
+daemons to execute \fIuux\fP-requested commands.
+\fIUucico\fP also acts as the \*(Uu ``shell'' when remote systems call in
+to requests transfers.
+.LP
+Three types of files are used in \*(Uu operation.
+\fIControl files\fP describe the \*(Uu environment, including
+known remote hosts, available devices, and remote file access permissions.
+Control files are relatively static; they are generally changed only by the
+system administrator.
+\fISpool files\fP (also called \fIQueue files\fP) contain transfer requests
+and data; they are created and deleted as necessary
+by \fIuucp\fP, \fIuux\fP, and \fIuucico\fP.
+\fILog files\fP accumulate a history of \*(Uu activity; these tend to
+grow forever if not periodically cleaned up.
+.LP
+Spool files are further divided into three types:
+\fIWork files\fP
 contain directions for file transfers between systems.
 contain directions for file transfers between systems.
-.I Execution\ files
-are directions for
+Every invocation of \fIuucp\fP or \fIuux\fP creates one or more work files.
+\fIData files\fP contain data for transfer to or from remote systems.
+\fIExecution files\fP contain directions for
 .UX
 command executions which
 involve the resources of one or more systems.
 .UX
 command executions which
 involve the resources of one or more systems.
-.LP
-The uucp system consists of four primary and two
-secondary programs.
-The primary programs are:
+Execution files are created only by \fIuux\fP.
+.\"===========================================================================
+.\" SECTION 2: USER UTILITIES
+.\"===========================================================================
+.ne 5
+.NH
+USER UTILITIES
+.PP
+\*(Uu includes a total of ten ``primary'' utilities, that is, ten
+utilities for general users.
+All reside in the \fB/usr/bin\fP directory, where they are easily accessible.
+This section provides detailed implementation descriptions for the more
+important commands; see the corresponding \fIman\fP pages for additional
+information.
+.LP
+The following two commands queue transfer requests:
 .RS
 .RS
-.IP uucp 10
-This program creates work and gathers data files in the spool directory
-for the transmission of files.
-.IP uux
-This program creates work files, execute files and gathers data files for the remote execution of
+.IP uucp(1C) 15
+UNIX-to-UNIX File Copy.
+One of more \fIcontrol files\fP are created, containing names of files to be
+transferred.
+When necessary, local files are copied into \fIdata files\fP for
+transmission.
+.IP uux(1C)
+Execute command.
+An \fIexecute file\fP is created, containing a
 .UX
 .UX
-commands.
-.IP uucico
-This program executes the work files for data transmission.
-.IP uuxqt
-This program executes the execution files for
-.UX
-command execution.
+command to be executed and its arguments.
+A \fIcontrol file\fP is created that includes all files that must be
+transferred to execute the command, including the \fIexecute file\fP itself.
+When necessary, local files are copied into \fIdata files\fP for
+transmission.
+Any output from the command will also be written to \fIdata files\fP.
 .RE
 .RE
-.ne 10
 .LP
 .LP
-The secondary programs are:
+The following four commands provide \*(Uu status information:
 .RS
 .RS
-.IP uulog 10
-This program updates the log file with new entries
-and reports on the status of uucp requests.
-.IP uuclean
-This program removes old files from the spool directory.
+.IP uulog(1C) 15
+Display selected information from the \*(Uu log.
+.IP uuname(1C)
+Display the names of all remote hosts that are directly accessible via \*(Uu.
+.IP uusnap(8C)
+Provide a snapshot of the current queue, including
+the number of work files, data files, and execute files for each site.
+.IP uuq(1C)
+A variant of \fIuusnap\fP, lists files and \fIuux\fP commands
+queued for each site.
+\fIUuq\fP also permits the \*(Uu administrator to delete jobs.
+.RE
 .LP
 .LP
+The following four commands provide miscellaneous support services:
+.RS
+.IP uudecode(1C) 15
+The decoder for files created by \fIuuencode\fP, below.
+.IP uuencode(1C)
+A filter to convert binary files into printable ASCII.
+This is useful when transferring object files over communications links
+that do not support 8-bit transfers.
+.IP uupoll(8C)
+A user utility to conveniently fork the \*(Uu daemon, \fIuucico\fP.
+.IP uusend(1C)
+A utility to send files to remote sites more than one ``hop'' distant.
 .RE
 .RE
-The remainder of this paper will describe the operation
-of each program, the installation of the system,
-the security aspects of the system,
-the files required for execution,
-and the administration of the system.
-.NH
+.\"===========================================================================
+.NH 2
 Uucp - UNIX to UNIX File Copy
 .LP
 Uucp - UNIX to UNIX File Copy
 .LP
-The
-.I uucp
+The \fIuucp\fP
 command is the user's primary interface with the system.
 The
 .I uucp
 command is the user's primary interface with the system.
 The
 .I uucp
@@ -116,8 +175,7 @@ option
 \ ...\ \ source\ ...\ \ destination
 .LP
 where the source and destination
 \ ...\ \ source\ ...\ \ destination
 .LP
 where the source and destination
-may contain the prefix
-.I system-name!
+may contain the prefix \fIsystem-name\fP\fB!\fP
 which indicates the system on which the file
 or files reside
 or where they will be copied.
 which indicates the system on which the file
 or files reside
 or where they will be copied.
@@ -126,33 +184,47 @@ The options interpreted by
 .I uucp
 are:
 .RS
 .I uucp
 are:
 .RS
-.IP \-d 10
-Make directories when necessary for copying the file.
-.IP \-c
-Don't copy source files to the spool directory,
-but use the specified source when the actual
+.IP \-f 10
+Don't make directories when copying the file.
+The default is to make the necessary directories.
+.IP \-C
+Copy source files to the spool directory.
+The default is to use the specified source when the actual
 transfer takes place.
 transfer takes place.
-.IP \-g\fIletter\fR
+.IP \-g\fIgrade\fR
 Put
 Put
-.I letter
+.I grade
 in as the grade in the name of the work file.
 in as the grade in the name of the work file.
-(This can be used to change the order of work for a particular
-machine.)
+This is a single character in the range \fB[0-9][A-Z][a-z]\fP.
+The \fIgrade\fP will be used by \fIuucico\fP to establish the
+priority of requests.
+\fB0\fP is the highest (best) grade; \fBz\fP is the lowest (worst).
+The default
+.I grade
+for
+.I uucp
+is \fBn\fP.
 .IP \-m
 Send mail on completion of the work.
 .IP \-m
 Send mail on completion of the work.
+.IP \-n\fIuser\fR
+Notify \fIuser\fR on the destination system that a file was sent.
 .LP
 .LP
-The following options are used primarily for debugging:
+The following options are used primarily for debugging, or when
+.I uucp
+is invoked from other programs:
 .IP \-r 10
 .IP \-r 10
-Queue the job but do not start
-.I uucico
-program.
+Queue the job but do not start \fIuucico\fP.
+The assumption is that \fIuucico\fP will be started at a later time, perhaps
+by \fIcron\fP(8) or \fIuupoll\fP.
 .IP \-s\fIdir\fR
 Use directory
 .I dir
 .IP \-s\fIdir\fR
 Use directory
 .I dir
-for the spool directory.
+for the top level spool directory.
 .IP \-x\fInum\fR
 .I Num
 is the level of debugging output desired.
 .IP \-x\fInum\fR
 .I Num
 is the level of debugging output desired.
+This option requires the user to have read permission to the \*(Uu
+control file \fIL.sys\fP.
 .RE
 .LP
 The destination may be a directory name,
 .RE
 .LP
 The destination may be a directory name,
@@ -160,9 +232,11 @@ in which case the file name is taken from the last part of the
 source's name.
 The source
 name may contain special shell characters
 source's name.
 The source
 name may contain special shell characters
-such as ``\fI?*[]\fR''.
+such as ``\fB?*[]\fR'';
+these and other shell characters such as ``\fB!<>\fP'' will need to be quoted
+or escaped.
 If a source argument has a
 If a source argument has a
-.I system-name!
+\fIsystem-name\fP\fB!\fP
 prefix for a remote system,
 the file name expansion will be done on the remote system.
 .LP
 prefix for a remote system,
 the file name expansion will be done on the remote system.
 .LP
@@ -171,13 +245,15 @@ The command
 uucp\ \ *.c\ \ usg!/usr/dan
 .LP
 will set up the transfer of all files whose names end with ``.c''
 uucp\ \ *.c\ \ usg!/usr/dan
 .LP
 will set up the transfer of all files whose names end with ``.c''
-to the ``/usr/dan'' directory on the``usg'' machine.
+to the ``/usr/dan'' directory on the ``usg'' machine.
 .LP
 .LP
-The source and/or destination names may also contain a
-.I ~user
+The source and/or destination names may also contain a \fB~\fP\fIuser\fP
 prefix.
 This translates to the login directory on
 the specified system.
 prefix.
 This translates to the login directory on
 the specified system.
+A lone \fB~\fP prefix is expanded to the name of the specified system's
+public access directory, usually 
+\fB/usr/spool/uucppublic\fP.
 For names with partial path-names,
 the current directory is prepended to the file name.
 File names with
 For names with partial path-names,
 the current directory is prepended to the file name.
 File names with
@@ -202,41 +278,36 @@ classify the work into one of five types:
 .IP [1]
 Copy source to destination on local system.
 .IP [2]
 .IP [1]
 Copy source to destination on local system.
 .IP [2]
-Receive files from other systems.
+Receive files from a remote system.
 .IP [3]
 .IP [3]
-Send files to a remote systems.
+Send files to a remote system.
 .IP [4]
 .IP [4]
-Send files from remote systems
+Send files from remote system
 to another remote system.
 .IP [5]
 to another remote system.
 .IP [5]
-Receive files from remote systems when the source
+Receive files from remote system when the source pathname
 contains special shell characters as
 mentioned above.
 .RE
 .LP
 contains special shell characters as
 mentioned above.
 .RE
 .LP
-After the work has been set up in the spool directory,
-the
-.I uucico
-program is started to try to contact the other
+After the work has been set up in the spool directories,
+the \*(Uu daemon \fIuucico\fP is started to try to contact the other
 machine to execute the work (unless the \-r option
 was specified).
 .SH
 Type 1
 .LP
 machine to execute the work (unless the \-r option
 was specified).
 .SH
 Type 1
 .LP
-A
-.I cp
-command is used to do the work.
+.I Uucp
+makes a copy of the file.
 The
 The
-.I \-d
-and the
 .I \-m
 .I \-m
-options are not honored in this case.
+option is not honored in this case.
 .SH
 Type 2
 .LP
 A one line
 .I "work file"
 .SH
 Type 2
 .LP
 A one line
 .I "work file"
-is created for each file requested and put in the spool directory
+is created for each file requested and put in the \fBC.\fP spool directory
 with the following fields, each separated by a blank.
 (All
 .I "work files"
 with the following fields, each separated by a blank.
 (All
 .I "work files"
@@ -252,7 +323,7 @@ The
 .I ~user
 part will be expanded on the remote system.
 .IP [3]
 .I ~user
 part will be expanded on the remote system.
 .IP [3]
-The full path-name of the destination file.
+The full path-name of the local destination file.
 If the
 .I ~user
 notation is used, it will be immediately
 If the
 .I ~user
 notation is used, it will be immediately
@@ -260,8 +331,7 @@ expanded to be the login directory for the user.
 .IP [4]
 The user's login name.
 .IP [5]
 .IP [4]
 The user's login name.
 .IP [5]
-A ``\-'' followed by an option list.
-(Only the \-m and \-d options will appear in this list.)
+A `\-' followed by an option list.
 .RE
 .KS
 .SH
 .RE
 .KS
 .SH
@@ -269,16 +339,14 @@ Type 3
 .LP
 For each source file, a
 .I "work file"
 .LP
 For each source file, a
 .I "work file"
-is created and the source file is copied into a
-.I "data file"
-in the spool directory.
-(A ``\-c'' option on the
+is created.
+A \fB\-C\fP option on the
 .I uucp
 .I uucp
-command will prevent the
+command will cause the
 .I "data file"
 .I "data file"
-from being made.)
-In this case, the file will be transmitted from
-the indicated source.)
+to be copied into the spool directory
+and the file to be transmitted from
+the copy; the copy is deleted when the transfer completes.
 The fields of each entry are given below.
 .RS
 .IP [1]
 The fields of each entry are given below.
 .RS
 .IP [1]
@@ -291,15 +359,22 @@ The full-path name of the destination or
 .IP [4]
 The user's login name.
 .IP [5]
 .IP [4]
 The user's login name.
 .IP [5]
-A ``\-'' followed by an option list.
+A `\-' followed by an option list.
 .IP [6]
 .IP [6]
-The name of the
+The full path-name of the local source file.
+If the
+.I ~user
+notation is used, it will be immediately
+expanded to be the login directory for the user.
+If the \fB\-C\fP option was used, this will be the name of a
 .I "data file"
 in the spool directory.
 .IP [7]
 The file mode bits of the source file
 in octal print format
 (e.g. 0666).
 .I "data file"
 in the spool directory.
 .IP [7]
 The file mode bits of the source file
 in octal print format
 (e.g. 0666).
+.IP [8]
+The user to notify on the remote system that the transfer has completed.
 .RE
 .KE
 .SH
 .RE
 .KE
 .SH
@@ -314,11 +389,11 @@ the remote
 executes the
 .I uucp
 command.
 executes the
 .I uucp
 command.
-.NH
+.\"===========================================================================
+.NH 2
 Uux - UNIX To UNIX Execution
 .LP
 Uux - UNIX To UNIX Execution
 .LP
-The
-.I uux
+The \fIuux\fP
 command is used to set up the execution of a
 .UX
 command
 command is used to set up the execution of a
 .UX
 command
@@ -335,33 +410,60 @@ option
 \ ...\ \ command-string
 .LP
 where the command-string is made up of one or more arguments.
 \ ...\ \ command-string
 .LP
 where the command-string is made up of one or more arguments.
-All special shell characters such as ``<>|^'' must be quoted
+All special shell characters such as ``<>|*?!'' must be quoted
 either by quoting the entire command-string
 or quoting the character as a separate argument.
 Within the command-string, the command and file names may
 contain a
 either by quoting the entire command-string
 or quoting the character as a separate argument.
 Within the command-string, the command and file names may
 contain a
-.I system-name!
+\fIsystem-name\fP\fB!\fP
 prefix.
 All arguments which do not contain a ``!'' will not
 be treated as files.
 (They will not be copied to the execution machine.)
 prefix.
 All arguments which do not contain a ``!'' will not
 be treated as files.
 (They will not be copied to the execution machine.)
-The ``\-'' is used to indicate that the standard input
+The `\-' is used to indicate that the standard input
 for
 .I command-string
 should be inherited from the standard input
 of the
 .I uux
 command.
 for
 .I command-string
 should be inherited from the standard input
 of the
 .I uux
 command.
-The options, essentially for debugging, are:
+.LP
+The options, used mostly for debugging and by other programs, are:
 .RS
 .RS
-.IP \-r 10
-Don't start
-.I uucico
-or
-.I uuxqt
-after queuing the job;
+.IP \-a\fIname\fP 10
+Use \fIname\fP as the requestor of the \fIuux\fP command, instead of the
+real system and login names.
+Unlike most other \*(Uu arguments, \fIname\fP may consist of a chain of
+system names separated by `!' characters, as in:
+.IP \  15
+uux\ \ \-\ \ \-r\ \ \-aihnp4!decwrl!pyramid!csg\ \ seismo!rmail\ \ rick
+.IP \-C 10
+Copy source files to the spool directory.
+Same as for \fIuucp\fP.
+.IP \-g\fIgrade\fR
+Put
+.I grade
+in as the grade in the name of the work file.
+Same as for \fIuucp\fP.
+The default
+.I grade
+for
+.I uux
+is \fBA\fP.
+.IP \-n
+Do not mail an acknowledgement to the requestor of the command.
+Normally the execution daemon, \fIuuxqt\fP, will mail a message
+to the user who entered the \fIuux\fP command.
+This message includes the status return value that the program exited with.
+The \fB\-n\fP option requests that this message not be sent.
+.IP \-r
+Do not start the \*(Uucp daemons \fIuucico\fP(8C) or \fIuuxqt\fP(8C)
+after queuing the job.
 .IP \-x\fInum\fR
 Num is the level of debugging output desired.
 .IP \-x\fInum\fR
 Num is the level of debugging output desired.
+.IP \-z
+Mail an acknowledgement to the requestor only if the command fails, that
+is, the command exits with a non-zero status.
 .RE
 .LP
 The command
 .RE
 .LP
 The command
@@ -380,28 +482,27 @@ names of the files required
 for execution (including standard input),
 the user's login name, the destination
 of the standard output, and the command to be executed.
 for execution (including standard input),
 the user's login name, the destination
 of the standard output, and the command to be executed.
-This file is either put in the spool directory
-for local execution or sent to the remote system using
-a generated send command (type 3 above).
+This file is either put in the \fBX.\fP spool directory
+for local execution,
+or in the \fBD.\fP\fIhostname\fP\fBX\fP directory
+for transfer to the remote system.
 .LP
 For required files which are not on the execution machine,
 .I uux
 will generate receive command files (type 2 above).
 These command-files will be put on the execution machine and
 .LP
 For required files which are not on the execution machine,
 .I uux
 will generate receive command files (type 2 above).
 These command-files will be put on the execution machine and
-executed by the
-.I uucico
-program.
+executed by 
+\fIuucico\fP.
 (This will work only if the local system has permission
 to put files in the remote spool directory as controlled
 by the remote
 (This will work only if the local system has permission
 to put files in the remote spool directory as controlled
 by the remote
-.I USERFILE .
-)
+\fIUSERFILE\fP.)
 .LP
 The
 .I "execute file"
 will be processed
 by the
 .LP
 The
 .I "execute file"
 will be processed
 by the
-.I uuxqt
+\fIuuxqt\fP(8C)
 program on the execution machine.
 It is made up of several lines,
 each of which contains an identification character
 program on the execution machine.
 It is made up of several lines,
 each of which contains an identification character
@@ -419,7 +520,7 @@ where the
 .I user
 and
 .I system
 .I user
 and
 .I system
-are the requester's login name and system.
+are the requestor's login name and system.
 .SH
 Required File Line
 .IP
 .SH
 Required File Line
 .IP
@@ -443,23 +544,60 @@ Standard Input Line
 .IP
 I\ \ file-name
 .LP
 .IP
 I\ \ file-name
 .LP
-The standard input is either specified by a ``<'' in the
+The standard input is either specified by a `<' in the
 command-string or inherited from the standard input of the
 .I uux
 command-string or inherited from the standard input of the
 .I uux
-command if the ``\-'' option is used.
+command if the `\-' option is used.
 If a standard input is not specified,
 If a standard input is not specified,
-``/dev/null'' is used.
+.B /dev/null
+is used.
 .SH
 Standard Output Line
 .IP
 O\ \ file-name\ \ system-name
 .LP
 .SH
 Standard Output Line
 .IP
 O\ \ file-name\ \ system-name
 .LP
-The standard output is specified by a ``>'' within the
+The standard output is specified by a `>' within the
 command-string.
 If a standard output is not specified,
 command-string.
 If a standard output is not specified,
-``/dev/null'' is used.
+.B /dev/null
+is used.
 (Note \- the use of ``>>'' is not implemented.)
 .SH
 (Note \- the use of ``>>'' is not implemented.)
 .SH
+Status Return Line
+.IP
+N
+.LP
+Normally \fIuuxqt\fP mails an acknowledgement message to the
+requestor after the command completes.
+The message includes the status return value that the program exited with.
+This line inhibits mailing of the acknowledgement message.
+It is generated by the \fB-n\fP option of \fIuux\fP;
+it is also quietly assumed by \fIuuxqt\fP on the command \fBrmail\fP.
+.SH
+Error Status Return Line
+.IP
+Z
+.LP
+A variant of the \fIStatus Return\fP line, this line indicates that
+an acknowledgement should be mailed only if the command's status
+return is non-zero, i.e., the program exited with an error.
+This line is generated by the \fB-z\fP option of \fIuux\fP.
+It is also quietly assumed by \fIuuxqt\fP on the command \fBrnews\fP.
+If both the \fBZ\fP and \fBN\fP lines appear, the \fBZ\fP line has
+precedence.
+.SH
+Requestor Line
+.IP
+R\ \ requestor
+.LP
+where
+.I requestor
+is a complete return mailing address to the original requestor.
+This line is generated by the \fB-a\fP option of \fIuux\fP, and is used
+to override the mail return address implied by the \fIUser\fP line.
+This is commonly used by mailers and programs like \fIuusend\fP that
+know how to ``hop'' a file from system to system.
+.SH
 Command Line
 .IP
 C\ \ command\ \ 
 Command Line
 .IP
 C\ \ command\ \ 
@@ -479,21 +617,50 @@ and the
 .UX
 command is executed using the Shell specified in the
 .I uucp.h
 .UX
 command is executed using the Shell specified in the
 .I uucp.h
-header file.
+header file (usually \fI/bin/sh\fP).
 In addition, a shell ``PATH'' statement is prepended
 In addition, a shell ``PATH'' statement is prepended
-to the command line as specified in the
-.I uuxqt
-program.
+to the command line.
 .LP
 .LP
-After execution, the standard output is copied or set up to be
+After execution, the temporary standard output file is copied to
+or set up to be
 sent to the proper place.
 .RE
 sent to the proper place.
 .RE
+.\"===========================================================================
+.\" SECTION 3: SYSTEM UTILITIES
+.\"===========================================================================
+.ne 5
 .NH
 .NH
-Uucico - Copy In, Copy Out
+SYSTEM AND ADMINISTRATIVE UTILITIES
 .LP
 .LP
-The
-.I uucico
-program will perform the following major functions:
+\*(Uu includes four system utilities;
+these are not normally referenced by users.
+All except \fIuucpd\fP reside in the \*(Uu administrative directory,
+\fB/usr/lib/uucp\fP.
+These include:
+.RS
+.IP uucico(8C) 15
+Copy In, Copy Out. This is the primary \*(Uu daemon.
+.IP uuclean(8C)
+A handy utility to clean up the \*(Uu spool directories.
+.IP uucpd
+The \*(Uu TCP/IP daemon.
+This daemon ``answers'' the connection request from a remote \fIuucico\fP
+to a TCP/IP socket.
+It is functionally a stripped-down version of \fIrlogind\fP(8) that provides
+full 8-bit communication.
+(Note: this utility does not have a \fIman\fP page.)
+.IP uuxqt(8C)
+Execution Daemon.
+This is forked by \fIuucico\fP to interpret execution files
+transferred from a remote system.
+.RE
+.\"===========================================================================
+.NH 2
+Uucico - Copy In, Copy Out (\*(Uu Daemon)
+.LP
+.I Uucico
+is the ``heart'' of the \*(Uu system.
+The program performs the following major functions:
 .RS
 .IP -\ \  3
 Scan the spool directory for work.
 .RS
 .IP -\ \  3
 Scan the spool directory for work.
@@ -511,21 +678,21 @@ Log work requests and work completions.
 may be started in several ways;
 .RS
 .IP a) 5
 may be started in several ways;
 .RS
 .IP a) 5
-by a system daemon,
+by a system daemon (such as \fIcron\fP(8)),
 .IP b)
 by one of the
 .I
 uucp, uux, uuxqt
 .R
 or
 .IP b)
 by one of the
 .I
 uucp, uux, uuxqt
 .R
 or
-.I uucico
+.I uupoll
 programs,
 .IP c)
 directly by the user (this is usually for testing),
 .IP d)
 by a remote system.
 programs,
 .IP c)
 directly by the user (this is usually for testing),
 .IP d)
 by a remote system.
-(The uucico program should be specified as the ``shell''
-field in the ``/etc/passwd'' file for the ``uucp'' logins.)
+(The \fIuucico\fP program should be specified as the ``shell''
+field in the \fB/etc/passwd\fP file for the \*(Uu logins.)
 .RE
 .LP
 When started by method a, b or c, the program is considered to
 .RE
 .LP
 When started by method a, b or c, the program is considered to
@@ -553,18 +720,21 @@ The
 program is generally started by another program.
 There are several options used for execution:
 .RS
 program is generally started by another program.
 There are several options used for execution:
 .RS
-.IP \-r1 10
+.IP \-g\fIgrade\fP 10
+Set the minimum grade of this \fIuucico\fP run to \fIgrade\fP.
+Only files of this grade or better will be transferred.
+.IP \-r1
 Start the program in
 .I MASTER
 mode.
 This is used when
 .I uucico
 Start the program in
 .I MASTER
 mode.
 This is used when
 .I uucico
-is started by a program or ``cron'' shell.
+is started by a program or \fIcron\fP shell.
 .IP \-s\fIsys\fR
 Do work only for system
 .I sys.
 If
 .IP \-s\fIsys\fR
 Do work only for system
 .I sys.
 If
-.I \-s
+.B \-s
 is specified,
 a call to the specified system
 will be made even if there is no work for system
 is specified,
 a call to the specified system
 will be made even if there is no work for system
@@ -577,7 +747,7 @@ The following options are used primarily for debugging:
 .IP \-d\fIdir\fR
 Use directory
 .I dir
 .IP \-d\fIdir\fR
 Use directory
 .I dir
-for the spool directory.
+for the top level spool directory.
 .IP \-x\fInum\fR
 .I Num
 is the level of debugging output desired.
 .IP \-x\fInum\fR
 .I Num
 is the level of debugging output desired.
@@ -590,27 +760,27 @@ program.
 .SH
 Scan For Work
 .LP
 .SH
 Scan For Work
 .LP
-The names of the work related files in the spool directory have format
+The names of the work related files in a spool subdirectory have format
 .IP
 .IP
-type . system-name grade number
+type \fB.\fP system-name grade number
 .LP
 where:
 .IP
 .I Type
 is an upper case letter,
 (
 .LP
 where:
 .IP
 .I Type
 is an upper case letter,
 (
-.I C
--\ copy command file,
-.I D
+.B C
+-\ work (copy command) file,
+.B D
 -\ data file,
 -\ data file,
-.I X
+.B X
 -\ execute file);
 .IP
 .I System-name
 is the remote system;
 .IP
 .I Grade
 -\ execute file);
 .IP
 .I System-name
 is the remote system;
 .IP
 .I Grade
-is a character;
+is a character in the range \fB[0-9][A-Z][a-z]\fP;
 .IP
 .I Number
 is a four digit, padded sequence number.
 .IP
 .I Number
 is a four digit, padded sequence number.
@@ -625,9 +795,9 @@ for a file transfer between the local
 machine and the ``res45'' machine.
 .LP
 The scan for work is done by looking through the
 machine and the ``res45'' machine.
 .LP
 The scan for work is done by looking through the
-spool directory for
-.I "work files"
-(files with prefix ``C.'').
+appropriate spool directory for
+\fIwork files\fP
+(files with prefix \fBC.\fP).
 A list is made of all systems to be called.
 .I Uucico
 will then call each system and process all
 A list is made of all systems to be called.
 .I Uucico
 will then call each system and process all
@@ -635,15 +805,15 @@ will then call each system and process all
 .SH
 Call Remote System
 .LP
 .SH
 Call Remote System
 .LP
-The call is made using information from several
-files which reside in the uucp program directory.
+The call is made using information from the \fIcontrol\fP files
+that reside in the \fB/usr/lib/uucp\fP directory.
 At the start of the call process, a lock is
 set to forbid multiple conversations 
 between the same two systems.
 .LP
 The system name is found in the
 .I L.sys
 At the start of the call process, a lock is
 set to forbid multiple conversations 
 between the same two systems.
 .LP
 The system name is found in the
 .I L.sys
-file.
+control file.
 The information contained for each system is;
 .RS
 .IP [1]
 The information contained for each system is;
 .RS
 .IP [1]
@@ -652,17 +822,13 @@ system name,
 times to call the system
 (days-of-week and times-of-day),
 .IP [3]
 times to call the system
 (days-of-week and times-of-day),
 .IP [3]
-device or device type to be used for call,
+the \fIcaller\fP, that is, the type of device to be used for the call,
 .IP [4]
 .IP [4]
-line speed,
+the line speed or network number (as appropriate),
 .IP [5]
 .IP [5]
-phone number if field [3] is
-.I ACU
-or the device name (same as field [3])
-if not
-.I ACU,
+telephone number or device name (as appropriate),
 .IP [6]
 .IP [6]
-login information (multiple fields),
+login information (multiple fields).
 .RE
 .LP
 The time field is checked against the present time to see
 .RE
 .LP
 The time field is checked against the present time to see
@@ -683,7 +849,7 @@ file is scanned using fields [3] and [4] from the
 .I L.sys
 file to find an available device for the call.
 The program will try all devices which satisfy
 .I L.sys
 file to find an available device for the call.
 The program will try all devices which satisfy
-[3] and [4] until the call is made, or no more
+[3] and [4] until the call is made or no more
 devices can be tried.
 If a device is successfully opened, a lock file
 is created so that another copy of
 devices can be tried.
 If a device is successfully opened, a lock file
 is created so that another copy of
@@ -694,7 +860,7 @@ If the call is complete, the
 login information
 .R
 (field [6] of
 login information
 .R
 (field [6] of
-.I L.sys )
+\fIL.sys\fP)
 is used to login.
 .LP
 The conversation between the two
 is used to login.
 .LP
 The conversation between the two
@@ -740,10 +906,46 @@ message is
 .IP "" 12
 U\fIcode\fR
 .LP
 .IP "" 12
 U\fIcode\fR
 .LP
-where code is either a one character
+where 
+.I code
+is either a one character
 protocol letter or
 protocol letter or
-.I N
+.B N
 which means there is no common protocol.
 which means there is no common protocol.
+.LP
+The following protocols are implemented in 4.3BSD \*(Uu:
+.RS
+.IP \fBg\fP
+General.
+Default for dialup or hardwired lines, supported by all versions of \*(Uu.
+This protocol employs small (64 byte) data packets with
+checksums and packet-by-packet retransmission.
+This ensures reliable and efficient transfers over slow and noisy links
+like 1200-baud dial-up lines.
+These same characteristics make the \fBg\fP protocol bulky and slow over
+error free links, and very expensive on public data-switched networks.
+.IP \fBf\fP
+Optimized for use on X.25 PAD public data-switched networks.
+The protocol employs larger (256 byte) data packets,
+passes no control characters except CR,
+and uses only a 7-bit data path.
+(Note that the files transferred may still contain full 8-bit data.)
+It assumes that the link is ``mostly'' error-free, calculating a checksum
+for the entire file only. 
+When an error is detected, the entire file is retransmitted.
+.IP \fBt\fP
+Optimized for use on TCP/IP networks and other completely error free links.
+It employs large (1024 byte) packets, and uses the full 8-bit data path.
+.RE
+.LP
+Note: AT&T System VR2 \*(UU supports the \fBx\fP (\fIX.25\fP) and \fBe\fP
+(\fIError Free\fP) protocols, which provide functionality similar to the
+4.3BSD \fBf\fP and \fBt\fP protocols, respectively. 
+They are incompatible, however.
+Thus when attempting to connect two systems via X.25 or an local area network,
+it is not adequate for both systems to simply ``support X.25'' or ``support
+error free transfers.''
+Both must support the same \*(Uu protocols.
 .SH
 Work Processing
 .LP
 .SH
 Work Processing
 .LP
@@ -755,7 +957,7 @@ or
 the mode in which each program starts.
 (The 
 .I MASTER
 the mode in which each program starts.
 (The 
 .I MASTER
-has been specified by the ``\-r1'' uucico option.)
+has been specified by the \fB\-r1\fP \fIuucico\fP option.)
 The
 .I MASTER
 program does a work search similar to the
 The
 .I MASTER
 program does a work search similar to the
@@ -776,7 +978,7 @@ copy complete,
 .IP X
 execute a
 .I uucp
 .IP X
 execute a
 .I uucp
-command,
+command, and
 .IP H
 hangup.
 .RE
 .IP H
 hangup.
 .RE
@@ -796,7 +998,7 @@ The
 .I SLAVE
 will reply with
 \fISY\fR, \fISN\fR, \fIRY\fR, \fIRN\fR, \fIHY\fR, \fIHN\fR,
 .I SLAVE
 will reply with
 \fISY\fR, \fISN\fR, \fIRY\fR, \fIRN\fR, \fIHY\fR, \fIHN\fR,
-\fIXY\fR, \fIXN\fr,
+\fIXY\fR, \fIXN\fR,
 corresponding to
 .I yes
 or
 corresponding to
 .I yes
 or
@@ -805,7 +1007,7 @@ for each request.
 .LP
 The send and receive replies are
 based on permission to access the
 .LP
 The send and receive replies are
 based on permission to access the
-requested file/directory using the
+requested file/directory using
 .I USERFILE
 and read/write permissions of the file/directory.
 After each file is copied into the spool directory
 .I USERFILE
 and read/write permissions of the file/directory.
 After each file is copied into the spool directory
@@ -821,15 +1023,14 @@ Otherwise, a
 message is sent.
 (In the case of
 .I CN ,
 message is sent.
 (In the case of
 .I CN ,
-the transferred file will be in the spool
-directory with a name beginning with ``TM'.)
+the transferred file will be in the \fBTM.\fP spool subdirectory.)
 The requests and results are logged on both systems.
 .LP
 The hangup response is determined by the
 .I SLAVE
 The requests and results are logged on both systems.
 .LP
 The hangup response is determined by the
 .I SLAVE
-program by a work scan of the spool directory.
-If work for the remote system exists in the
-.I SLAVE's
+program by a work scan of its spool directory.
+If work for the \fIMASTER\fP\|'s system exists in the
+\fISLAVE\fP\|'s
 spool directory, an
 .I HN
 message is sent and the programs switch roles.
 spool directory, an
 .I HN
 message is sent and the programs switch roles.
@@ -856,10 +1057,11 @@ The
 will proceed to call other systems
 and process work as long as possible
 or terminate if a
 will proceed to call other systems
 and process work as long as possible
 or terminate if a
-.I \-s
+.B \-s
 option was specified.
 .LP
 option was specified.
 .LP
-.NH
+.\"===========================================================================
+.NH 2
 Uuxqt - Uucp Command Execution
 .LP
 The
 Uuxqt - Uucp Command Execution
 .LP
 The
@@ -877,11 +1079,8 @@ program may be started by either the
 or
 .I uux
 programs.
 or
 .I uux
 programs.
-The program scans the spool directory for
-.I
-execute files
-.R
-(prefix ``X.'').
+The program scans the \fBX.\fP spool directory for
+\fIexecute files\fP.
 Each one is checked to see if all the required files are available and
 if so, the command line or send line is executed.
 .LP
 Each one is checked to see if all the required files are available and
 if so, the command line or send line is executed.
 .LP
@@ -889,7 +1088,8 @@ The
 .I
 execute file
 .R
 .I
 execute file
 .R
-is described in the ``Uux''
+is described in the
+.I uux
 section above.
 .SH
 Command Execution
 section above.
 .SH
 Command Execution
@@ -903,47 +1103,14 @@ standard input and standard output have been opened.
 If a standard output is specified, the program
 will create a send command or copy the output
 file as appropriate.
 If a standard output is specified, the program
 will create a send command or copy the output
 file as appropriate.
-.NH
-Uulog - Uucp Log Inquiry
-.LP
-The
-.I uucp
-programs create individual
-log files for each program invocation.
-Periodically,
-.I uulog
-may be executed to prepend these files to the
-system logfile.
-This method of logging was chosen to minimize file
-locking of the logfile during program execution.
-.LP
-The
-.I uulog
-program merges the individual
-log files and outputs specified log entries.
-The output request is specified by the use of the
-following options:
-.RS
-.IP \-s\fIsys\fR 9
-Print entries where
-.I sys
-is the remote system name;
-.IP \-u\fIuser\fR
-Print entries for user
-.I user.
-.RE
-.LP
-The intersection of lines satisfying the two options is output.
-A null
-.I sys
-or
-.I user
-means all system names or users respectively.
-.NH
+.\"===========================================================================
+.NH 2
 Uuclean - Uucp Spool Directory Cleanup
 .LP
 Uuclean - Uucp Spool Directory Cleanup
 .LP
-This program is typically started by the daemon, once a day.
-Its function is to remove files from the spool directory which
+This program is typically started by the
+\fIcron\fP(8)
+daemon, once a day.
+Its function is to remove files from the spool directories which
 are more than 3 days old.
 These are usually files for work which can not be completed.
 .LP
 are more than 3 days old.
 These are usually files for work which can not be completed.
 .LP
@@ -973,240 +1140,109 @@ for deletion.
 .IP \-x\fInum\fR
 This is the level of debugging output desired.
 .RE
 .IP \-x\fInum\fR
 This is the level of debugging output desired.
 .RE
+.\"===========================================================================
+.\" SECTION 4: CONTROL FILES
+.\"===========================================================================
+.ne 5
 .NH
 .NH
-Security
-.LP
-.LG
-\fB
-The uucp system, left unrestricted,
-will let any outside user execute any commands
-and copy in/out any file which is readable/writable
-by the uucp login user.
-It is up to the individual sites to be aware of this and
-apply the protections that they feel are necessary.
-\fR
-.NL
-.LP
-There are several security features available aside from the
-normal file mode protections.
-These must be set up by the installer of the
-.I uucp
-system.
-.IP - 3
-The login for uucp does not get a standard shell.
-Instead, the
-.I uucico
-program is started.
-Therefore, the only work that can be done is through
-.I uucico .
-.IP -
-A path check is done on file names that are to be sent
-or received.
-The
-.I USERFILE
-supplies the information for these checks.
-The
-.I USERFILE
-can also be set up to require call-back
-for certain login-ids.
-(See the ``Files required for execution'' section
-for the file description.)
-.IP -
-A conversation sequence count can be set up so
-that the called system
-can be more confident that the caller
-is who he says he is.
-.IP -
-The
-.I uuxqt
-program comes with a list of commands that it
-will execute.
-A ``PATH'' shell statement is prepended to the command
-line as specifed in the
-.I uuxqt
-program.
-The installer may modify the list or remove the
-restrictions as desired.
-.IP -
-The
-.I L.sys
-file should be owned by uucp and have mode 0400
-to protect the phone numbers and login information
-for remote sites.
-(Programs uucp, uucico, uux, uuxqt should be also
-owned by uucp and have the setuid bit set.)
-.NH
-Uucp Installation
-.LP
-There are several source modifications that may be required
-before the system programs are compiled.
-These relate to the directories used during compilation,
-the directories used during execution,
-and the local
-.I
-uucp system-name.
-.R
-.LP
-The four directories are:
-.RS
-.IP lib 12
-(/usr/src/cmd/uucp)
-This directory contains the source files for generating the
-.I uucp
-system.
-.IP program
-(/usr/lib/uucp)
-This is the directory used for the executable system programs and
-the system files.
-.IP spool
-(/usr/spool/uucp)
-This is the spool directory used during
-.I uucp
-execution.
-.IP xqtdir
-(/usr/spool/uucp/.XQTDIR)
-This directory is used during execution of
-.I "execute files" .
-.RE
-.LP
-The names given in parentheses above are the default values
-for the directories.
-The italicized named
-.I
-lib, program, xqtdir,
-.R
-and
-.I spool
-will be used in the following text to represent the
-appropriate directory names.
-.LP
-There are two files which may require modification,
-the
-.I makefile
-file and the
-.I uucp.h
-file.
-The following paragraphs describe the modifications.
-The modes of
-.I spool
-and
-.I xqtdir
-should be made ``0777''.
-.SH
-Uucp.h modification
-.LP
-Change the
-.I program
-and the
-.I spool
-names from the default values to the directory
-names to be used on the local system using
-global edit commands.
-.LP
-Change the
-.I define
-value for
-.I MYNAME
-to be the local
-.I uucp
-system-name.
-.SH
-makefile modification
-.LP
-There are several
-.I make
-variable definitions which may need modification.
+SYSTEM CONTROL FILES
+.PP
+Seven \fIControl Files\fP are referenced by the \*(Uu utilities.
+All live in the \*(Uu administrative directory, \fB/usr/lib/uucp\fP.
+These are ASCII files, and can be modified using standard text editors such
+as \fIvi\fP and \fIex\fP.
+Lines beginning with a `#' character are comments;
+lines ending with a `\e' are continued on the next input line.
 .RS
 .RS
-.IP INSDIR 10
-This is the
-.I program
-directory
-(e.g. INSDIR=/usr/lib/uucp).
-This parameter is used if ``make cp'' is
-used after the programs are compiled.
-.IP IOCTL
-This is required to be set if an appropriate
-.I ioctl
-interface subroutine does not exist in the standard
-``C'' library;
-the statement
-``IOCTL=ioctl.o'' is required in this case.
-.IP PKON
-The statement ``PKON=pkon.o'' is required if the
-packet driver is not in the kernel.
+.IP L-devices(5) 15
+Declares all devices that are available to \fIuucico\fP for calling out.
+.IP L-dialcodes(5)
+Phone number prefixes.
+Used to map alphabetic prefixes on phone numbers from \fIL.sys\fP to
+real phone numbers.
+Also useful to keep a phone number database outside of \fIL.sys\fP.
+.IP L.sys(5)
+Systems.
+Declares all ``adjacent'' \*(Uu hosts, with directions on how to reach them.
+.IP L.aliases(5)
+Contains aliases used to map obsolete or truncated host names to the
+correct names.
+.IP L.cmds(5)
+Commands Permissions.
+Declares those commands for which remote \fIuux\fP execution is permitted.
+.IP SQFILE
+Sequence-number check file. (Optional)
+.IP USERFILE(5)
+Directory Tree Permissions.
+Specifies the set of directory trees that a particular user or host may
+reference.
 .RE
 .RE
-.SH
-Compile the system
-The command
-.IP "" 12
-make
-.LP
-will compile the entire system.
-The command
-.IP "" 12
-make cp
 .LP
 .LP
-will copy the commands to the
-to the appropriate directories.
+A general description of each file follows; see the \fIman\fP pages for
+complete information.
+Examples of the six standard files are included in the distribution in the
+\fB/usr/lib/uucp/UUAIDS\fP directory.
+.NH 2
+L-devices \- \*(UU Devices File
 .LP
 .LP
-The programs
-.I uucp ,
-.I uux ,
-and
-.I uulog
-should be put in ``/usr/bin''.
-The programs
-.I uuxqt ,
-.I uucico ,
-and
-.I uuclean
-should be put in the
-.I program
-directory.
-.SH
-Files required for execution
-.LP
-There are four files which are required for execution,
-all of which should reside in the
-.I program
-directory.
-The field separator for all files is a space unless otherwise
-specified.
-.SH
-L-devices
-.LP
-This file contains entries for the call-unit devices and
-hardwired connections which are to be used by
-.I uucp.
+This file declares all devices that are available to
+\fIuucico\fP
+for calling out.
 The special device files are assumed to be in the
 .I /dev
 directory.
 The format for each entry is
 .IP "" 12
 The special device files are assumed to be in the
 .I /dev
 directory.
 The format for each entry is
 .IP "" 12
-line\ \ call-unit\ \ speed
+caller  line  call-unit  class  dialer  [chat....]
 .LP
 where;
 .RS
 .LP
 where;
 .RS
-.IP line 12
-is the device for the line (e.g. cul0),
+.IP caller 12
+is the caller mechanism, that is, the type of device to be used.
+This can be one of  \fBACU\fP (for Automatic
+Call Units (modem)), \fBDIR\fP (direct hardwired), \fBPAD\fP
+(X.25/PAD), and others.
+.IP line
+is the device for the link.
+For example, \fBcul0\fP for a modem, \fBtty10\fP for a hardwired line.
 .IP call-unit
 is the automatic call unit associated with
 .IP call-unit
 is the automatic call unit associated with
-.I line
-(e.g. cua0),
-(Hardwired lines have a number ``0'' in this field.),
-.IP speed
-is the line speed.
+\fIdevice\fP.
+This is used on autodialers such as the Racal-Vadic MACS and the
+DEC DN-11 that use one device for data, and a second device for dialing.
+If unused, this field must contain a placeholder such as ``unused'' or ``0''.
+Some modems use this field to specify tone or pulse dialing.
+.IP class
+is the line speed, plus an optional alphabetic prefix.
+The prefix can be used to distinguish among different devices that
+have identical \fIcaller\fP and line speed.
+.IP dialer
+applies to \fBACU\fP devices only;
+this is the type or brand name of the modem.
+Supported modems include \fBDN11\fP (DEC DN-11),
+\fBhayes\fP (Hayes Smartmodem),
+\fBvadic\fP (Racal-Vadic 3451),
+\fBventel\fP (VenTel 212A), and others.
+.IP chat
+refers to an \fIexpect/send\fP script, similar to that provided in
+\fIL.sys\fP.
+The difference is that the script in
+.I L-devices
+is executed before the connection is established, while the script in
+.I L.sys
+is executed afterwards.
 .RE
 .LP
 The line
 .IP "" 12
 .RE
 .LP
 The line
 .IP "" 12
-cul0\ \ cua0\ \ 300
+ACU\ \ tty47\ \ unused\ \ 1200\ \ hayes
 .LP
 would be set up for a system which
 .LP
 would be set up for a system which
-had device cul0 wired to a call-unit
-cua0 for use at 300 baud.
-.SH
-L-dialcodes
+had device tty47 wired to a 
+Hayes ``Smartmodem 1200''
+for use at 1200 baud.
+.NH 2
+L-dialcodes \- Phone Number Prefix File
 .LP
 This file contains entries with location abbreviations used
 in the
 .LP
 This file contains entries with location abbreviations used
 in the
@@ -1230,23 +1266,155 @@ py\ \ 165\-
 .LP
 would be set up so that entry py7777 would
 send 165\-7777 to the dial-unit.
 .LP
 would be set up so that entry py7777 would
 send 165\-7777 to the dial-unit.
-.SH
-LOGIN/SYSTEM NAMES
+.NH 2
+L.aliases \- Hostname Aliases File
 .LP
 .LP
-It is assumed that the
-.I "login name"
-used by a remote computer to call into a local computer
-is not the same as the login name of a normal user
-of that local machine.
-However, several remote computers may employ the same
-login name.
+This file defines mapping (aliasing) of remote host names.
+This is intended for compensating for systems that have
+changed names, or do not provide their entire machine name
+(like most USG systems).
+It is also useful when a machine's name is not obvious or commonly misspelled.
 .LP
 .LP
-Each computer is given a unique
-.I "system name"
-which is transmitted at the start of each call.
-This name identifies the calling machine to the called machine.
-.SH
-USERFILE
+Each line is of the form
+.IP
+real-name\ \ alias-name
+.LP
+where
+.I real-name
+is the full, correct name for the host, and
+.I alias-name
+is the old or truncated name.
+.NH 2
+L.sys \- \*(Uu Systems File
+.LP
+Each entry in this file represents one system
+which can be called by the local uucp programs.
+The format for each entry is
+.IP
+system  times  caller  class  device/phone-number  [login]
+.LP
+where;
+.RS
+.IP "system" 12
+is the hostname of the remote system.
+.IP times
+is a keyword-encoded string that indicates the days-of-the-week
+and times-of-day when the system may
+be called.
+For example \fBMoTuTh0800\-1730\fP would denote Monday, Tuesday,
+and Thursday, between 8 a.m. and 5:30p.m.
+.IP
+The day portion may be a list containing
+any of
+\fBSu\fP, \fBMo\fP, \fBTu\fP, \fBWe\fP, \fBTh\fP, \fBFr\fP, \fBSa\fP,
+or 
+.B Wk
+for any week-day or
+.B Any
+for any day.
+.IP
+The time should be a range of times (as in \fB0800\-1230\fP).
+If no time portion is specified, any time
+of day is assumed to be acceptable for the call.
+.IP caller
+is one of the caller device-types listed in \fIL-devices\fP.
+.IP class
+is the line speed for the call (e.g., 300, 1200, 9600),
+plus an optional alphabetic prefix.
+Network devices use this field for the network port number.
+.IP phone
+is the the phone number to call (for \fBACU\fP devices) or the
+device filename. 
+A phone number is made up of an optional
+alphabetic abbreviation and a numeric part.
+The abbreviation is one which appears in the
+.I L-dialcodes
+file (e.g. mh5900, boston995\-9980).
+.IP login
+is a script describing how to log in to the remote host.
+It is expressed as a series of
+fields and subfields in the format
+.IP "" 17
+expect\ \ send\ 
+[
+expect\ \ send
+]
+\ ...
+.IP "" 12
+where;
+.I expect
+is the string expected to be read and
+.I send
+is the string to be sent when the
+.I expect
+string is received.
+The
+.I send
+string is normally terminated with carriage-return;
+an empty
+.I send
+string will send only a carriage-return.
+.IP
+The expect field may be made up of subfields
+of the form
+.IP "" 17
+expect\fB[\fR\-send\-expect\fB]\fR...
+.IP "" 12
+where the
+.I send
+is sent if the prior
+.I expect
+is not successfully read
+and the
+.I expect
+following the
+.I send
+is the next expected string.
+.RE
+.LP
+A typical entry in the L.sys file would be
+.IP "" 6
+sys\ Any\ ACU\ 1200\ \ mh7654\ login:--login:\ uucp\ ssword:\ word
+.LP
+The expect algorithm looks at the last part of the
+string as illustrated in the password field.
+.NH 2
+L.cmds \- Commands Permissions File
+.LP
+This file contains a list of commands, one per line, that are permitted
+for remote execution via \fIuux\fP.
+This list should be chosen with great care, since commands that take filenames
+as arguments will allow users to easily circumvent \*(Uu's security.
+For most sites,
+.I L.cmds
+should only include the lines:
+.DS
+rmail
+ruusend
+.DE
+.NH 2
+SQFILE \- Sequence Check File (Optional)
+.LP
+This file contains an entry for each remote
+system with which this site agrees to perform conversation
+sequence checks.
+The initial entry is just the system name of
+the remote system.
+The first conversation will add two items to the line,
+the conversation count, and the date/time of the most
+resent conversation.
+These items will be updated with each conversation.
+If a sequence check fails, which could indicate that an unauthorized
+connection has been attempted, the entry will have to
+be adjusted.
+.LP
+This facility is technically no longer supported in 4.3BSD \*(Uu,
+since it was hardly ever used and consumed precious memory space on PDP-11
+systems.
+The compile-time #define GNXSEQ can be set to enable sequence checking
+should it be needed.
+.NH 2
+USERFILE \- Pathnames Permissions File
 .LP
 This file contains user accessibility information.
 It specifies four types of constraint;
 .LP
 This file contains user accessibility information.
 It specifies four types of constraint;
@@ -1322,6 +1490,16 @@ There may be several lines with the same login name but one of them must
 either have the name of the remote system or must contain a
 .I null
 system name.
 either have the name of the remote system or must contain a
 .I null
 system name.
+.B Note:
+This constraint, although stated in the original Nowitz \*(Uu document,
+was not implemented in Version 7 \*(Uu.
+For all practical purposes,
+a remote computer's login was not validated by \*(Uu.
+This is still the case in 4.3BSD.
+Remote login checking \fIis\fP implemented in AT&T's System VR2.2 release,
+and in the \*(Uu provided with Digital Equipment Corporation's ULTRIX.
+HoneyDanBer analogously requires all remote logins to be listed in
+its \fIPermissions\fP file.
 .IP [4]
 If the line matched in ([3]) contains a ``c'',
 the remote machine is called back before any transactions take place.
 .IP [4]
 If the line matched in ([3]) contains a ``c'',
 the remote machine is called back before any transactions take place.
@@ -1370,160 +1548,112 @@ allows any user to transfer files beginning with ``/usr''
 but the user with login
 .I root
 can transfer any file.
 but the user with login
 .I root
 can transfer any file.
-.SH
-L.sys
-.LP
-Each entry in this file represents one system
-which can be called by the local uucp programs.
-The fields are described below.
+.PP
+.\"===========================================================================
+.\" SECTION 5: SPOOL FILES
+.\"===========================================================================
+.ne 5
+.NH
+SPOOL FILES
+.PP
+Spool Files contain \*(Uu transfer requests and data.
+Most have been described in detail earlier in this document.
+.LP
+All spool files live in the
+.B /usr/spool/uucp
+directory tree.
+To keep the spool directory from becoming hopelessly cluttered,
+each type of spool file is kept in its own subdirectory.
+The name of the directory is the same as the common prefix of the
+filename.
+For example, \fIwork files\fP (files beginning with \fBC.\fP) are kept
+in the \fBC.\fP directory; \fIexecute files\fP (which begin with \fBX.\fP)
+are kept in the \fBX.\fP directory, and so on.
+.LP
+A total of ten spool subdirectories are used, one of which is optional:
 .RS
 .RS
-.SH
-system name
-.LP
-The name of the remote system.
-.SH
-time
-.LP
-This is a string which indicates the days-of-week
-and times-of-day when the system should
-be called
-(e.g. MoTuTh0800\-1730).
-.LP
-The day portion may be a list containing
-some of
-.IP
-.I
-Su Mo Tu We Th Fr Sa
-.R
-.LP
-or it may be
-.I Wk
-for any week-day or
-.I Any
-for any day.
-.LP
-The time should be a range of times (e.g. 0800\-1230).
-If no time portion is specified, any time
-of day is assumed to be ok for the call.
-.SH
-device
-.LP
-This is either
-.I ACU
-or the hardwired device to be used for the call.
-For the hardwired case, the last part of the
-special file name is used (e.g. tty0).
-.SH
-speed
-.LP
-This is the line speed for the call (e.g. 300).
-.SH
-phone
-.LP
-The phone number is made up of an optional
-alphabetic abbreviation and a numeric part.
-The abbreviation is one which appears in the
-.I L-dialcodes
-file (e.g. mh5900, boston995\-9980).
-.LP
-For the hardwired devices, this field contains
-the same string as used for the
-.I device
-field.
-.SH
-login
-.LP
-The login information is given as a series of
-fields and subfields in the format
-.IP
-expect\ \ send\ 
-.B [
-expect\ \ send
-.B ]
-\ ...
-.LP
-where;
-.I expect
-is the string expected to be read and
-.I send
-is the string to be sent when the
-.I expect
-string is received.
-.LP
-The expect field may be made up of subfields
-of the form
-.IP
-expect\fB[\fR\-send\-expect\fB]\fR...
-.LP
-where the
-.I send
-is sent if the prior
-.I expect
-is not successfully read
-and the
-.I expect
-following the
-.I send
-is the next expected string.
-.LP
-There are two special names available to be sent
-during the login sequence.
-The string
-.I EOT
-will send an EOT character and the string
-.I BREAK
-will try to send a BREAK character.
-(The
-.I BREAK
-character is simulated using line speed changes
-and null characters and may not work on all
-devices and/or systems.)
+.IP C. 15
+\fIWork\fP files.
+.IP CORRUPT
+Corrupted \fIwork\fP and \fIexecute\fP files.
+\fIUucico\fP and \fIuuxqt\fP will deposit \fBC.\fP and \fBX.\fP files here
+when they are unable to parse them.
+A notice will also be placed in the \*(Uu log.
+.IP D.
+\fIData files\fP received from remote hosts.
+.IP D.\fIhostname\fP
+\fIData files\fP to be sent to remote hosts.
+.IP D.\fIhostname\fPX
+\fIExecution files\fP to be sent to remote hosts.
+.IP LCK
+Per-device and per-site lock (\fBLCK.\fP) files. (Optional)
+.IP STST
+Per-site system status files.
+.IP TM.
+Temporary files used in data transfer.
+When the transfer is complete, the file is typically
+\fImv\fP'ed to the \fBD.\fP or \fBX.\fP directory.
+.IP X.
+\fIExecution files\fP received from remote sites. 
+.IP XTMP
+Temporary files and home directory for \fIuuxqt\fP.
 .RE
 .LP
 .RE
 .LP
-A typical entry in the L.sys file would be
-.IP "" 6
-sys Any ACU 300  mh7654 login uucp ssword: word
+The following sections describe only those spool files that were not
+discussed earlier.
+.NH 2
+LCK \- lock files
 .LP
 .LP
-The expect algorithm looks at the last part of the
-string as illustrated in the password field.
-.RE
-.NH
-Administration
+Lock files are created for each device in use (except for TCP/IP sockets)
+and each system conversing.
+This prevents duplicate conversations and multiple attempts to use the
+same devices.
+The form of the lock file name is
+.IP "" 12
+\fBLCK..\fRstr
 .LP
 .LP
-This section indicates some events and files which must be
-administered for the
-.I uucp
-system.
-Some administration can be accomplished by 
-.I "shell files"
-which can be initiated by
-.I crontab
-entries.
-Others will require manual intervention.
-Some sample 
-.I "shell files"
-are given toward the end of this section.
-.SH
-SQFILE \- sequence check file
+where
+.I str
+is either a device or system name.
+The files may be left in the spool directory if
+.I uucico
+aborts.
+They will be ignored (reused) after 90 minutes.
+When runs abort and calls are desired before the time limit expires,
+the lock files should be removed.
+If the \fBLCK.\fP subdirectory is used, it's access mode can be set to 777,
+thus allowing normal users to remove dead lock files when necessary.
+.NH 2
+STST \- system status files
 .LP
 .LP
-This file is set up in the
-.I program
-directory and contains an entry for each remote
-system with which you agree to perform conversation
-sequence checks.
-The initial entry is just the system name of
-the remote system.
-The first conversation will add two items to the line,
-the conversation count, and the date/time of the most
-resent conversation.
-These items will be updated with each conversation.
-If a sequence check fails, the entry will have to
-be adjusted.
-.SH
+These files are created in the \fBSTST\fP subdirectory by
+\fIuucico\fP.
+They contain information of failures such as login, dialup, or
+sequence check, and will contain a
+\fITALKING\fP, \fIRECEIVING\fP, or \fPSENDING\fP
+status when two machines are conversing.
+The file name is
+\fBSTST/\fP\fIsystem\fP,
+where \fIsystem\fP is the host name of the remote machine.
+.LP
+For ordinary failures (dialup, login), the file indicates the time
+of the last failure;
+this allows \fIuucico\fP to avoid retrying the failed call too soon.
+For sequence check failures, the file must be removed before
+any future attempts to converse with that remote system.
+.LP
+If the file is left due to an aborted run, it may contain a
+.I TALKING
+status.
+In this case, the file must be removed before a conversation
+is attempted.
+The easiest way to do this is to use the \fIuupoll\fP command to
+force \fIuucico\fP to start up.
+.NH 2
 TM \- temporary data files
 .LP
 These files are created in the
 TM \- temporary data files
 .LP
 These files are created in the
-.I spool
+.B /usr/spool/uucp/TM.
 directory while files are being copied
 from a remote machine.
 Their names have the form
 directory while files are being copied
 from a remote machine.
 Their names have the form
@@ -1538,251 +1668,432 @@ is a sequential three digit number starting at zero
 for each invocation of
 .I uucico
 and incremented for each file received.
 for each invocation of
 .I uucico
 and incremented for each file received.
-
 After the entire remote file is received, the
 After the entire remote file is received, the
-.I TM
-file is moved/copied to the requested destination.
+.B TM
+file is moved to the requested destination,
+often the \fBX.\fP or \fBD.\fP directory.
 If processing is abnormally terminated or the
 If processing is abnormally terminated or the
-move/copy fails, the file will remain in the
-spool directory.
+move fails, the file will remain in the
+\fBTM.\fP directory.
 .LP
 .LP
-The leftover files should be periodically removed;
+The stranded files should be periodically removed;
 the
 .I uuclean
 program is useful in this regard.
 The command
 .IP "" 12
 the
 .I uuclean
 program is useful in this regard.
 The command
 .IP "" 12
-uuclean\ \ \-pTM
+uuclean\ \ -d/usr/spool/uucp/TM.\ \ \-pTM.
 .LP
 will remove all
 .LP
 will remove all
-.I TM
+.B TM
 files older than three days.
 files older than three days.
-.SH
-LOG \- log entry files
-.LP
-During execution of programs, individual
-.I LOG
-files are created in the
-.I spool
-directory with information about
-queued requests, calls to remote systems,
-execution of
-.I uux
-commands and file copy results.
-These files should be combined into the
-.I LOGFILE
-by using the
-.I uulog
-program.
-This program will put the new
-.I LOG
-files at the beginning of the existing
-.I LOGFILE.
-The command
-.IP "" 12
-uulog
-.LP
-will accomplish the merge.
-Options are available to print some or all the
-log entries after the files are merged.
-The
-.I LOGFILE
-should be removed periodically
-since it is copied each time new LOG
-entries are put into the file.
-.LP
-The
-.I LOG
-files are created initially with mode 0222.
-If the program which creates the file terminates normally,
-it changes the
-mode to 0666.
-Aborted runs may leave the files with mode
-0222 and the
-.I uulog
-program will not read or remove them.
-To remove them, either use
-.I rm ,
-.I uuclean ,
-or change the mode to 0666 and let
-.I uulog
-merge them with the
-.I LOGFILE .
-.SH
-STST \- system status files
+.\"===========================================================================
+.\" SECTION 6: LOG FILES
+.\"===========================================================================
+.ne 5
+.NH
+LOG FILES
 .LP
 .LP
-These files are created in the spool directory by the
-.I uucico
-program.
-They contain information of failures such as login, dialup or
-sequence check and will contain a
-.I TALKING
-status when to machines are conversing.
-The form of the file name is
+The following files provide a history of \*(Uu activities.
+All live in the spool directory, \fB/usr/spool/uucp\fP.
+They grow forever, and must be periodically trimmed or deleted;
+this is usually done weekly (or daily) via \fIcron\fP.
+.RS
+.IP AUDIT 12
+This is a directory of audit trail files, one file per site.
+.I Uucico
+uses an audit file for debugging output
+whenever it is run with debug enabled (via the \fB-x\fP option or a
+\fBSIGFPE\fP signal), but the standard message output file \fBstderr\fP is
+not available.
+.IP ERRLOG
+This is an oft-forgotten log of \*(Uu ``Assert'' errors.
+An Assert error is a catastrophic and unrecoverable failure of the \*(Uu
+system.
+These include spool directories or control files that cannot be opened, 
+an unexpected error return from a system call, or an ``impossible case''
+in a utility's control flow.
 .IP
 .IP
-\fBSTST\fR.sys
-.LP
-where
-.I sys
-is the remote system name.
-.LP
-For ordinary failures (dialup, login), the file will prevent
-repeated tries for about one hour.
-For sequence check failures, the file must be removed before
-any future attempts to converse with that remote system.
+Utilities that abort with an Assert error return a status code of -1.
+If a user reports \fIuucp\fP or \fIuux\fP dying with a message like
+``uux failed, status -1,'' then the ERRLOG file should be checked.
+.IP LOGFILE
+This is the primary \*(Uu log. All \*(Uu activity is recorded here,
+including queue requests from \fIuucp\fP and \fIuux\fP, attempted
+connections, file transfers, and communications failures.
+.IP SYSLOG
+This is a log of file transfer statistics: number of bytes, time required,
+and number of packet retries.
+The effective data rate can be calculated simply by dividing the number of
+bytes by the time;
+low data rates or a large number of retries implies that the communication
+link may marginal.
+.RE
 .LP
 .LP
-If the file is left due to an aborted run, it may contain a
-.I TALKING
-status.
-In this case, the file must be removed before a conversation
-is attempted.
+Optionally, one \fILOGFILE\fP per site may be maintained in the \fBLOG\fP
+subdirectory.
+This option can be selected at \*(Uu compile time via the LOGBYSITE #define
+in \fBuucp.h\fP.
+.\"===========================================================================
+.\" SECTION 7: ADMINSTRATION AND SYSTEM SECURITY
+.\"===========================================================================
+.ne 5
+.NH
+ADMINISTRATION AND SYSTEM SECURITY
+.NH 2
+.UX 
+System Files
 .SH
 .SH
-LCK \- lock files
-.LP
-Lock files are created for each device in use (e.g. automatic calling
-unit) and each system conversing.
-This prevents duplicate conversations and multiple attempts to use the
-same devices.
-The form of the lock file name is
-.IP "" 12
-\fBLCK..\fRstr
+/etc/passwd
 .LP
 .LP
-where
-.I str
-is either a device or system name.
-The files may be left in the spool directory if runs abort.
-They will be ignored (reused) after a time of about 24 hours.
-When runs abort and calls are desired before the time limit,
-the lock files should be removed.
-.SH
-Shell Files
+\*(Uu requires a login in \fB/etc/passwd\fP;
+at its simplest the entry would be
+.DS
+uucp::66:1:UNIX-to-UNIX Copy:/usr/spool/uucppublic:/usr/lib/uucp/uucico
+.DE
 .LP
 .LP
-The
-.I uucp
-program will spool work and attempt to start the
-.I uucico
-program, but the starting of
-.I uucico
-will sometimes fail.
-(No devices available, login failures etc.).
-Therefore, the
+This user should own all the \*(Uu files and utilities.
+Remote sites wishing to call in for \*(Uu transfers would login to
+\fBuucp\fP (with the correct password, if any), and get
 .I uucico
 .I uucico
-program should be periodically started.
-The command to start
-.I uucico
-can be put in a ``shell'' file with a command to merge
-.I LOG
-files and started by a crontab entry on an hourly basis.
-The file could contain the commands
-.IP
-.I program /uulog
-.br
-.I program /uucico
-\ \ \-r1
-.LP
-Note that the ``\-r1'' option is required to start the
-.I uucico
-program in
+as their ``shell.''
+Since \fIuucico\fP would be called without any options, it would run in
+.I SLAVE
+mode, thus responding correctly to the remote system, which
+would be in
 .I MASTER
 mode.
 .LP
 .I MASTER
 mode.
 .LP
-Another shell file may be set up on a daily basis to remove
-.I TM ,
-.I ST
-and
-.I LCK
-files
-and
-.I C.
+The directory
+.B /usr/spool/uucppublic
+should be created with 777 access modes, owned by \fBuucp\fP.
+In addition to serving as the home directory for \*(Uu remote logins,
+.B uucppublic
+provides a ``public-access'' directory where any user can read, write,
+or transfer files.
+.LP
+There are a number of security problems with using a single login, not
+the least of which is that superuser permission would be necessary to
+edit the \fIcontrol\fP files.
+A better arrangement would be:
+.DS
+uucp::66:1:UUCP Administrator:/usr/lib/uucp:
+nuucp::67:1:UNIX-to-UNIX Copy:/usr/spool/uucppublic:/usr/lib/uucp/uucico
+.DE
+This provides one login for the \*(Uu administrator (which must be kept
+secure!) and a second for remote machines to use for login.
+A still more elaborate setup would use a separate login for each remote
+site, and possibly provide the administrator with a choice of shells:
+.DS
+uucp::66:1:UUCP Administrator:/usr/lib/uucp:
+UUCP::66:1:UUCP Administrator:/usr/lib/uucp:/bin/csh
+Uhosta::6001:1:UNIX-to-UNIX Copy:/usr/spool/uucppublic:/usr/lib/uucp/uucico
+Uhostb::6002:1:UNIX-to-UNIX Copy:/usr/spool/uucppublic:/usr/lib/uucp/uucico
+Uhostc::6003:1:UNIX-to-UNIX Copy:/usr/spool/uucppublic:/usr/lib/uucp/uucico
+.DE
+.LP
+It is assumed that the login name
+used by a remote computer to dial in
+is not the same as the login name of a normal user
+of the machine.
+However, several remote computers may employ the same
+login name.
+.LP
+Note that
+.B uucppublic
+is
+.I not
+used as the home directory for
+.B uucp
+when it logs into a regular shell.
+This would be an extreme security hazard, since anyone could slip a
+``Trojan horse'' into a
+.B .profile
 or
 or
-.I D.
-files for work which can not be accomplished for
-reasons like bad phone number, login changes etc.
-A shell file containing commands like
-.IP
-.I program /uuclean
-\ \ \-pTM \-pC. \-pD.
-.br
-.I program /uuclean
-\ \ \-pST \-pLCK \-n12
+.B .cshrc
+file, which would be automatically executed when the \*(Uu administrator
+logged in.
+.SH
+/etc/rc
 .LP
 .LP
-can be used.
-Note the ``\-n12'' option causes the
-.I ST
-and
-.I LCK
-files older than 12 hours to be deleted.
-The absence of the ``\-n'' option will use a three day time
-limit.
-.LP
-A daily or weekly shell should also be created
-to remove or save old
-.I LOGFILE s.
-A shell like
+The system startup file, \fB/etc/rc\fP, should clean up any stray lock
+files with the line
 .IP
 .IP
-cp
-.I spool /LOGFILE
-\ \ 
-.I spool /o.LOGFILE
-.br
-rm
-.I spool /LOGFILE
+rm -f /usr/spool/uucp/LCK.*
 .LP
 .LP
-can be used.
+or, if the LCK subdirectory is being used,
+.IP
+rm -f /usr/spool/uucp/LCK/LCK.*
 .SH
 .SH
-Login Entry
-.LP
-One or more logins should be set up for
-.I uucp .
-Each of the ``/etc/passwd'' entries should
-have the
-``\fIprogram\fR/uucico''
-as the shell to be executed.
-The login directory is not used, but if the system
-has a special directory for use by the users for
-sending or receiving file, it should as the
-login entry.
-The various logins are used in conjunction with the
-.I USERFILE
-to restrict file access.
-Specifying the
-.I shell
-argument limits the login to the use of uucp
-(
-.I uucico )
-only.
+/etc/services
+.LP
+If \*(Uu is to be used over TCP/IP links, then an entry for \*(Uu's port
+number should be added to \fB/etc/services\fP:
+.IP
+uucp\ \ 540/tcp\ \ uucpd\ \ # UUCP TCP/IP
+.\"===========================================================================
+.NH 2
+Shell Scripts For Periodic Cleanup
+.LP
+The \*(Uu system has a fairly large number of activities that must
+occur periodically.
+These include starting \fIuucico\fP to process queued requests,
+running \fIuuclean\fP to remove old spool files, and
+shuffling the boundlessly-growing log files.
+Some sites will also want to poll other sites periodically.
+.LP
+While it's possible to put all the necessary commands into \fIcron\fP's
+control file \fB/usr/lib/crontab\fP, this would be extremely awkward.
+The usual technique is to use three separate shells scripts, one each
+for hourly, daily, and weekly operations.
+Examples are provided in the
+.B UUAIDS
+directory; the following sections provide some specific recommendations.
 .SH
 .SH
-File Modes
+Hourly
 .LP
 .LP
-It is suggested that the owner and file modes of various
-programs and files be set as follows.
+Activities that should occur hourly include:
+.RS
+.IP - 2
+Polling of selected sites.
+Sites that have no dial-out capability will need to be periodically polled.
+The \fIuupoll\fP command works well for this.
+.IP -
+Start \fIuucico\fP to complete all unfinished work.
+This can be as simple as:
+.IP "" 7
+uucico -r1 &
+.RE
+.SH
+Daily
 .LP
 .LP
-The programs
-.I uucp ,
-.I uux ,
+The daily script should be started by \fIcron\fP in the wee hours, around
+4 a.m.
+Activities that should occur daily include:
+.RS
+.IP - 2
+Call
+.I uuclean
+to remove old spool files.
+The preferred technique is something like the following:
+.DS
+cd /usr/lib/uucp
+deadtime=`expr 24 * 7`
+uuclean -d/usr/spool/uucp/AUDIT -n72
+uuclean -d/usr/spool/uucp/LCK -pLCK. -pLTMP. -n24
+uuclean -d/usr/spool/uucp/STST -n72
+uuclean -d/usr/spool/uucp/TM. -pTM. -n72
+uuclean -d/usr/spool/uucp/XTMP -n72
+uuclean -d/usr/spool/uucp/X. -pX. -n$deadtime
+uuclean -d/usr/spool/uucp/C. -pC. -n$deadtime
+uuclean -d/usr/spool/uucp/D. -pD. -n$deadtime
+uuclean -d/usr/spool/uucp/D.`uuname -l` -pD. -n$deadtime
+uuclean -d/usr/spool/uucp/D.`uuname -l`X -pD. -n$deadtime
+.DE
+.IP
+In this example,
+Audit files, Lock files, System Status files, temp files, and \fIuuxqt\fP
+output files are cleaned up every 72 hours (3 days).
+(\fBLTMP.\fP files are temporary files created by the lock mechanism;
+they are rarely around for more than a few seconds.
+Note, the above assumes that the
+.B LCK
+subdirectory is being used.)
+All normal data files are cleaned up every 24 * 7 hours, or every 7 days.
+.IP -
+Shuffle the log files.
+At the very least, LOGFILE should be moved to LOGFILE.old, and SYSLOG moved
+to SYSLOG.old.
+Busy sites may want to use \fIcompress\fP(1) to squeeze down the old files.
+.IP -
+Use \fIfind\fP(1) to clean up the
+.B /usr/spool/uucppublic
+directory.
+If left unattended, garbage will gradually accumulate there until it fills
+the file system.
+.RE
+.SH
+Weekly
+.LP
+Small sites with very little traffic may chose to shuffle the log files once
+per week, instead of once per day.
+The weekly script should, like the daily script, be run early in the morning.
+.\"===========================================================================
+.NH 2
+Connecting new systems
+.LP
+When first connecting a new machine to a \*(Uu network,
+it is useful to try and establish a connection with
+\fItip\fR or \fIcu\fR first.
+The \*(Uu administrator will quickly become aware of any special facilities
+that are going to be required,
+for example:
+What lines and modems are to be used?
+Is the connection through different hardware and carriers?
+Does the remote system care about parity?
+What speed lines are being used and do they cycle through several speeds?
+Is there a line switch front end that will require special login dialogue in
+\fBL.sys\fP?
+.LP
+Once a successful login is achieved ``by hand,'' the administrator should
+have enough information to allow the correct setup of the \fIcontrol\fR files
+in
+.B /usr/lib/uucp.
+.LP
+The \*(Uu administrator should then
+negotiate with the remote site's \*(Uu administrator
+as to who (if anyone) will do polling and when.
+Both administrators must set up the relevant accounts and passwords.
+The local administrator should
+decide on what permissions and security precautions are to be observed.
+Testing time and facilities will need to be arranged
+to complete initial connection testing between the systems.
+.\"============================================================================
+.NH 2
+Miscellaneous Security Issues
+.LP
+The \*(Uu system, left unrestricted,
+will let any outside user execute any commands
+and copy any files that are accessible
+to the
+.B uucp
+login user.
+It is up to the individual sites to be aware of this and
+apply the protections that they feel are necessary.
+.PP
+There are several security features available aside from the
+normal file mode protections.
+These must be set up by the installer of the
+\*(Uu
+system.
+.IP - 3
+The login for uucp does not get a standard shell.
+Instead, 
 .I uucico
 .I uucico
-and
-.I uuxqt
-should be owned by the
-.I uucp
+is started.
+Therefore, the only work that can be done is through
+.I uucico .
+.IP -
+A path check is done on file names that are to be sent
+or received.
+.I USERFILE
+supplies the information for these checks.
+.I USERFILE
+can also be set up to require call-back
+for certain login-ids.
+(See the description of 
+.I USERFILE
+above.)
+.IP -
+A conversation sequence count can be set up so
+that the called system
+can be more confident that the caller
+is who he says he is.
+.IP -
+.I Uuxqt
+is restricted via the
+.I L.cmds
+file to a small list of commands that it
+will execute.
+A ``PATH'' shell statement is prepended to the command
+line as specified in the
+.I L.cmds
+file.
+The administrator may modify the list or remove the
+restrictions as desired.
+.IP -
+All the \*(Uu utilities except \fIuudecode\fP, \fIuuencode\fP,
+and \fIuusend\fP should be owned by the
+.B uucp
 login with the ``setuid'' bit set and only execute
 permissions (e.g. mode 04111).
 This will prevent outsiders from modifying the programs
 login with the ``setuid'' bit set and only execute
 permissions (e.g. mode 04111).
 This will prevent outsiders from modifying the programs
-to get at a standard
-.I shell
-for the
-.I uucp
-logins.
-.LP
+to get at a standard shell with a
+.B uucp
+login.
+Optionally, the utilities may belong to group \fBdaemon\fP and be given
+``setgid'' permissions (mode 06111).
+\fIUuxqt\fP should only permit other \*(Uu programs to execute it;
+its mode should be 04100 or 06110.
+.IP -
+The \fIcontrol\fP files \fIL.sys\fP, \fIUSERFILE\fP, and \fISQFILE\fP
+contain highly sensitive information.
+They should be owned by the
+.B uucp
+login, with read and write permission granted only to the owner (mode 0600).
+.\"===========================================================================
+.\" SECTION 7: UUCP SOURCE INSTALLATION
+.\"===========================================================================
+.ne 5
+.NH
+INSTALLING THE \*(UU SYSTEM
+.PP
+The source for the \*(UU system resides in the
+.B /usr/src/usr.bin/uucp
+directory.
+The README file includes complete instructions on how to rebuild the
+\*(Uu system from source.
+.LP
+For most environments, only two files will need to be modified:
+.B uucp.h
+includes a large number of tunable system-dependent parameters,
+including operating system type, devices to be supported,
+and a variety of optional features.
 The
 The
-.I L.sys ,
-.I SQFILE
-and the
-.I USERFILE
-which are put in the
-.I program
-directory should be owned by
-the
-.I uucp
-login and set with mode 0400.
-.SG MH-1273-DAN-unix
+.B Makefile
+may also have to be modified,
+particularly if you chose to keep certain files in different
+directories from usual.
+.\"===========================================================================
+.\" SECTION 8: ACKNOWLEDGMENTS
+.\"===========================================================================
+.ne 5
+.NH
+ACKNOWLEDGEMENTS
+.PP
+4.3BSD UUCP was a group development effort, involving the contributed work
+of over one hundred members of the USENET community.
+We're extremely grateful to them all.
+.LP
+Special thanks go to the following individuals, whose contributions were
+especially valuable:
+.RS
+.IP - 2
+Rick Adams (Center for Seismic Studies) coordinated the 4.3BSD UUCP release,
+incorporating (and often correcting) hundreds of bug fixes that
+were posted on the USENET and mailed to him directly.
+Rick also managed to find time to add many enhancements
+and corrections of his own.
+.IP -
+Tom Truscott (Research Triangle Institute) and Bob Gray (then with
+PAR Tech Corp, now at Univ of Colorado)
+coordinated the 4.2BSD UUCP release, which was also a group effort.
+Tom has continued to provide enhancements and fixes in 4.3BSD.
+.IP -
+Guy Harris (then with Computer Consoles, Inc., now with Sun Microsystems)
+contributed many general bug fixes;
+in particular, he was the first to isolate the infamous 4.2BSD ``TIMEOUT'' bug.
+.IP -
+Lou Salkind (New York University) wrote the \fIuuq\fP utility.
+.IP -
+James Bloom (U.C. Berkeley) isolated a major
+day-one bug in the \fBg\fP-protocol driver
+that had eluded many people's attempts to squash it.
+.IP -
+Piet Beertema (Centrum voor Wiskunde en Informatica, Amsterdam) wrote the
+\fBf\fP-protocol to support ``mostly error-free links'';
+Robert Elz (University of Melbourne) modified the protocol
+specifically for X.25/PAD.
+.IP -
+Peter Honeyman (Princeton) assisted Rick by providing information on the
+facilities provided in HoneyDanBer UUCP;
+Rick then added many HDB-compatibility features and HDB-like
+extensions to 4.3BSD UUCP.
+.IP -
+Ross Green (U.C. Berkeley) produced the first revision of this chapter,
+updating the aging Nowitz document to more closely reflect reality.
+.RE
+.LP
+Thanks again to everyone who contributed.
+Berkeley UUCP continues to be a product of its own users,
+and would not exist as it does today without them.