paths(4) paths(4)
NAME
paths - pathrouter routing database
DESCRIPTION
The paths file is the routing database for the pathrouter
command. Each line of the file provides routing information
to either a host or to a domain. Each line should have either
two or three tab characters (ascii 0x9) as separated fields.
The format of each line in the paths file is:
key route [cost]
The key field is the key on which searches are performed.
Typically, either a UUCP host name or a domain name is used as
the value for key. pathrouter uses a binary search algorithm
when searching the database, so the keys must be sorted in
ascending order. Case is ignored when searching, so the keys
should be converted to lower case before sorting.
The route field is a printf string that details the route that
mail should take on the path to key.
The cost field is not referenced by pathrouter in this release
and a value for cost is optional.
EXAMPLES
Here is a sample paths file for a small host, where complete
routing information does not need to be maintained. It
illustrates many of the characteristics of the paths file.
Assume that the host's name is mypc, and that it is in domain
Also, assume that it has a dedicated link to two smart hosts
named bighub and gateway, and that the administrators for
bighub and gateway have given mypc permission to use each of
the smart hosts as a mail relay. Further, assume that bighub
is connected to the European network and that gateway is
connected directly to the USA. Lastly, assume that mypc has a
dialed-on-demand link to another computer named friend and
that through this link another computer named japan can be
reached.
Here is a typical paths file based on the example described
above.:
.com gateway!%s 300
.edu gateway!%s 300
.mypc.mydomain %s 0
Copyright 1994 Novell, Inc. Page 1
paths(4) paths(4)
.org gateway!%s 0
friend friend!%s 300
japan friend!japan!%s 300
mypc %s 0
smart-host bighub!%s 95
In this example, domain .com, .edu, and .org are routed to
gateway which has a US connection. Other domains will be
routed to the smart-host which is bighub. Mail to the host
japan will be routed via friend.
The following shows example output for pathrouter for the
above paths file.
$ pathrouter -p john@usl.com arnold@friend.mypc.domain
arnold@friend.mypc.domain arnold
john@usl.com gateway!usl.com!john
$ pathrouter -d john@uknet.ac.uk
resolve: parse address 'john@uknet.ac.uk'
= 'john' @ 'uknet.ac.uk' (DOMAIN)
getpath: looking for '.uknet.ac.uk'
getpath: looking for 'uknet.ac.uk'
getpath: looking for '.ac.uk'
getpath: looking for 'ac.uk'
getpath: looking for '.uk'
getpath: looking for 'uk'
getpath: looking for 'smart-host'
route: 'uknet.ac.uk' (NULL) = 'bighub!%s' (0)
resolve: parse route 'bighub!uknet.ac.uk!john'
= 'uknet.ac.uk!john' @ 'bighub' (UUCP)
resolve 'john@uknet.ac.uk' = 'uknet.ac.uk!john'
@ 'bighub' (UUCP)
bighub!uknet.ac.uk!john
$ pathrouter fred@japan help@usl.com
gateway!usl.com!help friend!japan!fred
REFERENCES
pathrouter(1M)
Copyright 1994 Novell, Inc. Page 2