

			     Columbia MM
		     A Mail Manager Program in C


			      Chris Maio
      Computer Research Facilities, Computer Science Department

			      Fuat Baran
			      Howie Kaye
			     Melissa Metz
		   Center for Computing Activities

			  Columbia University




ABSTRACT
--------

Columbia MM is a mail manager program based on the TOPS-20 MM program
running on Digital Equipment Corporation DEC20 systems.  Columbia MM
is written in C using the CCMD (TOPS-20 COMND Jsys in C) package
developed at Columbia University.

MM currently runs under various flavors of UNIX.  Ports to various
other microcomputer and mainframe operating systems are planned.


INTRODUCTION
------------

Columbia University used to have a number of DECSYSTEM-2060's on
campus.  (The Columbia University Center for Computing Activities
(CUCCA) had four, the Computer Science Department had one, and
Teachers College had one.)  Our user community, especially the less
technically experienced, grew accustomed to the friendly user
interface provided by programs written for TOPS-20.  The two most
widely used programs were the Exec (equivalent of the shell in UNIX),
and MM, the mail program, both written using the TOPS-20 COMND Jsys
(monitor call).  The users loved the ability to see what input was
expected next (the help provided when you type a '?' anywhere in a
parse), and command completion (completion of unique input when an ESC
was typed).  Unfortunately, the good days did not last.  DEC (Digital
Equipment Corporation) discontinued the DEC20 line and, due to rising
maintenance costs, it was decided that all of our DEC20's would be
phased out and replaced by other systems.

Various people were consulted, surveys were conducted, and plans were
made.  When asked what a minimally acceptable system should have,
a large number of users said that an MM equivalent would be highest on
their list of priorities.  (Some others were Emacs, Scribe, etc.)
People that knew about the usual mail facility supplied with Unix
stated that they did not like it at all.

CUCCA and the CS Deptartment ultimately decided to go with various
UNIX machines to replace the aging DEC20's.  CUCCA currently has a DEC
VAX 8700 running Ultrix 2.0, a VAX 750, numerous microvaxen, and a Sun
4.  For the last two years student computing has slowly migrated from
the DEC20's to Unix systems.

At about the same time as all this was happening, a package called
CCMD was also being developed (at CUCCA, initially by Andrew Lowry and
later on by Howie Kaye).  CCMD is a general parsing mechanism for
developing user interfaces to programs.  It is based on the
functionality of TOPS-20's COMND Jsys.  CCMD allows a program to parse
for various field types (file names, user names, dates and times,
keywords, numbers, arbitrary text, tokens, etc.).  The original reason
for writing the CCMD package was to use it in locally developed
microcomputer cluster software.  For various reasons which we won't go
into here, this project never saw the light of day, though the CCMD
package came about as a useful product.

CCMD was announced to the public on some Internet mailing lists as
well as at Usenix last summer.  A mailing list to discuss TOPS-20 to
UNIX migration issues was set up (INFO-TOPSUX@CU20B.CC.COLUMBIA.EDU).
(Send requests to INFO-TOPSUX-REQUEST@CU20B.CC.COLUMBIA.EDU.)  We
began using CCMD internally for various programs.  Our operations
interface, group management program etc. were all written using CCMD
as the user interface.

Chris Maio, at the Computer Science Department, began writing MM in C
using CCMD.  CUCCA also decided that it needed to make an MM-like
program available to its users who were migrating from the DEC20's.
So three systems programmers from CUCCA (Fuat Baran, Howie Kaye and
Melissa Metz) joined Chris Maio in his efforts, and Columbia-MM was
born.

The first internal release of Columbia MM was unleashed on our user
population in January of 1988.  Since then we have put up numerous new
versions internally, and a couple of months ago we began beta testing
with the help of eager people at other sites.



DESCRIPTION
-----------

MM is a powerful electronic mail system which allows you to send,
read, edit and manage messages quickly and easily.  Since it is
written with the CCMD package, you can hit the escape key to complete
commands and "?" to find out what MM is expecting.

These are the five most popular commands:

SEND user-name	Send mail to specified user-name.  May be a USER-NAME
		or a list of USER-NAMES, local or network addresses.

READ msgs	Read specified messages, MSGS, from current file.
		The default is to read UNSEEN messages.

DELETE msgs	Delete specified messages, MSGS, from current file.

HEADERS msgs	Give a brief summary of the specified messages, MSGS.

HELP topic	Type a message explaining the specified TOPIC.


MESSAGE SEQUENCES
-----------------

A message sequence is a series of messages that have some trait in
common.  Various specifiers, listed below, identify a message
sequence; the intersection of the specifiers given determines the
messages to be processed.  Some specifiers are compound and accept a
string argument (e.g., 'FROM FOO', or 'SUBJECT HOMEWORK').  If
the argument to any of these has a space (or certain other
non-alphanumeric characters) in it, the argument should be quoted, as
in 'FROM "JOHN SMITH"'. 

The message sequences available are:

AFTER		Equivalent to SINCE
ALL		Every message in your file, whether deleted or not.
ANSWERED	Messages you have REPLY'd to or ANSWER'd
BEFORE		Messages before a given date
CURRENT		MM keeps a pointer to the current message it is
		set at.  This sequence (which consists of only 1
		message obviously) is that message.
DELETED		Messages you have marked for deletion with the
		DELETE command or the MOVE command
FLAGGED		Messages you have marked with the FLAG command
FROM		Followed with a word or phrase denoting the
		senders of the message; e.g. HEADERS FROM SMITH
		would show all the headers of the messages you've
		received from SMITH.
INVERSE		This reverses the sequence.  Instead of
		taking the sequence as lowest message number to
		highest, it takes it from highest to lowest
KEYWORD		Messages containing the specified keyword
LAST		Followed with a number specifying the last n messages
		in the file
NEW		Messages that are new as of this MM session
ON		Messages on a given date
PREVIOUS-SEQUENCE
		The last sequence used in an MM command
RECENT		Messages that were new as of this MM session but which
		have already been seen
SEEN		Messages that you have read
SINCE		Messages after a given date (entered as	DATE-MONTH-YEAR
		or mm/dd/yy)
SUBJECT		Followed with a word or phrase denoting the subject
		of the message; e.g. HEADERS SUBJECT MEETING would show
		you all the headers of the messages about a meeting
		(assuming they say MEETING in the header)
TEXT		Followed with a word, phrase or sentence denoting
		the text of the message; e.g. HEADERS TEXT BIZARRE
		would show you the headers of all the messages with
		the word BIZARRE in their text or headers
TO		Followed with the name of a recipient, shows messages
		whose To or cc fields contain that recipient.
UNANSWERED	Messages you have not REPLY'd to or ANSWER'd
UNDELETED	Messages that haven't been deleted via the DELETE or
		MOVE commands
UNFLAGGED	Messages that haven't been flagged by the FLAG command
UNKEYWORD	Messages not included in the specified keyword
UNSEEN		Messages you haven't seen via the READ or TYPE command

Also, message numbers are allowed to be specified as a sequence, i.e.
	1,2,3,5,8   -	 Messages 1, 2, 3, 5, and 8
	1:3,5:8     -	 Messages 1 through 3 and 5 through 8
	5	    -	 Message number 5
	6+3	    -	 Messages 6, 7, and 8



CCMD FEATURES
-------------

We have already mentioned that MM is written with the CCMD package.
This provides sevaral features to make it easier for MM to parse your
input.

Probably the most important feature is instant help.  At almost any
point when MM is waiting for input from you, you can type a "?", and
MM will tell you what it is looking for.  (One exception is when MM is
parsing an outgoing message, at which time the question mark will
simply get inserted into the text like any other character.)  If you
have partially typed a command, MM will only show you things that
match the current input.

Another feature is command completion or recognition.  This means that
when MM is parsing, you can hit the ESCAPE key or TAB key and MM will
complete the current field (command keyword, filename, etc.), if it is
unambiguous.  Control-F works similarly to tab and escape, but only
completes to a punctuation character.  If what you have typed is
ambiguous, MM will beep.  You can then hit "?"  to find out the
available completions.  For example, if you were typing in the file
name "mail.txt" and there were no other files in your directory
beginning with "m", you could simply type "m<ESC>" and MM would echo
"mail.txt ".  If you typed "m<Control-F>" MM would echo "mail" and
wait for you to finish it.  This is useful when specifying the name of
a new file.

A third feature is command retry.  This means that after you have
typed a command and hit return, then realize that was not what you
meant to do, you can redo the command.  When you get the prompt back
from MM, if the VERY NEXT character you type is control-H, MM will
redisplay your last command.  You can then delete the offending parts
and run the command you wanted.  This saves you from having to retype
the entire command.

There is also a simple command history mechanism, which allows you to
redo commands.  Command editing is planned for the future.

MM will accept comments on any line -- this is most useful inside
files run by the "take" command.  The comment start string is
typically "#", and the comment end string is end of line.

In case you should want to input any of these special characters, CCMD
also provides a quoting character, control-V.  Control-V followed by
any character simply inserts that character into the current command.


COMPATIBILITY
-------------

MM is compatible with various other mail programs, and has hooks for
adding more in the future.  MM currently supports the following mail
file formats:

mtxt:
mtxt is the format used by MM-20 on DEC20s.  This format is not compatible
with any other Unix mail utilities, but has the advantage of being easier
to parse.  That is, mm will read in an mtxt format file faster than any
other format.

Babyl: 
Babyl is the mail file format used by gnuemacs rmail mode.  Use this
format if you wish to use emacs for reading your mail as well as mm.

mbox:
mbox is the mail file format the Unix mail(1) program uses.  Use this format
if you wish to use mail(1) for reading your mail as well as mm.

Future plans include supporting mh(1), and pop (post office protocol)
for remote systems (PC's, ...).


MAIL DELIVERY
-------------

MM currently uses sendmail(8) to deliver mail, but it should be fairly
easy to make it use other delivery systems.


SYSTEMS
-------

MM has been tested on Ultrix, BSD 4.2/4.3, SunOS, Pyramid, DYNIX
(Sequent Balance 21000), Celerity.  The HP-UX and System V ports are
currently in progress.  (At Columbia we only test MM under Ultrix 2.0
and SunOS 3.2/4.0, and rely on our beta testers for the other ports.)


AVAILABILITY
------------

MM is currently in Beta Test.  If you wish to join in the testing,
please send mail to 

   info-mm-request@columbia.edu				(Internet)
   info-mm-request%cunixc.cc.columbia.edu@cuvma.cc.columbia.edu  (Bitnet)
   ...rutgers!columbia!info-mm-request			(Usenet)

and we'll add you to our list of people involved in MM.  If you are
interested in MM, but do not want to get involved in the beta test,
send mail to the same address, and we'll put you on a different list.

A test version of MM is currently available via anonymous ftp from
cunixc.cc.columbia.edu (128.59.40.130 since August 15, 1988) in the mm
subdirectory.  The following files are currently available:

	 ccmd.tar.Z            	# CCMD tar file
	 mm-0.87.0.diff      	# diffs to create 0.87 
	 mm-0.87.0.tar.Z       	# MM version 0.87-Beta tar file
	 mm-0.88.0.diff      	# diffs from 0.87 to 0.88 (MM only)
	 mm-0.88.0.tar.Z       	# MM version 0.88-Beta (new release)
	 mm-intro.txt           # general introductory document
	 mm-only-0.88.0.tar.Z  	# MM 0.88 only (no CCMD)
	 release-0.88.txt    	# release notes for 0.88 (changes
				# since 0.87)

mm-{Version #}.tar.Z contains the full (compressed and tarred) sources
to MM and CCMD.  Contained in the mm subdirectory (once uncompressed
and untarred), is an INSTALL file with installation hints.  Please
note that the distribution is available for testing, and may not be up
to date.  We periodically send out patches to our mailing list of beta
test sites.

In the future, once MM is out of beta test, we plan on making it more
widely available.  We have plans to distribute MM through the Kermit
Distribution Center, which will supply MM on 1200 foot magnetic tape
in various formats.


COPYRIGHT
---------

Columbia MM carries the following copyright notice:


Copyright (c) 1986, 1987, 1988, The Trustees of Columbia University in
the City of New York.  Chris Maio, Computer Research Facilities,
Computer Science Department, Fuat C. Baran, Howard Kaye, Melissa Metz,
Academic Systems Group, Center for Computing Activities.

Permission is granted to any individual or institution to use, copy,
or redistribute this software so long as it is not sold for profit,
provided that this notice and the original copyright notices are
retained.  Columbia University makes no representations about the
suitability of this software for any purpose.  It is provided "as is"
without express or implied warranty.
