key~~route~~~[cost]
The key field is the key on which searches are performed. Typically this is either a UUCP host name or a domain name. smail 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 (see lcase(8) and pathproc(8)). Warning: There is a bug in sort -f, so don't use it. Convert the keys to lower case, and then sort.
The route field is a "printf" string that details the route that mail to the key should take. See pathalias documentation for details.
The optional cost field is used by smail to determine whether to simply queue outbound UUCP mail, or to attempt immediate delivery (usually by invoking uucico). If the cost field is present, and the value is at or below smail's queueing threshold then the mail will be queued and an attempt at immediate delivery will be made. This will speed mail delivery between hosts who enjoy a cheap uucp link, like a hardwired line or some other low cost transport medium, while allowing mail sent over more expensive media to accumulate before transmission. If the field is absent, the cost defaults to a value above the queueing threshold. The default value for the queueing threshold is equal to the pathalias cost DEDICATED+LOW. Thus, direct links with cost DEDICATED+LOW or less will see immediate delivery, while the others are queued for later delivery.
pathalias input mypc = .mypc.mydomain mypc friend(DEMAND), bighub(DEDICATED) smart-host = bighub paths file produced by pathalias -f inputfile|pathproc .mypc.mydomain %s 0 bighub bighub!%s 95 friend friend!%s 300 mypc %s 0 smart-host bighub!%s 95