Go to the first, previous, next, last section, table of contents.


config File Examples

To start with, here are some examples of uses of the main configuration file, `config'. For a complete description of the commands that are permitted in `config', see section The Main Configuration File.

In many cases you will not need to create a `config' file at all. The most common reason to create one is to give your machine a special UUCP name. Other reasons might be to change the UUCP spool directory, or to permit any remote system to call in.

If you have an internal network of machines, then it is likely that the internal name of your UUCP machine is not the name you want to use when calling other systems. For example, here at `airs.com' our mail/news gateway machine is named `elmer.airs.com' (it is one of several machines all named `localname.airs.com'). If we did not provide a `config' file, then our UUCP name would be `elmer'; however, we actually want it to be `airs'. Therefore, we use the following line in `config':

nodename airs

The UUCP spool directory name is set in `policy.h' when the code is compiled. You might at some point decide that it is appropriate to move the spool directory, perhaps to put it on a different disk partition. You would use the following commands in `config' to change to directories on the partition `/uucp':

spool /uucp/spool
pubdir /uucp/uucppublic
logfile /uucp/spool/Log
debugfile /uucp/spool/Debug

You would then move the contents of the current spool directory to `/uucp/spool'. If you do this, make sure that no UUCP processes are running while you change `config' and move the spool directory.

Suppose you wanted to permit any system to call in to your system and request files. This is generally known as anonymous UUCP, since the systems which call in are effectively anonymous. By default, unknown systems are not permitted to call in. To permit this you must use the unknown command in `config'. The unknown command is followed by any command that may appear in the system file; for full details, see section The System Configuration File.

I will show two possible anonymous UUCP configurations. The first will let any system call in and download files, but will not permit them to upload files to your system.

# No files may be transferred to this system
unknown receive-request no
# The public directory is /usr/spool/anonymous
unknown pubdir /usr/spool/anonymous
# Only files in the public directory may be sent (the default anyhow)
unknown remote-send ~

Setting the public directory is convenient for the systems which call in. It permits to request a file by prefixing it with `~/'. For example, assuming your system is known as `server', then to retrieve the file `/usr/spool/anonymous/INDEX' a user on a remote site could just enter `uucp server!~/INDEX ~'; this would transfer `INDEX' from `server''s public directory to the user's local public directory. Note that when using `csh' or `bash' the ! and the second ~ must be quoted.

The next example will permit remote systems to upload files to a special directory named `/usr/spool/anonymous/upload'. Permitting a remote system to upload files permits it to send work requests as well; this example is careful to prohibit commands from unknown systems.

# No commands may be executed (the list of permitted commands is empty)
unknown commands
# The public directory is /usr/spool/anonymous
unknown pubdir /usr/spool/anonymous
# Only files in the public directory may be sent; users may not download
# files from the upload directory
unknown remote-send ~ !~/upload
# May only upload files into /usr/spool/anonymous/upload
unknown remote-receive ~/upload


Go to the first, previous, next, last section, table of contents.