mmaaiill -- Overview

Electronic mail system

The COHERENT  system includes a full-featured,  UNIX-style mail system.  It
consists of a  number of commands and files through  which you can describe
potential recipients  of mail, either on your system  or other systems, and
send mail to them either directly  or via UUCP.  This article describes the
design of  the COHERENT mail system, and introduces  the commands and files
that compose it.

_S_t_r_u_c_t_u_r_e _o_f _t_h_e _C_O_H_E_R_E_N_T _M_a_i_l _S_y_s_t_e_m
The COHERENT mail system has  three major components: the _u_s_e_r _a_g_e_n_t (i.e.,
mmaaiill); the  _r_o_u_t_i_n_g _a_g_e_n_t (the commands ssmmaaiill and  rrmmaaiill); and the delivery
agents (the commands llmmaaiill and uuuuxx).

The user  agent collects messages from  the user and reads  messages from a
user's mailbox.  It hands to the routing agent for delivery any messages it
receives from the user.

The routing  agents decode addresses  and decide how to  deliver a message.
They are  the only components  of the mail  system that must  run sseettuuiidd to
assume the privilege of the superuser rroooott.

The delivery agents move messages to their destination.

The local delivery agent, llmmaaiill, places messages into users' mailboxes.  To
discourage mail  forging, llmmaaiill does  not use sseettuuiidd.  It must be  run by a
privileged user (generally rroooott) to write  into all mail boxes.  As a rule,
llmmaaiill is invoked only by a routing agent.

The UUCP  delivery agent, uuuuxx,  queues messages for  transmission to remote
systems.  It  uses sseettuuiidd to assume  the identity of user  uuuuccpp in order to
write into  the necessary spool  directories.  It has long  been trivial to
forge messages to remote systems with uuuuxx; keep this in mind if you plan to
use electronic mail for any kind of authorization system.

ssmmaaiill looks  up each  _u_s_e_r in the  file /uussrr/lliibb/mmaaiill/aalliiaasseess. If  it finds
_u_s_e_r therein, it uses the matched  name in place of _u_s_e_r. If _u_s_e_r is of the
form

    _s_y_s!_u_s_e_r

or

    _s_y_s! ... !_u_s_e_r

or

    _u_s_e_r@_s_y_s[._d_o_m_a_i_n]

it is treated  as a remote destination.  ssmmaaiill then  invokes command uuuuxx to
pass  the message  to  _s_y_s, whose  responsibility  it becomes  to pass  the
message to _u_s_e_r.

If  ssmmaaiill  finds  no  match  in /uussrr/lliibb/mmaaiill/aalliiaasseess,  or  $HHOOMMEE/.aalliiaasseess,
however, it attempts  to look up each _u_s_e_r in  the file /eettcc/ppaasssswwdd, to see
if this  is a local  user.  If it does  not find _u_s_e_r therein,  it mails an
error message back  to the sender.  If, however, it  does find _u_s_e_r in this
file, ssmmaaiill  checks file $HHOOMMEE/.ffoorrwwaarrdd  for a list of  E-mail addresses to
which it can forward the message.  If this file is absent, ssmmaaiill passes the
message   to   llmmaaiill.    llmmaaiill   writes   the   message   into   the   file
/uussrr/ssppooooll/mmaaiill/_u_s_e_r.  This  file is  called the user's  ``mailbox''.  _u_s_e_r
owns this  file, and  can therefore  permit or deny  access to her  mail by
other users.

Before you can send mail, either  locally or to a remote site, you must run
the program uuuuiinnssttaallll and use its  `S' option to set the name of your local
site and  domain.  Your local system must, of  course, also have permission
to  log into  any remote  site to  which you  wish to  send mail.   See the
tutorial and Lexicon articles on UUCP for details on using UUCP to exchange
mail and files with remote sites.

_M_a_i_l_i_n_g _a _F_i_l_e
To mail a  file to another user, use the  shell's redirection operator `<'.
For example, the command

    mail stephen <bug.report

mails file bbuugg.rreeppoorrtt to user sstteepphheenn.  The file will be prefixed with your
address, and suffixed with your mail ``signature'', should you have one.

_M_a_i_l_i_n_g _t_o _N_e_t_w_o_r_k_s
The following  gives directions  on how  to send mail  to users  on popular
networks:

AAmmeerriiccaa OOnnlliinnee
    _u_s_e_r@aaooll.ccoomm
AApppplleelliinnkk
    _u_s_e_r@aapppplleelliinnkk.aappppllee.ccoomm
AATTTTMMaaiill
    _u_s_e_r@aattttmmaaiill.ccoomm
BBIITTNNEETT

    _u_s_e_r@_h_o_s_t.bbiittnneett
    _u_s_e_r%_h_o_s_t.bbiittnneett@_g_a_t_e_w_a_y
CCoommppuusseerrvvee

    _n_u_m_b_e_r._n_u_m_b_e_r@ccoommppuusseerrvvee.ccoomm
    Convert comma in _n_u_m_b_e_r to a period

FFiiddooNNeett
    This network  uses an unusual addressing scheme.  To  send mail to John
    Doe at 1:123/456.0, use the following domain address:

        f456.n123.z1.fidonet.org.

    The zz11 comes  from the 11: at the front  of the FidoNode address.  Then,
    put the person's name in front of this, with the at-sign between them:

        john.doe@f456.n123.z1.fidonet.org

    If the host label does not end in .00, as in 1:123/456.4, use that digit
    with pp prefixed to it, as follows:

        john.doe@p4.f456.n123.z1.fidonet.org

MMCCIIMMaaiill

    _u_s_e_r@mmcciimmaaiill.ccoomm
    Remove the hyphen from _u_s_e_r
UUUUnneett

    _u_s_e_r@hhoosstt.uuuuccpp
    _u_s_e_r%_h_o_s_t.uuuuccpp@_g_a_t_e_w_a_y
    _u_s_e_r@_d_o_m_a_i_n

These directions  assume that you have  a UUCP link to  another system that
gives you  access to the  Internet or other intelligent  network.  For more
information on  sending mail  to remote systems  via UUCP, see  the Lexicon
entry for UUUUCCPP.

_F_i_l_e_s
$HHOOMMEE/.aalliiaasseess -- Personal mail alias file for outgoing mail
$HHOOMMEE/.ffoorrwwaarrdd -- Forwarding instructions for inbound mail
$HHOOMMEE/.ssiigg.mmaaiill -- Personal signature
$HHOOMMEE/ddeeaadd.lleetttteerr -- Message that mmaaiill could not send
/eettcc/ddoommaaiinn -- Name of your system's domain
/eettcc/ppaasssswwdd -- User identities
/eettcc/uuuuccppnnaammee -- Name of your system
/ttmmpp/mmaaiill* -- Temporary and lock files
/uussrr/lliibb/mmaaiill/aalliiaasseess -- Aliases of users
/uussrr/lliibb/mmaaiill/ffuullllnnaammeess -- Short full name aliases of users
/uussrr/lliibb/mmaaiill/ppaatthhss -- Mail routing control file
/uussrr/ssppooooll/mmaaiill -- Mailbox directory, filed by user name

_S_e_e _A_l_s_o
aalliiaasseess,  ccoommmmaannddss, ccvvmmaaiill,  .ffoorrwwaarrdd,  mmaaiill, mmkkffnnaammeess,  mmssgg, nnppttxx,  ppaatthhss,
rrmmaaiill, ssmmaaiill, UUUUCCPP
Krol,  E.: _T_h_e  _W_h_o_l_e _I_n_t_e_r_n_e_t:  _U_s_e_r'_s _G_u_i_d_e  & _C_a_t_a_l_o_g.  Sebastopol, Ca.:
O'Reilly & Associates, Inc., 1992.  _H_i_g_h_l_y _r_e_c_o_m_m_e_n_d_e_d.

_N_o_t_e_s
The Lexicon  entry on  mmaaiill is  more than sufficient  for most  users.  The
Lexicon entries  for rrmmaaiill and  ssmmaaiill are only  for those who  wish to work
with electronic mail in a very detailed manner.
