comparison unix-phil.ms @ 19:d8f428cee0d1

about mh (ch04)
author meillo@marmaro.de
date Thu, 25 Feb 2010 15:06:34 +0100
parents e2240a387a84
children 578d5c84e5c0
comparison
equal deleted inserted replaced
18:e2240a387a84 19:d8f428cee0d1
652 .I "``Use software leverage!'' 652 .I "``Use software leverage!''
653 653
654 654
655 655
656 .NH 1 656 .NH 1
657 Case study: nmh 657 Case study: \s-1MH\s0
658 .LP 658 .LP
659 The last chapter introduced and explained the Unix Philosophy 659 The last chapter introduced and explained the Unix Philosophy
660 from a general point of view. 660 from a general point of view.
661 The driving force were the guidelines and references to 661 The driving force were the guidelines and references to
662 existing software were given only sparsely. 662 existing software were given only sparsely.
663 In this and the next chapter, concrete software will be 663 In this and the next chapter, concrete software will be
664 the driving force in the discussion. 664 the driving force in the discussion.
665 .PP 665 .PP
666 This first case study is about the mail user agents \s-1MH\s0 666 This first case study is about the mail user agents \s-1MH\s0
667 (``mail handler'') and its descendent \fInmh\fP (``new mail handler''). 667 (``mail handler'') and its descendent \fInmh\fP (``new mail handler'').
668 668 In this document, the name \s-1MH\s0 will be used for both of them.
669 669 A distinction will only be made if differences between
670 .NH 2 670 them are described.
671 History of \s-1MH\s0 671
672 .LP 672
673 In 1977, Stockton Gaines and Norman Shapiro of the \s-1RAND\s0 Corporation 673 .NH 2
674 came up with a concept for a new electronic mail system. 674 Historical background
675 Till then, \s-1RAND\s0 had used \s-1MS\s0 (``mail system''), 675 .LP
676 which was monolithic. 676 Electronic mail was available in Unix very early.
677 In 1978 and 1989, Bruce Borden implemented the concept \(en 677 It is out of matter that in the beginning mail was only
678 this was the birth of \s-1MH\s0. 678 transferred within one machine.
679 This chapter is about a mail user agent (\s-1MUA\s0),
680 which provides functions to read, compose, and organize mail,
681 but (ideally) not to transfer.
682 .PP
683 The first \s-1MUA\s0 on Unix was \f(CWmail\fP.
684 It was a small program that either prints the own mailbox file
685 or appends text to someone elses mailbox file,
686 depending on the command line arguments.
687 .[
688 %O http://cm.bell-labs.com/cm/cs/who/dmr/pdfs/man12.pdf
689 .]
690 It was a program that did one job well.
691 This job was emailing, which then was very simple.
692 .PP
693 Later, emailing became more powerfull, and thus more complex.
694 The simple \f(CWmail\fP, which knew nothing of subjects,
695 independent handling of single messages,
696 and long-time storage of them, was not powerful enough anymore.
697 At Berkeley, Kurt Shoens wrote \fIMail\fP (with capital `M')
698 in 1978 to provide additional functions for emailing.
699 Mail was still one program, but now it was large and did
700 several jobs.
701 Its user interface is modeled after the one of ed.
702 It is designed for humans, but is still scriptable.
703 \fImailx\fP is the adaption of Berkeley Mail into System V.
704 .[
705 %A Gunnar Ritter
706 %O http://heirloom.sourceforge.net/mailx_history.html
707 .]
708 Elm, pine, mutt, and today a whole bunch of graphical \s-1MUA\s0s
709 followed Mail's direction.
710 They are large, monolithic programs which include all emailing functions.
711 .PP
712 A different way took the people of \s-1RAND\s0 Corporation.
713 In the beginning, they also had used a monolitic mail system,
714 simply called \s-1MS\s0 for ``mail system''.
715 But in 1977, Stockton Gaines and Norman Shapiro
716 came up with a proposal of a new email system concept \(en
717 one that honors the Unix Philosophy.
718 The concept was implemented by Bruce Borden in 1978 and 1979.
719 This was the birth of \s-1MH\s0 \(en the ``mail handler''.
679 .PP 720 .PP
680 Since then, \s-1RAND\s0, the University of California at Irvine and 721 Since then, \s-1RAND\s0, the University of California at Irvine and
681 at Berkeley, and several others have contributet to the software. 722 at Berkeley, and several others have contributed to the software.
682 However, it's core concepts remained the same. 723 However, it's core concepts remained the same.
683 In the 90s, the development of \s-1MH\s0 slowed down. 724 In the 90s, when development of \s-1MH\s0 slowed down,
684 Richard Coleman started with \fInmh\fP, the new mail handler, 725 Richard Coleman started with \fInmh\fP, the new mail handler.
685 in 1997 to improve \s-1MH\s0, especially in regard of modern emailing. 726 This was in 1997.
686 Today, nmh is developed by various people on the internet. 727 His goal was to improve \s-1MH\s0, especially in regard of
728 the requirements of modern email.
729 Today, nmh is developed by various people on the Internet.
687 .[ 730 .[
688 %T RAND and the Information Evolution: A History in Essays and Vignettes 731 %T RAND and the Information Evolution: A History in Essays and Vignettes
689 %A Willis H. Ware 732 %A Willis H. Ware
690 %D 2008 733 %D 2008
691 %I The RAND Corporation 734 %I The RAND Corporation
700 %P Appendix B 743 %P Appendix B
701 %O Also available online: \f(CW\s-2http://rand-mh.sourceforge.net/book/\fP 744 %O Also available online: \f(CW\s-2http://rand-mh.sourceforge.net/book/\fP
702 .] 745 .]
703 746
704 .NH 2 747 .NH 2
705 Contrasts to similar sw 748 Contrasts to similar software
706 .LP 749 .LP
707 vs. Thunderbird, mutt, mailx, pine 750 All \s-1MUA\s0s are monolithic, except \s-1MH\s0.
708 .LP 751 This might not be completely true,
752 but it reflects the general situation pretty well.
753 .PP
754 While monolithic \s-1MUA\s0s gather all function in one program,
755 \s-1MH\s0 is a toolchest of many small tools \(en one for each job.
756 Following is a list of important programs of \s-1MH\s0's toolchest:
757 .IP \(bu
758 .CW inc :
759 incorporate new mail
760 .IP \(bu
761 .CW scan :
762 list messages in folder
763 .IP \(bu
764 .CW show :
765 show message
766 .IP \(bu
767 .CW next\fR/\fPprev :
768 show next/previous message
769 .IP \(bu
770 .CW folder :
771 change current folder
772 .IP \(bu
773 .CW refile :
774 refile message into folder
775 .IP \(bu
776 .CW rmm :
777 remove message
778 .IP \(bu
779 .CW comp :
780 compose a new message
781 .IP \(bu
782 .CW repl :
783 reply to a message
784 .IP \(bu
785 .CW forw :
786 forward a message
787 .IP \(bu
788 .CW send :
789 send a prepared message
790 .LP
791 \s-1MH\s0 has no special user interface like monolithic \s-1MUA\s0s have.
792 The user does not leave the shell to run \s-1MH\s0,
793 but he uses \s-1MH\s0 within the shell.
794 \s-1MH\s0's mail storage is (only little more than) a directory tree
795 where directories are mail folders and files are mail messages.
796 Working with \s-1MH\s0's toolchest is much like working
797 with Unix' toolchest:
798 \f(CWscan\fP is like \f(CWls\fP,
799 \f(CWshow\fP is like \f(CWcat\fP,
800 \f(CWfolder\fP is like \f(CWcd\fP,
801 \f(CWrefile\fP is like \f(CWmv\fP,
802 and \f(CWrmm\fP is like \f(CWrm\fP.
803 .PP
804 The most important difference to Unix' toolchest is,
805 that \s-1MH\s0's tools have an own context.
806 The context of the Unix tools is mainly the current working directory,
807 the user identification, and the environment variables.
808 \s-1MH\s0 extends this context by two more items:
809 A current mail folder, similar to the current working directory,
810 is maintained; \f(CWfolder\fP provides the functionality
811 of \f(CWpwd\fP and \f(CWcd\fP for it.
812 A current message, relative to the current folder, is maintained.
813 This enables commands like \f(CWnext\fP and \f(CWprev\fP.
814 In contrast to Unix' context, which is chained to the shell session,
815 \s-1MH\s0's context is meant to be chained to a mail account.
816 Actually, the current message is a property of the mail folder.
817 This is without problem as long as a mail folder belongs to one user.
818 But when multiple users want to work on one mail folder simultaneously,
819 it will cause problems.
820 This is a legacy from a time when emailing was different.
821 .PP
822 Using a monolithic program with a captive user interface
823 means ``entering'' the program, using it, and ``leaving'' the program.
824 Using a toolchest like \s-1MH\s0 means running programs,
825 alone or in combinition with others, even from other toolchests,
826 without leaving the shell.
827
828 .NH 2
829 Gains of the design
830 .LP
831 \s-1MH\s0 is perfectly suited for non-interactive use.
832 It offers all functions directly and without captive user interfaces.
833 If users want a graphical user interface, anyhow,
834 they can have it with \fIxmh\fP or \fIexmh\fP.
835 These are graphical frontends for the \s-1MH\s0 toolchest.
836 This means, all email-related work is still done by \s-1MH\s0 tools,
837 but xmh issues the calls when the user clicks a button.
838 Providing easy-to-use user interfaces as frontends is a good
839 approach, because it does not limit the power of the backend itself.
840 The frontend will anyways only be able to make a part of the
841 backend's power and flexibility available.
842 If it is separate, then the missing parts can still be accessed
843 at the backend directly.
844 If it is integrated, then this will hardly be possible.
845 .PP
709 flexibility, no redundancy, use the shell 846 flexibility, no redundancy, use the shell
710 847
711 .NH 2 848 .PP
712 Gains of the design 849 easy to write: see ksh-book
713 .LP
714 850
715 .NH 2 851 .NH 2
716 Problems 852 Problems
717 .LP 853 .LP
718 854