The Story of the Email Limited to 800 Kilometers of Distance

NicolasBrondinBernard

Author
@NicolasBrondinBernard

You don't know the incredible story of the "500-mile email"? Then now's the time to discover it, in French!

Article published on 04/02/2022, last updated on 10/08/2026

There are stories in the world of computing that are incredible to discover, and the protagonist doesn't necessarily need to be of the caliber of Steve Jobs or Bill Gates for it to be interesting.

The story you're about to discover below is certainly one of my favorites, it's not mine, but Trey Harris's, and its original version (in English) is available on his blog: https://www.ibiblio.org/harris/500milemail.html

I decided to translate this story because I think it can interest a lot of developers in the French-speaking community, just as much as the original version interested me when I discovered it.

What you're about to read next is a group email sent by Trey Harris based on a thread titled "Your favorite impossible task?" on November 24, 2002.

Once upon a time... an email.

By Trey Harris

Here's a problem that was *at first glance* impossible... I almost regret sharing this story with a wide audience, because it's a great epic to tell at conferences over a drink! The story has been slightly altered in order to protect the guilty, to avoid insignificant and boring details, and more generally to make it more entertaining.

A few years ago, I was working in a position where my role was to manage the campus's email system, when all of a sudden, I received a call from the chairman of the university's statistics department.

"We're having problems sending emails outside of the department."

"What's the problem?" I asked.

"We can't send email more than 500 miles (Editor's note: about 800km)," the chairman then explained to me.

That's when I choked on my latte. "Come again?"

"We can't send emails farther than 500 miles from here," he repeated to me. "A tiny bit more, actually. Let's say 520 miles. But no farther."

"Um... Email doesn't really work like that, at least not usually," I replied, trying to conceal any panic in my voice. You show no sign of panic when talking to a department chairman, even for a relatively impoverished department like statistics.

"What makes you think you can't send email more than 500 miles away?"

"It's not what I *think*," the chairman replied, irritated. "You see, when we discovered this phenomenon a few days ago--"

"You waited a few DAYS?" I interrupted him, a tremble in my voice. "And you weren't able to send emails the whole time?"

"We could send emails. Just not farther than--"

"--500 miles, yes," I finished, "I got that. But why didn't you call sooner?"

"Well, we didn't yet have enough data to be sure of what was really happening until now."

Makes sense. He is the chairman of *statistics* after all. "Anyway, I asked one of our geostatisticians to take a look at it--"

"Geostatisticians..."

"--yes, and she generated a map showing the radius within which we could send emails, which turned out to be slightly more than 500 miles. There are a number of destinations inside that radius that we still can't reach, or only sporadically, but we can never send anything beyond that radius."

"I see," I said, holding my head. "When did this start? You said a few days ago, but has anything changed in your systems since then?"

"Well, the consultant came, patched our server and restarted it. But I called him, and he said he hadn't touched the email system."

"Ok, let me take a look at it, and I'll call you back later," I said, only half believing it. It wasn't April Fool's Day. I tried to remember if anyone owed me a tech prank.

I logged into the department's server, and sent a few test emails. I was then in the "Research Triangle" of North Carolina, and a test email to my personal account went through without a hitch. Same for one sent to Richmond, and Atlanta, and Washington. Another one sent to Princeton (400 miles) also worked.

But then I tried to send an email to Memphis (600 miles). It failed. Boston, failed. Detroit, failed. I then pulled out my address book to start refining all this. New York (420 miles) worked, but Providence (580 miles) failed.

I started to believe I had lost my sanity. I then tried to send an email to a friend living in North Carolina, but whose email provider was in Seattle. Fortunately, it failed. If the problem was related to the geographic location of the recipient, and not their mail server, I think I would have burst into tears.

After establishing --as unlikely as it may seem-- that the reported problem was true, and repeatable, I then took a look at the "sendmail.cf" file.

It looked pretty normal. In fact it even looked as usual.

I then compared it to the "sendmail.cf" in my home directory. It hadn't been modified... it was the "sendmail.cf" that I had written.

And I was pretty certain I hadn't enabled the "FAIL_MAIL_OVER_500_MILES" option.

In vain, I launched a telnet connection on the SMTP port. The server then happily answered me with a SunOS sendmail banner.

Wait a minute... a SunOS sendmail banner? At that time, Sun was still deploying Sendmail 5 with its operating system, even though Sendmail 8 was already fairly mature. As a good system administrator, I had standardized on Sendmail 8.

And still as a good system administrator, I had written a sendmail.cf that used long, intuitive variable names available in Sendmail 8 as compared to the cryptic punctuation marks used in Sendmail 5.

Everything suddenly became clearer, and I choked again on the remains of my already-cold latte.

When the consultant "patched the server", he had apparently updated the version of SunOS, and in the process *downgraded* the version of Sendmail. The update had nevertheless left the sendmail.cf intact, even though it was now the wrong version.

It appeared that Sendmail 5 (at least, the version that Sun had deployed, and which had some adjustments) could work with a sendmail.cf coming from Sendmail 8, as most of the rules hadn't been altered. Except the new long and nice configuration options... the ones it had treated as anomalies, had been ignored. And the sendmail binary had no default values compiled in for most of those settings, so, lacking any in the sendmail.cf file's parameters, they were initialized to 0.

One of the parameters that had been set to zero was the maximum wait time for connecting to the remote SMTP server. A few experiments had established that with this particular machine, and with its usual load, a wait time of zero would cancel the connection after about 3 milliseconds.

A strange peculiarity of our campus network at the time was that it ran 100% on switches.

An outgoing packet would only incur a router delay after reaching the POP (point of presence to the internet) and hitting a router on the other side. So the delay to connect to a lightly loaded remote host on a nearby network was roughly governed by the distance traveled at the speed of light to the destination, rather than by incidental router delays.

Feeling slightly dizzy, I then typed in my shell:

$ units 
> 1311 units, 63 prefixes
> You have: 3 millilightseconds
> You want: miles
> * 558.84719
> / 0.0017893979

"500 miles, or a little bit more."
Trey Harris


For the more skeptical about the veracity of the account, Trey has actually created a FAQ with all the info regarding his now-famous story: https://www.ibiblio.org/harris/500milemail-faq.html


Liam Truong sur Unsplash

Finished reading this article?
Our newsletter

No spam. Only free content, news, and ever more resources to level up your skills!

Join +1500 developers

Comments (0)

to leave a comment

No comments yet