home *** CD-ROM | disk | FTP | other *** search
/ The AGA Experience 2 / agavol2.iso / software / utilities / comms / metamail-2.3a / man / metamail.1 < prev    next >
Text File  |  1992-06-14  |  29KB  |  716 lines

  1.  
  2.  
  3.  
  4. METAMAIL(1)              USER COMMANDS                METAMAIL(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      metamail - infrastructure for mailcap-based multimedia  mail
  10.      handling
  11.  
  12. SYNOPSIS
  13.      metamail[-b] [-B] [-c contenttype ...] [-d] [-e] [-f   from-
  14.      name]   [-m mailer-name] [-p] [-P] [-r] [-s subject] [-q] [-
  15.      x] [-y] [-z] [file-name]
  16.  
  17. DESCRIPTION
  18.      The _m_e_t_a_m_a_i_l program reads a "mailcap" file to determine how
  19.      to  display  non-text at the local site.  Every mail-reading
  20.      interface needs to call metamail whenever non-text  mail  is
  21.      being  viewed,  unless the mail is of a type that is already
  22.      understood by the mail-reading  program.  _M_e_t_a_m_a_i_l  consults
  23.      the mailcap file(s) to determine what program to use to show
  24.      the message to the user.
  25.  
  26.      At a site where all mail reading interfaces have been  modi-
  27.      fied to call _m_e_t_a_m_a_i_l for non-text mail, extending the local
  28.      email system to handle a new media type in the mail  becomes
  29.      a  simple  matter  of  adding  a  line  to  a  mailcap file.
  30.      (Although this manual page will discuss only mail,  metamail
  31.      is  equally  useful in adding multimedia support to news and
  32.      bulletin board reading  programs,  assuming  those  programs
  33.      preserve  the "Content-type" header or some other indication
  34.      of the content type of the messages.)
  35.  
  36.      In  general,  users  will  never  run   metamail   directly.
  37.      Instead, metamail will be invoked for the user automatically
  38.      by the user's mail reading program, whenever a non-text mes-
  39.      sage  is  to  be  viewed.   This  manual page, therefore, is
  40.      directed not at end users, but at two categories of readers:
  41.      those  who are adding metamail support to a particular mail-
  42.      reading program, and those who are adding lines to a mailcap
  43.      file.  The former need only to be concerned with the command
  44.      line syntax of metamail.  The latter may ignore the  command
  45.      line  syntax,  and  need  only be concerned with the mailcap
  46.      file syntax, as described in a later section.
  47.  
  48.      Note:  Metamail determines the type of a message  using  the
  49.      "Content-type"  header, as defined in RFC 1049 and RFC-MIME.
  50.      However, using the -b and -c options, metamail can  be  made
  51.      to  work with mail that is not in Internet format, including
  52.      X.400  messages.   Note  also  that  metamail  automatically
  53.      decodes  mail  that  has been encoded for 7 bit transport if
  54.      the mail  includes  a  Content-Transfer-Encoding  header  as
  55.      specified by RFC-MIME.
  56.  
  57.  
  58.  
  59.  
  60.  
  61. Bellcore Prototype   Last change: Release 2                     1
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. METAMAIL(1)              USER COMMANDS                METAMAIL(1)
  69.  
  70.  
  71.  
  72. OPTIONS
  73.      When called with no options or arguments,  metamail  expects
  74.      to  receive an RFC 822 format message on its standard input.
  75.      The following options can alter that expectation:
  76.  
  77.      -b      This option tells metamail that the message  is  not
  78.              in  RFC  822 format, but instead is only the body of
  79.              the message (i.e. there  are  no  message  headers).
  80.              The use of -b requires the use of -c.
  81.  
  82.      -B      This option tells metamail that the message is to be
  83.              displayed   in   the   background,  if  it  is  non-
  84.              interactive (i.e. it doesn't have  the  "needstermi-
  85.              nal" attribute in the mailcap file).
  86.  
  87.      -c <contenttype>
  88.              This option tells metamail to use the specified con-
  89.              tent  type  rather  than  the one in the headers, if
  90.              any.
  91.  
  92.      -d      This option tells metamail not to ask any  questions
  93.              before  running  an interpreter to view the message.
  94.              (By default, metamail  always  asks  before  running
  95.              almost  any  interpreter,  if  it  is  running in an
  96.              interactive terminal and  the  MM_NOASK  environment
  97.              variable is not set.  However, it does not ask about
  98.              the content-type "text"  --  that  is,  the  default
  99.              value for MM_NOASK is "text,text/us-ascii")
  100.  
  101.      -e      This option tells metamail to "eat" leading newlines
  102.              in  message bodies.  This is particularly useful for
  103.              MH-format mail.
  104.  
  105.      -f <address>
  106.              This option specifies the name of the sender of  the
  107.              message.   Otherwise,  this  is  determined from the
  108.              header,  if  possible.   This  information  will  be
  109.              placed  in  the  environment to make it available to
  110.              any interpreters called by metamail.
  111.  
  112.      -m <mailername>
  113.              This option specifies the name of the  mail  program
  114.              that  called  metamail.   This  information  will be
  115.              placed in the environment to make  it  available  to
  116.              any interpreters called by metamail.
  117.  
  118.      -p      This option specifies  that,  if  necessary,  output
  119.              should  be shown to the user one page at a time.  By
  120.              default, this will cause such  output  to  be  piped
  121.              through  the  "more"  command,  but  the environment
  122.              variable METAMAIL_PAGER can be used  to  specify  an
  123.              alternative  command  to  use.  Note that one should
  124.  
  125.  
  126.  
  127. Bellcore Prototype   Last change: Release 2                     2
  128.  
  129.  
  130.  
  131.  
  132. METAMAIL(1)              USER COMMANDS                METAMAIL(1)
  133.  
  134.  
  135.  
  136.              use -p rather than piping  the  output  of  metamail
  137.              through a pager, because some interpreters called by
  138.              metamail might be interactive rather than  requiring
  139.              pagination.  Metamail can tell whether or not to use
  140.              a pager from information in the mailcap file.
  141.  
  142.      -P      This option is just like -p,  except  that  it  also
  143.              causes metamail to print "Press RETURN to go on" and
  144.              await a RETURN after it has finished with  the  mes-
  145.              sage.   This  is intended for use only when metamail
  146.              calls itself recursively in a  new  terminal  window
  147.              created only for that purpose.
  148.  
  149.      -q      This option tells metamail to be quiet.  By default,
  150.              metamail prints a few key message headers (controll-
  151.              able with the KEYHEADS environment) and  some  other
  152.              informative  information,  on  stdout before running
  153.              the interpreter, but  this  behavior  is  suppressed
  154.              with -q.
  155.  
  156.      -r      This option specifies that it is OK to run as  root.
  157.              By  default,  metamail refuses to run if the real or
  158.              effective user id is root.
  159.  
  160.      -R      This option specifies that the /usr/ucb/reset should
  161.              be  executed to reset the terminal state, before any
  162.              other I/O activity.
  163.  
  164.      -s <subject>
  165.              This option specifies the subject of the  mail  mes-
  166.              sage.  By default, this information is obtained from
  167.              the headers.  This information will be placed in the
  168.              environment to make it available to any interpreters
  169.              called by metamail.
  170.  
  171.      -x      This option tells metamail that it is definitely not
  172.              running on a terminal, no matter what isatty() says.
  173.              This is necessary when metamail is actually  running
  174.              on  a  pseudoterminal and isatty(3) returns TRUE but
  175.              there's really no terminal on which to interact with
  176.              the  user.   The  same  effect  as  -x  can  also be
  177.              obtained with the environment variable MM_NOTTTY.
  178.  
  179.      -y      This option tells metamail to try to "yank" a  MIME-
  180.              format  message from the body of the message.  It is
  181.              useful when a MIME-format has  been  rejected  by  a
  182.              mail delivery system that does not now how to format
  183.              the rejection in a MIME-compliant manner.  (For  the
  184.              convenience  of those who can't control how metamail
  185.              is called from their mail reader, this can  also  be
  186.              set with the MM_YANKMODE variable.)  If you use yank
  187.              mode on messages that really ARE in MIME format,  or
  188.  
  189.  
  190.  
  191. Bellcore Prototype   Last change: Release 2                     3
  192.  
  193.  
  194.  
  195.  
  196. METAMAIL(1)              USER COMMANDS                METAMAIL(1)
  197.  
  198.  
  199.  
  200.              on  messages  that  do not contain a MIME message in
  201.              the body, the effects could  be  VERY  strange.   It
  202.              won't hurt you, but you won't see anything very use-
  203.              ful, either.
  204.  
  205.      -z      This option tells metamail to delete its input  file
  206.              when  finished.   The -z option requires that a file
  207.              name was given as an argument to metamail, i.e. that
  208.              it is not reading stdin.
  209.  
  210.      -T      This option is  intended  to  be  used  by  metamail
  211.              recursively,   to   turn   off  the  effect  of  the
  212.              MM_TRANSPARENT environment variable.  It should only
  213.              be used when the metamail program restarts itself in
  214.              a terminal emulator window.
  215.  
  216.      File Name Arguments
  217.              Any argument that does not start with "-" is  inter-
  218.              preted  as  the  name  of  a file to read instead of
  219.              standard input.
  220.  
  221. UNRECOGNIZED MAIL TYPES
  222.      From time to time, metamail may tell you something like
  223.  
  224.      **** Unrecognized mail type: 'smell-o-vision'.   Writing  to
  225.      file /tmp/metamail.1234 ****
  226.  
  227.      What this means is that your are trying to  read  a  message
  228.      that  contains  data  that  is  marked as being in "smell-o-
  229.      vision" format, but that your site has  not  yet  configured
  230.      metamail to properly display that type of data.  In the gen-
  231.      eral case, such  configuration  is  accomplished  using  the
  232.      mailcap file mechanism, as described in the next section.
  233.  
  234.      For unrecognized types, metamail simply removes  all  header
  235.      and encoding information from the data, and writes it out to
  236.      a temporary file.  (If running interactively, it  will  give
  237.      you  more  alternatives  --  writing it to a temporary file,
  238.      viewing it as text, or jus skipping it.)  It is  up  to  the
  239.      user  to  delete  such  files when he or she is through with
  240.      them.
  241.  
  242.  
  243. THE MAILCAP FILE(S)
  244.      The primary purpose of the  metamail  program  is  to  allow
  245.      diverse  mail reading programs to centralize their access to
  246.      multimedia information.  If all the  mail  reading  programs
  247.      call  a  single  program  to handle non-text mail, then only
  248.      that program needs to know about the diverse types  of  non-
  249.      text mail that might be received.
  250.  
  251.      The metamail program is made  more  flexible  in  this  role
  252.  
  253.  
  254.  
  255. Bellcore Prototype   Last change: Release 2                     4
  256.  
  257.  
  258.  
  259.  
  260. METAMAIL(1)              USER COMMANDS                METAMAIL(1)
  261.  
  262.  
  263.  
  264.      through  the  mechanism of one or more "mailcap" files.  The
  265.      purpose of the mailcap files is to tell metamail  what  pro-
  266.      gram  to  run in order to show the user mail in a given for-
  267.      mat.  Thus it becomes possible to add a new  media  type  to
  268.      all  of the mail reading programs at a site simply by adding
  269.      a line to a mailcap file.
  270.  
  271.      Metamail uses a search path to find the mailcap  file(s)  to
  272.      consult.   Unlike  many path searches, if necessary metamail
  273.      will read _a_l_l the mailcap files on its path.   That  is,  it
  274.      will  keep  reading mailcap files until it runs out of them,
  275.      or until it finds a line that tells it  how  to  handle  the
  276.      piece  of  mail  it  is  looking at.  If it finds a matching
  277.      line, it will execute the command that is specified  in  the
  278.      mailcap file.
  279.  
  280.      The default search path is equivalent to
  281.  
  282.      $HOME/.mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap
  283.  
  284.      It  can  be  overridden  by setting the MAILCAPS environment
  285.      variable.   Note:  Metamail  does  not  actually   interpret
  286.      environment  variables  such  as  $HOME or the "~" syntax in
  287.      this path search.
  288.  
  289.      The syntax of a mailcap file is quite simple, at least  com-
  290.      pared  to termcap files.  Any line that starts with "#" is a
  291.      comment.  Blank lines are  ignored.   Otherwise,  each  line
  292.      defines  a  single  mailcap entry for a single content type.
  293.      Long lines may be continued by ending them with a  backslash
  294.      character, \.
  295.  
  296.      Each individual mailcap entry  consists  of  a  content-type
  297.      specification, a command to execute, and (possibly) a set of
  298.      optional "flag" values.  For example, a very simple  mailcap
  299.      entry  (which  is  actually  a built-in default behavior for
  300.      metamail) would look like this:
  301.  
  302.      text/plain; cat %s
  303.  
  304.      The optional flags can be used to specify additional  infor-
  305.      mation about the mail-handling command.  For example:
  306.  
  307.      text/plain; cat %s; copiousoutput
  308.  
  309.      can be used to indicate that the output of the 'cat' command
  310.      may  be  voluminous,  requiring either a scrolling window, a
  311.      pager, or some other appropriate coping mechanism.
  312.  
  313.      The "type" field (text/plain, in the above example) is  sim-
  314.      ply  any legal content type name, as defined by RFC 822.  In
  315.      practice, this is almost any string.  It is the string  that
  316.  
  317.  
  318.  
  319. Bellcore Prototype   Last change: Release 2                     5
  320.  
  321.  
  322.  
  323.  
  324. METAMAIL(1)              USER COMMANDS                METAMAIL(1)
  325.  
  326.  
  327.  
  328.      will  be  matched  against the "Content-type" header (or the
  329.      value passed in with -c) to decide if this  is  the  mailcap
  330.      entry  that  matches the current message.  Additionally, the
  331.      type field may specify a subtype (e.g. "text/ISO-8859-1") or
  332.      a wildcard to match all subtypes (e.g. "image/*").
  333.  
  334.      The "command" field is any UNIX command  ("cat  %s"  in  the
  335.      above  example),  and is used to specify the interpreter for
  336.      the given type of message.  It will be passed to  the  shell
  337.      via  the  system(3)  facility.   Semicolons  and backslashes
  338.      within the command must be quoted with backslashes.  If  the
  339.      command contains "%s", those two characters will be replaced
  340.      by the name of a file that contains the body of the message.
  341.      If  it  contains "%t', those two characters will be replaced
  342.      by the content-type field, including the  subtype,  if  any.
  343.      (That    is,    if    the   content-type   was   "image/pbm;
  344.      opt1=something-else",  then  "%t"  would  be   replaced   by
  345.      "image/pbm".)   If the command field contains  "%{" followed
  346.      by a parameter name and a closing "}", then all those  char-
  347.      acters will be replaced by the value of the named parameter,
  348.      if any, from the Content-type header.   Thus, in the  previ-
  349.      ous example, "%{opt1}" will be replaced by "something-else".
  350.      Finally, if the command contains "",  those  two  characters
  351.      will  be  replaced  by  a single % character.  (In fact, the
  352.      backslash can be used  to  quote  any  character,  including
  353.      itself.)
  354.  
  355.      If no "%s" appears in the command  field,  then  instead  of
  356.      placing  the message body in a temporary file, metamail will
  357.      pass the body to the command on the standard input.  This is
  358.      helpful  in  saving  /tmp file space, but can be problematic
  359.      for window-oriented applications under some  window  systems
  360.      such as MGR.
  361.  
  362.      The "notes=xxx" field is an  uninterpreted  string  that  is
  363.      used  to  specify  the name of the person who installed this
  364.      entry in the mailcap file.  (The "xxx" may  be  replaced  by
  365.      any text string.)
  366.  
  367.      The "test=xxx" field is a command that is executed to deter-
  368.      mine whether or not the mailcap line actually applies.  That
  369.      is, if the content-type field matches  the  content-type  on
  370.      the  message,  but a "test=" field is present, then the test
  371.      must succeed  before  the  mailcap  line  is  considered  to
  372.      "match"  the  message  being viewed.  The command may be any
  373.      UNIX command, using the same syntax and the  same  %-escapes
  374.      as  for  the viewing command, as described above.  A command
  375.      is considered to succeed  if  it  exits  with  a  zero  exit
  376.      status, and to fail otherwise.
  377.  
  378.  
  379.      needsterminal
  380.  
  381.  
  382.  
  383. Bellcore Prototype   Last change: Release 2                     6
  384.  
  385.  
  386.  
  387.  
  388. METAMAIL(1)              USER COMMANDS                METAMAIL(1)
  389.  
  390.  
  391.  
  392.              If this flag is given, the named  interpreter  needs
  393.              to  interact  with  the user on a terminal.  In some
  394.              environments (e.g.  a  window-oriented  mail  reader
  395.              under  X11)  this will require the creation of a new
  396.              terminal emulation window, while  in  most  environ-
  397.              ments  it  will not.  If the mailcap entry specifies
  398.              "needsterminal" and metamail is  not  running  on  a
  399.              terminal (as determined by isatty(3), the -x option,
  400.              and  the  MM_NOTTTY   environment   variable)   then
  401.              metamail will try to run the command in a new termi-
  402.              nal emulation window.  Currently, metamail knows how
  403.              to  create  new windows under the X11, SunTools, and
  404.              WM window systems.
  405.  
  406.      copiousoutput
  407.              This flag should be given whenever  the  interpreter
  408.              is  capable  of  producing  more than a few lines of
  409.              output on stdout, and does no interaction  with  the
  410.              user.  If the mailcap entry specifies copiousoutput,
  411.              and pagination has been requested via the "-p"  com-
  412.              mand,  then the output of the command being executed
  413.              will be piped through a pagination  program  ("more"
  414.              by  default,  but  this  can  be overridden with the
  415.              METAMAIL_PAGER environment variable).
  416.  
  417. BUILT-IN CONTENT-TYPE SUPPORT
  418.      The metamail program has built-in  support  for  a  few  key
  419.      content-types.   In  particular,  it supports the text type,
  420.      the  multipart  and  multipart/alternative  type,  and   the
  421.      message/rfc822  types.   This support is incomplete for many
  422.      subtypes -- for example, it only supports US-ASCII  text  in
  423.      general.  This kind of built-in support can be OVERRIDDEN by
  424.      an entry in any mailcap file  on  the  user's  search  path.
  425.      Metamail  also  has  rudimentary  built-in support for types
  426.      that are totally unrecognized -- i.e. for which  no  mailcap
  427.      entry  or  built-in  handler  exists.  For such unrecognized
  428.      types, metamail will write a file with a "clean" copy of the
  429.      data  --  i.e.  a  copy  in which all mail headers have been
  430.      removed, and in which any 7-bit transport encoding has  been
  431.      decoded.
  432.  
  433. NON-ASCII HEADER FIELDS
  434.      Metamail has rudimentary built-in support for  the  emerging
  435.      Internet standards for non-ASCII data in mail headers.  What
  436.      this means is that such data will  be  recognized,  decoded,
  437.      and sent to the terminal.  This behavior may be more or less
  438.      reasonable, depending on the character  set  in  the  header
  439.      data  and the capability of the user's terminal, but it will
  440.      rarely be any worse than showing such data  in  its  encoded
  441.      form.
  442.  
  443.  
  444.  
  445. Bellcore Prototype   Last change: Release 2                     7
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452. METAMAIL(1)              USER COMMANDS                METAMAIL(1)
  453.  
  454.  
  455.  
  456. ENVIRONMENT
  457.      MM_NOASK
  458.              If MM_NOASK is set to "1", metamail will  never  ask
  459.              the  user  for confirmation before running an inter-
  460.              preter.  Otherwise, MM_NOASK may be set to a  comma-
  461.              separated  list  of type names (without white space)
  462.              for which the user  does  not  desire  confirmation.
  463.              Thus,  setting  MM_NOASK  to  "magicmail,audio" will
  464.              cause the user not to be asked before running inter-
  465.              preters for magicmail- or audio-format mail, but the
  466.              user will still be asked for all other  types.   (If
  467.              the -d command line option is given, MM_NOASK is set
  468.              to 1 for spawned  processes,  allowing  -d  to  work
  469.              recursively.)
  470.  
  471.      KEYHEADS
  472.              The  KEYHEADS  variable  may  be  set  to  a  colon-
  473.              separated  list  of header names, which are the only
  474.              headers that metamail will print out.   By  default,
  475.              the behavior is as if KEYHEADS were set to:
  476.  
  477.              Date:From:Subject:To:CC:Content-Description
  478.  
  479.              If KEYHEADS is set to the empty  string,  no  header
  480.              are printed out.  If it is set to an asterisk ("*"),
  481.              all headers are printed out.
  482.  
  483.      MM_NOTTTY
  484.              If MM_NOTTTY is set to any nonzero  value,  metamail
  485.              will  assume  that  it  is not running in a terminal
  486.              window.  MM_NOTTTY implies setting  MM_NOASK  to  1.
  487.              If  -z  is  given,  MM_NOTTTY  is  set  for  spawned
  488.              processes, allowing -z to work recursively.
  489.  
  490.      MAILCAPS
  491.              This variable can be used to  override  the  default
  492.              path search for mailcap files.
  493.  
  494.      METAMAIL_PAGER
  495.              If set, this variable overrides "more" as  the  name
  496.              of  the  program  to  run to paginate output from an
  497.              interpreter, when  pagination  has  been  requested.
  498.              Note  that  the  normal "PAGER" variable is not used
  499.              because  many  pagers  (notably  the  "less"  pager)
  500.              interfere  with  the  workings of termcap-based mail
  501.              viewers.
  502.  
  503.      NOMETAMAIL
  504.              This variable is not actually used by metamail,  but
  505.              is  used  by  most  metamail-compatible mail reading
  506.              interfaces.  If NOMETAMAIL is set to any value, most
  507.              mail reading interfaces will never call the metamail
  508.  
  509.  
  510.  
  511. Bellcore Prototype   Last change: Release 2                     8
  512.  
  513.  
  514.  
  515.  
  516. METAMAIL(1)              USER COMMANDS                METAMAIL(1)
  517.  
  518.  
  519.  
  520.              program, effectively inhibiting all multimedia func-
  521.              tionality.
  522.  
  523.      MM_DEBUG
  524.              If MM_DEBUG is set to any value, metamail will  pro-
  525.              duce slightly more verbose output to tell what it is
  526.              doing.
  527.  
  528.      MM_QUIET
  529.              If this variable is set to "1", metamail  will  pro-
  530.              duce even less output than usual.  In particular, it
  531.              will  suppress  the   "Executing..."   line   unless
  532.              MM_DEBUG is set.
  533.  
  534.              Otherwise, this variable can  be  set  to  a  comma-
  535.              separated  list  of short commands, and the "Execut-
  536.              ing..." line will be suppressed for  those  commands
  537.              only.
  538.  
  539.              The default setting for  MM_QUIET  is  "cat",  which
  540.              means  that  the  "Executing..." line is printed for
  541.              all commands executed except "cat".  This makes text
  542.              support  look  more  natural  without sacrificing an
  543.              understanding of what is going on  in  more  complex
  544.              circumstances.
  545.  
  546.      MM_YANKMODE
  547.              Setting this variable to a non-zero  value  has  the
  548.              same   effect as the -y switch.  Be sure to read the
  549.              caveats attached to the description of -y before you
  550.              use  it.  Basically,  the  only  time  you would set
  551.              MM_YANKMODE is in order to re-enter a mail reader in
  552.              which  you can't control the way metamail is called,
  553.              just to read a single rejected MIME message that was
  554.              rejected  by  a  mail agent that does not understand
  555.              MIME.  In such cases, you should read that  message,
  556.              exit, and unset this variable.
  557.  
  558.      MM_TRANSPARENT
  559.              If this variable is set, metamail will reproduce the
  560.              entire raw message on stdout, and will open up a new
  561.              terminal emulator window in which  to  do  something
  562.              more  intelligent.   This  option  supports  certain
  563.              brain-dead mail  readers,  such  as  mailtool,  that
  564.              actually  depend  on  the  output of the UNIX "Mail"
  565.              program being the same as the  raw  message  in  the
  566.              database.
  567.  
  568.      MM_CHARSET
  569.              If this variable is set, it will suppress the print-
  570.              ing  of character set declarations when mail headers
  571.              being printed contain text in  this  character  set.
  572.  
  573.  
  574.  
  575. Bellcore Prototype   Last change: Release 2                     9
  576.  
  577.  
  578.  
  579.  
  580. METAMAIL(1)              USER COMMANDS                METAMAIL(1)
  581.  
  582.  
  583.  
  584.              For  example, if you set MM_CHARSET to "iso-8859-8",
  585.              it will suppress warnings when header output is pro-
  586.              duced in that character set.
  587.  
  588.      DISPLAY Used to create a terminal window under the X11  win-
  589.              dow system.
  590.  
  591.      WINDOW_PARENT
  592.              Used to create a terminal window under the  SunTools
  593.              window system.
  594.  
  595.      WMHOST  Used to create  a  terminal  window  under  the  old
  596.              Andrew WM window system.
  597.  
  598. INTERPRETER ENVIRONMENT
  599.      When metamail calls an interpreter specified  in  a  mailcap
  600.      file,  it  sets  several  environment variables which can be
  601.      used by the interpreter if desired:
  602.  
  603.      MM_HEADERS
  604.              This variable is set  to  the  full  set  of  RFC822
  605.              headers, if any.
  606.  
  607.      MM_MAILER
  608.              This variable is set to the name of the mailer  that
  609.              called metamail, if the -m option was used.
  610.  
  611.      MM_CONTENTTYPE
  612.              This variable is set to the content type,  as  named
  613.              by  the  Content-type header or passed in via the -c
  614.              option.  If  the  content-type  has  a  subtype  and
  615.              parameters,    these    are    also    included   in
  616.              MM_CONTENTTYPE,        e.g.        "multipart/mixed;
  617.              boundary=foobar".
  618.  
  619.      MM_SUMMARY
  620.              This variable is set to an efficient one-line  "cap-
  621.              tion" of the message, typically including its sender
  622.              and subject.
  623.  
  624.      MM_USEPAGER
  625.              This variable is set to a non-zero if the use  of  a
  626.              pager  has  been requested for long output (e.g. the
  627.              -p switch was given.)  If -p is  given,  MM_USEPAGER
  628.              is  set  for  spawned processes, allowing -p to work
  629.              recursively.
  630.  
  631.      TERMINAL_CMD
  632.              This variable may be set to a string that is used to
  633.              start  a new terminal window if necessary.  The com-
  634.              mand to be executed in that window will be  APPENDED
  635.              to  this  command.   By  default,  this  is  set  to
  636.  
  637.  
  638.  
  639. Bellcore Prototype   Last change: Release 2                    10
  640.  
  641.  
  642.  
  643.  
  644. METAMAIL(1)              USER COMMANDS                METAMAIL(1)
  645.  
  646.  
  647.  
  648.              something  like "xterm -e" if  DISPLAY  is  set,  or
  649.              "shelltool" if WINDOW_PARENT is set.  Users of Sun's
  650.              OpenWindows  may  wish  to   set   TERMINAL_CMD   to
  651.              "shelltool" if they prefer shelltool over xterm.
  652.  
  653. FILES
  654.      $HOME/.mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap
  655.      -- default path for mailcap files.
  656.  
  657. SEE ALSO
  658.      audiocompose(1),  audiosend(1),  ezview(1),  getfilename(1),
  659.      mailto-hebrew(1),   mailto(1),   metasend(1),   mmencode(1),
  660.      richtext(1), showaudio(1), showexternal(1), shownonascii(1),
  661.      showpartial(1), showpicture(1)
  662.  
  663. BUGS
  664.      In a multipart/alternative body or body parts, some  headers
  665.      in  the  embedded  part  that should be displayed may not be
  666.      displayed.  This will rarely  be  a  problem.   Also,  in  a
  667.      multipart/alternative, anything of type "multipart" or "mes-
  668.      sage" is considered to be a recognized part,  regardless  of
  669.      the  recognizability  of its contents.  Thi might be a prob-
  670.      lem, only further experience will tell.
  671.  
  672. COPYRIGHT
  673.      Copyright  (c)  1991  Bell  Communications  Research,   Inc.
  674.      (Bellcore)
  675.  
  676.      Permission  to  use,  copy,  modify,  and  distribute   this
  677.      material  for any purpose and without fee is hereby granted,
  678.      provided that the above copyright notice and this permission
  679.      notice  appear  in all copies, and that the name of Bellcore
  680.      not be used in advertising or publicity pertaining  to  this
  681.      material  without  the specific, prior written permission of
  682.      an authorized representative of Bellcore.  BELLCORE MAKES NO
  683.      REPRESENTATIONS  ABOUT  THE  ACCURACY OR SUITABILITY OF THIS
  684.      MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS  IS",  WITHOUT
  685.      ANY EXPRESS OR IMPLIED WARRANTIES.
  686.  
  687. AUTHOR
  688.      Nathaniel S. Borenstein
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701. Bellcore Prototype   Last change: Release 2                    11
  702.  
  703.  
  704.  
  705.