PATHTO(1)

NAME
pathto, uupath - calculate mail paths

SYNOPSIS
pathto [ -tdnsv ] address ...
uupath [ -tsv ] [ sitename|domain|path ] ...

DESCRIPTION
These commands query the mail routing databases to determine which paths will be used in sending mail to the specified hosts or addresses.

The pathto(1) command takes the address of a user and determines the path that smail(8) would use for delivery. For historical reasons, the resulting path is rewritten as a UUCP-style `!'-path by default, even though this form may not be used by smail for delivery. The leading sitename in the path is the site towards which smail(8) will make a delivery. The leading sitename may be followed by a route to the target of the address if the leading sitename and target are different. The remainder of the argument, if anything, is added on to the end. This command advises you on how smail(8) will handle an address but does not give the actual address that smail(8) will use, unless the -n option given.

The uupath(1) command attempts to compute paths from your machine to other machines. If the argument is the name of a site such as nsavax, or nsavax.nsa.gov, or if it is the name of a domain such as .nsa.gov, then the uupath(1) program will try to produce a path to that site or domain. If the argument is a `!'-path, then uupath computes a route to the first site, and appends the remainder of the path onto it. For historical reasons, the resultant string will be ``%s'', if the host is the local host.

It is important to note that uupath arguments relate to sitenames, while the pathto arguments relate to addresses of users. The command:
    uupath namei
will compute a path to the SITE named namei, while the command:
    pathto namei
will ``compute a path'' to the USER named namei on the local machine.

OPTIONS
All three commands take hosts and addresses from the arguments, or from standard input if none are given as arguments. The following options are recognized:

-s  If smart-host routing is enabled in the smail routing databases, then -s will cause smart-host routing used as a last resort in computing paths. By default, smart-host routing is not taken into account by these commands. A smart-host router will route an address to a remote host that supposedly has a larger or more up-to-date routing database than the local host.

-d  By default, pathto does not examine what will happen when mail is actually delivered to the final user(s). If the final users are on the local system, then -d will apply any aliasing, forwarding or mailing lists expansions. The order and number of arguments will not necessarily correspond to the order and number of output address when this option is used.

-n  uupath will always produce a pure UUCP path, and by default so will will pathto, in the interest of backward compatibility. The -n flag will generate other addressing forms if they would actually be used by smail for delivery. With the -n option, the pathto command will print the next-hop host that a particular address would be sent to (or it will print ``local'' if the address would be delivered locally), and it will print the address that smail will give to the next-hop. The next-hop host and the address are separated by :: and some whitespace.

-t  Announce the name of the transport that would be used in delivering to an address, if the transport is known. Local addresses that are not resolved using the -d flag will not produce a tranport because the specific local transport cannot determined without applying the directors.

-v  Be verbose, announcing each important state of address resolution as it occurs. The verbose messages are written to standard error.

EXAMPLES
The following examples assume the following routing configuration will be used to compute path information:

a.  a list of known local host names: amdahl, uts.amdahl.com and amdahl.com.

b.  a pathalias(8) database containing the lines:
    .nsa.gov	namei!nsavax!%s
    amdahl	%s
    glotz	namei!glotz!%s
    kgbvax	name!walldrug!kgbvax!%s
    namei	namei!%s
    nsavax	namei!glotz!nsavax!%s
    where each path will use UUX for delivery.

c.  a known network connection to the host eek, which is also known as eek.uts.amdahl.com.

d.  domains of the form [number.number.number.number] are recognized as internet numbers to be delivered using TCP/IP.

e.  the path namei!glotz!nsavax is used as a smart-host path for addresses the localhost cannot route.

The following commands, in italic, will produce the corresponding output:
    $ uupath nsavax mit-prep uts.amdahl.com
    namei!glotz!nsavax
    uupath: no route found to mit-prep
    %s $ uupath -s mit-prep!rms
    namei!glotz!nsavax!mit-prep!rms $ pathto @eek.uts.amdahl.com:rms@prep.ai.mit.edu
    eek!prep.ai.mit.edu!rms $ pathto -n @[192.2.12.3]:rms@prep.ai.mit.edu
    [192.2.12.3] :: rms@prep.ai.mit.edu $ pathto brown@nsavax
    namei!glotz!nsavax!brown

DIAGNOSTICS
An error message will be written to standard error if there is a syntax error in an address, or if no path can be found for an address and smart-host routing is not being used. In case of such errors, these programs return an appropriate exit code from the file /usr/include/sysexits.h; e.g., EX_DATAERR or EX_NOHOST.

FILES

/var/lib/smail/paths
    Standard ascii path database.

/var/lib/smail/routers
    Smail routing configuration.

SEE ALSO
smail(8), smail(5), pathalias(8) and pathalias(5).

BUGS
Your local site does not always know a correct path to every site.

Routing is only as good as your routing information. Smail cannot compensate for out-of-date or poorly syncronized databases.

COPYRIGHT
Copyright(C)1987, 1988 Ronald S. Karr and Landon Curt Noll
Copyright(C)1992 Ronald S. Karr
See a file COPYING, distributed with the source code, or type smail -bc for distribution rights and restrictions associated with this software.