COHERENT manpages
This page displays the COHERENT manpage for config [File that configures smail].
List of available manpages
Index
config -- System Administration File that configures smail /usr/lib/mail/config File /usr/lib/mail/config holds instructions that configure the mailer- delivery program smail. You can modify this file to supplement, modify, or override smail's default configuration. Please note that this file is in no way related to file /usr/lib/uucp/config, which can be used to configure the Taylor UUCP system. For details on how to configure UUCP, see the Lexicon entry for /usr/lib/mail/config, which immediately follows this article in the Lexicon. The rest of this article describes config, the attributes you can set within it, and how the setting of each attribute affects smail's behavior. Suite of Configuration Files To begin, your machine can have two smail configuration files: a primary one, and a secondary one. Either can reset the values of any smail variable; for example, each can define names for the local host, define where files reside, or set the values for site-definable message-header fields. You are not obliged to use a configuration file: if smail's default configuration suits you, then you can rename or move the primary configuration file so it will no longer be read. Likewise, if you have a primary configuration file, you are not obliged to have a secondary one. smail reads the primary configuration file first, then the secondary configuration file. The values in the secondary configuration file can override those set in the primary file; the primary file, in turn, can redefine the name of the secondary configuration file. This gives you great flexibility to configure smail to suit your needs and preferences. Format of a Configuration File A configuration file consists of instructions; each instruction, in turn, sets an attribute to a value. Attributes come in three flavors: string, numeric, and Boolean. To set a variable to a string or numeric value, use the form: variable = value For example, the instructions postmaster = tron@glotz.uucp domains = wall.com spool_mode = 0664 set the default address for the postmaster to tron@glotz.uucp, the attribute domains to wall.com, and the permissions for spool files to permit the file's owner and group to write into it. Boolean attributes are either turned off or turned on. To turn on a Boolean attribute, use the notation: +boolean-attribute To turn it off, use the notation: -boolean-attribute You can also use the notation -attribute to set a numeric variable to zero and to un-set a value for a string variable. For example, the following instructions disable the use of an external transport file and tells smail that configuration files are not optional: -transport_file +require_configs smail ignores blanks lines within a configuration file. If smail encounters a `#' character, it ignores that character plus all text to its right; thus, you can use this character to introduce a comment. If a line begins with white space, smail assumes that it continues the previous line; in this way, you can extend an instruction over more than one line. For example, the following instructions set the Received: header field to use for messages to a multi-line value, and also set 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 # comment: user "unknown" has few access capabilities smail Attributes The following names the attributes that you can set in a configuration file. Each attribute's name is followed by its type and its default setting in parentheses. auth_domains (string, off) Name the domains for which your host is considered authoritative -- i.e., the domains that your host knows how to access directly. The domain names must be separated by a single colon character `:'. Mail addressed to any domain named in this list will not be forwarded to the smart host (described below). auto_mkdir (Boolean, on) If set, smail creates all directories required for spooling and logging if they do not exist. However, smail will never create required parent directories. auto_mkdir_mode (integer, 0755) When smail creates a directory, give it this permission mask. For details on what the numbers in a permission mask mean, see the Lexicon entry for chmod. console (string, /dev/console) Name the console device. This device is used as a last resort in attempting to write panic messages. copying_file (string, COPYING) The path name to file COPYING, which states your distribution rights and details the warranty information from the authors of smail. If this does not begin with `/', smail assumes that it is in the directory named by attribute smail_lib_dir (described below). date_field (string, Date: $spool_date) smail expands this string to form field Date: in a mail message's header, should the header not already contain such a field. delivery_mode (string, foreground) The default mode for delivering new mail. This can be one of the following values: foreground Immediate delivery via the process that received the message. background Immediate delivery via a child process. The process that received the message exits immediately. queued Do not attempt delivery until a later queue run. director_file (string, directors) This names the file that configures smail's directors. If this does not begin with `/', smail assumes that it is in the directory named by variable smail_lib_dir (described below). domains (string) This sets the domain name that smail writes into the header of an outgoing mail message. It is computed at run time. If attribute visible_name is turned off, then smail sets it to the first name set by attribute hostnames. If hostnames is not set, then smail constructs the domain-name host names of the form hostname.domain. hostname is set in file /etc/uucpname domain is a name set by the attribute domains-- smail uses each entry in domains, in order, to create the hostnames value. For sites in the UUCP zone, domains often will merely be set to the string uucp. Finally, you can use the variable $visible_name within the string to which you set this attribute. For compatibility with earlier versions of smail, this attribute can also be called visible_domains. error_copy_postmaster (Boolean, off) Send the postmaster a copy of every error message. Normally, smail sends the postmaster only the errors that appear to result from administrator mistakes. If you set this attribute, then smail also sends the postmaster the errors that are returned to the sender or that are mailed to owners of mailing lists. fnlock_interval (number, 3) Set the sleep interval between retries while attempting to lock mailbox files with a lockfile-based locking protocol. Under COHERENT, the function sleep() has a one-second granularity; therefore, you must this value to at least two. fnlock_mode (number, 0666) Create mailbox lock files. fnlock_retries (number, five) The number of times smail attempts to lock mailbox files using a file- based locking protocol. from_field (string) smail expands this string to form the fields From: and Sender: in a mail message's header. 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)} grades (string) Set the grade (or priority) characters that correspond to values of the Precedence: field in a mail message's header. The fields within the string are separated by `:'; precedence strings alternate with grade characters. Numbers have higher priority than upper-case letters, which in turn are higher than lower-case letters. Lower numbers are higher in priority than higher numbers, and the same goes for letters lower in the alphabet. Grades in the range `a' through `m' only return an error message and header to the sender when an error occurs. Grades in the range `n' through `z' return nothing to the sender should an error occur. The precedence names recognized by many BSD sendmail configurations are special-delivery, first-class, and junk. Others are useful mainly for getting mail out of the local machine or for communicating with other machines that run smail in a similar configuration. The grade character for a message is available in string expansions as the variable $grade. The default setting is: special-delivery:9:air-mail:A:first-class:C:bulk:a:junk:n hit_table_len (number, 241) The length of the internal-address ``hit'' table. smail hashes addresses into this table to prevent multiple deliveries to the same address. Longer tables speed address hashing, at the price of a small increase in the amount of memory used. NB, this value may be ignored in the future. host_lock_timeout (numeric, 30) Set the time during which smail will attempt to lock a host's retry file; this file is used to guarantee exclusive delivery to that thost. If smail cannot lock the file within this time, then it leaves the message in the queue, to be delivered later. A number with no suffix indicates seconds. Suffixes can be added to indicate a time multiplier: m indicates minutes, h indicates hours, and d indicates days. hostnames (string) hostname (string) A colon-separated list of names for the local host. This list, together with the attributes uucp_host and more_hostnames, should represent all possible names for the local host. Note that smail does not recognize the name hostname as a name for the local host unless that name is also set by one of the other hostname variables. If your local host is in more than one domain or can gateway to more than one level of domains, then this attribute should represent those names. For a host in a registered domain in the UUCP zone, which is also in the maps distributed over USENET, localhost.uucp should also be in the list. The first value in hostnames is used internally as a special ``primary name'' for the local host. Under COHERENT, this attribute is turned off by default. smail computes the value of hostnames by pairing the local host's name, as set in file /etc/uucpname, with every value set by attribute domains. smail re-computes the default value each time you run it. lock_by_name (Boolean, on) If this variable is turned on, locking of the input spool file is always based on lock files. Otherwise, an i-node--based locking mechanism may be used, such as the BSD function flock() or lockf() under System V or COHERENT. I-node--based locking is more efficient, if available. However, lock files can be easily created by shell scripts, which may be advantageous under some circumstances. lock_mode (number, 0444) log_mode (number, 0664) The mode assigned to newly created mail-system log files. logfile (string, /usr/spool/smail/log/logfile) The file into which smail writes transaction messages and error messages. If this file does not exist, smail creates it with the mode set by variable log_mode. max_hop_count (number, 20) If the hop count for a message equals or exceeds this number, then any attempt at remote delivery results in an error message being returned to the sender. smail uses this mechanism to prevent infinite loops. To set the hop count for a specific message, use smail's command-line option -h. Otherwise, smail computes it from the number of Received: fields in the message header. max_load_ave (number) For systems on which a load average can be computed, this attribute sets the maximum load average at which mail will be delivered. If the load average exceeds this number, smail saves incoming mail within the input spool directory for delivery later. Under COHERENT, this attribute is not set; therefore, smail does not compute the load average, and always attempts to deliver mail. max_message_size (number, 100k) Set the maximum size of a message. smail truncates messages longer than this. (This is not yet implemented; at present, smail sets nolimit on the size of a message.) message_buf_size (number, 100k) The size of the internal buffer that smail uses to read and write messages. The larger the value of this buffer, the fewer the number of calls to read() are required to read the message, because the entire message is always kept in memory. The default value is 100 kilobytes (100k). message_id_field (string) smail expands this attribute to form the field Message-Id: in a mail message's header. This will be used if such a field does not already exist in the header. The default value is: Message-Id: <$message_id@$primary_name> message_log_mode (number, 0644) Each message has associated with it a unique file that contains a transaction log for that message. This number sets the permissions that smail gives this file when it creates it. method_dir (string, methods) If a method attribute for a router does not specify a path name that begins with `/', smail prefixes this directory onto the path to form the complete path for the method file. If this does not begin with `/', smail assumes that it is in the directory set by attribute smail_lib_dir (described below). See the description of the router file for more information on method files. more_hostnames (string, off) A colon-separated list of host names. These host names are in addition to any names that smail computed from the domains when forming the value of the variable hostnames. Thus, it is useful for specifying names that are not formed from the computed name for the host. Attribute more_hostnames can also be called gateway_names, because it is often used to indicate the list of domains for which this machine is a gateway. nobody (string, nobody) The default user. This variables defines permissions to use when no other user is specified. Also, smail uses this user in some conditions when it is not certain whether a set of actions can be trusted, if performed under other, potentially more powerful users. This should reference a login identifier that has little power to do harm or access protected files. paniclog (string, /usr/spool/smail/log/paniclog) The name of the file onto which smail appends panic messages and other important error messages. If this file does not exist, smail creates it and assigns it the permissions specified by variable log_mode. smail records in this log all errors that require human intervention, such as configuration errors or directory-permission errors, that prevent mail spooling or delivery. When a configuration error occurs, smail usually moves the mail into a special error directory under the input spool directory. This prevents smail from again attempting to delivery the message until the configuration error has been corrected. Thus, you should regularly check both the panic log and the error directory, especially after you have changed a configuration. When the problem has been resolved, you can move the diverted messages back into the spool directory, and smail will again attempt to deliver them. postmaster_address (string, root) postmaster (string, root) This attribute sets the default address of the postmaster. If the address Postmaster is not resolved by any of the configured directors, smail then uses this address. qualify_file (string, qualify) This variable names the file that contains the host-name qualification information. If this does not begin with `/', smail assumes that it is a subdirectory of the directory defined by the attribute smail_lib_dir. queue_only (Boolean, off) If this flag is set, then smail does not deliver incoming mail immediately. It only attempts delivery when it explicitly processes the input queue, such as when you invoke it with command-line option - q. received_field (string) smail expands this string to form the field Received: in a mail message's header. It inserts this field into the header if the ``received'' attribute is not explicitly turned off for a transport. The default value for received_field is: received_field="Received: \ ${if def:sender_host\ {from $sender_host by $primary_name\ ${if def:sender_proto: with $sender_proto}\ \n\t(Smail$version #$compile_num) }\ else {by $primary_name ${if def:sender_proto:with $sender_proto }\ (Smail$version #$compile_num)\n\t}}\ id $message_id; $spool_date" require_configs (Boolean, off) If this option is turned off or is not set, then smail does not require its configuration files to exist. This applies to the primary and secondary configuration files, and the director, router, and transport files (respectively, /usr/lib/mail/directors, /usr/lib/mail/routers, and /usr/lib/mail/transports). If one of these files does not exist, smail ignores it and instead uses its internally compiled configuration. If, however, you turn on this attribute, then if smail cannot find a configuration file whose file name is not null, it displays a panic message and exits. To set a configuration file's name to null, turn off the attribute that names it. For example, to set the router file's name to null, use the attribute -router. retry_file (string, retry) This names the file that contains the retry-control information. If this name does not begin with `/', smail assumes that it is in directory named by variable smail_lib_dir (described below). retry_duration (interval, 5d) This specifies the default period of time for which smail will attempt to deliver a message. If the message cannot be delivered within this period of time, smail assumes it is undeliverable, and sends a ``bounce'' message either to the sender or to the list's owner, should there be one. A number with no suffix indicates seconds. Suffices can be added to indicate a time multiplier: m indicates minutes, h indicates hours, and d indicates days. Under COHERENT, the default is five days. retry_interval (interval, 10m) If smail cannot connect to a given host, it will wait at least this amount of time before it tries again. This applies to all messages routed to the host in question, to help process a queue efficiently. return_path_field (string, Return-Path: <$sender>) smail expands this string into field Return-Path: in the mail- message's header. It inserts this field into the header if attribute return_path is turned on for a given transport in file /usr/lib/mail/transports. router_file (string, routers) This attribute names the file that contains the router-configuration information. If this does not begin with `/', smail assumes that it is in the directory named by attribute smail_lib_dir (described below). second_config_file (string, none) This names the secondary configuration file. The section on configuration files, above, describes how this file relates to the primary configuration file. If this file's name does not begin with `/', smail assumes that it is in the directory named by attribute smail_lib_dir (described below). This is primarily useful in networks whose machines share file systems. In particular, the attributes smart_user, smart_path, and smart_transport are set in the secondary configuration file. sender_env_variable (string, not set) This attribute names the environmental variable that, in turn, gives the name of the mail message's sender. Normally, the name of the sender is determined from her login identifier, or by checking calling process's real-user identifier. If sender_env_variable is set and the environmental variable it names exists, then smail uses that name by default. For example, if the line sender_env_variable=BOGUS_NAME appears in /usr/lib/mail/config, and if variable BOGUS_NAME is set in the user's environment, then smail uses that name to identify the sender, instead of the name for that user that appears in file /etc/passwd. smail (string, /bin/smail) This attribute names the smail binary. smail uses this to re-exec itself when a major configuration change has been detected, or to exec smail when delivering error messages. If this name does not begin with `/', smail assumes that this binary is kept in the directory named by attribute smail_lib_dir. smail_lib_dir (string, /usr/lib/mail) This attribute gives the full path name of the directory in which smail by default seeks its configuration files. smail_util_dir (string, /usr/lib/mail) This attribute gives the full path name of the directory that holds smail's utilities, in particular the utilities mkaliases and mkdbm. smart_path (string, not set) This attribute defines the value that the router smarthost uses by default for its path attribute. It gives the path to a machine whose routing data base is more complete than the one on your local host. By default, this is not set; however, if you using UUCP to receive mail service from another system, you must set this variable to the name of that system. For details, see the Lexicon entry for routers. smart_transport (string, not set) This attribute defines the value that the smarthost router driver uses by default for its attribute transport. For details, see the Lexicon entry for routers. smart_user (string, not set) This attribute defines the value that the smarthost router driver uses by default for its attribute smart_user. For details, see the Lexicon entry for routers. smtp_accept_max (number, 20) This attribute sets the maximum number of SMTP connections that smail will process at any one time. This is for use with SMTP daemons started with smail's command-line option -bd, or through the command smtpd. If smail receives a a connection request when this number of SMTP-connection children have already been forked, smail shuts down the connection with SMTP message 421. If this attribute is set to zero, then the number of SMTP connections is unlimited. smtp_accept_queue (number, 5) If this number of SMTP connection processes is exceeded, then smail accepts additional connections but queues their messages for later processing. When the number of current connection processes drops below this number, smail resumes the immediate processing of mail (if attribute delivery_mode is set to foreground or background.) If delivery_mode is set to zero, then smail will always process mail immediately, regardless of the number SMTP connections that it is handling. Note that the value of smtp_accept_queue should be less than the value of smtp_accept_max. Setting smtp_accept_max to zero prevents smtp_accept_queue from working correctly in all cases. smtp_banner (string) smail expands this string to the SMTP startup banner. smail's SMTP server writes this banner when it accepts a connection request. Each line of this message is automatically preceded by identification code ``220''; newlines are correctly changed into a carriage-return newline sequence. The default value for smtp_banner is: $primary_name Smail$version #$compile_num ready at $date smtp_debug (Boolean, on) This Boolean variable controls the meaning of the DEBUG command when receiving SMTP commands. If this variable is on, then the DEBUG command (with an optional debugging level) sets debugging to the specified level, or to level 1 if no level was specified. smail writes the debugging output to the SMTP connection. smtp_receive_command_timeout (interval, 5m) This attribute sets the time that smail's SMTP daemon waits for a receiver command after it displays its prompt. If the daemon does not receive the command within this interval, it closes down the connection and exits. The default is 5m, that is, five minutes. smtp_receive_message_timeout (interval, 2h) This attribute sets the time that smail SMTP daemon waits for a message after it has displayed its prompt: 354 Enter mail If it does not receive the entire message within this interval, it removes the message, closes the connection, and exits. The default is 2h, that is, two hours. spool_dirs (string, /usr/spool/smail) This sets the directory or directories into which smail spools incoming mail. If it names more than one directory, the directories must be separated by a colon `:'. If smail cannot write a message to the first directory (say, due to permission problems, file-system-full errors, etc.), it tries to write the message into the other directories, one after another, until it either succeeds in writing the message or runs out of directories to try. Each spool directory is expected to have the following writable subdirectories: input The actual spool files lock Temporary lock files msglog Temporary per-message transaction logs and audit trails error Messages failing from problems requiring human intervention spool_grade (character, C) This attribute gives the default grade for mail messages. It can be overridden by a Precedence: field in a message's header. smail uses the grade to sort messages in the input spool directory. The grade is also available in string expansions as the variable $grade. See the description of the attribute grades, above, for more information. spool_mode (number, 0440) This attribute sets the permissions smail gives to spooled files. transport_file (string, transports) This attribute names the file that holds the transport-configuration information. If the directory does not begin with `/', smail assumes it is in the directory named by the attribute smail_lib_dir (described above). trusted_users (string, off) This names the users who are trusted to specify a sender for a message. Users who are not in this list cannot specify a Sender: field in a mail header; if they do, smail removes it. If a trusted user specifies a From: header field, then smail also creates a Sender: field that names the real user who submitted the message. In general, this attribute should name every user under whom remote mail is received and sent to smail. If this list is turned off, using the form -trusted, then every user is trusted. NB, smail uses the real user identifier to verify a trusted user. However, the program uucico runs under the real user identifier of the user who invoked it -- and any user can invoke uucico. smail cannot distinguish this case from any other, and thus will do the ``wrong thing'' in this instance. Under COHERENT, this attribute is turned off by default to avoid this problem. trusted_groups (string, off) This attribute names the user groups that are trusted to specify a sender of a message. smail checks a user's effective group identifier to ensure that he really is a member of a trusted group. Thus, were smail a setgid program, then this string would be of no value and should be turned off. However, if smail is not set gid (as it is not under COHERENT), then programs that invoke smail under a specific effective gid, not a specific real uid, can be detected and can be properly treated as trusted. uucp_name (string) This attribute gives the name of your local host. It is computed at run-time. This name is available in string expansions as the variable $uucp_name smail also uses it in the ``remote from hostname'' suffix to ``From'' lines for mail being delivered to remote machines, when the from attribute is turned on for a transport. visible_domains (string) This is a synonym for attribute domains. See Also Administering COHERENT, directors, mail [overview], routers, smail, transports Notes Copyright © 1987, 1988 Ronald S. Karr and Landon Curt Noll. Copyright © 1992 Ronald S. Karr. For details on the distribution rights and restrictions associated with this software, see file COPYING, which is included with the source code to the smail system; or type the command: smail -bc.