ssmmaaiill -- Command

Send UUCP mail
ssmmaaiill [-AAccddLLllRRrrvv] -aa _a_l_i_a_s_f_i_l_e -FF _a_d_d_r_e_s_s -HH [_h_o_s_t_d_o_m_a_i_n] \
        -hh [_h_o_s_t] -mm _n_u_m -nn [_n_a_m_e_l_i_s_t] -pp _p_a_t_h_f_i_l_e \
        -qq _n_u_m -uu _u_u_x_f_l_a_g_s _a_d_d_r_e_s_s ...

ssmmaaiill sends mail locally for delivery to remote COHERENT systems.

_O_p_t_i_o_n_s
ssmmaaiill recognizes the following options:

-AA Print the  resolved UUCP  addresses.  Do not  collect a message  or mail
   anything.  The  -AA option to smail is only  moderately helpful.  It will
   expand any  aliases, and expand  routes to any  machine it knows  how to
   reach.  However,  it will _n_o_t expand addresses  that would otherwise get
   passed to the smart-host.

-aa _a_l_i_a_s_f_i_l_e
   Read  _a_l_i_a_s_f_i_l_e instead  of /uussrr/lliibb/mmaaiill/aalliiaasseess  to  find the  list of
   mailing aliases that you have set.

-cc Check /uussrr/lliibb/mmaaiill/ppaatthhss  for the cost of mailing a  message to a given
   host,  without  actually sending  the  message.  If  you  wish, you  can
   redesign the path or reset the queueing threshold.

-dd Tell ssmmaaiill  to give a verbose  description of what it  is doing.  Do not
   invoke other mailers.

-FF _a_d_d_r_e_s_s
   Use _a_d_d_r_e_s_s on the FFrroomm: line  in locally generated mail.  This lets you
   make a message appear as if it came from someone else.

-HH _h_o_s_t_d_o_m_a_i_n
   Set the host's domain.  The default is the contents of /eettcc/ddoommaaiinn.

-hh _h_o_s_t_n_a_m_e
   Set a _h_o_s_t_n_a_m_e.  The  default is the contents of /eettcc/uuuuccppnnaammee, followed
   by a  period, followed by  the contents of /eettcc/ddoommaaiinn.  Use this option
   only if you wishtolie to ssmmaaiill about your machine's name.

-LL Send all  addresses to the  local mailer for  processing, including mail
   that appears to be for remote systems.

-ll Send a  domain address  to the  local mailer for  processing.  Normally,
   only local addresses go to the local mailer.

-mm _n_u_m_b_e_r
   Tell  ssmmaaiill to  hand  no more  than  _n_u_m_b_e_r jobs  to  uuuuxx for  immediate
   delivery.

-nn [_n_a_m_e_l_i_s_t]
   Use name-list  style aliasing.  In this  method, a name is  linked to an
   address.       This      correctly      resolves     addresses      like
   SSaannttaa.CCllaauuss@nnoorrtthhppoollee.ccoomm.  If  no _n_a_m_e_l_i_s_t  is named, then  ssmmaaiill reads
   /uussrr/lliibb/mmaaiill/nnaammeelliisstt by default.

   File  /uussrr/lliibb/mmaaiill/ffuullllnnaammeess is  the default  name-list data  base that
   ssmmaaiill uses.  The -nn option is on automatically if this file exists.

   To generate a name-list data base  for all users of your system, run the
   command:

       mkfnames > /usr/lib/mail/fullnames

   This generates  the list based on the contents  /eettcc/ppaasssswwdd. If you wish
   to add other entries to your name-list database, use the command nnppttxx.

-pp _p_a_t_h_f_i_l_e
   Read  _p_a_t_h_f_i_l_e instead  of /uussrr/lliibb/mmaaiill/ppaatthhss  to  find paths  to other
   systems.

-qq _n_u_m_b_e_r
   Set the queuing threshold to _n_u_m_b_e_r.  When routing mail to a given host,
   ssmmaaiill checks the ``cost'' of contacting  the host; this cost is given in
   /uussrr/lliibb/mmaaiill/ppaatthhss. If  the cost is  less than the  queueing threshold,
   then ssmmaaiill sends the mail immediately; otherwise, it queues the mail for
   later shipment.  Under COHERENT, the default queueing threshold is 100.

-RR Reroute UUCP paths, trying successively larger righthand substrings of a
   path  until  a  component is  recognized.   This  is called  ``reroute''
   routing.

-rr Route the  first component of a UUCP path  (hhoosstt!aaddddrreessss) in addition to
   routing  domain  addresses  (uusseerr@ddoommaaiinn).   This is  called  ``always''
   routing.

-uu _u_u_x_f_l_a_g_s
   Pass _u_u_x_f_l_a_g_s to uuuuxx for remote mail.  This overrides any of the default
   values and other queueing strategies.

-vv Give a verbose description, but invoke other mailers.


_A_d_d_r_e_s_s_e_s
ssmmaaiill understands UUCP-style  addresses, both domain-style addresses (e.g.,
hheennrryy@mmwwcc.ccoomm) full  UUCP path  names, (e.g., mmwwcc!lleeppaannttoo!hheennrryy),  or local
addresses (e.g.,  hheennrryy).  ssmmaaiill takes uusseerr@ddoommaaiinn to  be a domain address,
hhoosstt!aaddddrreessss to be a UUCP path, and anything else to be a local address.

ssmmaaiill gives precedence to `@' over `!' when parsing mixed addresses.  Thus,
aa!bb@cc is parsed as (aa!bb)@cc, rather than aa!(bb@cc).

_R_o_u_t_i_n_g
There are two forms of an  address for E-mail: _i_n_t_e_r_n_a_l, and _e_x_t_e_r_n_a_l (also
called _e_n_v_e_l_o_p_e).

The  internal address  is what  appears on  the TToo:  line in  the message's
header.  This is  usually the address typed in by  the person who wrote the
message.

The envelope address is the address  that ssmmaaiill passes to the mail delivery
agent (either uuuuxx or llmmaaiill).

_R_e_s_o_l_v_i_n_g is  the act of transforming an internal  address into an envelope
address.  There are two steps to resolving an address: _h_o_s_t _r_e_s_o_l_u_t_i_o_n, and
_a_l_i_a_s _r_e_s_o_l_u_t_i_o_n.

Host resolution  determines the computer to which  ssmmaaiill sends the message.
Host resolution is also called _r_o_u_t_i_n_g.

If  a message  resolves  to the  local  machine, then  alias resolution  is
applied.  Alias resolution is also called _a_l_i_a_s _e_x_p_a_n_s_i_o_n. Mail aliases are
expanded by alias resolution.  If a local address is actually an alias, the
newly resolved address must go through host resolution again.

Although ssmmaaiill  understands domain-style addresses, it  can only deliver to
UUCP paths  and local  addresses.  Thus, it  must resolve a  domain address
into a UUCP path or local address.

To resolve a domain address, ssmmaaiill  finds a route to the most specific part
of the  domain specified in  the routing table.  Two  degrees of resolution
can occur:

_F_u_l_l _r_e_s_o_l_u_t_i_o_n
     ssmmaaiill finds  a route for  the entire domain  specification.  It either
     tacks  the  user specification  onto  the  end of  the  UUCP path,  or
     resolves it into a local address, whichever is appropriate.

_P_a_r_t_i_a_l _r_e_s_o_l_u_t_i_o_n
     ssmmaaiill  finds  a  route  for  only  the right  portion  of  the  domain
     specification; e.g., for

         henry@lepanto.mwc.com

     it finds .mmwwcc.ccoomm but  cannot identify lleeppaannttoo.  Here, ssmmaaiill tacks the
     complete address  (in the form  ddoommaaiinn!uusseerr) onto the end  of the UUCP
     path.  For  example, if ssmmaaiill finds  that the route to  mmwwcc.ccoomm is via
     systems ffoooo, bbaarr, and bbaazz, it constructs the path:

         foo!bar!baz!lepanto.mwc.com!henry

     This assumes  that the version  of ssmmaaiill on system  bbaazz will recognize
     the token lleeppaannttoo.mmwwcc.ccoomm as being a domain rather than a host.

It is an error if a  partially resolved address routes to the local host (a
null UUCP  path), since according to  the routing table, the  local host is
responsible for resolving the address more fully.

The -rr flag tells ssmmaaiill to  attempt to route the first (leftmost) component
of a  UUCP path -- probably  to impress people with how  many UUCP hosts it
knows.  This  is called ``always  routing''.  If this fails,  it passes the
unrouted address to uuuuxx, in case the path data base is not complete.

The -RR  flag tells ssmmaaiill to  take a UUCP path and  route the rightmost host
named in the path.  This is called ``reroute'' routing.  Use it if you have
a very  up-to-date routing table, and wish to  bypass some obsolete routing
information in  the current path.   This is generally  considered dangerous
and anti-social.

If a route  cannot be found from the available  routing data base, then one
more attempt  to route the  mail is made  by searching for an  entry in the
database for  a route  to a  ssmmaarrtt-hhoosstt. If this  entry exists,  then ssmmaaiill
forwards the mail  there, for it to deliver.  This  lets one host depend on
another, presumably  better informed, host to deliver  its mail.  This kind
of  arrangement  should be  worked  out in  advance  with the  ssmmaarrtt-hhoosstt's
administrator.

After ssmmaaiill resolves an address, it  reparses it to see if it is now a UUCP
path or local  address.  If the new address turns  out to be another domain
address,  ssmmaaiill complains.   This error  occurs  when an  address partially
resolves to the local host.

By default, ssmmaaiill does not alter an explicit UUCP path of any mail message.
If the stated path is unuseable (i.e., the next host is unknown) then ssmmaaiill
applies _a_l_w_a_y_s routing, and attempt  to deliver the mail to the potentially
new address.   If this fails  too, then it  uses _r_e_r_o_u_t_e routing  and makes
another attempt to deliver the message.   Finally, it attempts to to find a
path to a ssmmaarrtt-hhoosstt and pass the mail to it.

_F_r_o_m-_m_i_n_g
ssmmaaiill collapses  the FFrroomm_ and  >FFrroomm_ lines to generate  a simple ``from''
argument, which  it then uses to  create its own FFrroomm  line.  The rules for
from-ming are:  concatenate all ``remote  from'' hosts (separating  them by
!'s), and tack on the address from the last FFrroomm_ line.  If that address is
in uusseerr@ddoommaaiinn format, rewrite it as ddoommaaiinn!uusseerr.  Ignore host or domain if
either is simply the local hostname.  It also removes redundant information
from the FFrroomm_ line.

ssmmaaiill generates its own FFrroomm_ line.  For UUCP-bound mail, ssmmaaiill generates a
``remote  from hostname'',  where hostname  is the  UUCP hostname  (not the
domain name),  so that FFrroomm_  can indicate a  valid UUCP path,  leaving the
sender's domain address in FFrroomm:.

_H_e_a_d_e_r_s
Protocol  RFC822,  which  governs  Internet  mail,  demands  that  messages
contains certain headers, including  TToo:, FFrroomm:, and DDaattee. If these headers
are absent in locally generated mail, ssmmaaiill inserts them.

_U_n_d_e_l_i_v_e_r_a_b_l_e _M_a_i_l
ssmmaaiill  returns to  sender  all undeliverable  mail (i.e.,  unknown user  or
unknown host).

_L_o_g_g_i_n_g
If you are having problems with mail delivery and wish to log all messages,
simply  create  the   directory  /uussrr/ssppooooll/uuuuccpp/.LLoogg/mmaaiill.  It  will  then
generate a log in that directory called mmaaiill.

This file can  grow quickly on a busy system, so  you may want to add it to
the script uuuummvvlloogg, to trim it down to size automatically.

_R_e_g_i_s_t_e_r_e_d _D_o_m_a_i_n_s _a_n_d _S_u_b_d_o_m_a_i_n_s
You may wish  to register your domain with the  NIC.  This will give you an
internationally recognized  E-mail address.  For more  information, send E-
mail to ppoossttmmaasstteerr@nniicc.ddddnn.mmiill.

Once you  have registered your domain,  you can also set  up subdomains for
other systems,  so they can receive information from  the Internet via your
system.  The  rest of this section discusses how  to describe subdomains to
your system, and related topics.

Let's  say that  you have  registered your  domain, and  you have  named it
mmyyddoommaaiinn. To route mail systems subordinate to mmyyddoommaaiinn, do the following:

11. Insert the following entry into /uussrr/lliibb/mmaaiill/ppaatthhss:

       .mydomain.com   %s  50

   This tells  ssmmaaiill that the local host (i.e.,  your machine) must resolve
   that any  address that  ends in  the suffix .mmyyddoommaaiinn.ccoomm,  or it  is an
   error.

22. For each  site in mmyyddoommaaiinn,  create two entries  in /uussrr/lliibb/mmaaiill/ppaatthhss.
   For example, for the site ffoooo.mmyyddoommaaiinn.ccoomm, create the entries :

       foo foo!%s  200
       foo.mydomain.com    foo!%s  200

   If  the site  bbaarr.mmyyddoommaaiinn.ccoomm  is fed  by  the route  ffrroobboozz!fflloorrpp!bbaarr,
   insert these lines into ppaatthhss:

       bar froboz!florp!bar!%s 200
       bar.mydomain.com    froboz!florp!bar!%s200

Note that  you do not have  to register subdomains with  the NIC.  Once you
register the  top-level domain  with the NIC,  you control the  entire name
space -- you can subdomain to your heart's content.

The only restrictions on subdomaining may be with your Internet Nameserver.
Most  nameservers for  UUCP domains publish  a ``wildcard''  mail exchanger
(MX) record, that essentially says, ``send everything for *.mydomain.com to
this Internet  gateway.'' However, some nameserver  managers require you to
register every  site in your domain,  for which they provide  a separate MX
record.   The advantage  of this  scheme  is that  anybody on  the Internet
sending mail  to your domain  gets an immediate  error message if  they are
sending to a non-existent site.  Check with the manager of your nameserver.

To  route for  an  entire subdomain  (e.g.,  .ssuubbdd.mmyyddoommaaiinn.ccoomm), you  must
choose  a gateway  for that  domain (e.g.,  ggaatteewwaayy.ssuubbdd.mmyyddoommaaiinn.ccoomm), and
then use a line like this:

    .subd.mydomain.com  gateway!%s  200

ssmmaaiill automatically  chooses the  longest subdomain  match it can  find, so
this rule applies before the .mmyyddoommaaiinn.ccoomm %ss rule.

Note that the gateway need not  be in the subdomain itself.  You could have
a line elsewhere in the paths file on mydomain that says:

    gateway.mydomain.com    gateway!%s200

Your main  gateway may also have information  about machines in subdomains,
though  this is  not  necessary.  For  instance,  if your  main machine  is
directly connected  to a machine in  a subdomain, you may  want to put this
information into  ppaatthhss, so the  mail will not  go through the  gateway for
that domain.   For example,  the machine  ssmmiitthh.ssuubbdd.mmyyddoommaaiinn.ccoomm  might be
directly connected to your master gateway, mmyyddoommaaiinn.ccoomm:

    smith   smith!%s    200
    smith.subd.mydomain.com smith!%s200

Without this rule, mail for ssmmiitthh would be queued up for forwarding through
ggaatteewwaayy.ssuubbdd.mmyyddoommaaiinn.ccoomm.

Always remember to keep the ppaatthhss file in sorted order.

_F_i_l_e_s
/bbiinn/llmmaaiill -- Local mailer
/bbiinn/mmaaiill -- Mail user agent
/uussrr/lliibb/mmaaiill/aalliiaasseess -- Alias data base
/uussrr/lliibb/mmaaiill/nnaammeelliisstt -- Name list data base
/uussrr/lliibb/mmaaiill/ppaatthhss -- Path data base
/uussrr/ssppooooll/uuuuccpp/.LLoogg/mmaaiill/mmaaiill -- Log of mail

_S_e_e _A_l_s_o
aalliiaasseess, .ffoorrwwaarrdd, mmaaiill, ppaatthhss, rrmmaaiill

_N_o_t_e_s
ssmmaaiill and rrmmaaiill are links to the same program.
