[TUHS] mh/hm, mmh

Eric Allman tuhs at eric.allman.name
Mon Jun 1 04:56:07 AEST 2020

Ah, time for some "Email at Berkeley" history....

First the back story.  In the beginning, /bin/mail was the mail system. 
All mail was local to one machine so the distinction between MUA, MTA,
and MSA (Mail Storage Agent) didn't exist.  At this point there were no
options, at least at Berkeley, although I suspect that Bruce was working
on MH by then.

If my memory serves, networking at Berkeley started with BerkNET.  Clem
got it right: Eric Schmidt wrote it, and it was designed to be cheap. 
The main purpose was that Berkeley was getting more Unix machines and
carrying tapes was problematic.  It was purely batch (no interactive
sessions; file copy and email only) and ran over 9600 baud TTY lines. 
Eric hacked /bin/mail to do the appropriate calls if it saw a colon in
the address, so the flow of a typical message would be keyboard →
/bin/mail → BerkNET → /bin/mail → /var/mail.

In about 1976 the INGRES project at Berkeley got an ARPAnet connection. 
6th Edition was current then, and we got the software from (iirc) UC San
Diego.  It was kind of a mess, but it did work.  It was a VDH (Very
Distant Host) interface running at 9600 baud.  But the mail system it
included, MSG I think, was a world unto itself, and definitely did not
use /bin/mail.  So now we had two universes: to send something to both
someone on BerkNET and someone on ARPAnet you had to type the message
into two different MUAs.  But at first this was good enough.  But not
for long.

The problem was that to use the ARPAnet you had to be logged into our
PDP-11/70.  Back then the cool kids had "glass TTYs" (i.e., adm3a).  But
BerkNET didn't have interactive connections, so you had to actually have
a TTY line into our machine.  Two problems arose: first, INGRES was in a
different building (Cory Hall) than the rest of the department (Evans
Hall).  But that's OK, there were already wires running between the two
buildings that were probably inspired by BerkNET.  Second, our PDP-11
had a single DH-11 multiport interface with 16 ports.  Only two of those
ports were available, and new DH-11s cost on the order of $15,000, money
which we did not have.

But no problem.  At this point there was already a "plug board" in the
mail room in Evans that had ports to the half dozen or so machines that
were by then on campus and lines to each office.  To connect you would
plug in a wire between the machine you wanted to use and your office. 
Protocol was that you remove the cross connect after use, but that was
widely ignored.  Ing70 ports were quite frequently being pulled out
while in use and no one was happy.  Unfortunately since I was kind of
managing that machine, I was the one who got yelled at.

Also in that period Berkeley got connected into UUCP.  UUCP had also
done a hack to /bin/mail, so it was becoming quite the big mess.  I made
the observation that I could hack /bin/mail to forward messages with an
"@" sign in the address to our ARPAnet-connected machine, but at that
point the code was becoming unwieldy.  Enter delivermail, which was
essentially what we now call an MTA.  It was still a hack, but it was
easier to deal with because it didn't have MUA and MSA functionality.  I
changed /bin/mail to call delivermail unless it got a "-d" (deliver)
flag, so now the sequence for local mail was /bin/mail → delivermail →
/bin/mail -d → /var/mail.  And most importantly, I hacked the ARPAnet
code to use delivermail as well, so now Ing70 could forward mail from
BerkNET to ARPAnet and back again.  The fights over our two plug board
ports mostly dissipated and my life got better.

I'm pretty sure that at this point Kurt Schoens was working on Mail.  He
read /var/mail (at that point it had been migrated to /var/spool/mail)
directly, so there was no hiding of the mailbox format, so he had MUA +
a half of an MSA.  He converted Mail to use delivermail for outgoing
mail.  I don't recall the details of how MH got hooked in, but it did
have a separate program for sending (called "send" I think) that would
have been fairly easy to hack.  It still had "inc" (incorporate) to
bring mail from the /var/mail one-file-per-mailbox format into the MH
one-file-per-message format, so the three functions were not completely
broken out, but it was really the closest to that ideal model available
at the time, so far as I know.

That's the gist of that story.  Sendmail is a completely different
story, driven by the onset of the Internet, and I won't make this
already long message even longer by going into it here.

By the way, I have a 9-track tape sent to me by Marshall Rose containing
the November 1983 version of MH that UCI did (based on the Rand system),
complete with original versions of the documentation.  If anyone has any
way of reading it I'm happy to pass it on.


More information about the TUHS mailing list