home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume4 / msg / fmtd2 / Guide.fmtd
Encoding:
Text File  |  1986-11-30  |  49.3 KB  |  1,783 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                     Msg 3.1 Users Guide
  9.  
  10.  
  11.                         Dave Taylor
  12.  
  13.  
  14.                        March 15, 1986
  15.  
  16.  
  17.  
  18.  
  19.  
  20. 1.  Introduction
  21.  
  22.      The UNIX operating system was originally written  on  a
  23. small  PDP  machine  to  work  with teletypewriters.  Conse-
  24. quently, all the original software for the operating  system
  25. was  written  with  a  'tty'  in  mind  - they were all line
  26. oriented, rather than screen oriented.
  27.  
  28.      Gradually this began to change, and, with the  addition
  29. of  the  Berkeley vi visual shell to the ed line editor, the
  30. trend was brought to the attention of certain  UNIX  systems
  31. designers.
  32.  
  33.      This, however, seemingly hasn't been enough, as vi  and
  34. notes  are still the only screen oriented software available
  35. (other than games, which are a taboo subject  with  managers
  36. and  the like!).  Consequently, after becoming more and more
  37. frustrated with the existing electronic mail  facilities  on
  38. the  system  ('mail'  and  'mailx', both of which are essen-
  39. tially line-editors) I decided to write my own!
  40.  
  41.      This document discusses the msg mailer, and includes  a
  42. set  of  example  screens  and a discussion of configuration
  43. (for systems administrators).  It is broken  down  into  the
  44. following   general  sections;  The  .msgrc  file,  starting
  45. options of msg, the main system level, responses of  various
  46. commands, the alias system, and system configuration.
  47.  
  48.      Any comments or problems with either this  document  or
  49. the program itself are welcome: all installed systems should
  50. have an alias that will ensure that I receive any mail  sent
  51. to 'msg'.
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. Page 1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. Msg Users Guide                                  Version 3.2
  71.  
  72.  
  73.  
  74. 2.  The .msgrc File
  75.  
  76.      The msg mailer has the ability to automatically read in
  77. a  configuration  file at each invocation.  The file must be
  78. called ".msgrc" and reside in your home directory for it  to
  79. be read in, and can have any of the following entries in any
  80. order (note that the first four entries replace  environment
  81. variables  of  the  same  name, and the four boolean options
  82. supplement required starting parameters);
  83.  
  84. fullname  This is the name the mailer will use when  sending
  85.           mail  from you.  It is highly recommended that you
  86.           use your full name and nothing strange or unusual,
  87.           as  that  can  appear  extremely  rude  to  people
  88.           receiving your mail.
  89.  
  90. maildir   This is the default mail folder.  It  is  used  to
  91.           expand  filenames  in  the  mailer  when specified
  92.           using the '=' metacharacter.  That is, if you save
  93.           to file "=/stuff" then the '=' will be expanded to
  94.           the current value of maildir.
  95.  
  96. mailbox   This is where to put incoming  mail  after  you've
  97.           read  it.   When  you  answer  'y' to the "save to
  98.           mailbox?" prompt, this is where the messages go!
  99.  
  100. editor    The editor to use when typing in message  to  peo-
  101.           ple.
  102.  
  103. print     This indicates how to print out a message.   There
  104.           are two possible formats for this string, either a
  105.           command that can have a filename affixed to (as  a
  106.           suffix) and then sent to the system for execution,
  107.           or a string that contains the  meta-sequence  '%s'
  108.           which will be replaced by the name of the file and
  109.           then also sent to the  shell.   Examples  of  each
  110.           are;
  111.  
  112.                   print = print -formfeed
  113.                   print = pr %s | lpr
  114.  
  115.  
  116. prefix    When you reply to a message or forward  a  message
  117.           to  another person, you can optionally include the
  118.           original message.  Defining the prefix value  here
  119.           allows  you  to  indicate  what the prefix of each
  120.           included line should be.  The default is "> "  and
  121.           is fairly standard in the Unix community.
  122.  
  123. savemail  This is where  outgoing  mail  will  have  a  copy
  124.           silently  (and  quickly) saved.  This will only be
  125.  
  126.  
  127.  
  128. Page 2
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. Msg Users Guide                                  Version 3.2
  137.  
  138.  
  139.  
  140.           used if the flag 'copy' is turned on.   Also  note
  141.           that if the 'savename' flag is turned on then this
  142.           line is ignored since  each  outgoing  message  is
  143.           saved according to whom it's being sent to.
  144.  
  145. shell     This defines the  shell  to  use  when  doing  '!'
  146.           escapes  and  such.   Note  that  the program also
  147.           reads the  $SHELL  variable  out  of  the  current
  148.           environment,  but that defining this in the .msgrc
  149.           file will override the environment definition.
  150.  
  151. weedout   This is something new and exciting!  When specify-
  152.           ing this option, you can then list as many headers
  153.           of messages that you don't want to  see  when  you
  154.           are read mail.  This list can continue for as many
  155.           lines as desired, as long as the  continued  lines
  156.           all have leading indentation.
  157.  
  158. alternatives This is a list of other machine/username combi-
  159.           nations  that  you  receive mail from (forwarded).
  160.           This is used when  the  G)roup  reply  feature  is
  161.           invoked  to  ensure that you don't send yourself a
  162.           copy of the outbound message.
  163.  
  164. autocopy  This is a boolean flag, and if set will  automati-
  165.           cally  copy the text of each message being replied
  166.           to into the edit buffer.  This is the same as  the
  167.           '-a' starting parameter.
  168.  
  169. copy      This, in combination with the "savemail" filename,
  170.           will allow you to have silent copies of all outgo-
  171.           ing mail made on the outbound step.
  172.  
  173. resolve   This is a boolean flag that defines the  behaviour
  174.           of  the program for such actions as deletion, sav-
  175.           ing a message and so on.
  176.  
  177. weed      This is a boolean flag that, in  combination  with
  178.           the  "weedout"  list,  allows you to custom define
  179.           the set of headers you  would  like  to  not  have
  180.           displayed  while  reading  messages.  The defaults
  181.           are listed further into the document.
  182.  
  183. noheader  This boolean flag tells the mailer not to  include
  184.           the  headers  of  messages  when copying a message
  185.           into a file buffer for replying to or forwarding.
  186.  
  187. titles    This boolean flag allows you to have each page  of
  188.           a message to be titled with:
  189.           Message #N from username        Mailed date at time
  190.           where all  the  information  has  been  previously
  191.  
  192.  
  193.  
  194. Page 3
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. Msg Users Guide                                  Version 3.2
  203.  
  204.  
  205.  
  206.           extracted  from  the  message.  This is especially
  207.           useful if you weed out all  the  headers  of  each
  208.           message with a large 'weedout' list...
  209.  
  210. Two more things: the format for each of the lines is;
  211.  
  212.         variable = value
  213.  
  214. and for boolean variables, value can be 'ON' or 'OFF' only.
  215.  
  216. For a better idea of how this all works,  here's  my  .msgrc
  217. file.   While  looking  through it, notice that you can have
  218. lots of comments and blank lines for  readability  and  that
  219. you can also use 'shell variables' and the '~' metacharacter
  220. for your home directory, and they are  expanded  accordingly
  221. when read in by the mailer.
  222.  
  223.   #
  224.   # .msgrc - automatic variable defines for the 'msg' mailer.
  225.   #
  226.   # Personalized for Dave Taylor
  227.   #
  228.  
  229.   fullname = Dave Taylor
  230.  
  231.   # where to save my mail to, default directory
  232.   maildir  = ~/Mail
  233.  
  234.   # where to save messages to, default file
  235.   mailbox  = ~/Mail/mailbox
  236.  
  237.   # what editor to use
  238.   editor   = $EDITOR
  239.  
  240.   # where to save mail if not specified somewhere else
  241.   savemail = ~/Mail/mail.sent
  242.  
  243.   # how to print a message ('%s' is the filename)
  244.   print    = /usr/local/bin/print -p lpn -f %s
  245.  
  246.   # prefix sequence for including message text in other messages...
  247.   prefix = >
  248.  
  249.   # what headers I DON'T want to see, ever.
  250.  
  251.   weedout  = "Via:"  "Sent:"  "Date:"  "Status:"  "Original"
  252.              "From"  "Phase"  "Subject:"  "Fruit"  "Sun"
  253.              "Lat"  "Buzzword"  "Return"  "Posted" "Telephone"
  254.              "Postal-Address" "Origin" "X-Sent-By-Nmail-V"
  255.              "Resent" "X-Location"  "Source" "Mood"  "Neuron"
  256.              "Libido" "To:" "X-Mailer:"  "Full-Name:" "X-HPMAIL"
  257.  
  258.  
  259.  
  260. Page 4
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. Msg Users Guide                                  Version 3.2
  269.  
  270.  
  271.  
  272.              "Cc:" "cc:" "Mmdf" "Network-"
  273.  
  274.   # automatically copy message being replied to into buffer?
  275.   autocopy = OFF
  276.  
  277.   # save a copy of all outbound messages?
  278.   copy     = ON
  279.  
  280.   # emulate the mailx message increment mode (only increment after something
  281.   # has been 'done' to a message, either saved or deleted)
  282.   resolve  = ON
  283.  
  284.   # enable the weedout list to be read...
  285.   weed     = ON
  286.  
  287.   # when messages are copied into the outbound buffer, don't include headers
  288.   noheader = ON
  289.  
  290.   # display message title when displaying pages of message
  291.   titles         = ON
  292.  
  293.   # alternative addresses that I could receive mail from (usually a
  294.   # forwarding mailbox)
  295.  
  296.   alternatives = hpcnof!dat,  hpcnof!d_taylor,   hpcnou!d_taylor,
  297.                  hpcnou!root, hpcnou!postmaster, hpcnoe!d_taylor,
  298.                  hpcnoe!dat,  hpcnoa!d_taylor,   hpcnoa!dat,
  299.                  hpfcla!d_taylor
  300.  
  301. Along with this, there is still an environment variable that
  302. the  mailer  checks  for,  namely  "EDITOR",  which can also
  303. define what editor to use when entering messages.   As  with
  304. the shell variable, having an editor specified in the .msgrc
  305. file  will  override  anything  read  in  from  the  current
  306. environment.
  307.  
  308.  
  309.  
  310.  
  311. 3.  The Starting Parameters
  312.  
  313.      There are a number of starting options to the msg  pro-
  314. gram, with only one that needs to be remembered: '-?'or '-h'
  315. for help.
  316.  
  317. The flags are;
  318.  
  319.    -d     Debug.  Useful for debugging the msg program.  The
  320.           results  of  using  the  debug option is much less
  321.           drastic than in the previous versions of the  pro-
  322.           gram  -  it  creates a file in your home directory
  323.  
  324.  
  325.  
  326. Page 5
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. Msg Users Guide                                  Version 3.2
  335.  
  336.  
  337.  
  338.           called "Msg.debug.info" and  creates  a  (verbose)
  339.           log of activity as the program is used.
  340.  
  341.    -f <file> File.  Read  specified  file  rather  than  the
  342.           default input mailbox.
  343.  
  344.    -h or -? Help.  Gives a short list of all  these  options
  345.           and exit.
  346.  
  347.    -k     Keypad - This option, when used, lets the msg pro-
  348.           gram  know  that  you're on an HP terminal, and it
  349.           can then interpret the PREV  NEXT  and  HOME/DOWN-
  350.           HOME  keys  accordingly.   If you are not on an HP
  351.           terminal, it is recommended that you  do  NOT  use
  352.           this option.
  353.  
  354.    -s     Softkeys.  The msg mailer can, to a rather limited
  355.           extent, use the HP softkeys as an alternative form
  356.           of input.  If you specify this option be sure that
  357.           you're on an HP terminal that can accept the stan-
  358.           dard 2622 terminal escape sequences!
  359.  
  360.    -z     Zero.  This causes the mailer not to be started if
  361.           you  don't  have  any  mail.    This  emulates the
  362.           behaviour of programs like 'mailx'.
  363.  
  364.    -S <subject> In batch mode, this is how to  indicate  the
  365.           subject  of the resulting message.  Please see the
  366.           section  on  "Non-Interactive  Uses  of  Msg"  for
  367.           further information.
  368.  
  369.      All the above flags default to reasonable  options,  so
  370. there is usually no need to use them.
  371.  
  372.  
  373.  
  374.  
  375. 4.  Non-Interactive Uses of Msg
  376.  
  377.      Before we discuss the main mail system, it's worth not-
  378. ing  that  there  are  a couple of other ways to use the msg
  379. mail system, namely to 'send only' and to send files (batch-
  380. mail).
  381.  
  382.      To send a message to someone without any of the associ-
  383. ated  overhead  of  the  main  system  being loaded, you can
  384. invoke the mailer with the name(s) of the people to send to.
  385. The  mailer  will  then prompt for Subject, Copies, and then
  386. drop you in your (defined in the ".msgrc"  file)  editor  to
  387. compose  the  message.    When  composition is complete, the
  388. program verifies transmission then terminates.  For example;
  389.  
  390.  
  391.  
  392. Page 6
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. Msg Users Guide                                  Version 3.2
  401.  
  402.  
  403.  
  404.   $ msg dat
  405.   To: ihnp4!hpfcla!d_taylor
  406.   Subject: this is a test
  407.   Copies To: <return>
  408.  
  409.   <invokes editor, message composed, then>
  410.  
  411.   Are you sure you want to send this? (y/n) y
  412.  
  413.   mail sent.
  414.  
  415.   $
  416.  
  417. Note that the user input is in bold face,  so  you  can  see
  418. that the mailer verified the alias expansion too!
  419.  
  420.  
  421.      The mailer also supports batch type mailing,  of  files
  422. and so on, by using the following starting sequence;
  423.  
  424.   $ msg -S "File help.c" dat < help.c
  425.  
  426. which will read in the file and transmit it to the specified
  427. user  with  the specified subject.  Note that the program is
  428. intelligent enough to check to see what the  stdin  is  from
  429. this invocation, so a command of the form
  430.  
  431.   $ msg -S "file help.c" dat
  432.  
  433. would result in the following sequence (since the program is
  434. reading the "standard in" for information;
  435.  
  436.   $ msg -S "file help.c" dat
  437.   To: ihnp4!hpfcla!d_taylor
  438.   Subject: file help.c
  439.  
  440.   Enter your message, ending with ^D
  441.  
  442.   this is the message
  443.   Please don't ask me why I used this wierd mode!
  444.  
  445.   ^D
  446.   <end-of-message>
  447.  
  448.   $
  449.  
  450. which is reasonable behaviour!!  (not only that, but this is
  451. almost exactly what /bin/mail does in the same situation!!)
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458. Page 7
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. Msg Users Guide                                  Version 3.2
  467.  
  468.  
  469.  
  470.      Enough of this foolishness, however, let's get onto the
  471. real stuff;
  472.  
  473.  
  474.  
  475.  
  476. 5.  The Main System
  477.  
  478.      Upon entry to the program,  the  main  screen  will  be
  479. displayed as below;
  480.  
  481.  
  482. -----------------------------------------------------------------
  483. Mailbox is '/usr/mail/mymail' with 13 messages.  [Version 3.0]
  484.  
  485.    1<-   Apr 3  rob             Doing anything tonight?
  486.    2     Apr 5  hplabs!joe      bug in gammon game
  487.    3     Apr 5  root
  488.    4     Apr 6  root            (continuation of previous message)
  489. U  5     Apr 8  decvax!mouse    Re: net.music article decvax:495
  490.    6     Apr 13 John Jacobs      How can you hate RUSH?
  491.    7     Apr 15 kevin           More software requests
  492. N  8     Apr 18 games           Hi there
  493. N  9     Apr 18 Dave Taylor     EditFile.c source...
  494. N 10     Apr 23 veeger!carl     More silly stuff
  495.  
  496.  
  497. |=pipe, !=shell, ?=help, <n>=set current to n, /=search pattern
  498. A)lias, C)hange mailbox, D)elete, F)orward, G)roup reply, M)ail,
  499. N)ext, P)rint, R)eply, S)ave to file, Q)uit, U)ndelete, or eX)it
  500.  
  501. Mail :@
  502. -----------------------------------------------------------------
  503.  
  504.  
  505.  
  506.      There are a number  of  things  to  notice  about  this
  507. screen;
  508.  
  509.    o The top line always displays the current mail file, the
  510.      number  of  messages  in  the file, and the current msg
  511.      version number.
  512.  
  513.    o On the left side of each message is the message  number
  514.      which is unique for each message in the file.
  515.  
  516.    o The arrow ('<-') always points to the current  message.
  517.      This  is  the  message that the commands having default
  518.      message numbers (such as D)elete, and N)ext) will  work
  519.      with.
  520.  
  521.  
  522.  
  523.  
  524. Page 8
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532. Msg Users Guide                                  Version 3.2
  533.  
  534.  
  535.  
  536.    o The date associated with each message is the  date  the
  537.      person  sent  the  message.  This is obtained by either
  538.      the oldest of the ">From" line dates, or, if  possible,
  539.      by parsing the "Date:" line.
  540.  
  541.    o The  third  field  displayed  is  a  truncated   'from'
  542.      address,  and  will  indicate whom the message is from.
  543.      Note that on the sixth and ninth  messages  full  names
  544.      appear instead of the usual machine!login format.  This
  545.      is because these messages have a From line of the form:
  546.  
  547.              From: fullname <address>
  548.      or      From: address (fullname)
  549.  
  550.      which the mailer reads and displays if  possible.   The
  551.      msg mailer (version 2.1 and beyond) also generates this
  552.      header line on outgoing mail.
  553.  
  554.    o The final field is the (optional) subject of  the  mes-
  555.      sage.  Note that message 3 has no subject.
  556.  
  557.    o Message five is an 'Urgent' message  (it  contains  the
  558.      header
  559.  
  560.              Priority: Urgent
  561.  
  562.      to make it urgent) that should be read immediately.
  563.  
  564.    o Messages 8 thru 10 are new since the last time the user
  565.      read  their mail - the "N" in the leftmost margin indi-
  566.      cates this.
  567.  
  568.    o A maximum of ten messages are displayed at  one  time*.
  569.      Further  into  the  document  we'll learn how to change
  570.      'pages' in the mailbox.
  571.  
  572.    o The three line mini-menu will always indicate what com-
  573.      mands are available at the current moment.
  574.  
  575.    o Finally, the '@' character indicates where  the  cursor
  576.      would be, awaiting your input.
  577.  
  578.      The typical action at this point is to use the <return>
  579. key  to  read  the  current message.  This particular option
  580.  
  581.  
  582. __________
  583.  
  584.  0. On terminals with greater than 25 lines, more messages
  585.     will be displayed automatically.
  586.  
  587.  
  588.  
  589.  
  590. Page 9
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598. Msg Users Guide                                  Version 3.2
  599.  
  600.  
  601.  
  602. isn't noted in the  mini-menu,  but  choosing  the  '?=help'
  603. option  will  inform  you  of a number of choices other than
  604. those in the basic menu!
  605.  
  606.      Pressing this key will clear the screen and display the
  607. first  page  of the message.  At the bottom of the page, the
  608. system will write either;
  609.  
  610. Please press <space> to continue             <xx> lines left
  611.  
  612. or
  613.  
  614. Please press <space> to return
  615.  
  616. These indicate how much of  the  current  message  has  been
  617. read: 'continue' indicates the presence of at least one more
  618. line of information (the exact number will be  indicated  on
  619. the  right hand side as 'xx lines left').  Pressing <return>
  620. rather than <space> will automatically  return  you  to  the
  621. main system level at any page of a message.
  622.  
  623.      When the message continues onto another  page  the  msg
  624. mailer  will  also  indicate  how many lines are left in the
  625. message...
  626.  
  627.      If resolve-mode is turned off (see the 'resolve'  flag)
  628. the  current message pointer (the arrow) will be incremented
  629. after reading the message and will point to the next message
  630. in the list.
  631.  
  632.      As you can see, it would be  quite  simple  to  quickly
  633. read  through  all  the pending mail by repeatedly using the
  634. <return> command at the menu  level,  and  the  <space>  bar
  635. while reading each message!
  636.  
  637.      While reading is perhaps the most fundamental  function
  638. that  the  msg program performs, there are a number of other
  639. options available, namely;
  640.  
  641.  
  642. Command                  Action
  643.  
  644.  
  645.    |                  Pipe current message to specified com-
  646.                       mand.
  647.    !                  Shell escape.
  648.    ?                  A help screen listing commands
  649.    +, <space>, or <NEXT> Next page of headers
  650.    -, or <PREV>       Previous page of headers
  651.    =, or <HOME>       Set current message to 1
  652.    *, or <SHIFT>-<HOME> Set current to last message.
  653.  
  654.  
  655.  
  656. Page 10
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664. Msg Users Guide                                  Version 3.2
  665.  
  666.  
  667.  
  668.    <n>                Set current message to n
  669.  
  670.    a                  Alias, change to 'alias' mode
  671.    c                  Change current mail file
  672.    d                  Delete current message
  673.    f                  Forward message to specified user
  674.    g                  Group reply - reply  to  everyone  who
  675.                       received the current message
  676.    h                  Display message + headers
  677.    j                  Increment current message by one
  678.    k                  Decrement current message by one
  679.    m                  Mail to arbitrary user(s)
  680.    n  or  <return>      Next  message  (Read  current,  then
  681.                       increment)
  682.    o                  Option.  Alter current options.
  683.    p                  Print current message.
  684.    r                  Reply to the author of current message
  685.    s                  Save current message to file
  686.    t                  The current time and date is displayed
  687.    q                  Quit - mail deleted, saved in mbox  or
  688.                       left.
  689.    u                  Undelete current message
  690.    v                  Variables.  Display current variables.
  691.    x                  Exit - don't  record  as  read,  don't
  692.                       save...
  693.  
  694.    ^L                 Rewrite screen.
  695.    ^M (<return>)      Read current message
  696.    ^Q, ^Z, DEL        Exit - don't  record  as  read,  don't
  697.                       save...
  698.  
  699.  
  700. That are all the commands available at the main level of the
  701. msg  program!   Now  you can see why it is nice to leave the
  702. three-line menu displayed!
  703.  
  704.  
  705.  
  706.      As an example, let's enter a  series  of  commands  and
  707. indicate what the display would be after each one;
  708.  
  709.  
  710. First off, let's go to the next page of mail with '+';
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722. Page 11
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730. Msg Users Guide                                  Version 3.2
  731.  
  732.  
  733.  
  734. -----------------------------------------------------------------
  735. Mailbox is '/usr/mail/mymail' with 13 messages.  [Version 3.0]
  736.  
  737. N 11<-    Apr 27 Jack           Wanna buy some albums cheap?
  738. N 12      Apr 28 Jack           Cancel the previous offer!
  739. N 13      Apr 30 sdcsvax!dx     Moving day (long)
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749. |=pipe, !=shell, ?=help, <n>=set current to n, /=search pattern
  750. A)lias, C)hange mailbox, D)elete, F)orward, G)roup reply, M)ail,
  751. N)ext, P)rint, R)eply, S)ave to file, Q)uit, U)ndelete, or eX)it
  752.  
  753. Mail :@
  754. -----------------------------------------------------------------
  755.  
  756.      We need to move the current message pointer to  message
  757. 11, so type in '11', then let's read the new current message
  758. by using the next command (typing <return>)...
  759.  
  760.  
  761. -----------------------------------------------------------------
  762.  
  763. Message #11 from Jack           Mailed December 7, 1984 at 8:45 pm
  764.  
  765. Hey Dave! I've got some old AC/DC and KISS albums, and as I know
  766. you are a collector, do you want to buy them off of me before
  767. I make ashtrays out of them (or frisbees...)?
  768.  
  769.                         Humourously,
  770.                                         Jack The Gripper
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778. Please press <space> to return: @
  779.  
  780. -----------------------------------------------------------------
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788. Page 12
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796. Msg Users Guide                                  Version 3.2
  797.  
  798.  
  799.  
  800.      Needless to say,  we  can't  let  this  message  go  by
  801. without  replying!  So let's press the <space> bar to return
  802. to the main menu, then use the reply command to respond.
  803.  
  804.      After pressing the 'r' key, the program asks if a  copy
  805. of  the  source  message is desired (the character under the
  806. cursor indicates the default if  <return>  is  pressed.   In
  807. this case, the default is 'no');
  808.  
  809. copy source message? (y/n) @
  810.  
  811.      We choose to answer no, so press the 'n' key.  Next msg
  812. verifies that the subject is okay;
  813.  
  814. Subject: Re: Wanna buy some albums cheap?@
  815.  
  816. Typing anything other than <return> will allow us to  change
  817. the  subject to something more appropriate.  Furthermore, if
  818. we choose to type our "kill line" character (the same as the
  819. one  the  shell  uses,  probably Control-U or Control-X) the
  820. entire line will be erased.  We decide, however, to leave it
  821. be and press return.
  822.  
  823. Finally, we're asked if we want to send copies of this  mes-
  824. sage  to  anyone.   We  don't, so we press <return> one more
  825. time.
  826.  
  827.      The program then puts us in the vi editor (the default,
  828. assuming  no other editor specified by the '.msgrc' variable
  829. "editor") with a blank file.
  830.  
  831.      After having entered a suitable  reply,  and  left  the
  832. editor,  the msg system then verifies that we really want to
  833. send the message with;
  834.  
  835. Are you sure you want to send this message? (y/n) @
  836.  
  837. To which the response is 'y' for 'yes'.  It then  sends  the
  838. message  off  to  Jack,  who will receive it hopefully quite
  839. soon (or at least  before  he  makes  ashtrays  out  of  the
  840. albums!)
  841.  
  842.  
  843.      Also, if we have a file  called  ".msgheaders"  in  our
  844. home directory, the mailer will include those headers in the
  845. outbound message.  This is to  allow  custom  (personalized)
  846. mail,  especially  headers  like  "Organization:" and "Loca-
  847. tion:".
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854. Page 13
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862. Msg Users Guide                                  Version 3.2
  863.  
  864.  
  865.  
  866.      Message 11 is still the current message, so,  now  that
  867. we  have  saved  it, let's mark it for deletion by using the
  868. delete command 'd'.
  869.  
  870.      The screen is now;
  871.  
  872.  
  873. -----------------------------------------------------------------
  874. Mailbox is '/usr/mail/mymail' with 13 messages.  [Version 3.0]
  875.  
  876. N 11    * Apr 27 Jack           Wanna buy some albums cheap?
  877. N 12<-    Apr 28 Jack           Cancel the previous offer!
  878. N 13      Apr 30 sdcsvax!dx     Moving day (long)
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889. |=pipe, !=shell, ?=help, <n>=set current to n, /=search pattern
  890. A)lias, C)hange mailbox, D)elete, F)orward, G)roup reply, M)ail,
  891. N)ext, P)rint, R)eply, S)ave to file, Q)uit, U)ndelete, or eX)it
  892.  
  893. Mail :@
  894. -----------------------------------------------------------------
  895.  
  896.  
  897.  
  898.      Now lets go back to the first page of messages by typing '=';
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920. Page 14
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928. Msg Users Guide                                  Version 3.2
  929.  
  930.  
  931.  
  932. -----------------------------------------------------------------
  933. Mailbox is '/usr/mail/mymail' with 13 messages.  [version 2.2]
  934.  
  935.    1<-   Apr 3  rob             Doing anything tonight?
  936.    2     Apr 5  hplabs!joe      bug in gammon game
  937.    3     Apr 5  root
  938.    4     Apr 6  root            (continuation of previous message)
  939. U  5     Apr 8  decvax!mouse    Re: net.music article decvax:495
  940.    6     Apr 13 John Jacob       How can you hate RUSH?
  941.    7     Apr 15 kevin           More software requests
  942. N  8     Apr 18 games           Hi there
  943. N  9     Apr 18 Dave Taylor     EditFile.c source...
  944. N 10     Apr 23 veeger!carl     More silly stuff
  945.  
  946.  
  947.  
  948. |=pipe, !=shell, ?=help, <n>=set current to n, /=search pattern
  949. A)lias, C)hange mailbox, D)elete, F)orward, G)roup reply, M)ail,
  950. N)ext, P)rint, R)eply, S)ave to file, Q)uit, U)ndelete, or eX)it
  951.  
  952. Mail :@
  953. -----------------------------------------------------------------
  954.  
  955.  
  956.  
  957.      Gee..note five not only looks  mildly  interesting  but
  958. it's  an  Urgent  message  too!   So let's read it by typing
  959. '5'<return> to make that  the  current  message,  and  press
  960. <return>  again  to  read  it.  After reading the message we
  961. decide that this seems like a message worth keeping  in  the
  962. 'music'  mailbox,  so lets do that by using the save to file
  963. command!
  964.  
  965.      Pressing 's' results in the msg system prompting;
  966.  
  967. Save to what file : @
  968.  
  969. to which we reply '=/music'.  The file is then saved in  the
  970. directory  we  specified as mail home via the '.msgrc' vari-
  971. able "maildir". After saving, the  "Mail:"  prompt  returns,
  972. with  message  5 marked for deletion and the current message
  973. pointer incremented to message 6.
  974.  
  975.      Before we finish up, we suddenly remember that  one  of
  976. the  messages  was  supposed to be about how to write decent
  977. documentation for Unix systems, so let's try to find it...
  978.  
  979.      First off, we'll move back  to  message  one  with  the
  980. <HOME>  key (you'll need to use the "-k" starting option and
  981. be on an HP terminal for this to work!) and then use the '/'
  982. pattern matching command:
  983.  
  984.  
  985.  
  986. Page 15
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994. Msg Users Guide                                  Version 3.2
  995.  
  996.  
  997.  
  998. Mail: Pattern                 / = match anywhere in messages
  999. Match pattern: @
  1000.  
  1001. we'll type in 'document' and see if the system can find  it.
  1002. After  a brief second or two it returns 'pattern not found.'
  1003. Hmm...maybe it's not either the from or the subject  of  any
  1004. of  the  messages...In  case,  let's try using the new match
  1005. anywhere in message command;
  1006.  
  1007. Mail: @
  1008.  
  1009. To which we type '/' for pattern matching;
  1010.  
  1011. Mail: Pattern                 / = match anywhere in messages
  1012. Match pattern: @
  1013.  
  1014. Now we'll use '/' again to get the match  anywhere  in  file
  1015. option, and then get the prompt;
  1016.  
  1017. Match pattern (in entire mailbox): @
  1018.  
  1019. to which we respond 'document' again.
  1020.  
  1021.      The msg mailer then searches through each line  of  all
  1022. the  messages  in  the  file  and  moves the current message
  1023. pointer to message number 7.  A  quick  check  reveals  that
  1024. this  message  indeed contains the word 'document', but it's
  1025. not the one we want, so we're going to just get outta here!
  1026.  
  1027.      We've had enough mail for today, so lets  quit,  saving
  1028. all messages in our mailbox as defined in the '.msgrc' file,
  1029. except messages 5 and 11, which are marked for deletion.
  1030.  
  1031.      Quit prompts;
  1032.  
  1033. Delete messages? (y/n) @
  1034.  
  1035. to which we answer 'y' for yes.  The next prompt is then;
  1036.  
  1037. Keep mail in incoming mailbox? (y/n) @
  1038.  
  1039. To which we also answer yes...the program then quickly saves
  1040. the  files,  removing message 5 and 11 as it goes along, and
  1041. exits.
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052. Page 16
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. Msg Users Guide                                  Version 3.2
  1061.  
  1062.  
  1063.  
  1064. 6.  Responses...
  1065.  
  1066.  
  1067.  
  1068.      This section will discuss each command in the msg  pro-
  1069. gram  in  more  detail than above, including the prompts the
  1070. user can expect upon executing the command, the  meaning  of
  1071. different options etc etc.
  1072.  
  1073.  
  1074.    |      Pipe.  This command allows you to pipe the current
  1075.           message  through other filters as you desire.  The
  1076.           shell used for the entire command will  be  either
  1077.           the  one  specified  in your ".msgrc" file, or, if
  1078.           none, /bin/sh.
  1079.  
  1080.    !      Shell.  This allows you to send a command  to  the
  1081.           shell without leaving the program.
  1082.  
  1083.    ?      Help.  This command produces  a  two-page  display
  1084.           that  details  all  the  commands  available  in a
  1085.           reference guide format.
  1086.  
  1087.    /      Pattern match.  This command, on  the  top  level,
  1088.           allows the user to search through all the from and
  1089.           subject lines of the current mailbox  starting  at
  1090.           the  current  message  and  continuing through the
  1091.           end.  If the first character of the pattern  is  a
  1092.           '/', then the program will try to match the speci-
  1093.           fied pattern against  ANY  line  in  the  mailbox.
  1094.           Again,  this works from one after the current mes-
  1095.           sage through the end.
  1096.  
  1097.    <n>    Specify new current message.  Typing in any of the
  1098.           digits  one  thru nine will result in the msg pro-
  1099.           gram producing the prompt 'Set current  to  :  n',
  1100.           where 'n' is the digit entered. Note that changing
  1101.           the current  message  to  a  message  not  on  the
  1102.           current  page  of the headers will result in a new
  1103.           page of headers being displayed.
  1104.  
  1105.    a      Alias.  The alias system is a way  by  which  more
  1106.           complex  mail  addresses  can be shortened for the
  1107.           mail user.  For example;
  1108.  
  1109.           joe, blow : Joe Blow : veeger!hpcnoe!hpcfla!jblow
  1110.  
  1111.           which allows mail to 'joe' with the system expand-
  1112.           ing the address properly.  As is obvious, this not
  1113.           only saves remembering complex addresses, it  also
  1114.           allows  the  address to be optimized to go through
  1115.  
  1116.  
  1117.  
  1118. Page 17
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. Msg Users Guide                                  Version 3.2
  1127.  
  1128.  
  1129.  
  1130.           the minimum number of machines without anyone hav-
  1131.           ing to be informed of the change.  A more detailed
  1132.           discussion can be found in  the  section  entitled
  1133.           'The Alias System'.
  1134.  
  1135.    c      Change mailbox.  Specifying  this  command  allows
  1136.           the  user  to  change  the  mailbox  file  that is
  1137.           currently  being  read.   This  is  intended   for
  1138.           perusal and reply to previously archived messages.
  1139.           The prompt is 'Name of new mailbox : ' and  enter-
  1140.           ing <return> cancels the operation, while entering
  1141.           a filename causes the program to read that file as
  1142.           the  new  mailbox  file, if possible.  As with the
  1143.           "save" command,  this  command  expands  filenames
  1144.           with  '~'  being your home directory and '=' being
  1145.           your MAILDIR directory, if defined.  This  command
  1146.           also  allows  the special character '!' to be used
  1147.           to allow you to change  to  the  default  incoming
  1148.           mailbox.
  1149.  
  1150.    d, u   Delete and Undelete.  Neither of  these  two  com-
  1151.           mands  have  any prompts and indicate their action
  1152.           by either adding an asterisk to the  current  mes-
  1153.           sage  index entry (indicating deletion pending) or
  1154.           removing the asterisk (indicating that  the  dele-
  1155.           tion is cancelled).
  1156.  
  1157.    f      Forward.  Allows the user to forward  the  current
  1158.           message  to  another user. This copies the message
  1159.           into the edit buffer and allows the  user  to  add
  1160.           their  own  message  too.   The prompt is 'Forward
  1161.           to:' and will expand an alias if entered.
  1162.  
  1163.    j, k   These two keys work similarly to what  they  would
  1164.           do  in  'vi'  or  any of the other screen oriented
  1165.           programs.  The 'j' key moves the  current  message
  1166.           pointer  down  to  the  next message (going to the
  1167.           next page if needed) and the  'k'  key  moves  the
  1168.           current  message pointer back to the previous mes-
  1169.           sage (also changing pages if needed)
  1170.  
  1171.    m      Mail.  Send mail to a specified user.  The  prompt
  1172.           that is associated with this command is 'Send mail
  1173.           to :'.  Entering an alias name results in the full
  1174.           address  being  rewritten  in  parenthesis immedi-
  1175.           ately.  This  prompt  is  followed  by  'Subject:'
  1176.           which  allows  the  user to title their note.  The
  1177.           final field is 'Copies to: ', which  allows  other
  1178.           people specified to receive "carbon copies" of the
  1179.           message. Upon entering all three items the vi edi-
  1180.           tor  (or any other editor specified by $EDITOR) is
  1181.  
  1182.  
  1183.  
  1184. Page 18
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. Msg Users Guide                                  Version 3.2
  1193.  
  1194.  
  1195.  
  1196.           invoked and the message can be composed.
  1197.  
  1198.    n      Next message.  See above.
  1199.  
  1200.    o      Options.  This is a small  subsystem  of  the  msg
  1201.           system  with the various options selected by their
  1202.           first letter, '1' enabling the option,  '0'  disa-
  1203.           bling  it  and  <return> leaving it unchanged. 'r'
  1204.           returns to the main system.
  1205.  
  1206.    p      Print message.  This allows you to print  out  the
  1207.           current  message  to  a previously defined printer
  1208.           (see the section on the  '.msgrc'  discussing  the
  1209.           "print" variable)
  1210.  
  1211.    q      Quit.  This command's action is dependent  on  the
  1212.           current state of the msg program.  For example, if
  1213.           the current mailbox is  the  default  mailbox  the
  1214.           messages  that  are  not  deleted are saved in the
  1215.           file $home/mbox, whereas  if  it  is  a  specified
  1216.           mailbox  the  to-be-deleted  messages  are removed
  1217.           from the file.  The possible prompts are 'Save  to
  1218.           mailbox?' if the default mailbox is being read and
  1219.           there is at least one message to save, 'Delete all
  1220.           messages'  if  all  messages  in  any  mailbox are
  1221.           marked for deletion or 'Delete message(s)?' if not
  1222.           reading  the  default  mailbox  and there are some
  1223.           messages that should be saved.  A response of  'n'
  1224.           (no)  to any of these questions will result in the
  1225.           quit  command  aborting,  and  the   files   being
  1226.           untouched.
  1227.  
  1228.    r      Reply.  Reply to the author of  the  current  mes-
  1229.           sage.   If the autocopy flag is not specified, the
  1230.           program will prompt 'Copy Message? (y/n)' to which
  1231.           the  user can specify whether a copy of the source
  1232.           message is to be copied into the edit  buffer,  or
  1233.           not.  If copied in, all lines from the message are
  1234.           prepended with the prefix character  sequence,  as
  1235.           specified in the users ".msgrc" file.
  1236.  
  1237.    s      Save to file.  As demonstrated in the above  exam-
  1238.           ple, this command allows the current message to be
  1239.           copied into an arbitrary file.  If there  is  any-
  1240.           thing   in  the  file  currently  the  message  is
  1241.           appended to the end, otherwise the file is created
  1242.           containing  only the message.  The prompt for this
  1243.           command is 'Save to  file  :  '.   A  response  of
  1244.           <return>  cancels the command and returns the user
  1245.           to the system prompt.  After saving  a  file,  the
  1246.           message  is  marked  for  deletion and the current
  1247.  
  1248.  
  1249.  
  1250. Page 19
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. Msg Users Guide                                  Version 3.2
  1259.  
  1260.  
  1261.  
  1262.           message pointer is  incremented.   There  are  two
  1263.           available   meta-characters   when   specifying  a
  1264.           filename too - '~' as the first character  expands
  1265.           to your home directory, and '=' as the first char-
  1266.           acter expands to the mail folder directory defined
  1267.           via  the  'maildir' variable in the users ".msgrc"
  1268.           file.
  1269.  
  1270.    t      Time.  This simply displays the current  date  and
  1271.           time in a nice readable format.
  1272.  
  1273.    v      Variables.  This is also a small subsystem of  the
  1274.           msg  system  allowing  you  to  alter the value of
  1275.           various msg variables.  The variables that you can
  1276.           change  are the 'EDITOR' variable which determines
  1277.           what editor to use when you compose a message, the
  1278.           'MAILBOX'  variable  which indicates where mail is
  1279.           to be put after being  read,  and  the  'USERNAME'
  1280.           variable.   (Note  that  only  the  superuser  can
  1281.           change their username within the program)
  1282.  
  1283.    x      Exit.  This is functionally the same as  answering
  1284.           'n'o to the quit command prompt, and simply leaves
  1285.           the program in the quickest possible manner.  This
  1286.           command   can   also  occur  from  typing  DELETE,
  1287.           control-Q or control-Z, all of which are also exit
  1288.           commands.
  1289.  
  1290.  
  1291.  
  1292.  
  1293. 7.  Special Outgoing Mail Processing
  1294.  
  1295.  
  1296.  
  1297.      There are a few extra features that the  mailer  offers
  1298. on outgoing mail that are worthy of mention;
  1299.  
  1300.  
  1301.      The first, and probably the most exciting  feature,  is
  1302. the ability to send encrypted mail!  To do this is extremely
  1303. simple:  You need merely to have two 'key lines'  "[encode]"
  1304. and "[clear]" in the message body.
  1305.  
  1306.      Consider the following outgoing message:
  1307.  
  1308.         Joe,
  1309.                 Remember that talk we had about Amy?  Well,
  1310.         I talked to my manager about it and he said...
  1311.  
  1312.         uhh...better encrypt this...the usual 'key'...
  1313.  
  1314.  
  1315.  
  1316. Page 20
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. Msg Users Guide                                  Version 3.2
  1325.  
  1326.  
  1327.  
  1328.         [encode]
  1329.  
  1330.                 He said that Amy was having family problems
  1331.         and that it had been affecting her work.
  1332.  
  1333.                 Given this, I went and talked to her, and
  1334.         told her I was sorry for getting angry.  She said
  1335.         that she understood.
  1336.  
  1337.                 We're friends again!!
  1338.         [clear]
  1339.  
  1340.                 Exciting stuff, eh?
  1341.  
  1342.                                          Mike
  1343.  
  1344. While this is obviously quite  readable  while  being  typed
  1345. into  the  editor,  as  soon  as the message is confirmed as
  1346. wanting to be sent, the msg mailer prompts with;
  1347.  
  1348.         Enter encryption key: @
  1349.  
  1350. and accepts a key  (or  series  of  8  or  less  characters)
  1351. without  echoing  them  to the screen.  After entry, it will
  1352. ask for the same key again to confirm  it,  then  *poof*  it
  1353. will encrypt and send the mail!
  1354.  
  1355.      If you have the "copy" option enabled, the program will
  1356. save  your  copy  of the message encrypted too.  (This is to
  1357. ensure the privacy and security of your archived mail too!)
  1358.  
  1359.      If the mailer doesn't ask for the encryption key,  it's
  1360. because you don't have the '[encode]' entered as the first 8
  1361. characters of the line.  It MUST be so for this to work!!
  1362.  
  1363.      On the other end, a person receiving  this  mail  (they
  1364. must  also be using msg to receive it, since this mailer has
  1365. a unique encryption program) will be reading the message and
  1366. then suddenly be prompted;
  1367.  
  1368.         Enter decryption key: @
  1369.  
  1370. and will again be asked to re-enter it to confirm.  The pro-
  1371. gram  will then on-the-fly decrypt the mail and display each
  1372. line as it is decoded.  The '[clear]'  line  signifies  that
  1373. the block to encrypt is done.
  1374.  
  1375.      For those sites not running msg, I also have  available
  1376. the  encryption  code  as  a separate program suitable for a
  1377. filter for use with other mailers...
  1378.  
  1379.  
  1380.  
  1381.  
  1382. Page 21
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. Msg Users Guide                                  Version 3.2
  1391.  
  1392.  
  1393.  
  1394.      The other option on outgoing mail  is  the  ability  to
  1395. specify  what  section  of  the  message  you  want  to have
  1396. archived (assuming "copy" is enabled) and what  section  you
  1397. don't.   This  is  most  useful  for sending out source file
  1398. listings and so on...
  1399.  
  1400.      To indicate the end of the section that should be saved
  1401. in the archive, you need merely to have the line
  1402.  
  1403.         [no save]
  1404.  
  1405. appear by itself on a line.  This will be removed  from  the
  1406. outgoing  mail,  and will indicate the last line of the mes-
  1407. sage in the saved mail.
  1408.  
  1409.  
  1410.  
  1411.  
  1412. 8.  The Mail Archive File
  1413.  
  1414.  
  1415.  
  1416.      The format of the mail saved to  the  archive  file  is
  1417. also  worth a quick discussion.  Unlike the usual exact copy
  1418. of the entire header section, the archived mail has the fol-
  1419. lowing header;
  1420.  
  1421.         From To:<name> 15 Jan 1985 4:54:30 MST
  1422.         Original-To: <address>
  1423.         Subject: <subject>
  1424.  
  1425.         <message body>
  1426.  
  1427. The first line, the 'From'  line,  is  deliberately  mangled
  1428. with the occurance of the 'To:<name' to ensure that when you
  1429. are perusing your archive file with the mailer that you  see
  1430. WHO  the  message was TO, since they're all going to be FROM
  1431. you!!  The <name> will either be the  machine!login  of  the
  1432. person, or, if used as an alias, it will be the alias name.
  1433.  
  1434.      To read this file, you can use the mailer, choosing the
  1435. "C)hange  mailbox"  command,  or  start  up  specifying your
  1436. archive file as the mailbox to read.
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448. Page 22
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. Msg Users Guide                                  Version 3.2
  1457.  
  1458.  
  1459.  
  1460. 9.  Using MSG with the Notes System
  1461.  
  1462.  
  1463.  
  1464.      A new and innovative feature in the 3.0 release of  the
  1465. msg  program is the ability to read files saved by the notes
  1466. system and display  them  as  individual  messages.   Unfor-
  1467. tunately,  the notes software does not currently save a note
  1468. with the subject line, however, so the mailer uses the  next
  1469. best thing and displays each note in the form:
  1470.  
  1471.     1  Apr 5  hplabs!kundler    Note from group net.unix-wizards
  1472.     2  Apr 7  hplabs!richards   Note from group net.unix-wizards
  1473.  
  1474. and so on.  The individual notes can be replied to by  using
  1475. the  reply command, as with normal mail, and the mailer will
  1476. modify it's behaviour to work with this particular brand  of
  1477. mail file.
  1478.  
  1479.      How does the mailer know if it's reading  a  file  that
  1480. contains normal mail versus a saved set of notes?  By check-
  1481. ing the first line of the file - if  it's  the  header  line
  1482. that  notes emits (ie "/***** host:login / notesgroup / date
  1483. **/") then the file is considered to be a  notes  file.   If
  1484. not, the default for unknown files is to assume they're mail
  1485. files.
  1486.  
  1487.  
  1488.  
  1489.  
  1490. 10.  The Alias System
  1491.  
  1492.  
  1493.  
  1494.      As mentioned previously, there exists in the msg system
  1495. a set of aliases that associate an arbitrary word (such as a
  1496. persons name) to a complex address or group. The  advantages
  1497. are  readily apparent; rather than remembering an address of
  1498. the form;
  1499.  
  1500. machine1!machine2!machine3! ... !machineN!account
  1501.  
  1502. the user merely has to remember a single word.
  1503.  
  1504.      Two alias tables are available for a each  user  within
  1505. msg, namely the system alias file and the users' alias file.
  1506. The system alias file is created and maintained (by the sys-
  1507. tem      administrator)      by     editing     the     file
  1508. '/usr/mail/.alias_text' as described  in  the  documentation
  1509. with  the  newalias  command, then running the newalias pro-
  1510. gram.
  1511.  
  1512.  
  1513.  
  1514. Page 23
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522. Msg Users Guide                                  Version 3.2
  1523.  
  1524.  
  1525.  
  1526.      An individual user can also have an  alias  file  which
  1527. works  in  conjunction with the system aliases.  To do this,
  1528. they  need  merely  to  peruse  the  documentation  for  the
  1529. newalias  command  and  create  a file as indicated therein.
  1530. After executing the program, the aliases will  be  available
  1531. for using from within msg.
  1532.  
  1533.      The command checkalias is also useful  to  ensure  that
  1534. the aliases are installed correctly.
  1535.  
  1536.      Within msg,  however,  the  alias  system  acts  as  an
  1537. entirely  different  program, with it's own commands and own
  1538. mini-menu.  The menu replaces the standard mini-menu with;
  1539.  
  1540.  
  1541. ---------------------------------------------------------------------
  1542.  
  1543.                        Alias commands
  1544.  
  1545. A)lias current message, C)heck alias, M)ake user alias, R)eturn
  1546.  
  1547.  
  1548. Alias: @
  1549. ---------------------------------------------------------------------
  1550.  
  1551.  
  1552. The commands are;
  1553.  
  1554.    a      Alias current message. This  allows  the  user  to
  1555.           create an alias that has the return address of the
  1556.           current message as the address field of the alias.
  1557.           It  prompts  for  a unique alias name.   Important
  1558.           note: when you alias an address in  this  fashion,
  1559.           the  mailer  will  try  to  minimize the amount it
  1560.           needs to store by  iteratively  comparing  machine
  1561.           names  in  the  path  with  the  machines  in  the
  1562.           pathalias database.  Once it finds  an  entry  the
  1563.           address will be saved at that point.   For further
  1564.           information, please  see  the  "Msg  Alias  System
  1565.           Guide".
  1566.  
  1567.    c      Check alias.  This is a  simple  way  of  checking
  1568.           what  is in the alias database - it prompts for an
  1569.           alias name, and  returns  the  address  associated
  1570.           with  that  name  or  the error message 'alias not
  1571.           found' as appropriate.
  1572.  
  1573.    m      Make user alias.  This will prompt  for  a  unique
  1574.           alias  name and then for an address.  The informa-
  1575.           tion provided will be  added  to  your  individual
  1576.           alias_text file ($home/.alias_text) and then added
  1577.  
  1578.  
  1579.  
  1580. Page 24
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588. Msg Users Guide                                  Version 3.2
  1589.  
  1590.  
  1591.  
  1592.           to the database.
  1593.  
  1594.    r      Return.  Return to the main level of the msg  pro-
  1595.           gram.
  1596.  
  1597.  
  1598.  
  1599.  
  1600. 11.  While We're Talking Aliases...
  1601.  
  1602.      Another feature worthy of discussion, since  it's  been
  1603. getting  lots of veiled references throughout this document,
  1604. is the system alias section.  This is implemented using  the
  1605. uucp  pathalias  database,  with  a  file (whose location is
  1606. specified in the hdrs/sysdefs.h file - see the Configuration
  1607. Guide) in the format:
  1608.  
  1609.   hostname <tab> address!%s
  1610.  
  1611. The actual details of the file are, suprise suprise, located
  1612. in the Alias System Users Guide.
  1613.  
  1614.      Anyway, to use them is quite  simple...when  specifying
  1615. the  address  of  someone,  you can either have an alias for
  1616. them already, resond to their mail to you, or use the system
  1617. alias feature!
  1618.  
  1619.      Enough hype, right?  Okay...to use  this  feature,  you
  1620. specify  an  address  by either "machine!person" ignoring if
  1621. your specific machine  can  talk  directly  to  the  machine
  1622. specified,  or, if you prefer the ARPANET addressing scheme,
  1623. "person@machine".  When you enter the address as  specified,
  1624. the  mailer  will quickly search through the pathalias data-
  1625. base file and expand the specified address to be  a  legiti-
  1626. mate routing address.
  1627.  
  1628.      What's really nice about this is that the address  that
  1629. we're going to send to can be either on ARPA, CSNET, BITNET,
  1630. uucp, or any other network.  The method  of  specifying  the
  1631. basic address is the same regardless!
  1632.  
  1633.      For example,  mail  to  me  could  be  sent  as  either
  1634. "hpfcla!d_taylor"  (or  "hpfcla!hpcnof!d_taylor",  with  the
  1635. first machine name  being  expanded)  or  "d_taylor@hpfcla".
  1636. msg will expand them both in the same manner.
  1637.  
  1638.      As the song goes, check the alias guide...
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646. Page 25
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. Msg Users Guide                                  Version 3.2
  1655.  
  1656.  
  1657.  
  1658. 12.  Expert Mail Users and Debugging the Mailer
  1659.  
  1660.      There are some additional facilities available  in  the
  1661. msg  mailer for those people who are knowledgable about mail
  1662. protocols, or trying to debug/track down a problem.
  1663.  
  1664.      The 'h' command at the outermost level  of  the  mailer
  1665. will  display  the current message ignoring the current set-
  1666. ting of the 'weed' option.  This is most useful for  answer-
  1667. ing questions of the form "I wonder what this guy put in his
  1668. header?" and such.  This command does not  show  up  on  the
  1669. mini-menu  because  it  is  somewhat  esoteric,  but it DOES
  1670. appear on the '?' help screen (can you find it there?).
  1671.  
  1672.      The '@' command at the outermost level  of  the  mailer
  1673. will output a screen of debugging information, including the
  1674. number of lines and offsets of each of the  message  in  the
  1675. current mailbox.
  1676.  
  1677.      The '#' command at the outermost level  of  the  mailer
  1678. will  display  the  entire stored 'record structure' for the
  1679. current message.
  1680.  
  1681.      The '%' command at the outermost level  of  the  mailer
  1682. will display the full computed return address of the current
  1683. message.
  1684.  
  1685.      Starting up msg with the "-d" debug option will  create
  1686. a file called Msg.debug.info in your home directory and con-
  1687. tain a wealth of useful information (to me,  at  least!)  to
  1688. aid in tracking down what errors are occuring and why.  With
  1689. this option on, most  everything  acts  the  same  with  the
  1690. exception  of when you get new mail while in the mailer - it
  1691. will indicate "New mail: N bytes" rather than the usual "New
  1692. mail has arrived...hang on...".
  1693.  
  1694.  
  1695.      If there are any problems with the mailer,  please  try
  1696. to  recreate  the error with the debug option enabled before
  1697. sending defect reports my way.
  1698.  
  1699.  
  1700.      One final note: all error numbers reported by the  pro-
  1701. gram are defined in the HP-UX Reference Manual in Errno(2).
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712. Page 26
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720. Msg Users Guide                                  Version 3.2
  1721.  
  1722.  
  1723.  
  1724. 13.  Credits and so on
  1725.  
  1726.      This mailer has been evolving over the past year or  so
  1727. with some extremely valuable input from the following people
  1728. at Hewlett Packard; Mark Laubach, Walt Underwood,  Tw  Cook,
  1729. Larry  Fenske,  Rob  Sartin,  and  of course Carl Dierschow.
  1730. There have been many others, to numerous  to  mention,  that
  1731. have   inspired  me  with  questions  like  "why  can't  the
  1732. mailer..." or "why does it do that?"
  1733.  
  1734.      Also helpful was the ability to have my  'own'  machine
  1735. to close up the many many iterative loops that this software
  1736. has gone through - since being on a big  multi-user  machine
  1737. tends to slow it down to a standstill...
  1738.  
  1739.      Finally,  it's  also  been  a  very  useful  experience
  1740. overall,  confirming  my  beliefs  that  iterative  software
  1741. design and keeping a close watch on users (not to mention an
  1742. open mind and mailbox!) improves a product manyfold.
  1743.  
  1744.      Incidentally, this entire mail system,  including  this
  1745. documentation, is
  1746.  
  1747.                (C) Copyright 1986 Dave Taylor
  1748.  
  1749.  
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758.  
  1759.  
  1760.  
  1761.  
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778. Page 27
  1779.  
  1780.  
  1781.  
  1782.  
  1783.