Building a UUCP node on an emulated PDP-11

Back in 1995, just before the internet exploded in popularity, I would use my modem connected to a landline to call BBSes. It was the way I would keep in touch with friends, play online games, and download software. My friend ran a BBS and he used UUCP to connect his BBS to internet email. It's hard to imagine compared to today's always-on internet, but emails back then could easily take half a day or more to reach their recipient. The outgoing emails would sit on the BBS hard drive until a scheduled time (like once a day). At that time, the BBS would dial up the ISP and use UUCP to send all outgoing email and receive all incoming email.

UUCP history

UUCP was originally created in the late 1970s, before the internet or email of today was deployed. It was developed on Unix on PDP-11 hardware and was quickly ported to more platforms. UUCP is a peer to peer platform, and networks were built through direct connections between sites. Some sites acted more like central hubs, for example duke, ucbvax, and decvax (1981 UUCP/USENET map).

UUCP could handle more than email, but I'm just focusing on the email portion here. There are some longer explanations on UUCP available if you'd like to dig more into that: The 1970s: UUCP, Store And Forward Communication: UUCP and FidoNet, Things Every Hacker Once Knew

Timeline

To give some more context around the history of UUCP & the PDP-11, here are some relevant events and their years:

What was a PDP-11 in the 1970s?

Linux and BSD can trace their origins back to the original Unix on the PDP-11. Computers were expensive back in the 1970s. For example, a base PDP-11/40 with 16KB memory was $12,995 in 1973. That price doesn't include things like a hard drive. Each system was highly customizable, and a whole system could easily reach $100k.

The CPU was somewhere around 1 MIPS, which by comparison was about twice the speed of the Commodore 64 which came out about 10 years later at a tiny fraction of the cost.

The PDP-11/70 model could handle up to 4MB of physical memory with an MMU. Since it's a 16-bit computer, you can only access 64KB at a time. This is the model I'll be emulating.

The PDP-11 models were produced until 1997, but it was probably starting to show its age around the time of the release of the MicroVAX in 1985.

The beginning of the end of UUCP

UUCP was relatively cheap to set up and run, which is why my friend could afford it for his BBS. You didn't even need to dedicate a whole machine, modem, or phone line to it. UUCP connected your system into the internet's email, which was about 16 million people in 1995.

However, UUCP was not that much cheaper than an internet connection. Like today, most internet connections of the 1990s came with email addresses. So once dialup internet became available on a local number, they were quickly more popular than UUCP connections.

Professor Larry Landweber created maps showing how quickly UUCP and then internet access spread from 1991-1997.

0:00
/0:19

Internet reach 1991-1997

Why now?

Recently, two different articles inspired nostalgia for me:

  • Forgotten Internet: UUCP - a history and explanation of UUCP
  • UNIX V4 tape successfully recovered - This was the first version of Unix written partially in C, which was a language invented for that purpose. The V4 version of it was thought to be lost until recently, when a tape was found and successfully read. Using C instead of assembly made it easier to port to other systems, like the VAX.

I find the novelty of 1970s technology being able to speak to the modern Internet to be fascinating. Let's go through what it was like to email in that era.

This project's architecture

What I'm aiming to reproduce is a setup that would have been possible in the mid 90s. While internet email then was largely SMTP, there were still providers offering a SMTP/UUCP gateway for customers that had a modem but not a static IP. While the PDP-11 would have been considered obsolete (compared to even a 486 running Linux or FreeBSD), they were still in production for a few more years.

Inbound mail path (Internet -> vps3 -> pi5 -> pdp11)
Outbound mail path (pdp11 -> pi5 -> Internet)

Setup details

There's detailed instructions in the github repo: https://github.com/ddrown/pdp11-uucp

repo cloud/ directory: cloud server

The first thing I needed was an SMTP server that everyone on the internet can reach. I'm already running one for my normal email, so I'll have that server handle this as well. I've assigned the domain uucp.drown.org to the PDP-11.

repo pi5/ directory: pi5 relay

The pi5 handles the transition between SMTP and UUCP. Since the pi5 doesn't have a static IP, the cloud server reaches it via an frp tunnel. The cloud server speaks SMTP over the tunnel for inbound email, and the pi5 accepts the mail into a UUCP queue. Outbound mail arrives via UUCP, and the pi5 sends that via SMTP/submission.

The pi5 is also running the PDP-11 emulator, simh.

repo pdp11/ directory: PDP-11 config

The last step is giving the PDP-11 a "modem" to call the pi5 in order to speak the UUCP protocol. This emulated modem listens on a dedicated serial port on the emulated PDP-11, and when it receives a dialing command it pretends to connect to the remote site, spawns the UUCP process uucico, and shuttles bits between the PDP-11 and the pi5's UUCP stack.

I've also setup a dedicated PDP-11 serial port for the serial terminal, which is connected to the pi5 via a USB serial adapter.

What went wrong / what was hard?

Simulator serial port speeds limited to 120 bytes/s

When using 2.11BSD, it has an interrupt coalescing strategy for the serial driver. The BSD kernel switches on this mode when it receives more than 100 bytes per second via serial. It'll also fall back to interrupt per byte mode if less than 75 bytes per second are received. This combined with the emulator's bug that stops delivering bytes when in the coalescing mode means data from the host to the pdp11 is limited to around 120 bytes/s.
Full details:

Serial terminal cracked solder joints

My old Wyse WY-60 serial terminal from the 1980s had some missing pixels. I tracked this down to some cracked solder joints and reflowed them. It's better than it was, but a few pixels are still missing. I think my fix was incomplete.

The left two pins of U19 were not completely connected
before the fix, lots of missing pixels
after the fix, looking much better

Is UUCP still relevant today?

I'm sure there are still people running it for esoteric reasons like myself, but UUCP has largely been obsoleted by people having internet connections and either using POP/IMAP to receive their email, webmail, or a dedicated email app.

I'm told Eternal September (free text-only Usenet access) "offers UUCP Batches on demand"

Proof it works

Reading email on a serial terminal connected to an emulated PDP-11

Teaser for what's next

Also back in 1995, I used to read my email by telnet'ing to my ISP's unix server, which had pine as my shell.

Questions? Comments? Contact information