只能發(fā)500英里的郵件

From: Trey Harris

Here's a problem that *sounded* impossible...? I almost regret posting

the story to a wide audience, because it makes a great tale over drinks

at a conference. :-)? The story is slightly altered in order to protect

the guilty, elide over irrelevant and boring details, and generally make

the whole thing more entertaining.

I was working in a job running the campus email system some years ago

when I got a call from the chairman of the statistics department.

"We're having a problem sending email out of the department."

"What's the problem?" I asked.

"We can't send mail more than 500 miles," the chairman explained.

I choked on my latte.? "Come again?"

"We can't send mail farther than 500 miles from here," he repeated.? "A

little bit more, actually.? Call it 520 miles.? But no farther."

"Um... Email really doesn't work that way, generally," I said, trying

to keep panic out of my voice.? One doesn't display panic when speaking

to a department chairman, even of a relatively impoverished department

like statistics.? "What makes you think you can't send mail more than

500 miles?"

"It's not what I *think*," the chairman replied testily.? "You see, when

we first noticed this happening, a few days ago--"

"You waited a few DAYS?" I interrupted, a tremor tinging my voice.? "And

you couldn't send email this whole time?"

"We could send email.? Just not more than--"

"--500 miles, yes," I finished for him, "I got that.? But why didn't

you call earlier?"

"Well, we hadn't collected enough data to be sure of what was going on

until just now."? Right.? This is the chairman of *statistics*. "Anyway,

I asked one of the geostatisticians to look into it--"

"Geostatisticians..."

"--yes, and she's produced a map showing the radius within which we can

send email to be slightly more than 500 miles.? There are a number of

destinations within that radius that we can't reach, either, or reach

sporadically, but we can never email farther than this radius."

"I see," I said, and put my head in my hands.? "When did this start?

A few days ago, you said, but did anything change in your systems at

that time?"

"Well, the consultant came in and patched our server and rebooted it.

But I called him, and he said he didn't touch the mail system."

"Okay, let me take a look, and I'll call you back," I said, scarcely

believing that I was playing along.? It wasn't April Fool's Day.? I

tried to remember if someone owed me a practical joke.

I logged into their department's server, and sent a few test mails.

This was in the Research Triangle of North Carolina, and a test mail to

my own account was delivered without a hitch.? Ditto for one sent to

Richmond, and Atlanta, and Washington.? Another to Princeton (400 miles)

worked.

But then I tried to send an email to Memphis (600 miles).? It failed.

Boston, failed.? Detroit, failed.? I got out my address book and started

trying to narrow this down.? New York (420 miles) worked, but Providence

(580 miles) failed.

I was beginning to wonder if I had lost my sanity.? I tried emailing a

friend who lived in North Carolina, but whose ISP was in Seattle.

Thankfully, it failed.? If the problem had had to do with the geography

of the human recipient and not his mail server, I think I would have

broken down in tears.

Having established that -- unbelievably -- the problem as reported was

true, and repeatable, I took a look at the sendmail.cf file.? It looked

fairly normal.? In fact, it looked familiar.

I diffed it against the sendmail.cf in my home directory.? It hadn't been

altered -- it was a sendmail.cf I had written.? And I was fairly certain

I hadn't enabled the "FAIL_MAIL_OVER_500_MILES" option.? At a loss, I

telnetted into the SMTP port.? The server happily responded with a SunOS

sendmail banner.

Wait a minute... a SunOS sendmail banner?? At the time, Sun was still

shipping Sendmail 5 with its operating system, even though Sendmail 8 was

fairly mature.? Being a good system administrator, I had standardized on

Sendmail 8.? And also being a good system administrator, I had written a

sendmail.cf that used the nice long self-documenting option and variable

names available in Sendmail 8 rather than the cryptic punctuation-mark

codes that had been used in Sendmail 5.

The pieces fell into place, all at once, and I again choked on the dregs

of my now-cold latte.? When the consultant had "patched the server," he

had apparently upgraded the version of SunOS, and in so doing

*downgraded* Sendmail.? The upgrade helpfully left the sendmail.cf

alone, even though it was now the wrong version.

It so happens that Sendmail 5 -- at least, the version that Sun shipped,

which had some tweaks -- could deal with the Sendmail 8 sendmail.cf, as

most of the rules had at that point remained unaltered.? But the new

long configuration options -- those it saw as junk, and skipped.? And

the sendmail binary had no defaults compiled in for most of these, so,

finding no suitable settings in the sendmail.cf file, they were set to

zero.

One of the settings that was set to zero was the timeout to connect to

the remote SMTP server.? Some experimentation established that on this

particular machine with its typical load, a zero timeout would abort a

connect call in slightly over three milliseconds.

An odd feature of our campus network at the time was that it was 100%

switched.? An outgoing packet wouldn't incur a router delay until hitting

the POP and reaching a router on the far side.? So time to connect to a

lightly-loaded remote host on a nearby network would actually largely be

governed by the speed of light distance to the destination rather than by

incidental router delays.

Feeling slightly giddy, I typed into 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

--

I'm looking for work.? If you need a SAGE Level IV with 10 years Perl,

tool development, training, and architecture experience, please email

me at trey@sage.org.? I'm willing to relocate for the right opportunity.



原文鏈接:http://web.mit.edu/jemorris/humor/500-miles

最后編輯于
?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末够滑,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子版述,更是在濱河造成了極大的恐慌,老刑警劉巖渴析,帶你破解...
    沈念sama閱讀 221,548評論 6 515
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異俭茧,居然都是意外死亡咆疗,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 94,497評論 3 399
  • 文/潘曉璐 我一進店門母债,熙熙樓的掌柜王于貴愁眉苦臉地迎上來午磁,“玉大人尝抖,你說我怎么就攤上這事⊙富剩” “怎么了昧辽?”我有些...
    開封第一講書人閱讀 167,990評論 0 360
  • 文/不壞的土叔 我叫張陵,是天一觀的道長登颓。 經(jīng)常有香客問我搅荞,道長,這世上最難降的妖魔是什么框咙? 我笑而不...
    開封第一講書人閱讀 59,618評論 1 296
  • 正文 為了忘掉前任咕痛,我火速辦了婚禮,結果婚禮上喇嘱,老公的妹妹穿的比我還像新娘茉贡。我一直安慰自己,他們只是感情好者铜,可當我...
    茶點故事閱讀 68,618評論 6 397
  • 文/花漫 我一把揭開白布腔丧。 她就那樣靜靜地躺著,像睡著了一般王暗。 火紅的嫁衣襯著肌膚如雪悔据。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 52,246評論 1 308
  • 那天俗壹,我揣著相機與錄音科汗,去河邊找鬼。 笑死绷雏,一個胖子當著我的面吹牛头滔,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播涎显,決...
    沈念sama閱讀 40,819評論 3 421
  • 文/蒼蘭香墨 我猛地睜開眼坤检,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了期吓?” 一聲冷哼從身側(cè)響起早歇,我...
    開封第一講書人閱讀 39,725評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎讨勤,沒想到半個月后箭跳,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 46,268評論 1 320
  • 正文 獨居荒郊野嶺守林人離奇死亡潭千,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,356評論 3 340
  • 正文 我和宋清朗相戀三年谱姓,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片刨晴。...
    茶點故事閱讀 40,488評論 1 352
  • 序言:一個原本活蹦亂跳的男人離奇死亡屉来,死狀恐怖路翻,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情茄靠,我是刑警寧澤,帶...
    沈念sama閱讀 36,181評論 5 350
  • 正文 年R本政府宣布账嚎,位于F島的核電站,受9級特大地震影響疼邀,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜旁振,卻給世界環(huán)境...
    茶點故事閱讀 41,862評論 3 333
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望吉嚣。 院中可真熱鬧蹬铺,春花似錦、人聲如沸甜攀。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,331評論 0 24
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽歧胁。三九已至厉碟,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間墨榄,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,445評論 1 272
  • 我被黑心中介騙來泰國打工阵翎, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人砍聊。 一個月前我還...
    沈念sama閱讀 48,897評論 3 376
  • 正文 我出身青樓贰军,卻偏偏與公主長得像,于是被迫代替她去往敵國和親俯树。 傳聞我的和親對象是個殘疾皇子贰盗,可洞房花燭夜當晚...
    茶點故事閱讀 45,500評論 2 359

推薦閱讀更多精彩內(nèi)容

  • **2014真題Directions:Read the following text. Choose the be...
    又是夜半驚坐起閱讀 9,569評論 0 23
  • 01 鹿晗今日突然公布了戀情陋率,微博和朋友圈全淪陷了秽晚。 其實糖糖一開始是一臉的懵逼,是不是為了宣傳新劇赴蝇,才開這樣的玩...
    糖糖不是彩虹糖閱讀 355評論 0 2
  • 成年人如何高效的學習扯再,首先,根據(jù)學習的內(nèi)容斋竞,找到適合自己的學習方法。其次坝初,避免無效學習钾军,目標拆解,刻意訓練吏恭。 還有...
    學習是件幸福的事閱讀 256評論 0 0
  • 1.廣州的春天雨真是多啊樱哼、據(jù)說過去更多剿配、所以老城區(qū)有不少旗樓阅束、就是每棟樓都有屋檐相連、人在下面行走就不怕雨淋了息裸、現(xiàn)...
    若出其里閱讀 201評論 2 3
  • 《傷秋》 寫于2010年秋 時間過的真快呼盆,不知不覺又是一年秋至,秋天本是一個收獲的季節(jié)访圃,可是對于我來說常遂,秋天里彌漫...
    吳石磊閱讀 486評論 1 1