COHERENT manpages

This page displays the COHERENT manpage for transports [Describe mail transportation systems].

List of available manpages
Index


transports -- System Administration

Describe mail transportation systems
/usr/lib/mail/transports

The program  smail reads  file /usr/lib/mail/transports for  information on
the commands it can use to  deliver mail, either to your local system or to
a remote system.

Each entry  within transports  names a  transport and sets  its attributes.
Each entry consists of the following information:

-> The name  of the transport.   This attribute begins the  definition of a
   transport.  The name must be unique,  it must appear flush with the left
   margin, and must be followed by a single colon `:'.

-> The name of the driver,  or program that implements the transport.  This
   can be a  command that is part of smail's  suite of utilities (which are
   contained in  directory /usr/lib/mail), or  can be an  ordinary COHERENT
   command.   If  the  latter, then  the  full  name  of  the command  that
   implements  the  driver  is   given  with  a  cmd  attribute.   This  is
   demonstrated below.

-> A set  of generic  attributes for  the transport.  These  attributes are
   ``generic'' because they can come from  a set that can be applied to any
   router.

-> A  set of  driver-specific  attributes.  These  can be  applied only  to
   entries that use this driver.

To extend an entry across multiple lines, begin successive lines with white
space.


Attributes of a Transport

The following gives the generic attributes that a transport can have.  Each
attribute is followed  by its type (Boolean, string, or  number).  To set a
string or number attribute, its name should be followed by an `=', then the
value to which  you are setting it.  To set  a Boolean attribute, prefix it
with a `+'; to unset a Boolean attribute, prefix it with a `-'.

bsmtp (Boolean)
     This transport  uses a  batched SMTP format,  in which the  message is
     enclosed  within an  envelope of  SMTP commands.  You  can use  such a
     transport  to send  mail in  SMTP  format to  remote hosts,  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 the  command uux. Use of this attribute also
     turns on the attribute dots. When this attribute is also used with the
     attribute uucp, smail  uses UUCP-style bang-path addresses in the SMTP
     envelope.

crlf (Boolean)
     If set,  each line of the  header and message ends  within the pair of
     characters CR:LF rather  than a single newline character.  In general,
     this is not a useful  attribute, as the SMTP transport (which requires
     this as a part of the interactive protocol) always does this anyway.

debug (Boolean)
     If set, this attribute replaces the body of the message with debugging
     information.  You  can use it, for example, as  a shadow transport, to
     watch the  flow of mail  for debugging purposes.  This  lets you debug
     mail  while avoid  the problems  that arise  from saving  other users'
     personal correspondence.

dots (Boolean)
     If  set,  then  smail uses  the  ``hidden-dot''  protocol.  With  this
     protocol, smail  prefixes a  period `.'  onto every line  that already
     begins  with a  period.   All of  the  various SMTP  modes imply  this
     behavior.

driver (string)
     This attribute names  the specific entity that actually transports the
     mail.  It is required.

error_transport (string)
     This attribute names another transport  that smail can use to send the
     message, should this transport fail.

from (Boolean)
     If set, smail supplies a ``From<space>'' line before the message
     when  it  delivers mail  via  this  transport.  If  this  is a  remote
     transport (i.e., the attribute local is not turned on), this line ends
     with the string

         remote from hostname

     where hostname  is the UUCP name  for your local host  (as set in file
     /etc/uucpname).  This  is   useful  for  delivery  via  UUCP  and  for
     delivering mail to standard mailbox files, which require this format.

hbsmtp (Boolean)
     ``Half-baked''  batched SMTP.   This is batched  SMTP mode  without an
     initial HELO  command or an  ending QUIT command.  smail  can use this
     transport to create files that  it will later concatenate into a batch
     of SMTP  commands and multiple  messages.  Use of  this attribute also
     turns on attribute dots.

local_xform (Boolean)
     If  this attribute  is set,  smail  uses the  form of  the header  and
     envelope  information appropriate  for  delivery to  your local  host.
     This changes  no existing header field, except  that it inserts commas
     into the fields that name the sender and recipient.  This also affects
     the form of any generated From line and the form of envelope addresses
     used in SMTP commands.

     You can also use this attribute  when delivering mail to a remote site
     that  is also  running smail  version  3.1.  This  is useful  within a
     domain  that maintains  consistent user-forwarding  information.  This
     leaves a message in unqualified  format until it leaves the domain via
     a gateway.

local (Boolean)
     This  implies that  attribute  local_xform is  set,  but implies  that
     delivery really is  the final delivery to a user,  file, or program on
     your  local host.   This  attribute disables  generation  of a  bounce
     message that results should a message exceed its allowed hop-count.

max_addrs (number)
     This attribute sets 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.   The default  number is  one; typically,  this
     attribute either is left at one or turned off.

max_chars (number)
     This states the maximum number of characters in the addresses that can
     be given in one call to  this transport.  If this is turned off, there
     is no  maximum number.  The default  number is about one  third of the
     number of  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 rmail ona remote system, this  should be in the
     neighborhood of  200 to  250, to avoid  buffer overruns at  the remote
     site.  UUCP generally has small buffers to hold argument information.

     If smail  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.

max_hosts (number)
     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 -
     max_hosts, there is no maximum  number.  The default number is one and
     typically this is not changed.

received (Boolean)
     If this  attribute is set,  smail inserts a Received:  field into each
     message it  delivers via  this transport.  The  form of this  field is
     taken from the  attribute received_field in file /usr/lib/mail/config.
     This attribute is on by default.

return_path (Boolean)
     If this  attribute is set,  smail inserts field  Return-Path: into the
     header of  each message it  delivers via this transport.   The form of
     this  field is  taken  from the  attribute  return_path_field in  file
     /usr/lib/mail/config. Use  this attribute  only with a  transport that
     performs final delivery to a local destination.

shadow (string)
     This  names a  second  transport through  which smail  also sends  the
     message.   This second  transport usually performs  some task  that is
     unrelated to  the actual  delivery of  the message.  For  example, you
     could use  a shadow transport  to start a  program that looked  up the
     sender within  a data base  and displayed her  picture in a  window on
     your  workstation.   smail  calls the  shadow  transport  only if  the
     primary transport successfully delivers the message.

strict (Boolean)
     If this flag  is set, then smail attempts to  transform mail that does
     not conform  to RFC822 standards.   This may be useful  for sites that
     gateway between the UUCP zone and the Internet.  In general, it is not
     a good idea  to turn on this attribute, as  it changes the contents of
     headers fields.   Turn on this attribute only when  you know that some
     remote  hosts  understand  only  mail  that  conforms  to  the  RFC822
     standard.

unix_from_hack (Boolean)
     If set, then smail inserts the character `>' before any line in the
     message that  begins with the  string ``From''.  This  is required for
     local delivery to mailbox files that are in the standard form expected
     by the System-V program mailx and the BSD program Mail.

uucp (Boolean)
     If set,  then smail converts  outgoing recipient addresses  into UUCP-
     style paths of the form hosta!hostb!hostc!user.  An  exception is that
     smail preserves  any use of  `%' as an address  operator.  Thus, smail
     would  convert an  envelope address  of  the form  user%hostb@hosta to
     hosta!user%hostb. This  only affects  envelope addresses and  does not
     affect the body of the message or its header.

inet (Boolean)
     If you  set this attribute, smail  converts output-recipient addresses
     to Internet  specifications.  This  is not  the same as  the attribute
     strict,  because  the transformations  apply  only  to the  envelope's
     address, and  not to  header's.  If inet  is defined, then  when smail
     routes a  message to  a remote  system, it generates  a ``route-addr''
     address rather  than ``bang-path'' address.   Thus, if smail  is given
     the address user%host@gateway  and gateway is reached through the path
     hosta!hostb!hostc,     then     smail     generates    the     address
     @hostb,@hostc:user%host@gateway to be sent to the host @hosta.

retry_dir (string)
     This  attribute tells  smail to use  the subdirectory  under directory
     /usr/lib/mail/retry  for  managing   host  retry  intervals  for  this
     transport.  By  default, the directory  is named after  the transport.
     However,  multiple transports  can share  a  retry directory  by using
     retry_dir  to  force each  to  use that  directory.   For example,  by
     default the definition of each TCP/IP SMTP transport uses retry_dir to
     force that transport to use retry directory smtp.

remove_header (string)
     Tell smail to remove the named header field from each message it sends
     via this  transport.  This is  an expansion string,  so header removal
     can be made dependent upon some condition.  If expansion of the string
     results  in an  empty  string, then  no  header is  removed.  You  can
     specify any number of remove_header attributes for a given transport.

insert_header (string)
append_header (string)
     Add the  given header  field at  the beginning (insert_header)  or end
     (append_header)  of  the  message  header  for transport.   These  are
     expansion strings, so the header (and the existence of the header) can
     be  made to  depend on  some conditions.  If  expansion of  the string
     results in an empty string, then smail does not add a header.  You can
     specify any number of insert_header and append_header attributes for a
     given transport.

The Default Transports

The following  describes the transports that are defined  in the version of
/usr/lib/mail/transports that is shipped with COHERENT.

The first transport, local, delivers mail to a user on your system:

    # 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
        from,                   # supply a From_ envelope line
        local;                  # use local forms for delivery

        file=/usr/spool/mail/${lc:user}, # location of mailbox files
        mode=0600,                       # For BSD: only the user can
                                         # read and write file
        notify_comsat,                   # notify comsat daemon of delivery
        suffix="\1\1\1\10,             # MMDF mailbox format
        prefix="\1\1\1\10,             # MMDF mailbox format

The next transport, pipe, delivers mail to a shell command:

    # 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,            # include a Return-Path: field
        from,                   # supply a From_ envelope line
        local;                  # use local forms for delivery

        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
        ignore_status,          # ignore a non-zero exit status
        ignore_write_errors,    # ignore write errors, i.e., broken pipe
        umask=0022,             # umask for child process
        -log_output,            # do not log stdout/stderr

The next transport, file, delivers mail to a file:

    # file - deliver mail to files
    #
    # This is used implicitly when smail encounters addresses which begin with
    # a slash or squiggle character, such as "/usr/info/list_messages" or
    # perhaps "~/Mail/inbox".
    file:   driver=appendfile,
        return_path,           # include a Return-Path: field
        from,                  # supply a From_ envelope line
        local;                 # use local forms for delivery

        file=$user,            # file is taken from address
        append_as_user,        # use user-id associated with address
        expand_user,           # expand ~ and $ within address
        mode=0644,             # you may wish to change this
                               # mode, depending upon local
                               # conventions and preferences
        suffix="\1\1\1\10,       # MMDF mailbox format
        prefix="\1\1\1\10,       # MMDF mailbox format

The next transport , uux, invokes  the UUCP command uux to deliver messages
to a remote site via UUCP:

    # uux - deliver to the rmail program on a remote UUCP site
    #
    # HDB UUCP users should comment out the first cmd= line below, and
    # uncomment the second.
    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 -a$sender -g$grade $host!rmail $(($user)$)",
        pipe_as_sender,    # have uucp logs contain caller
        log_output,        # save error output for bounce messages

Transport demand delivers mail to command rmail on a remote system:

    # demand - deliver to a remote rmail program, polling immediately
    #
    # HDB UUCP users should comment out the first cmd= line below, and
    # uncomment the second.
    demand: 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

        cmd="/usr/bin/uux - -a$sender -g$grade $host!rmail $(($user)$)",
        pipe_as_sender,        # have uucp logs contain caller
        log_output,            # save error output for bounce messages

The  final  two   transports  are  local  versions  of  previously  defined
tranports.  What  a local  transport is, and  the advantages it  offers, is
described above.

Transport local_uux is a local version of transport uux:

    local_uux:
        driver=pipe,
        local_xform,        # transfer using local message format
        uucp,               # use uucp-conformant addresses
        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 -a$sender -g$grade $host!rmail $(($user)$)",
        pipe_as_sender,     # have uucp logs contain caller
        log_output,         # save error output for bounce messages

Finally, local_demand is a local form of transport demand:

    local_demand:
        driver=pipe,
        local_xform,         # transfer using local formats
        uucp,                # use uucp-conformant addresses
        from,                # supply a From_ envelope line
        max_addrs=5,         # at most 5 addresses per invocation
        max_chars=200;       # at most 200 chars of addresses

        cmd="/usr/bin/uux - -a$sender -g$grade $host!rmail $(($user)$)",
        pipe_as_sender,      # have uucp logs contain caller
        log_output,          # save error output for bounce messages

See Also

Administering COHERENT,
config [smail],
directors,
mail [overview],
smail,
routers

Notes

For  information on  how the  configuration  files directors,  routers, and
transports relate to each other, see the Lexicon entry for directors.

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.