SMAILCONF(5)

NAME
/usr/local/etc/smail/config - smail global variables configuration

THE CONFIG FILE
The config file defines values for global variables used by smail. 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 recognised forms for entries in the config file are:

    variable_name = string or number
or:
    variable_name or +variable_name
or:
    -variable_name

The first form above sets the variable to a string or numeric value, the second form sets a boolean variable, and the last form un-sets 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 200KB, a method directory of /usr/lib/smail/method 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 recognised attributes is given in the following table, in alphabetic order. Note that the default values can be changed when compiling the smail program.

auth_domains
    type: string
    default value: (none)

    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 smarthost router driver.

auto_mkdir
    type: boolean
    default value: on

    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.

auto_mkdir_mode
    type: integer
    default value: 0755

    When directories are created automatically by smail, they are created with this permissions mode mask. See stat(2) for information on what this mode represents.

console
    type: string
    default value: /dev/console

    The file name for the console device. This filename is used as a last resort when attempting to write panic messages.

copying_file
    type: string
    default value: COPYING

    The pathname to the COPYING 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 smail_lib_dir directory.

date_field
    type: string
    default value:

        Date: $spool_date

    This string will be expanded to form the Date: header field in a mail message. This will be used if such a field does not already exist in the message headers.

delivery_grades
    type: string
    default value: (none)

    The grades of message which will have delivery attempted immediately. Other message grades (outside this range) will be queued for later delivery. The runq_grades configuration variable similarly controls delivery of mail that is in the smail queue. If queue_only is set or delivery_mode is set to queued, then delivery_grades has no effect. The grade string is a simple range of mail grades (see the definition of the grades configuration variable). Entries can be of the following forms:

        delivery_grades="0-Z"
    This allows immediate delivery of mail of grades ``0'' to ``Z'' (inclusive) (ie all other mail is queued for later delivery).

        delivery_grades="C"
    Only grade ``C'' (normally ``First-Class'') is immediately delivered.

        delivery_grades="C-"
    The third form means that grade ``C'' or lower mail is delivered.

        delivery_grades="-C"
    The fourth form means that mail of grades ``C'' or above is immediately delivered

        delivery_grades="-"
        delivery_grades=""
        -delivery_grades
    All grades are delivered immediately - this is the default.

delivery_mode
    type: string
    default value: background

    The default mode of delivery for new mail. This can be one of the values ``foreground'' (immediate delivery in the process that received the message), ``background'' (immediate delivery in a child process, where the process that received the message exits immediately), or ``queued'' (do not attempt delivery until a later queue run).

director_file
    type: string
    default value: directors

    Names the file containing the director configuration information. If this does not begin with ``/'', it will be referenced relative to the smail_lib_dir directory.

domains
    type: string
    default value: uucp

    Specifies the (mail) domains that this host is in. The first item in the list is used with the hostname to make the primary_name which is used as this machine's name in SMTP conversations etc.

error_copy_postmaster
    type: boolean
    default value: off

    Copy the postmaster on all error messages. Normally only errors that appear to be a result of administrator errors will be mailed to the postmaster. If error_copy_postmaster 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.

fnlock_interval
    type: number
    default value: 3

    The sleep interval between retries while attempting to lock mailbox files with a lockfile-based locking protocol. On systems with one second timer granularity, this value should be at least 2.

fnlock_mode
    type: number
    default value: 0666

    Mailbox lock files are created with this mode.

fnlock_retries
    type: number
    default value: 0

    The number of times to attempt to lock mailbox files using a file-based locking protocol.

    If your system doesn't have an atomic rename() call the default value will be ``5''.

from_field
    type: string
    default value:

        From: $sender${if def:sender_name: ($sender_name)}

    This string will be expanded to form From: or Sender: header fields. The expanded string must begin with ``From:'', which may be replaced by other strings to form an actual header field.

grades
    type: string
    default value:

        special-delivery:9:air-mail:A:first-class:C:bulk:a:junk:n

    The priority, or grade, characters corresponding to particular values of the Precedence: field in the message header. The parts of the string are separated by colons (`:') 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 note that smaller numbers are higher in priority than larger numbers, and the same goes for letters lower in the alphabet. Grades in the range ``[a-m]'' 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 ``[n-z]'' will not have anything returned to the sender on errors. The precedence names recognised 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 communication with other machines running Smail in a similar configuration. The grade character for a message is available in string expansions as the $grade variable.

hit_table_len
    type: number
    default value: 241

    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.

    If your system does not have a a large virtual address space the default value will be ``13''.

    NOTE: This value may be ignored/deprecated in the future.

host_lock_timeout
    type: interval
    default value: 30

    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. In that case unless other considerations intervene, the message is left in the message queue (i.e. it is deferred). A number with no units suffix indicates the value is in seconds. Values can also be written as a sequence of numbers with suffixes to indicate a time multiplier: `m' indicates minutes, `h' indicates hours, and `d' indicates days.

hostnames or hostname
    type: string
    default value: (computed at run time)

    A colon-separated list of names for the local host. This list, together with uucp_host and more_hostnames should represent all possible names for the local host. Note that the visible_name hostname is not recognised 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 distributed over USENET, localhost.uucp should also be given in the list. The first value in hostnames is used internally as a special ``primary name'' for the local host.

    If hostnames is set turned off (which is generally the default) then the hostnames value will be computed by pairing the local host's name, computed in a system-dependent manner, with all values in the domains attribute list.

listen_name
    type: string
    default value: (none)

    This variable may be set to the DNS name of an interface on which the SMTP daemon should listen. By default the the listens are done using the wildcard address (INADDR_ANY). See also the sending_name attribute.

lock_by_name
    type: boolean
    default value: (system-dependent)

    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 flock(2) under BSD, or lockf(3) on older UNIX systems. Inode-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
    type: number
    default value: 0444

    The creation mode for lock files.

log_mode
    type: number
    default value: 0664

    The creation mode for the various mail system log files.

logfile
    type: string
    default value: /var/log/smail/logfile

    The name of a file to which transaction and error messages are appended. If this file does not exist, it is created with its permissions taken from the log_mode attribute.

max_hop_count
    type: number
    default value: 20

    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 ``-h'' option when invoking smail. Otherwise it is computed from the number of Received: fields in the message header.

max_load_ave
    type: number
    default value: 0

    For systems on which a load average can be computed, this specifies the maximum system 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 based on the number of jobs ready to run over the sample time. (This feature is not currently implemented)

max_message_size
    type: number
    default value: 100k

    Messages larger than this limit will be rejected by smail. This feature is currently only implemented when an ESMTP connection is negotiated which uses the ``MAIL FROM:'' SIZE option. In all other cases there is no limit on the size of messages.

    NOTE: In a future release this feature will cause SMTP messages to be truncated and then rejected. It is not clear how best to handle excessively large messages received by UUCP.

message_buf_size
    type: number
    default value: 100k

    The size of an internal buffer for reading and writing messages. For systems with a reasonably large virtual address 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.

    If your system does not have a large address space the value of BUFSIZ will be the default. BUFSIZ refers to the defined symbol in /usr/include/stdio.h.

message_id_field
    type: string
    default value:

        Message-Id: <$message_id@$primary_name>

    This string will be expanded to form the Message-Id: message header field. This will be used if such a field does not already exist in the message headers.

message_log_mode
    type: number
    default value: 0644

    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.

method_dir
    type: string
    default value: methods

    If a method 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 a slash (`/'), it will be referenced relative to the smail_lib_dir directory. See the description of the routers file for more information on method files.

more_hostnames
    type: string
    default value: (none)

    A colon-separated list of domain names for which this host will do local mail delivery for. This list is in addition to any names which may have been computed from the domains attribute in forming the value of hostnames. Thus, it is useful for specifying names which are not formed from the computed name for the host.

    The more_hostnames attribute can also be specified as gateway_names, since the attribute is often used to indicate the list of domains for which this machine is a gateway (i.e. mail exchanger).

    Note that virtual domains handled by pathalias or rewrite router drivers should not be listed here.

nobody
    type: string
    default value: (site-dependent)

    This names a default user that defines permissions when no other user is specified. Also note this user is used in some conditions when it is not certain whether a set of actions can be trusted if performed as other, potentially more powerful users. This should reference a user-ID which has few, or no, capabilities for doing harm or accessing protected files.

    On many systems, especially those that support NFS, the default value will be ``nobody''.

paniclog
    type: string
    default value: /var/log/smail/paniclog

    The name of a file to which panic and very important error messages are appended. If this file does not exist, it is created with a mode from the log_mode attribute. Entries written to this log file represent problems that require human intervention, such as configuration errors or directory permission errors preventing mail spooling or delivery.

    Configuration errors generally cause mail to be moved into a special error directory under the input spool directory, thus preventing attempts at re-delivery until the configuration error has been corrected.

    Thus, both the paniclog file and the error directory should be checked periodically under normal use, and frequently after configuration changes. When any problems have been resolved, these messages can be re-queued for delivery by using mv(1) to move the spool files back into the spool directory. However, before doing so, the file in the msglog directory for each message should be checked. If the address which caused the message to be moved to the error directory is marked as failed, then that line should be removed from the msglog file, because otherwise smail will not try to deliver to that address again.

    See checkerr(8) for information about automatically performing such checks.

postmaster_address
    type: string
    default value: root

    This is the default address for the postmaster. If the address Postmaster is not resolved by any of the configured directors, then this address is used.

qualify_file
    type: string
    default value: qualify

    Names the file containing the hostname qualification information. If this does not begin with a slash (`/'), it will be referenced relative to the smail_lib_dir directory.

queue_only
    type: boolean
    default value: off

    If this is set then smail will not immediately attempt delivery for incoming mail. The smail program will then only attempt delivery when explicitly processing the input queue, such as when invoked with the ``-q'' flag.

received_field
    type: string
    default value:

        Received: \
        ${if def:sender_host\
         {from $sender_host${if def:sender_host_addr\
          {(${if and{{def:sender_host_really}\
                     {!eq{sender_host_really}{$sender_host}}}\
           {$sender_host_really}}[$sender_host_addr])}} }\
         else {${if def:sender_host_addr\
          {from ${if def:sender_host_really\
            {$sender_host_really}}[$sender_host_addr] }\
          else {${if origin:local\
             {from localhost }}}}}}\
        ${if def:message_size\
           {($message_size bytes) }}\
        by $primary_name\n\t\
        ${if def:sender_program\
          {via $sender_program }}\
        ${if def:sender_proto\
          {with P:$sender_proto}\
         else {with P:stdio}}\
        ${if def:director\
          {/D:$director}}\
        ${if def:router\
          {/R:$router}}\
        ${if def:transport\
          {/T:$transport}}\n\t\
        ${if or{{def:sender} {def:owner}}\
         {(${if def:sender\
          {sender: <$sender>}\
        }${if and{{def:sender} {def:owner}}\
          { }\
        }${if def:owner\
          {owner: <$owner>}}) }}\
        ${if def:ident_sender\
          {(ident <$ident_sender> using $ident_method)}\
         else {${if origin:local\
           {(ident <$sender> using unix)}}}}\n\t\
        id <$message_id@$primary_name>\n\t\
        ${if def:input_addr\
          {for ${if origin:local\
                        {<}}${top:input_addr}${if origin:local\
                                                       {>}}}\
         else {for <unknown>}}\
        ; $spool_date\n\t\
        ($version_string built $compile_date)

    This string will be expanded to form the Received: header field. This field will be inserted into the message headers if the received attribute is not explicitly turned off for the transport delivering the current message.

require_configs
    type: boolean
    default value: off

    If this is not set, then configuration files are not required to exist. This applies to the config and second_config_file files and to the director_file, router_file, and transport_file files. If one of these files does not exist then it is ignored and internally compiled configuration is used instead. If this attribute is set, then any configuration file, which does not have a NULL filename (for example, using -router_file to clear the name for the router file) and which does not exist, will cause smail to generate a panic message.

resolve_timeout
    type: interval
    default value: 3d

    This sets a timeout for how long smail will continue attempting to resolve an address (that is route or direct it). This timeout causes messages to be bounced if they have not been resolved after this timeout has expired.

retry_file
    type: string
    default value: retry

    Names the file containing the retry control information. If this does not begin with a slash (`/'), it will be referenced relative to the smail_lib_dir directory. See the smailrtry(5) manual page for further information.

retry_duration
    type: interval
    default value: 5d

    Specify the default duration for attempting deliver of messages. This value will only be used if there's no wildcard entry in the file specified by retry_file. See the smailrtry(5) manual page for further information.

    If a message cannot be delivered within this period of time then the message delivery fails and a bounce message is sent to the sender, or to the list owner, if there is one (and possibly to the Postmaster too). A number with no units suffix indicates the value is in seconds. Values can also be written as a sequence of numbers with suffixes to indicate a time multiplier: `m' indicates minutes, `h' indicates hours, and `d' indicates days.

retry_interval
    type: interval
    default value: (2 * queue_interval)

    Specify the default retry interval for connecting to inaccessible hosts. This value will only be used if there's no wildcard entry in the file specified by retry_file. See the smailrtry(5) manual page for further information.

    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 inaccessible hosts.

    The default value (also attained by explicitly using a setting of ``0'') is twice whatever is given as the queue run interval with the ``-q'' parameter. This will prevent messages to one or more domains with many dead/broken MX targets from blocking the queue with every queue run attempt and will allow other messages in the queue to be processed more quickly. In extreme circumstances this may help avoid accumulating too many queue run processes that are doing nothing useful.

    A number with no units suffix indicates the value is in seconds. Values can also be written as a sequence of numbers with suffixes to indicate a time multiplier: `m' indicates minutes, `h' indicates hours, and `d' indicates days.

return_path_field
    type: string
    default value:

        Return-Path: <$sender>

    This string will be expanded to form the Return-Path: message header field. This field will be inserted into the header if the return_path attribute is turned on for the transport doing the message delivery.

rfc1413_query_timeout
    type: number
    default value: -1

    This defines the timeout for RFC 1413 ``ident'' protocol queries on incoming SMTP connections. Values of zero or less mean that no query is made (queries are initially disabled). This is only available if RFC1413 support is compiled into your copy of smail.

router_file
    type: string
    default value: routers

    Names the file containing the router configuration information. If this does not begin with a slash (`/'), it will be referenced relative to the smail_lib_dir directory.

runq_grades
    type: string
    default value: (none)

    The grades of message which will be processed by a normal queue run. Other grades of message are ignored by a queue run, but can be processed by a smail with a different runq_grades setting or by overriding the setting using the ``-oG'' command line option. This allows low priority mail to be processed in special queue runs to cut down system load in peak hours. See the discussion of the delivery_grades configuration variable to learn the meaning of the grade range.

second_config_file
    type: string
    default value: (none)

    This names one or more secondary configuration file(s) which can define attribute values which override internal defaults and values in the primary configuration file. Multiple file names are separated by colons. If a name does not begin with a slash (`/'), it will be referenced relative to the smail_lib_dir directory.

    This features is primarily useful in networks containing machines that share filesystems. By having a shared primary configuration file most systems on a network need not be concerned with maintaining the smail program, while other systems may want or need to use a different configuration, while sharing the same binary. In particular, the smart_user, smart_path, and smart_transport attributes are commonly set in the secondary configuration file.

sender_env_variable
    type: string
    default value: (none)

    This names an environment variable that can be used to name the sender. Normally, the sender is determined from system login information, or by checking the real user-ID of the calling process. If sender_env_variable 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 modern Unix systems, or ``USER'' for older BSD based systems.

sending_name
    type: string
    default value: (none)

    This variable may be set to the DNS name of an interface to which SMTP connections should be bound locally. By default connections are not bound to any specific address.

smail
    type: string
    default value: /usr/local/sbin/sendmail

    Name a valid path to a smail binary that can be used to re-invoke smail when a major configuration change has been detected, or to invoke smail for delivery of error messages. If this does not begin with a slash (`/'), it will be referenced relative to the smail_lib_dir directory.

smail_lib_dir
    type: string
    default value: /usr/local/etc/smail

    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.

smail_util_dir
    type: string
    default value: /usr/local/libexec/smail

    This defines the path to directory containing most smail utilities. In particular, smail expects to find the mkaliases and mkdbm utilities in this directory.

smart_path
    type: string
    default value: (none)

    This defines the default value for the path attribute used by the smarthost 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 the smailrtrs(5) for more information on the use of this attribute.

smart_transport
    type: string
    default value: (none)

    This defines the default value for the transport generic attribute used by the smarthost router driver.

smart_user
    type: string
    default value: (none)

    This defines the default value for the smart_user attribute used by the smartuser director driver. See the smailrtrs(5) for more information on the use of this attribute.

    WARNING: The contents of variables such as $user, $sender, etc., are under the control of the remote user. If these strings are passed to a pipe command via a shell command line it is extremely important that expansion of these variables be very carefully protected by proper shell quoting.

    For example:

          smart_user="|/local/sbin/phquery -f ${shquote:sender} \
                           ${shquote:user}"
    Note also that if this command is itself a script it must also treat the values of these arguments as potentially containing meta characters and such. Similarly for any program which may pass these values on to another via a shell command line.

smtp_accept_max
    type: number
    default value: 0

    The maximum number of SMTP connections that smail will accept at any one time. This is for use with SMTP daemons started with the ``-bd'' command-line option. If connection requests come in while when this number of SMTP-connection children are forked, the connection will be shutdown with an SMTP ``421'' reply.

    If this value is zero, then the number of SMTP connections is not limited.

smtp_accept_queue
    type: number
    default value: 0

    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 delivery_mode.

    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 smtp_accept_queue should be less than the value of smtp_accept_max, and that setting smtp_accept_max to zero prevents smtp_accept_queue from working correctly in all cases.

smtp_banner
    type: string
    default value:

        $primary_name Smail$version #$compile_num ready at $date

    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.

    If ESMTP is configured in Smail the default value is:

        $primary_name Smail$version #$compile_num ready at $date\n\
        ESMTP spoken here

smtp_allow_debug
    type: boolean
    default value: on

    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

    Having this enabled may enable people to gain more information than you would like about your systems, and so could be used as a prelude to a break-in attempt. Note that the ``DEBUG'' command cannot be directly used to gain any form of access.

smtp_hello_broken_allow
    type: string
    default value: (none)

    A colon-separated list of host IP patterns that are allowed to deliver mail even though they have broken DNS or give incorrect or invalid ``HELO'' or ``EHLO'' SMTP greeting command.

    Each IP pattern can end in an asterisk (``*'', the wildcard character), to allow a whole "classic" network at the specified dotted quad, and of course a string containing a single ``*'' will permit any and all hosts to break the SMTP greeting rules. This notation allows super-netting of some net-blocks, and sub-netting of Class A or Class B networks, but not sub-netting of Class C networks.

    A pattern may also be given as the keyword localnet, which represents a run-time generated pattern constructed to represent the classical IP network for the local interface address of the current connection.

    There is compile-time optional support for a magic keyword whoson which can be used to query a WHOSON server for additonal IP numbers which are currently authorised to relay mail remotely via SMTP and who it may be necessary to allow to generate broken SMTP greetings.

    Using the localnet keyword will implicitly match the localhost network however you may need to specify 127.0.0.1 (or 127.*) or other local interface address forms if you run clients such as Pine or MH which may give incorrect SMTP greetings. WARNING: Note that your border routers should filter 127.* from the outside world to prevent IP spoofing of localhost (even though this is less of a problem for TCP it's not impossible for this to happen if the attacker is capable of using sophisticated IP spoofing techniques).

smtp_hello_verify
    type: boolean
    default value: on

    This flag tells smail to verify the hostnames given in ``HELO'' or ``EHLO'' SMTP greeting command. This means the hostname specified in the greeting must resolve to a valid DNS record, i.e. an ``A'' resource record matching the connection address. Note that RFC 1123 says it is the responsibility of the remote SMTP client to supply a valid hostname and that the server SMTP ``MUST NOT'' reject a connection just because some arbitrary verification fails on this hostname. However in the Internet today we cannot often trust the sender so we must violate RFC 1123 in this respect lest the sender does the same to use while we're not checking. Remember that RFC 1123 was written in the days when it was unthinkable that a home PC would be used to generate SMTP sessions, let alone 30,000,000 plus PCs.

    Note that disabling this flag does not turn off syntax checking of the SMTP greeting. See smtp_hello_broken_allow above for that.

smtp_hello_verify_literal
    type: boolean
    default value: on

    If the greeting hostname given with the ``HELO'' or ``EHLO'' SMTP greeting command is a literal IP address (eg. ``[127.0.0.1]''), this flag tells smail to look up the domain name associated with the address given by the literal. This means the connecting host must have valid DNS, i.e. a ``PTR'' resource record for the connection address (sender_host_address), and the name given by the PTR must return an ``A'' resource record with an address matching the connection address. See the caveat for smtp_hello_verify for standards conformance notes.

smtp_hello_verify_ptr
    type: boolean
    default value: off

    This flag tells smail to verify that there's a DNS ``PTR'' resource record for the connection address and that it (or one of its aliases) matches the hostname given with the ``HELO'' or ``EHLO'' SMTP greeting command. This check is off by default because there's still a large segment of the Internet the doesn't have proper reverse DNS. See the caveat for smtp_hello_verify for standards conformance notes.

smtp_allow_expn
    type: boolean
    default value: on

    This boolean variable enables the use of the SMTP ``EXPN'' command. Some sites may wish to disable this command to prevent divulging the contents of mailing lists and aliases.

smtp_max_recipients
    type: number
    default value: 100

    The maximum number of recipients that can be specified in a single SMTP envelope. If too many recipients are specified each one over the maximum will be rejected with an SMTP ``452'' reply message.

    If this value is zero (or explicitly unset), then the number of recipients per SMTP envelope is not limited.

smtp_expn_delay
    type: number
    default value: 5

    The number of seconds to delay after processing an SMTP ``EXPN'' command. This can be set to some reasonable number so as to delay anyone attempting to do dictionary-style guessing attacks while at the same time not preventing human use of ``EXPN''.

smtp_vrfy_delay
    type: number
    default value: 5

    The number of seconds to delay after processing an SMTP ``VRFY command. This can be set to some reasonable number so as to delay anyone attempting to do dictionary-style guessing attacks while at the same time not preventing human use of ``VRFY''.

smtp_receive_command_timeout
    type: interval
    default value: 5m

    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.

smtp_receive_message_timeout
    type: interval
    default value: 2h

    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'' reply prompt, then the message is removed, the connection is closed down, and the SMTP receiver process exits.

smtp_recipient_no_verify
    type: string
    default value: (none)

    A colon-separated list of host IP patterns that are allowed to deliver remote mail via SMTP and which do not need or want target addresses specified in ``RCPT TO:'' commands to be verified immediately during message delivery. Setting this to a list of local network numbers helps clients deliver mail immediately to the queue without needing to wait for possible DNS lookup timeouts. Some MUAs (and even some primitive MTAs) that use SMTP for mail delivery do not have sufficient or adjustable timeouts and may fail to deliver mail when network or remote nameserver problems cause delays. This variable has precedence over smtp_remote_allow.

    The magic keyword localnet represents a run-time generated pattern constructed to represent the classical IP network for the local interface address of the current connection.

    There is compile-time optional support for a magic keyword whoson which can be used to query a WHOSON server for additonal IP numbers which are currently authorised to relay mail remotely via SMTP.

    See smtp_hello_broken_allow for and explanation of wild-cards and caveats.

smtp_remote_allow
    type: string
    default value: localnet

    A colon-separated list of host IP patterns that are allowed to deliver remote mail via SMTP. Setting this to a list of local network numbers helps stop remote systems from using your mailer to spoof headers in mail bound to remote addresses. This list is used for verification of the target addresses specified in all ``VRFY'' and ``RCPT TO:'' SMTP commands.

    The magic keyword localnet represents a run-time generated pattern constructed to represent the classical IP network for the local interface address of the current connection.

    There is compile-time optional support for a magic keyword whoson which can be used to query a WHOSON server for additonal IP numbers which are currently authorised to relay mail remotely via SMTP.

    Note that mail is implicitly accepted from arbitrary hosts if the target address is for any of the locally accepted domains, or if any of the locally accepted domain names are mentioned as MX hosts for the target address.

    See smtp_hello_broken_allow for and explanation of wild-cards and caveats.

smtp_sender_verify_mx_only
    type: boolean
    default value: off

    This flag tells smail to only look for DNS MX (mail exchanger) resource records when verifying the the host part of the SMTP envelope sender address. Strictly speaking it is required that all domain names used in SMTP must have DNS MX RRs associated, but it is common practice on the internet to allow a mail host to have only an A RR. In the default configuration smail will also search for DNS A RRs that match the domain part of the sender address.

smtp_sender_no_verify
    type: string
    default value: (none)

    A colon-separated list of host IP patterns that are allowed to deliver remote mail via SMTP and which do not need or want target addresses specified in ``MAIL FROM:'' commands to be verified immediately during message delivery. Setting this to a list of local network numbers helps clients deliver mail immediately to the queue without needing to wait for possible DNS lookup timeouts. Some MUAs (and even some primitive MTAs) that use SMTP for mail delivery do not have sufficient or adjustable timeouts and may fail to deliver mail when network or remote nameserver problems cause delays.

    Note that disabling sender address verifcation unnecessarily will make it possible for users to use incorrect sender addresses which may prevent them from ever receiving bounces or even replies (the latter in the common case where the sender's MUA uses the ``From:'' address as the sender address too). Unless you run Smail on a dial-up link and don't want it to connect for every queued message then do not set this variable!

    The magic keyword localnet represents a run-time generated pattern constructed to represent the classical IP network for the local interface address of the current connection.

    There is compile-time optional support for a magic keyword whoson which can be used to query a WHOSON server for additonal IP numbers which are currently authorised to relay mail remotely via SMTP.

    See smtp_hello_broken_allow for and explanation of wild-cards and caveats.

spool_dirs
    type: string
    default value: /var/spool/smail

    This defines one or more directories into which incoming mail can be spooled. Directories are separated 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 subdirectories of: input (to hold the actual spool files), lock (for temporary lock files), msglog (for temporary per-message transaction logs and audit trails), retry (for host retry information), error (to hold messages which failed due to configuration errors or other problems which require human intervention), and tmp (to hold temporary files in a safe non-world-writable place). Normally these directories will be created on demand.

spool_grade
    type: character
    default value: C

    This character names the default grade for messages. This can be overridden by a Precedence: 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 $grade variable. See the grades attribute for more information.

spool_mode
    type: number
    default value: 0440

    This defines the file creation mode for spool files.

transport_file
    type: string
    default value: transports

    names the file containing the transport configuration information. If this does not begin with a slash (`/'), it will be referenced relative to the smail_lib_dir directory.

trusted_users
    type: string
    default value: (none)

    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 Sender: header field without it being removed.

    If such users specify a From: header field, then a Sender: 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 by smail. If this list is turned off, using -trusted, then all users are trusted.

    NOTE: The real user-ID is used in verifying trusted users. However, under many operating systems, the uucico(8) program runs under the real UID of the user that ran it and often any user can do so. Smail 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.

trusted_groups
    type: string
    default value: (none)

    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 effective gid of smail. Thus, if smail is a set-group-ID program, then this string is of no value and should be turned off. However, if smail is not set-group-ID, then programs that invoke smail under a specific effective GID, while not a specific real UID, can be detected and can be properly treated as trusted.

uucp_name
    type: string
    default value: (computed at run time)

    This specifies a name for the local host. This name is available in string expansions as the $uucp_name variable. It is also used in the ``remote from hostname'' suffix to ``From<space>'' lines for mail being delivered to remote machines when the from attribute is turned on for a transport.

visible_name
    type: string
    default value: (computed at run time)

    The full domain name used in outgoing mail addresses within header fields. If visible_name is turned off, then it will be set to the first name from the hostnames attribute. If the hostnames attribute is not specified then that attribute will be filled in with hostnames of the form hostname.domain, where hostname is derived in a system-dependent manner and where domain, here, is the first name from the domains attribute. Note that each entry in the domains list is used, in sequence, to created the hostnames value if the latter is not explicitly specified.

    For sites in the UUCP zone domains will often merely be the string ``uucp''.

FILES

/usr/local/etc/smail/config
    Optional general smail configuration. This file can override compiled-in configuration.

/usr/local/etc/smail/transports
    Optional configuration for smail transports; i.e., configured methods of mail delivery. This file replaces the compiled-in transport configuration.

/usr/local/etc/smail/directors
    Optional configuration for smail directors, i.e., configured methods for resolving local addresses. This file replaces the compiled-in director configuration.

/usr/local/etc/smail/routers
    Optional configuration for smail routers, i.e., configured methods for resolving or routing to remote hosts. This file replaces the compiled-in router configuration.

/var/spool/smail
    The top of the spool directory hierarchy.

/var/spool/smail/input
    The directory containing messages to be processed and delivered.

/var/spool/smail/msglog
    A directory of transaction logs for individual messages.

/var/spool/smail/lock
    A directory used for input spool files.

/var/log/smail/logfile
    A log of smail transactions.

/var/log/smail/paniclog
    A log of serious configuration and/or system errors encountered by smail.

DEFAULT CONFIGURATION
The default internal directors configuration can be viewed by typing smail -oC /no-such-file -v -bP all. Note that this reports the values of all configuration variables using the default variable names (alias names are not shown). You should only adjust the values of those variables absolutely necessary to adjust for your particular system. Don't simply copy this output to your new config file or you'll make upgrading much harder.

SEE ALSO
smail(5), smaildrct(5), smailmeth(5), smailqual(5), smailrtrs(5), smailrtry(5), smailtrns(5), checkerr(8), smail(8). Smail Administration and Installation Guide. DARPA Internet Requests for Comments RFC 821, RFC 822, RFC 974, RFC 976, and RFC 1123.

BUGS
Colons cannot be included in the value of a list element. In most cases this is really a feature, such as with user and group names since a colon can never appear in such names anyway.

Database files cannot contain ``#'' in the left-hand field.

COPYRIGHT
Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
Copyright (C) 1992 Ronald S. Karr

See a file COPYING, distributed with the source code, or type smail -bc, to view distribution rights and restrictions associated with this software.