docs/unix-phil

changeset 19:d8f428cee0d1

about mh (ch04)
author meillo@marmaro.de
date Thu, 25 Feb 2010 15:06:34 +0100
parents e2240a387a84
children 578d5c84e5c0
files unix-phil.ms
diffstat 1 files changed, 152 insertions(+), 16 deletions(-) [+]
line diff
     1.1 --- a/unix-phil.ms	Wed Feb 24 18:05:54 2010 +0100
     1.2 +++ b/unix-phil.ms	Thu Feb 25 15:06:34 2010 +0100
     1.3 @@ -654,7 +654,7 @@
     1.4  
     1.5  
     1.6  .NH 1
     1.7 -Case study: nmh
     1.8 +Case study: \s-1MH\s0
     1.9  .LP
    1.10  The last chapter introduced and explained the Unix Philosophy
    1.11  from a general point of view.
    1.12 @@ -665,25 +665,68 @@
    1.13  .PP
    1.14  This first case study is about the mail user agents \s-1MH\s0
    1.15  (``mail handler'') and its descendent \fInmh\fP (``new mail handler'').
    1.16 +In this document, the name \s-1MH\s0 will be used for both of them.
    1.17 +A distinction will only be made if differences between
    1.18 +them are described.
    1.19  
    1.20  
    1.21  .NH 2
    1.22 -History of \s-1MH\s0
    1.23 +Historical background
    1.24  .LP
    1.25 -In 1977, Stockton Gaines and Norman Shapiro of the \s-1RAND\s0 Corporation
    1.26 -came up with a concept for a new electronic mail system.
    1.27 -Till then, \s-1RAND\s0 had used \s-1MS\s0 (``mail system''),
    1.28 -which was monolithic.
    1.29 -In 1978 and 1989, Bruce Borden implemented the concept \(en
    1.30 -this was the birth of \s-1MH\s0.
    1.31 +Electronic mail was available in Unix very early.
    1.32 +It is out of matter that in the beginning mail was only
    1.33 +transferred within one machine.
    1.34 +This chapter is about a mail user agent (\s-1MUA\s0),
    1.35 +which provides functions to read, compose, and organize mail,
    1.36 +but (ideally) not to transfer.
    1.37 +.PP
    1.38 +The first \s-1MUA\s0 on Unix was \f(CWmail\fP.
    1.39 +It was a small program that either prints the own mailbox file
    1.40 +or appends text to someone elses mailbox file,
    1.41 +depending on the command line arguments.
    1.42 +.[
    1.43 +%O http://cm.bell-labs.com/cm/cs/who/dmr/pdfs/man12.pdf
    1.44 +.]
    1.45 +It was a program that did one job well.
    1.46 +This job was emailing, which then was very simple.
    1.47 +.PP
    1.48 +Later, emailing became more powerfull, and thus more complex.
    1.49 +The simple \f(CWmail\fP, which knew nothing of subjects,
    1.50 +independent handling of single messages,
    1.51 +and long-time storage of them, was not powerful enough anymore.
    1.52 +At Berkeley, Kurt Shoens wrote \fIMail\fP (with capital `M')
    1.53 +in 1978 to provide additional functions for emailing.
    1.54 +Mail was still one program, but now it was large and did
    1.55 +several jobs.
    1.56 +Its user interface is modeled after the one of ed.
    1.57 +It is designed for humans, but is still scriptable.
    1.58 +\fImailx\fP is the adaption of Berkeley Mail into System V.
    1.59 +.[
    1.60 +%A Gunnar Ritter
    1.61 +%O http://heirloom.sourceforge.net/mailx_history.html
    1.62 +.]
    1.63 +Elm, pine, mutt, and today a whole bunch of graphical \s-1MUA\s0s
    1.64 +followed Mail's direction.
    1.65 +They are large, monolithic programs which include all emailing functions.
    1.66 +.PP
    1.67 +A different way took the people of \s-1RAND\s0 Corporation.
    1.68 +In the beginning, they also had used a monolitic mail system,
    1.69 +simply called \s-1MS\s0 for ``mail system''.
    1.70 +But in 1977, Stockton Gaines and Norman Shapiro
    1.71 +came up with a proposal of a new email system concept \(en
    1.72 +one that honors the Unix Philosophy.
    1.73 +The concept was implemented by Bruce Borden in 1978 and 1979.
    1.74 +This was the birth of \s-1MH\s0 \(en the ``mail handler''.
    1.75  .PP
    1.76  Since then, \s-1RAND\s0, the University of California at Irvine and
    1.77 -at Berkeley, and several others have contributet to the software.
    1.78 +at Berkeley, and several others have contributed to the software.
    1.79  However, it's core concepts remained the same.
    1.80 -In the 90s, the development of \s-1MH\s0 slowed down.
    1.81 -Richard Coleman started with \fInmh\fP, the new mail handler,
    1.82 -in 1997 to improve \s-1MH\s0, especially in regard of modern emailing.
    1.83 -Today, nmh is developed by various people on the internet.
    1.84 +In the 90s, when development of \s-1MH\s0 slowed down,
    1.85 +Richard Coleman started with \fInmh\fP, the new mail handler.
    1.86 +This was in 1997.
    1.87 +His goal was to improve \s-1MH\s0, especially in regard of 
    1.88 +the requirements of modern email.
    1.89 +Today, nmh is developed by various people on the Internet.
    1.90  .[
    1.91  %T RAND and the Information Evolution: A History in Essays and Vignettes
    1.92  %A Willis H. Ware 
    1.93 @@ -702,15 +745,108 @@
    1.94  .]
    1.95  
    1.96  .NH 2
    1.97 -Contrasts to similar sw
    1.98 +Contrasts to similar software
    1.99  .LP
   1.100 -vs. Thunderbird, mutt, mailx, pine
   1.101 +All \s-1MUA\s0s are monolithic, except \s-1MH\s0.
   1.102 +This might not be completely true,
   1.103 +but it reflects the general situation pretty well.
   1.104 +.PP
   1.105 +While monolithic \s-1MUA\s0s gather all function in one program,
   1.106 +\s-1MH\s0 is a toolchest of many small tools \(en one for each job.
   1.107 +Following is a list of important programs of \s-1MH\s0's toolchest:
   1.108 +.IP \(bu
   1.109 +.CW inc :
   1.110 +incorporate new mail
   1.111 +.IP \(bu
   1.112 +.CW scan :
   1.113 +list messages in folder
   1.114 +.IP \(bu
   1.115 +.CW show :
   1.116 +show message
   1.117 +.IP \(bu
   1.118 +.CW next\fR/\fPprev :
   1.119 +show next/previous message
   1.120 +.IP \(bu
   1.121 +.CW folder :
   1.122 +change current folder
   1.123 +.IP \(bu
   1.124 +.CW refile :
   1.125 +refile message into folder
   1.126 +.IP \(bu
   1.127 +.CW rmm :
   1.128 +remove message
   1.129 +.IP \(bu
   1.130 +.CW comp : 
   1.131 +compose a new message
   1.132 +.IP \(bu
   1.133 +.CW repl :
   1.134 +reply to a message
   1.135 +.IP \(bu
   1.136 +.CW forw : 
   1.137 +forward a message
   1.138 +.IP \(bu
   1.139 +.CW send : 
   1.140 +send a prepared message
   1.141  .LP
   1.142 -flexibility, no redundancy, use the shell
   1.143 +\s-1MH\s0 has no special user interface like monolithic \s-1MUA\s0s have.
   1.144 +The user does not leave the shell to run \s-1MH\s0,
   1.145 +but he uses \s-1MH\s0 within the shell.
   1.146 +\s-1MH\s0's mail storage is (only little more than) a directory tree
   1.147 +where directories are mail folders and files are mail messages.
   1.148 +Working with \s-1MH\s0's toolchest is much like working
   1.149 +with Unix' toolchest:
   1.150 +\f(CWscan\fP is like \f(CWls\fP,
   1.151 +\f(CWshow\fP is like \f(CWcat\fP,
   1.152 +\f(CWfolder\fP is like \f(CWcd\fP,
   1.153 +\f(CWrefile\fP is like \f(CWmv\fP,
   1.154 +and \f(CWrmm\fP is like \f(CWrm\fP.
   1.155 +.PP
   1.156 +The most important difference to Unix' toolchest is,
   1.157 +that \s-1MH\s0's tools have an own context.
   1.158 +The context of the Unix tools is mainly the current working directory,
   1.159 +the user identification, and the environment variables.
   1.160 +\s-1MH\s0 extends this context by two more items:
   1.161 +A current mail folder, similar to the current working directory,
   1.162 +is maintained; \f(CWfolder\fP provides the functionality
   1.163 +of \f(CWpwd\fP and \f(CWcd\fP for it.
   1.164 +A current message, relative to the current folder, is maintained.
   1.165 +This enables commands like \f(CWnext\fP and \f(CWprev\fP.
   1.166 +In contrast to Unix' context, which is chained to the shell session,
   1.167 +\s-1MH\s0's context is meant to be chained to a mail account.
   1.168 +Actually, the current message is a property of the mail folder.
   1.169 +This is without problem as long as a mail folder belongs to one user.
   1.170 +But when multiple users want to work on one mail folder simultaneously,
   1.171 +it will cause problems.
   1.172 +This is a legacy from a time when emailing was different.
   1.173 +.PP
   1.174 +Using a monolithic program with a captive user interface
   1.175 +means ``entering'' the program, using it, and ``leaving'' the program.
   1.176 +Using a toolchest like \s-1MH\s0 means running programs,
   1.177 +alone or in combinition with others, even from other toolchests,
   1.178 +without leaving the shell.
   1.179  
   1.180  .NH 2
   1.181  Gains of the design
   1.182  .LP
   1.183 +\s-1MH\s0 is perfectly suited for non-interactive use.
   1.184 +It offers all functions directly and without captive user interfaces.
   1.185 +If users want a graphical user interface, anyhow,
   1.186 +they can have it with \fIxmh\fP or \fIexmh\fP.
   1.187 +These are graphical frontends for the \s-1MH\s0 toolchest.
   1.188 +This means, all email-related work is still done by \s-1MH\s0 tools,
   1.189 +but xmh issues the calls when the user clicks a button.
   1.190 +Providing easy-to-use user interfaces as frontends is a good
   1.191 +approach, because it does not limit the power of the backend itself.
   1.192 +The frontend will anyways only be able to make a part of the
   1.193 +backend's power and flexibility available.
   1.194 +If it is separate, then the missing parts can still be accessed
   1.195 +at the backend directly.
   1.196 +If it is integrated, then this will hardly be possible.
   1.197 +.PP
   1.198 +flexibility, no redundancy, use the shell
   1.199 +
   1.200 +.PP
   1.201 +easy to write: see ksh-book
   1.202  
   1.203  .NH 2
   1.204  Problems