home *** CD-ROM | disk | FTP | other *** search
/ ftp.cse.unsw.edu.au / 2014.06.ftp.cse.unsw.edu.au.tar / ftp.cse.unsw.edu.au / pub / doc / standards / smtp / mail.errors.Z / mail.errors
Encoding:
Text File  |  1992-10-18  |  69.4 KB  |  1,748 lines

  1. In an effort to help mail implementers identify mail problems more
  2. rapidly, we have created a list of problems we have encountered,
  3. in the hope that others may not have to find them the same way we did.
  4. The file will be kept in ISIF<SMTP>mail.errors, and we encourage any
  5. contributions.  It at least shows you some of the armor plating you
  6. need on your mailer.
  7.  
  8. We have also set up a list of SMTP people in ISIF:<SMTP>SMTP.PEOPLE
  9. which has contacts for those installations we know of.  
  10.  
  11. Both files are ANONYMOUS accessible.
  12.  
  13. ***** Accepting paths *****
  14.  
  15.     Some mailers do not accept SMTP paths.  In general,
  16. an SMTP receiver should always accept a path in the FROM specifiaction,
  17. even if it cannot relay mail, and hence can't accept paths in a TO
  18. specification.
  19.  
  20. ***** "," vs ":", bad syntax errors *****
  21.  
  22.     During August 1982, the SMTP specification for
  23. paths was changed.  In the old specification, SMTP paths were specified
  24. using only commas.  For example:
  25.     MAIL FROM:<@ISID,MOCKAPETRIS@ISIF>
  26.     RCPT TO:<@ISIA,@ISIB,SMTP@ISID>
  27. whereas the new specification changes the last ",", if any, to a
  28. colon:
  29.     MAIL FROM:<@ISID:MOCKAPETRIS@ISIF>
  30.     RCPT TO:<@ISIA,@ISIB:SMTP@ISID>
  31.  
  32.     Various mailers will accept only one or the other form, leading to 
  33. (typically) syntax errors.  The recommended approach to this
  34. problem is to accept both forms, and to generate ":" form addresses.
  35. More clever mailers will try the other form when one fails, and will
  36. avoid path creation when not necessary.  That is send
  37.     MAIL FROM:<MOCKAPETRIS@ISIF>
  38. rather than
  39.     MAIL FROM:<@ISIF,MOCKAPETRIS@ISIF>
  40. or
  41.     MAIL FROM:<@ISIF:MOCKAPETRIS@ISIF>
  42. where possible.
  43.  
  44. ***** various marginal addresses *****
  45.  
  46. We have seen several instances of mail transfers with commands
  47. like:
  48.     RCPT to:<mockapetris>
  49. rather than :
  50.     RCPT to:<mockapetris@isif>
  51.  
  52. We recommend that if your mailer accepts this sort of thing, it
  53. should rewrite the address before forwarding.  I.E. Its OK to
  54. accept technically bad addresses, but you should not output them.
  55.  
  56. ***** TCP PSH bit = timeouts *****
  57.  
  58. When sending SMTP data via TCP, the PSH bit should be set on the
  59. last character of each command/response/DATA text.  The PSH bit forces
  60. the data through to the receiving SMTP.  This is absolutely necessary
  61. when talking to TOPS-20 SMTPs.
  62.  
  63. If PSH isn't set, TCP is free to buffer that data in either the sending
  64. or receiving host without passing it to the SMTP receiver.
  65.  
  66. ***** UNIX TCP BUG = duplicated mail, timeouts *****
  67.  
  68. In at least old versions of the TCP code distributed by BBN, there
  69. is a bug that can cause buffered data to not be sent until more data
  70. is transmitted.  When used by SMTP, this typically causes the end of a DATA
  71. transaction to appear to hang.  When the sending SMTP times out, it sends
  72. a QUIT.  This QUIT forces out the buffered data, and causes the receiver to
  73. see the end of the DATA commmand.  Thus the sender thinks the transaction has
  74. failed (it timed out), and the receiver thinks that the transaction has
  75. succeeded.  Later, the sender retransmits the whole message,
  76. leading to duplications.
  77.  
  78. The fix is below:
  79.  
  80. In tcp-states.c, procedure sss_snd, under the comment "find end of send buffer
  81. and append data", a while clause reading:
  82.  
  83.     while (m->m_next != NULL) {
  84.         m = m->m_next;
  85.         last +=m->m_len;
  86.     }
  87. is in error.  The fix is to reverse the two statements in the clause.
  88. As it is it counts the last buffer twice and the first buffer not at all.
  89. With the fix, each buffer is counted once.
  90.  
  91. ***** CRLF at end of message *****
  92.  
  93. There is a bug in many versions of XMAILR that will garbage the MAIL.TXT
  94. file if asked to store a message that does not end in CRLF.  The ISI
  95. SMTP adds an extra CRLF to all messages as a temporary cludge to
  96. avoid this problem.
  97.  
  98. ***** CRLF and UNIX systems *****
  99.  
  100. Some UNIXes send mail that if full of LFs rather than CRLFs.  This can
  101. cause problems in mail reading programs such as MSG, which can type
  102. the mail but not locate header fields.
  103.  
  104. ***** Null FROM fields *****
  105.  
  106. The SMTP specification allows the FROM field to be null.  Some mailers
  107. don't accept null fields, and others add hops to a null FROM field
  108. when forwarding mail.
  109.  
  110. ***** Domain names ******
  111.  
  112. There is a great deal of disagrement regarding doamin names in host
  113. identifiers.  The only widely acceptable domain names are X.ARPA
  114. for X, where X is a valid Internet (i.e. host table from NIC) host name.
  115. This will undoubtedly change as domain naming is standardized.
  116.  
  117. ***** HELO command *****
  118.  
  119. Many mailers demand a HELO command before they will accept mail.  Its
  120. best to give one before attempting to transmit.
  121.  
  122. ***** QUIT command *****
  123.  
  124. Several mailers simply hang up rather than sending QUITs, particularly
  125. after errors.  The QUIT command, followed by a TCP close, is recommended.
  126.  
  127. ***** TCP close ******
  128.  
  129. SMTP connections are supposed to be closed rather than aborted.  Several
  130. mailers don't do this, probably because TCP close can take a long
  131. time, i.e. 30 seconds.
  132.  
  133. ***** RCPT command responses in UNIX SMTP *****
  134.  
  135. Some versions of SMTP derived from the BBN code don't look at
  136. the response to RCPT commands.
  137.  
  138. ***** Multi-line responses *****
  139.  
  140. The SMTP protocol defines a method for giving multi-line response codes.
  141. Many mailers generate multi-line responses; some even use them in the
  142. message sent on initial connect.  
  143.  
  144. Unfortunately, some mailers don't understand multi-line responses.
  145. We have seen UNIX mailers that take each line of a multi-line response
  146. as a separate response.  Thus, for example, they take a 3 line
  147. initial connect message and interpret it as the initial connect
  148. message and positive responses to the first two commands sent, and 
  149. stay two commands out of phase in matching up commands and responses.
  150. This leads to interesting behavior.
  151.  
  152. We have also observed the reverse problem.  Some mailers send
  153. multi-line responses without the "-" which would identify the response
  154. as being multi-line.
  155.  
  156. ***** sndmsg balks *****
  157.  
  158. Some versions of SMTP derived from the BBN SMTP seem to occasionally
  159. send SMTP responses without numeric codes.  The message typically contains
  160. text "sndmsg balks ...".  Other messages without codes are also seen.
  161.  
  162. ***** TELNET protocol in SMTP transactions *****
  163.  
  164. The SMTP connection is not supposed to do TELNET negotiations, etc.
  165. The control codes used can make otherwise understandable transmissions
  166. unintelligible to SMTPs that don't implement TELNET codes.  TELNET codes
  167. should not be supported because they would destroy the ability
  168. of the SMTP protocol to send arbitrary octets in the message body.
  169. Admittedly this is not a real issue for DEC-10s and 20s, but could
  170. prevent future use of mail to send arbitrary text.
  171.  
  172. ***** \ and " in addresses ******
  173.  
  174. The use of the \ and " in addresses should be avoided when not necessary
  175. because many mailers don't as yet do the right thing; those mailers
  176. should be fixed.
  177. 18-Jan-83 10:45:38-PST,4224;000000000001
  178. Mail-From: SMTP created at 18-Jan-83 10:45:34
  179. Return-path: Taft.PA@PARC-MAXC.ARPA
  180. Received: FROM PARC-MAXC BY USC-ISIF.ARPA WITH TCP ; 18 Jan 83 10:41:54 PST
  181. Date: 18 Jan 1983 10:37 PST
  182. From: Taft at PARC-MAXC
  183. Subject: Re: common SMTP problems
  184. In-reply-to: MOCKAPETRIS' message of 17 Jan 1983 2218-PST
  185. To: MOCKAPETRIS@USC-ISIF
  186. cc: Postel@USC-ISIF, Taft
  187.  
  188. Your compilation of SMTP pitfalls should be very useful.  I've already stumbled
  189. over many of them!
  190.  
  191. A couple of comments/questions:
  192.  
  193. 1. QUIT command
  194.  
  195. What is supposed to be the problem with simply closing the connection?  The
  196. QUIT handshake seems entirely redundant.  I know TCP close has rather peculiar
  197. semantics in some implementations (e.g., the Tops20/Tenex TCP) and is therefore
  198. somewhat flakey; but such problems should be fixed at the TCP level rather than
  199. adding useless baggage to higher-level protocols.
  200.  
  201.  
  202. 2. Domain names
  203.  
  204. I've been forced to adopt a rather permissive attitude about the presence or
  205. absence of root (top-level) domain elements such as .ARPA, since many SMTPs
  206. don't send them (and, for that matter, most users don't type them).  Note,
  207. however, that when the root domain element is considered to be optional, parsing
  208. of domains becomes syntactically ambiguous.  Resolving this problem requires
  209. applying semantic information, such as consulting the host table.
  210.  
  211. For example, the names "foo@Berkeley.ARPA" and "foo@UCBVAX.Berkeley" are
  212. syntactically indistinguishable; but the host name of interest (for the purpose of
  213. making SMTP connections) is "Berkeley" in both cases.  My algorithm is to use
  214. the next-to-last element as the host name if the last element is "ARPA", else to
  215. use the last element as the host name.
  216.  
  217. Also, the presence or absence of source routes in mailbox paths complicates
  218. matters.  In a path of the form "x@y", y is the domain of interest; but in a path
  219. of the form "x,y:z@w", x is the domain of interest (i.e., the one which should be
  220. parsed to derive the name of the host to connect to).  This means that y in the
  221. first case and x in the second case may be assumed to have "ARPA" as their root
  222. element, whether they say so or not.  But note well that in the second case,
  223. nothing can be assumed about y and w, and in general it would be incorrect to
  224. automatically append ".ARPA" to either one.
  225.  
  226. For example, consider the following two pairs of paths:
  227.  
  228. 1a) @ISIF.ARPA:Mockapetris@ISIF
  229. 1b) @ISIF.ARPA:Mockapetris@ISIF.ARPA
  230.  
  231. 2a) @Berkeley.ARPA:foo!harpo!bilbo!frodo@RandomVAX
  232. 2b) @Berkeley.ARPA:foo!harpo!bilbo!frodo@RandomVAX.UUCP
  233.  
  234. The first two paths are equivalent, and so are the second (or at least they might
  235. be; I'm not too familiar with the Berkeley name space).  In the first instance the
  236. mailbox is within the ARPA root domain, but in the second it is not.  When the
  237. root element is not given, it is not possible to tell on a syntactic basis what the
  238. root element is.  And actually there is no way of knowing whether or not a root
  239. element exists unless you have a table of all possible root domains (a bad idea, in
  240. my estimation).  Consider:
  241.  
  242. 2c) @Berkeley.ARPA:foo!harpo!bilbo!frodo@RandomNet1.RandomVAX2
  243.  
  244. You may say that abbreviated domains shouldn't be sent; and in fact both the
  245. header standard and the SMTP spec say precisely this.  But a lot of
  246. implementations do send abbreviated domains anyway.  And even if they don't,
  247. PEOPLE will type abbreviated domains, and the mail-sending software can't
  248. always tell whether domains are abbreviated or not.  I think I have shown that
  249. just mindlessly pasting on ".ARPA" everywhere would be incorrect, since there
  250. exist root domains other than ARPA.  (UUCP and CSNET are the only ones I'm
  251. aware of at present, but the number is sure to grow.)
  252.  
  253. What to do?  I don't see this problem being solved until name servers become
  254. widely available and are sufficiently robust and sufficiently available to be
  255. trusted.  Such servers must (a) be capable of looking up multi-element domains,
  256. abbreviated or not, and returning an authoritative answer as to how they should
  257. be parsed; and (b) be sufficiently up-to-date that they can be guaranteed to
  258. contain at least all the root domains.
  259.  
  260.     Ed Taft
  261.  
  262. 25-Jan-83 01:19:18-PST,1089;000000000001
  263. Mail-From: SMTP created at 25-Jan-83 01:16:29
  264. Return-path: @USC-ISI,wales@UCLA-Net
  265. Received: FROM USC-ISI.ARPA BY USC-ISIF.ARPA WITH TCP ; 25 Jan 83 01:15:44 PST
  266. Received: FROM UCLA-SECURITY BY USC-ISI.ARPA WITH TCP ; 25 Jan 83 01:11:05 PST
  267. Date:           Tue, 25 Jan 1983 01:10:18 PST
  268. From:           Rich Wales <wales@UCLA-Net>
  269. To:             mockapetris@isi
  270. Subject:        another mail bug to add to your list
  271.  
  272. When we fixed the bug in our sender-SMTP ("mailer.c") from BBN which
  273. prevented it from looking at the reply to an RCPT command, we found
  274. another bug.
  275.  
  276. As distributed, the only affirmative reply BBN's "mailer.c" will take
  277. was a 250.  It looped forever until it got either a 250 or a rejection
  278. (4xx or 5xx).  If the receiver-SMTP happened to reply with a 251 ("will
  279. forward to ..."), our sender-SMTP would ignore that reply and timeout
  280. waiting for something else.
  281.  
  282. Lots of mail for ISI is probably getting held up by this one, needless
  283. to say.
  284.  
  285. The fix was fairly easy -- changing a "while (i != 250)" to "while
  286. (i != 250 && i != 251)".
  287.  
  288. -- Rich
  289.  
  290. 27-Jan-83 10:59:33-PST,1323;000000000001
  291. Mail-From: SMTP created at 27-Jan-83 10:55:33
  292. Return-path: @USC-ISI,wales@UCLA-Net
  293. Received: FROM USC-ISI.ARPA BY USC-ISIF.ARPA WITH TCP ; 27 Jan 83 09:51:23 PST
  294. Received: FROM UCLA-SECURITY BY USC-ISI.ARPA WITH TCP ; 27 Jan 83 09:44:27 PST
  295. Date:           Wed, 27 Jan 1982 09:41:58 PST
  296. From:           Rich Wales <wales@UCLA-Net>
  297. To:             Robert Gurwitz <gurwitz@bbnv>
  298. CC:             Paul Mockapetris <mockapetris@isi>
  299. CC:             Lou Nelson <lou@aerospace>,
  300.                 Evelyn Walton <eve@ucla-net>,
  301.                 Charles Kline <csk@ucla-net>
  302. Subject:        Silly Window Syndrome in BBN TCP kernel code
  303.  
  304. The BBN TCP kernel code suffers from Silly Window Syndrome.  The piece
  305. of code designed to combat this problem (near line 230 of bbnnet/-
  306. tcp_procs.c) suffers from Non-Terminated Comment Syndrome and thus
  307. never gets compiled into the program.
  308.  
  309.     /* Avoid silly window syndrome: make sure usable window
  310.        is at least 25% of offered window.  Be sure the user
  311.        is not blocked for send resources. 
  312.     
  313.     else if (!tp->rexmt && !tp->ack_due && !tp->snd_fin &&
  314.          up->uc_snd != up->uc_ssize && tp->snd_wnd > 0 && 
  315.          100*((tp->snd_lst-tp->snd_una)/tp->snd_wnd) < 25)
  316.         tp->snd_lst = tp->snd_nxt; 
  317.  
  318. Is this intentional?  (My initial assumption is that it isn't.)
  319.  
  320. -- Rich
  321.  
  322. 27-Jan-83 14:45:48-PST,1278;000000000001
  323. Mail-From: SMTP created at 27-Jan-83 14:10:53
  324. Return-path: @USC-ISI,wales@UCLA-Net
  325. Received: FROM USC-ISI.ARPA BY USC-ISIF.ARPA WITH TCP ; 27 Jan 83 12:42:35 PST
  326. Received: FROM UCLA-SECURITY BY USC-ISI.ARPA WITH TCP ; 27 Jan 83 12:38:46 PST
  327. Date:           Thu, 27 Jan 1983 12:33:06 PST
  328. From:           Rich Wales <wales@UCLA-Net>
  329. To:             gurwitz@bbnv
  330. CC:             mockapetris@isi, lou@aerospace, eve@ucla-net,
  331.                 csk@ucla-net
  332. Subject:        more on Silly Window Syndrome in BBN TCP kernel code
  333.  
  334. Regarding the code in "tcp_procs.c" to sidestep Silly Window Syndrome,
  335. I just noticed what appears to be a bug.  (My apologies for not having
  336. noticed it when I wrote my previous message!)
  337.  
  338. The computation
  339.  
  340.     100*((tp->snd_lst-tp->snd_una)/tp->snd_wnd) < 25
  341.  
  342. doesn't look like it will work right, since the result of the division
  343. will be truncated to zero before being multiplied by 100.
  344.  
  345. It seems that the following modified version would work:
  346.  
  347.     (100*(tp->snd_lst-tp->snd_una))/tp->snd_wnd < 25
  348.  
  349. (where the outer set of parens is not really necessary, because of the
  350. left-to-right evaluation).
  351.  
  352. For that matter, you could even use a left-shift for greater speed.
  353.  
  354.     ((tp->snd_lst-tp->snd_una)<<2)/tp->snd_wnd < 1
  355.  
  356. -- Rich
  357.  
  358. 25-Jan-83 13:54:55-PST,1566;000000000001
  359. Mail-From: POSTEL created at 25-Jan-83 13:53:15
  360. Date: 25 Jan 1983 1353-PST
  361. From: POSTEL at USC-ISIF
  362. Subject: DOMAIN STYLE NAMES
  363. To:   "Internet-Contacts":
  364.  
  365.  
  366.  
  367. Hello:
  368.  
  369. This message is about the domain style names that were introduced with 
  370. the new mail system.  The domain style names will be used in the future 
  371. for all naming of hosts, not just in mail.
  372.  
  373. Currently all host names used in the Internet must be registered and 
  374. kept on file at the Network Information Center.
  375.  
  376. The intent is to set in place a naming convention that allows for the 
  377. eventual subdivision of the authority for assigning host names.  In the 
  378. future, the Internet will be much larger and the task of maintaining a 
  379. central list of all the hosts will become impossible.  The task of 
  380. maintaining host name to address mapping tables, and tables of other 
  381. information about hosts will, of necessity, be subdivided among a number
  382. of authorities.
  383.  
  384. While policies and procedures are being developed for the use of the 
  385. domain style names, we must restrict the use of such names.  One of the 
  386. key issues to be resolved is to itemize the requirements on a naming 
  387. subauthority.  One requirement will be to provide online hostname to 
  388. address lookup servers.  Another task to be completed is the 
  389. specification the protocol to be used in accessing such servers.
  390.  
  391. Currently the only permitted use of the domain style names is the form
  392.  
  393.    "hostname.ARPA"
  394.  
  395. where "hostname" is registered with the NIC and on file in the NIC's 
  396. HOSTS.TXT file.
  397.  
  398. --jon.
  399.  
  400. -------
  401.  1-Feb-83 09:53:08-PST,1282;000000000001
  402. Mail-From: POSTEL created at  1-Feb-83 09:48:01
  403. Date:  1 Feb 1983 0948-PST
  404. From: POSTEL at USC-ISIF
  405. Subject: more info for mail.errors
  406. To:   MOCKAPETRIS at USC-ISIF
  407.  
  408. Mail-From: SMTP created at  1-Feb-83 08:38:40
  409. Return-path: ajg@ll-vlsi
  410. Received: FROM LL-VLSI BY USC-ISIF.ARPA WITH TCP ; 1 Feb 83 08:32:31 PST
  411. Date: 1 Feb 1983 11:33:02-EST
  412. From: ajg at ll-vlsi
  413. To: dmpowles@bbn-unix
  414. Subject: more mail problems
  415. Cc: ajg@ll-vlsi, postel@isif
  416.  
  417. Hi,
  418.   There are several additional problems with the 
  419. delivermail version of smtp.c.
  420.   If the the local mailer is delivermail smtp
  421. responds O.K. to any RCPT command, even if the
  422. recipient is not known locally. Delivermail
  423. then fails, and smtp issues a "451 sndmsg balks .. try again".
  424. The RCPT argument should be checked, anf if the user is
  425. unknown a 550 should be issued.
  426.   Also the MAIL argument is ignored, and delivermail 
  427. is invoked with the "a" switch, get sender from message
  428. header. The parser in delivermail dies on some message headers,
  429. which again results in a "451 sndmsg balks ..."
  430. Delivermail should probably be invoked with "f" switch,
  431. with the argument from the MAIL command.
  432.  
  433.               -Tony Giovinazzo
  434.                MIT Lincoln Laboratory
  435.                617 863 - 5500 X2702
  436. -------
  437.  6-Feb-83 10:55:30-PST,743;000000000001
  438. Mail-From: SMTP created at  6-Feb-83 10:53:02
  439. Return-path: Taft.PA@PARC-MAXC.ARPA
  440. Received: FROM PARC-MAXC BY USC-ISIF.ARPA WITH TCP ; 6 Feb 83 10:48:05 PST
  441. Date: 6 Feb 1983 10:47 PST
  442. From: Taft.PA@PARC-MAXC.ARPA
  443. Subject: Another common SMTP problem
  444. To: Mockapetris@ISIF.ARPA
  445. cc: Postel@ISIF.ARPA, Taft.PA@PARC-MAXC.ARPA
  446.  
  447. Here is another problem I've been seeing quite a lot of lately: SMTP senders who
  448. issue a QUIT command and then (without waiting for the reply) immediately
  449. either close or abort the connection.  This causes the server to get an I/O error
  450. while trying to send the reply.  If you use QUIT at all (I still consider it entirely
  451. pointless), you should wait for the reply before terminating the connection.
  452.     Ed
  453.  
  454. 12-Feb-83 16:55:33-PST,2156;000000000001
  455. Return-path: <WWB.TYM@OFFICE-3>
  456. Mail-From: SMTP created at 12-Feb-83 16:51:45
  457. Return-path: OUT-MAIL@OFFICE-3.ARPA
  458. Received: FROM OFFICE-3 BY USC-ISIF.ARPA WITH TCP ; 12 Feb 83 16:47:24 PST
  459. Date: 12-Feb-83 16:46 PST
  460. From: WWB.TYM@OFFICE-3
  461. Subject: NOSC SMTP weirdness
  462. To: postel@isif, mockapetris@isif
  463. Cc: RLL.TYM@OFFICE-3, DAP.TYM@OFFICE-3, DIA.TYM@OFFICE-3
  464. Message-ID: <[OFFICE-3]TYM-WWB-1U8WH>
  465.  
  466. Well.. you asked me to let you know if I saw anything weird anywhere.. and I 
  467. did.  We've had a message or two bottled up on office-7 for many days now for 
  468. NOSC.  Connections seem to get made sometimes (and not others) but it blows up 
  469. mysteriously.  I spotted an odd one in the logs today - happened a couple times.
  470.  Seems to be an instance of the missing-CR problem.  I tried to test it "by 
  471. hand" and the thing disconnected remotely before I got a whole message body 
  472. typed in!  That's too short a timeout.  Anyhow, as best I can guess from my 
  473. lousy logs, the thing accepts ANY address at the RCPT stage but after the DATA 
  474. part, it complains and presumably says NO if it doesn't like the address 
  475. (ARPAVAX.MAILER-DAEMON@NOSC is the specific badguy).  But the way in which it 
  476. says NO is weird, seeming to put out several messages that were intended to be 
  477. separate, separated by linefeeds.  Namely, " Mail not 
  478. delivered.<LF>ARPAVAX.MAILER-DAEMON... User unknown<LF>250 Mail Accepted.", 
  479. which is then apparently followed by a quick disconnect or something.  There 
  480. might have been a numeric code in front of the message; due to bad logging 
  481. habits I wouldn't know.
  482.  
  483. The unwillingnesss of their server to listen long enough for me to send then a 
  484. complaint msg by hand leaves us high and dry.  Do you know anything about this 
  485. kind of thing?  I think they are running the BBN UNIX code, but not sure.  In 
  486. any case they seem screwy to me.  If you happen to try it and discover anything,
  487. I'd be interested in hearing of it.  -Bill
  488.  
  489. PS.  Very early in the picture, I seem to remember that we did send some 
  490. messages successfully to NOSC.  Maybe they broke something while trying to jazz 
  491. up something else recently.
  492.  
  493. 15-Feb-83 07:07:50-PST,1188;000000000001
  494. Return-path: <gurwitz@BBN-UNIX>
  495. Mail-From: SMTP created at 15-Feb-83 06:45:26
  496. Return-path: gurwitz@bbn-unix
  497. Received: FROM BBNT BY USC-ISIF.ARPA WITH TCP ; 15 Feb 83 06:41:20 PST
  498. Date: 15 Feb 1983  9:27:36 EST (Tuesday)
  499. From: Rob Gurwitz <gurwitz at BBN-UNIX>
  500. Subject: Re: Bum SMTP code for VAX Unix
  501. In-Reply-to: Your message of 14 Feb 1983 12:14 PST
  502. To: POSTEL at USC-ISIF
  503. Cc: Gurwitz at BBN-UNIX, Postel at ISIF, Clark at MIT-MULTICS,
  504.     Haverty at BBN-UNIX, Kahn at ISIA
  505.  
  506. Jon,
  507. I've got a version of SMTP that should fix all the bugs you refer to.  I have
  508. a good list of the sites I sent tapes of the UNIX TCP code to, but I wouldn't
  509. be too surprised if there were other sites running the code by now, too.  
  510.  
  511. There is now a net mailing list, bbn-tcp, through which we can reach many of
  512. the recipients of our code.  I have not attempted to ship new code to each
  513. individual site, but have made its availability known through the list.  It's
  514. my understanding that we're not providing individual site support, except to
  515. ARPA VLSI and Image Understanding contractors. We are maintaining the code
  516. and making changes available to the non-ARPA sites, however.
  517.  
  518. Rob
  519.  
  520. 14-Mar-83 12:34:26-PST,614;000000000001
  521. Return-path: <dean@cornell>
  522. Mail-From: SMTP created at 14-Mar-83 12:32:58
  523. Received: FROM CORNELL BY USC-ISIF.ARPA WITH TCP ; 14 Mar 83 12:33:08 PST
  524. Date: 14 Mar 1983 14:23:06-EST
  525. From: dean at Cornell
  526. To: mike@brl, postel@usc-isif
  527. Subject: Re: Protocol Police!
  528.  
  529. I have made the fix to our SMTP server.  It now responds to an RSET with
  530. "250 OK" rather than the incorrect "200 OK".  This bug was in the BBN
  531. distribution we received for our 4.1bsd system, so it might be in other
  532. people's running systems as well.  Notice of the error should probably be
  533. distributed.
  534.                     Dean Krafft
  535.                     dean@cornell
  536. 27-Feb-83 13:56:22-PST,2334;000000000001
  537. Return-path: <mike@brl-bmd.arpa>
  538. Mail-From: SMTP created at 27-Feb-83 13:51:41
  539. Received: FROM BRL-BMD BY USC-ISIF.ARPA WITH TCP ; 27 Feb 83 13:51:44 PST
  540. Date:     27 Feb 83 15:50:11 EST (Sun)
  541. From:     Mike Muuss <mike@Brl-Bmd.ARPA>
  542. To:       ucbtcp11@Sri-Tsc.ARPA
  543. cc:       Gurus@Brl-Bmd.ARPA, Postel@Usc-Isif.ARPA
  544. Subject:  TCP Retransmit Timeouts
  545.  
  546. I have been watching the way our TCP has been interacting with our IMP,
  547. and I've noticed some really bad things.  Especially for bulk data transfers
  548. (SMTP, FTP) there has been a good deal of IMP Blocking.
  549.  
  550. Now I know that the PDP-11 version of the code does not do RFNM counting,
  551. but the problem would still be there if it did -- the TCP is simply
  552. over-driving the ArpaNet, and going into lots of (unnecessary) retransmits
  553. because of it.  After some inspection of the code in tcp_timer.c, I
  554. have made the following mods (around line 110):
  555.  
  556.  
  557. /* Note that the formula used by tcp_timers() goes like this:
  558.  *    t_timer = ( (t_srtt/10) * tcp_backoff[t_rxtshift-1] ) / 10;
  559.  *    t_srtt ~=~ t_rtt * 10;
  560.  * with the result limited to the range 0.5--15 seconds.
  561.  * t_srrt is the "smoothed" round trip time *10, t_rtt is 1 round trip time.
  562.  */
  563. int     tcp_backoff[TCP_MAXRXTSHIFT] =          /* scaled by 10 */
  564.     { 12, 20, 25, 32, 40, 50, 60, 80, 160, 320 };
  565. /**    { 10, 12, 14, 17, 20, 30, 50, 80, 160, 320 };    ** OLD ***/
  566.  
  567. I can certainly understand retransmissions at 1x, 2x, 3x the round trip
  568. times, but 1.0x 1.2x 1.4x 1.7x 2.0x ??  I don't see how those intermediate
  569. retransmissions can hope to be ack'ed in time to prevent the next retransmit.
  570. So, with no empirical evidence to support my suggestions, I suggest
  571. using 1.2x 2.0x 2.5x 3.2x 4.0x ... as shown above.  The 1.2x gives a
  572. triffle extra for the first ACK, 2.0 is obvious, 2.5 is being pesimistic,
  573. and the rest are just for luck.
  574.  
  575. I suspect that even slightly more pesimistic numbers may be appropriate
  576. for high-latency networks like the ArpaNet.  I have no idea what effect
  577. my change to the strategy will make on high-loss networks (like SATNET),
  578. but the penalty on local-area networks should be minimal, as retransmits
  579. arn't usually expected.
  580.  
  581. Again, I assert that all this is completely ad-hoc, but I'm trying to
  582. reduce IMP blocking / output queue backlogs.
  583.                         Cheers,
  584.                          -Mike
  585.  
  586. 25-Apr-83 12:31:03-PDT,1487;000000000001
  587. Return-path: <mja@cmu-cs-cad>
  588. Mail-From: SMTP created at 25-Apr-83 12:28:26
  589. Received: FROM CMU-CS-CAD BY USC-ISIF.ARPA WITH TCP ; 25 Apr 83 12:28:34 PDT
  590. Date: Monday, 25 April 1983 15:28:00 EDT
  591. From: Mike.Accetta@CMU-CS-CAD
  592. To: postel@isif
  593. Subject: SMTP question
  594. Message-ID: <1983.4.25.18.48.39.Mike.Accetta@CMU-CS-CAD>
  595.  
  596. Jon,
  597.  
  598.    We experienced problems over the weekend with mail from the
  599. INFO-COBOL mailing list.  Due to the number of message recipients, the
  600. sender was timing out before our local mailer finished delivering the
  601. mail (and consequently lots of CMU people received 10-20 copies of the
  602. same messages).  I guess this situation is really the product of the
  603. length of the message and the number of recipients.  Should this be
  604. considered a problem with the remote mailer not waiting long enough for
  605. delivery (i.e. they need to fix their system) or our mailer not meeting
  606. some maximum delivery time threshhold (i.e. we need to fix our system)?
  607.  
  608.    If we are at fault, would it be legal to change our mail servers to
  609. limit the number of RCPT TO commands it will accept per message and
  610. reject any after the first N with a 452 reply (so that those addresses
  611. will be retried later in a subsequent attempt).  This seems to be
  612. reasonable according to the specification and mailers ought to be
  613. prepared to deal with it.  I'm told that at least XMAILR deals with
  614. this type of reply correctly.  It won't handle the large message case
  615. though.
  616.  
  617.                 - Mike
  618.  5-May-83 20:59:40-PDT,3648;000000000001
  619. Return-path: <MRC@SU-SCORE.ARPA>
  620. Mail-From: SMTP created at  5-May-83 20:56:11
  621. Received: FROM SU-SCORE BY USC-ISIF.ARPA WITH TCP ; 5 May 83 20:56:17 PDT
  622. Date: Thu 5 May 83 20:49:57-PDT
  623. From: Mark Crispin <MRC@SU-SCORE.ARPA>
  624. Subject: [Mark Crispin <MRC@SU-SCORE.ARPA>: TCP BUGFIX: Slow TVT response]
  625. To: Postel@USC-ISIF.ARPA, Mockapetris@USC-ISIF.ARPA
  626. Postal-Address: 725 Mariposa Ave. #103; Mountain View, CA 94041
  627. Phone: (415) 497-1407 (Stanford); (415) 968-1052 (residence)
  628.  
  629. For your information.  You might want to add this to the official log
  630. of patches/bugfixes that affect the mailsystem.  I would consider this
  631. to be a required patch for the MRC mailsystem:
  632.  
  633.                 ---------------
  634.  
  635. Mail-From: MRC created at  5-May-83 20:43:39
  636. Date: Thu 5 May 83 20:43:38-PDT
  637. From: Mark Crispin <MRC@SU-SCORE.ARPA>
  638. Subject: TCP BUGFIX: Slow TVT response
  639. To: TOPS-20@SU-SCORE.ARPA
  640. Postal-Address: 725 Mariposa Ave. #103; Mountain View, CA 94041
  641. Phone: (415) 497-1407 (Stanford); (415) 968-1052 (residence)
  642.  
  643.      This patch is based on a patch from Charlie Lynn at BBN.  It
  644. fixes slow TVT response when the TVT is receiving a lot of data.
  645. This should be considered a "required patch" for all sites
  646. running my SMTP server (MAISER) to remedy a performance problem
  647. with large incoming messages; for all other sites it is a
  648. "recommended patch".
  649.  
  650.      This patch should improve the "slow TVT" problem.  The hook
  651. to refill the TTY input buffer from a packet when it is emptied
  652. is missing.  The current code "works" since arrivals of other
  653. packets (e.g. retransmissions) cause the reassembler to be run.
  654.  
  655. GTTCI/    SKIPG T1,TTICT(T2)
  656. GTTCI+1/  RET        JRST FFF
  657.  
  658. FFF/    HLRZ CX,TTSAL1(T2)
  659. FFF+1/    CAIN CX,TT.TVT
  660. FFF+2/    SKIPG TTNETW(T2)
  661. FFF+3/    RET
  662. FFF+4/    PUSH P,T2
  663. FFF+5/    PUSH P,TCB
  664. FFF+6/    JSP CX,NOSK11
  665. FFF+7/    HRRZ TCB,TTDEV(T2)
  666. FFF+10/    JUMPE TCB,.+11
  667. FFF+11/    HRLI TCB,INTSEC
  668. FFF+12/    XMOVEI T1,RA
  669. FFF+13/    MOVEI T2,T20
  670. FFF+14/    HRRZ T3,$TRCB(TCB)
  671. FFF+15/    HRRZ T4,TCBRPQ(TCB)
  672. FFF+16/    SKIPN T3
  673. FFF+17/    CAIE T4,TCBRPQ(TCB)
  674. FFF+20/    CALL SIGNAL
  675. FFF+21/    JSP CX,OKSK11
  676. FFF+22/    POP P,TCB
  677. FFF+23/    POP P,T2
  678. FFF+24/    RET
  679. FFF+25/    FFF:
  680.  
  681.      A source version of this patch follows.  It hasn't been
  682. tested yet, but ought to work.
  683.  
  684.      First, make the label SYMBOL in TCPTCP.MAC global (change
  685. SYMBOL: to SYMBOL::).  Add SYMBOL as a global in GLOBS.MAC.
  686.  
  687.      Second, change the start of GTTCI from:
  688. GTTCI:    SKIPG 1,TTICT(2)    ;ANY CHARS IN BUFFER?
  689.     RET            ;NO
  690.      to:
  691. GTTCI:    SKIPLE 1,TTICT(2)    ;ANY CHARS IN BUFFER?
  692.     IFSKP.            ;NO, MAYBE NEED TO REFILL FROM PACKET BUFFER
  693.       TDCALL D,<<TV,TVRFIL>>;DO TVT-DEPENDENT REFILL SIGNAL
  694.       RET            ;RETURN EMPTY
  695.     ENDIF.
  696.  
  697.      Finally, add the following routine to TTTVDV.MAC.  Make sure
  698. you add it in a section that is RSCOD.  I put it in right after
  699. the TVMNTR routine.
  700.  
  701. ;TVRFIL - ROUTINE TO SIGNAL TVT BUFFER REFILL WHEN EMPTY
  702. ;CALLED FROM GTTCI
  703.  
  704. TVRFIL:    SKIPG TTNETW(T2)    ;STILL CONNECTED TO NETWORK?
  705.      RET            ;NO, NOTHING TO DO
  706.     PUSH P,T2        ;SAVE DYNAMIC DATA
  707.     PUSH P,TCB        ;SAVE TTYSRV CONTEXT
  708.     NOSKED            ;OWN THE SYSTEM
  709.     LOAD TCB,PTVT,(T2)    ;GET TCB IF EXISTS
  710.     IFN. TCB        ;HAVE ONE?
  711.       SETSEC TCB,INTSEC    ;TCB'S ARE IN INTSEC
  712.       DO.
  713.         IFQE. TRCB,(TCB)    ;RECV% BUFFER EXISTS?
  714.           LOAD T1,QNEXT,<+TCBRPQ(TCB)> ;NO, GET NEXT ITEM ON RA QUEUE
  715.           CAIN T1,TCBRPQ(TCB) ;IS RA QUEUE EMPTY?
  716.            EXIT.        ;YES, NO NEED TO RUN REASSEMBLER
  717.         ENDIF.
  718.         $SIGNL(RA,20)    ;RUN REASSEMBLER AFTER SHORT DELAY
  719.       ENDDO.
  720.     ENDIF.
  721.     OKSKED            ;RETURN THE SYSTEM
  722.     POP P,TCB        ;RESTORE TTYSRV CONTEXT
  723.     POP P,T2        ;RESTORE DYNAMIC DATA
  724.     RET
  725. -------
  726. -------
  727.  5-May-83 21:43:58-PDT,1173;000000000001
  728. Return-path: <MRC@SU-SCORE.ARPA>
  729. Mail-From: SMTP created at  5-May-83 21:41:25
  730. Received: FROM SU-SCORE BY USC-ISIF.ARPA WITH TCP ; 5 May 83 21:41:49 PDT
  731. Date: Thu 5 May 83 21:38:44-PDT
  732. From: Mark Crispin <MRC@SU-SCORE.ARPA>
  733. Subject: TCP BUGFIX: ADDENDUM
  734. To: TOPS-20@SU-SCORE.ARPA
  735. cc: Postel@USC-ISIF.ARPA, Mockapetris@USC-ISIF.ARPA
  736. Postal-Address: 725 Mariposa Ave. #103; Mountain View, CA 94041
  737. Phone: (415) 497-1407 (Stanford); (415) 968-1052 (residence)
  738.  
  739. Don Watrous is, of course, right that "SYMBOL" should be replaced by
  740. "SIGNAL" in the comment on what to make global.  Let's hear it for bad
  741. proofreading.
  742.  
  743. I've discovered a problem in Charlie's original patch.  When MAISER
  744. invokes MMailbox to validate a host name, the connection starts echoing.
  745. Damned if I know why.  The fix, however, is to remove the POP P,T2 from
  746. the TVRFIL routine and replace the PUSH P,T2 with SAVET.  In the DDT
  747. patch, remove the POP P,T2 and replace the PUSH P,T2 with JSP CX,SAVT.
  748. I'll leave it as an exercise for those who are somewhat less tired than I
  749. am right now to figure out why this is necessary and why invoking an
  750. inferior fork tickles this bug.
  751. -------
  752.  5-May-83 23:14:45-PDT,911;000000000001
  753. Return-path: <WATROUS@RUTGERS>
  754. Mail-From: SMTP created at  5-May-83 23:10:20
  755. Received: FROM RUTGERS BY USC-ISIF.ARPA WITH TCP ; 5 May 83 23:10:31 PDT
  756. Date:  6 May 1983 0206-EDT
  757. From: Don <WATROUS@RUTGERS>
  758. Subject: Re: TCP BUGFIX: ADDENDUM
  759. To: MRC@SU-SCORE, TOPS-20@SU-SCORE
  760. cc: Postel@USC-ISIF, Mockapetris@USC-ISIF
  761. In-Reply-To: Your message of 6-May-83 0049-EDT
  762.  
  763. There's an incompatibility between TCPTCP's SIGNAL label and PROLOG's
  764. SIGNAL macro, causing MACRO to give one of its endearing Q errors on
  765. the $SIGNL macro we are adding to TTTVDV.
  766.  
  767. You can get around this by entering SIGNL (rather than SIGNAL) in
  768. GLOBS, putting SIGNL:: right before the SIGNAL: in TCPTCP, and
  769. changing the CALL SIGNAL in the definition of $SIGNL in TCPPAR to
  770. CALL SIGNL.  (Whew!)
  771.  
  772. Don
  773.  
  774. P.S. - We're now running the source version of MRC's patch, including
  775. replacing the PUSH/POP of T2 with SAVET.
  776. -------
  777.  6-May-83 02:32:12-PDT,1628;000000000001
  778. Return-path: <MRC@SU-SCORE.ARPA>
  779. Mail-From: SMTP created at  6-May-83 02:29:31
  780. Received: FROM SU-SCORE BY USC-ISIF.ARPA WITH TCP ; 6 May 83 02:29:35 PDT
  781. Date: Fri 6 May 83 02:32:03-PDT
  782. From: Mark Crispin <MRC@SU-SCORE.ARPA>
  783. Subject: more TVT performance fixes
  784. To: TOPS-20@SU-SCORE.ARPA
  785. cc: Postel@USC-ISIF.ARPA, Mockapetris@USC-ISIF.ARPA
  786. Postal-Address: 725 Mariposa Ave. #103; Mountain View, CA 94041
  787. Phone: (415) 497-1407 (Stanford); (415) 968-1052 (residence)
  788.  
  789.      A fix that should be put into the TVT performance
  790. improvement patch is to check to see if the reassembler's process
  791. lock is running already.  Otherwise, it is possible that the
  792. system could get an NSKDIS bughlt if RA's PRCLCK is locked when
  793. TVRFIL decides to wake up RA.  Here's an updated routine, with
  794. that check added:
  795.  
  796. ;TVRFIL - ROUTINE TO SIGNAL TVT BUFFER REFILL WHEN EMPTY
  797. ;CALLED FROM GTTCI
  798.  
  799. TVRFIL:    SKIPG TTNETW(T2)    ;STILL CONNECTED TO NETWORK?
  800.      RET            ;NO, NOTHING TO DO
  801.     SAVET            ;SAVE TEMPS
  802.     PUSH P,TCB        ;SAVE TTYSRV CONTEXT
  803.     NOSKED            ;OWN THE SYSTEM
  804.     SKIPL RA+PRCLCK        ;IS REASSEMBLER RUNNING ALREADY?
  805.     IFSKP.
  806.       LOAD TCB,PTVT,(T2)    ;NO, GET TCB IF EXISTS
  807.       IFN. TCB        ;HAVE ONE?
  808.         SETSEC TCB,INTSEC    ;TCB'S ARE IN INTSEC
  809.         DO.
  810.           IFQE. TRCB,(TCB)    ;RECV% BUFFER EXISTS?
  811.         LOAD T1,QNEXT,<+TCBRPQ(TCB)> ;NO, GET NEXT ITEM ON RA QUEUE
  812.         CAIN T1,TCBRPQ(TCB) ;IS RA QUEUE EMPTY?
  813.          EXIT.        ;YES, NO NEED TO RUN REASSEMBLER
  814.           ENDIF.
  815.           $SIGNL(RA,20)    ;RUN REASSEMBLER AFTER SHORT DELAY
  816.         ENDDO.
  817.       ENDIF.
  818.     ENDIF.
  819.     OKSKED            ;RETURN THE SYSTEM
  820.     POP P,TCB        ;RESTORE TTYSRV CONTEXT
  821.     RET
  822. -------
  823.  6-May-83 04:32:24-PDT,746;000000000001
  824. Return-path: <TAPPAN@BBNG.ARPA>
  825. Mail-From: SMTP created at  6-May-83 04:27:56
  826. Received: FROM BBNG BY USC-ISIF.ARPA WITH TCP ; 6 May 83 04:28:00 PDT
  827. Date: Fri 6 May 83 07:29:44-EDT
  828. From: Dan Tappan <Tappan@BBNG.ARPA>
  829. Subject: Re: TCP BUGFIX: ADDENDUM
  830. To: MRC@SU-SCORE.ARPA
  831. cc: TOPS-20@SU-SCORE.ARPA, Postel@USC-ISIF.ARPA, Mockapetris@USC-ISIF.ARPA,
  832.     Tappan@BBNG.ARPA
  833. In-Reply-To: Your message of Fri 6 May 83 00:49:10-EDT
  834.  
  835. The reason the connection starts echoing is that the routine INIT:
  836. does a RESET% which in addition to everything else resets TTY modes to
  837. system default. This is documented but I've long felt it's a bad idea
  838. for exactly this reason.
  839.  
  840. However, I don't know why the patch should affect it.
  841.  
  842. Dan
  843. -------
  844.  6-May-83 08:20:46-PDT,537;000000000001
  845. Return-path: <WATROUS@RUTGERS>
  846. Mail-From: SMTP created at  6-May-83 08:19:30
  847. Received: FROM RUTGERS BY USC-ISIF.ARPA WITH TCP ; 6 May 83 08:19:50 PDT
  848. Date:  6 May 1983 1015-EDT
  849. From: Don <WATROUS@RUTGERS>
  850. Subject: Re: TCP BUGFIX: ADDENDUM
  851. To: MRC@SU-SCORE, TOPS-20@SU-SCORE
  852. cc: Postel@USC-ISIF, Mockapetris@USC-ISIF
  853. In-Reply-To: Your message of 6-May-83 0206-EDT
  854.  
  855. Never mind all that about a SIGNAL macro in PROLOG.  I should have
  856. noticed it's part of a local PUP implementation.  Sorry about the
  857. confusion.
  858.  
  859. Don
  860. -------
  861. 26-Apr-83 21:13:59-PDT,3153;000000000001
  862. Mail-From: POSTEL created at 26-Apr-83 21:09:31
  863. Date: 26 Apr 1983 2109-PDT
  864. From: POSTEL at USC-ISIF
  865. Subject: Andler is right
  866. To:   Taft at PARC, Reilly at UDEL-RELAY
  867. cc:   Postel at ISIF, ANDLER.IBM-SJ at RAND-RELAY,
  868. cc:   FARBER at UDEL-RELAY, Landweber at UWISC
  869.  
  870.  
  871. Folks:
  872.  
  873. I agree with Sten.  Every SMTP implementation should do the full protocol
  874. and complete the session with the Quit command.  And every SMTP implementation
  875. must take full responsibility for the message when it sends an OK response
  876. after receiving the dot at the end of the message data.
  877.  
  878. --jon.
  879.  
  880. *****
  881.  
  882. Return-path: <@rand-relay.ARPA:ANDLER.IBM-SJ@Rand-Relay>
  883. Mail-From: SMTP created at 25-Apr-83 19:27:04
  884. Received: FROM RAND-RELAY BY USC-ISIF.ARPA WITH TCP ; 25 Apr 83 19:27:06 PDT
  885. Date: 25 Apr 1983 16:03:03-PST (Monday)
  886. From: Sten Andler <ANDLER.IBM-SJ@Rand-Relay>
  887. Return-Path: <ANDLER.IBM-SJ@Rand-Relay>
  888. Subject: Interesting SMTP interpretation problem
  889. To: Postel@isif
  890. Cc: taft@parc, reilly@udel-relay
  891. Via:  IBM-SJ; 25 Apr 83 19:09-PDT
  892.  
  893. Here is a copy of a message I sent to Ed Taft and Brendan Reilly after
  894. having found that we have received no mail from Xerox PARC since 1/1/83,
  895. and discovering that Ed Taft's transcripts seemed to show that mail
  896. had been delivered correctly.
  897.  
  898. === Begin forwarded message ===
  899. Date: 13 Apr 1983 14:12:24-PST (Wednesday)
  900. From: Sten Andler <ANDLER@IBM-SJ>
  901. To: taft@parc
  902. Subject: Mail deliveries from PARC to CSNET
  903. CC: cic@csnet-sh, reilly@udel-relay
  904. Via:  IBM-SJ; 13 Apr 83 19:04-PST
  905.  
  906. I have now looked at the mail transcript that you sent me together
  907. with Dick Edmiston of the CSNET CIC (at BBN) and Brendan Reilly of U.
  908. Delaware.  The reason your mail gets lost (and this has happened to
  909. all mail delivered by you to CSNET, as far as I can understand) is
  910. that there is a disagreement between you and CSNET on what commits a
  911. mail transaction.  You believe that the '.' at the end of the message
  912. data commits the transaction, whereas Brendan believes the mail
  913. transaction is not committed until the user quits the mail session by
  914. issuing the QUIT command (which is REQUIRED by the SMTP protocol as
  915. the way to terminate a session).  Since PARC never issues the QUIT,
  916. the CSNET end times out and aborts the mail transaction.
  917.  
  918. My view on this follows:
  919.  
  920. 1) I think PARC should follow the protocol and end the session with a
  921.     QUIT command.
  922.  
  923. 2) I interpret the SMTP specifications to say that the receiving end
  924.     (CSNET) should commit the mail transaction when the DATA part of
  925.     the mail is terminated by the period ('.'), and not respond ' 250
  926.     Ok' until the transaction has been committed.  The absence of the
  927.     QUIT command should thus NOT cause the mail transaction to be
  928.     aborted.
  929.  
  930. Either one of the two changes above would cause the immediate problem
  931. of lost mail to go away, and I will leave it to a shouting match between
  932. PARC and CIC about who should change it first.  But in my opinion, both
  933. changes have to be made to be able to say that both sides live up to the
  934. specifications.
  935.  
  936.    Regards,
  937.    Sten
  938. === End forwarded message ===
  939. -------
  940.  5-May-83 20:59:39-PDT,3648;000000000001
  941. Return-path: <MRC@SU-SCORE.ARPA>
  942. Mail-From: SMTP created at  5-May-83 20:56:11
  943. Received: FROM SU-SCORE BY USC-ISIF.ARPA WITH TCP ; 5 May 83 20:56:17 PDT
  944. Date: Thu 5 May 83 20:49:57-PDT
  945. From: Mark Crispin <MRC@SU-SCORE.ARPA>
  946. Subject: [Mark Crispin <MRC@SU-SCORE.ARPA>: TCP BUGFIX: Slow TVT response]
  947. To: Postel@USC-ISIF.ARPA, Mockapetris@USC-ISIF.ARPA
  948. Postal-Address: 725 Mariposa Ave. #103; Mountain View, CA 94041
  949. Phone: (415) 497-1407 (Stanford); (415) 968-1052 (residence)
  950.  
  951. For your information.  You might want to add this to the official log
  952. of patches/bugfixes that affect the mailsystem.  I would consider this
  953. to be a required patch for the MRC mailsystem:
  954.  
  955.                 ---------------
  956.  
  957. Mail-From: MRC created at  5-May-83 20:43:39
  958. Date: Thu 5 May 83 20:43:38-PDT
  959. From: Mark Crispin <MRC@SU-SCORE.ARPA>
  960. Subject: TCP BUGFIX: Slow TVT response
  961. To: TOPS-20@SU-SCORE.ARPA
  962. Postal-Address: 725 Mariposa Ave. #103; Mountain View, CA 94041
  963. Phone: (415) 497-1407 (Stanford); (415) 968-1052 (residence)
  964.  
  965.      This patch is based on a patch from Charlie Lynn at BBN.  It
  966. fixes slow TVT response when the TVT is receiving a lot of data.
  967. This should be considered a "required patch" for all sites
  968. running my SMTP server (MAISER) to remedy a performance problem
  969. with large incoming messages; for all other sites it is a
  970. "recommended patch".
  971.  
  972.      This patch should improve the "slow TVT" problem.  The hook
  973. to refill the TTY input buffer from a packet when it is emptied
  974. is missing.  The current code "works" since arrivals of other
  975. packets (e.g. retransmissions) cause the reassembler to be run.
  976.  
  977. GTTCI/    SKIPG T1,TTICT(T2)
  978. GTTCI+1/  RET        JRST FFF
  979.  
  980. FFF/    HLRZ CX,TTSAL1(T2)
  981. FFF+1/    CAIN CX,TT.TVT
  982. FFF+2/    SKIPG TTNETW(T2)
  983. FFF+3/    RET
  984. FFF+4/    PUSH P,T2
  985. FFF+5/    PUSH P,TCB
  986. FFF+6/    JSP CX,NOSK11
  987. FFF+7/    HRRZ TCB,TTDEV(T2)
  988. FFF+10/    JUMPE TCB,.+11
  989. FFF+11/    HRLI TCB,INTSEC
  990. FFF+12/    XMOVEI T1,RA
  991. FFF+13/    MOVEI T2,T20
  992. FFF+14/    HRRZ T3,$TRCB(TCB)
  993. FFF+15/    HRRZ T4,TCBRPQ(TCB)
  994. FFF+16/    SKIPN T3
  995. FFF+17/    CAIE T4,TCBRPQ(TCB)
  996. FFF+20/    CALL SIGNAL
  997. FFF+21/    JSP CX,OKSK11
  998. FFF+22/    POP P,TCB
  999. FFF+23/    POP P,T2
  1000. FFF+24/    RET
  1001. FFF+25/    FFF:
  1002.  
  1003.      A source version of this patch follows.  It hasn't been
  1004. tested yet, but ought to work.
  1005.  
  1006.      First, make the label SYMBOL in TCPTCP.MAC global (change
  1007. SYMBOL: to SYMBOL::).  Add SYMBOL as a global in GLOBS.MAC.
  1008.  
  1009.      Second, change the start of GTTCI from:
  1010. GTTCI:    SKIPG 1,TTICT(2)    ;ANY CHARS IN BUFFER?
  1011.     RET            ;NO
  1012.      to:
  1013. GTTCI:    SKIPLE 1,TTICT(2)    ;ANY CHARS IN BUFFER?
  1014.     IFSKP.            ;NO, MAYBE NEED TO REFILL FROM PACKET BUFFER
  1015.       TDCALL D,<<TV,TVRFIL>>;DO TVT-DEPENDENT REFILL SIGNAL
  1016.       RET            ;RETURN EMPTY
  1017.     ENDIF.
  1018.  
  1019.      Finally, add the following routine to TTTVDV.MAC.  Make sure
  1020. you add it in a section that is RSCOD.  I put it in right after
  1021. the TVMNTR routine.
  1022.  
  1023. ;TVRFIL - ROUTINE TO SIGNAL TVT BUFFER REFILL WHEN EMPTY
  1024. ;CALLED FROM GTTCI
  1025.  
  1026. TVRFIL:    SKIPG TTNETW(T2)    ;STILL CONNECTED TO NETWORK?
  1027.      RET            ;NO, NOTHING TO DO
  1028.     PUSH P,T2        ;SAVE DYNAMIC DATA
  1029.     PUSH P,TCB        ;SAVE TTYSRV CONTEXT
  1030.     NOSKED            ;OWN THE SYSTEM
  1031.     LOAD TCB,PTVT,(T2)    ;GET TCB IF EXISTS
  1032.     IFN. TCB        ;HAVE ONE?
  1033.       SETSEC TCB,INTSEC    ;TCB'S ARE IN INTSEC
  1034.       DO.
  1035.         IFQE. TRCB,(TCB)    ;RECV% BUFFER EXISTS?
  1036.           LOAD T1,QNEXT,<+TCBRPQ(TCB)> ;NO, GET NEXT ITEM ON RA QUEUE
  1037.           CAIN T1,TCBRPQ(TCB) ;IS RA QUEUE EMPTY?
  1038.            EXIT.        ;YES, NO NEED TO RUN REASSEMBLER
  1039.         ENDIF.
  1040.         $SIGNL(RA,20)    ;RUN REASSEMBLER AFTER SHORT DELAY
  1041.       ENDDO.
  1042.     ENDIF.
  1043.     OKSKED            ;RETURN THE SYSTEM
  1044.     POP P,TCB        ;RESTORE TTYSRV CONTEXT
  1045.     POP P,T2        ;RESTORE DYNAMIC DATA
  1046.     RET
  1047. -------
  1048. -------
  1049.  6-Jun-83 09:20:13-PDT,1179;000000000001
  1050. Mail-From: SMTP created at  6-Jun-83 09:16:20
  1051. Received: FROM [128.16.3.4] BY USC-ISIF.ARPA WITH TCP ; 6 Jun 83 09:16:32 PDT
  1052. Date:     2 Jun 83 12:52:13 BST (Thu)
  1053. From:     Steve Kille <steve@ucl-cs> (44a)
  1054. To:       knutsen @ sri-unix, dpk @ brl, mike @ brl
  1055. cc:       robert @ UCL-CS, steve @ UCL-CS, postel @ isif
  1056. Subject:  TCP performance across the Sattelite
  1057.  
  1058. After finding the thoughputs we have been getting across the sattelite,
  1059. we ran a packet trace.  By some conicidence we caught a letter from
  1060. SRI-KL running familiar code.
  1061.  
  1062. There are two points on the way the SMTP uses the TCP as a
  1063. transport:
  1064. 1. The command line is split into two parts, the command and a
  1065. <CR><LF> pair. Both parts are pushed (delivered with an EOL
  1066. marker), this is ineficient for the receiving TCP/host.
  1067.  
  1068. 2. The data part is sent on 40 byte pieces, with an ACK
  1069. required for each piece before sending the next. Each 40 bytes
  1070. is pushed (EOL bit set). Thus on a call
  1071. to the UK (3 sec approx round trip time) you get about 10
  1072. bytes/sec. IT IS possible to put more than 40 bytes of data
  1073. into a TCP packet, and IT IS NOT necesary to push every packet.
  1074.  
  1075. Robert Cole + Steve Kille
  1076.  
  1077.  6-Jun-83 11:07:26-PDT,1093;000000000001
  1078. Return-path: <Taft.PA@PARC-MAXC.ARPA>
  1079. Mail-From: SMTP created at  6-Jun-83 11:06:35
  1080. Received: FROM PARC-MAXC BY USC-ISIF.ARPA WITH TCP ; 6 Jun 83 11:06:47 PDT
  1081. Date: Mon, 6 Jun 83 11:05 PDT
  1082. From: Taft.PA@PARC-MAXC.ARPA
  1083. Subject: Re: SMTP use of TCP & impact of SATNET
  1084. In-reply-to: "POSTEL@USC-ISIF.ARPA's message of 6 Jun 83 09:36 PDT"
  1085. To: POSTEL@USC-ISIF.ARPA
  1086. cc: Steve Kille <steve@ucl-cs.ARPA>, Taft.PA@PARC-MAXC.ARPA
  1087.  
  1088. The reason Tops20 and Tenex SMTP senders use small segments and push
  1089. each one is that there is some problem in the TCP code that prevents
  1090. progress otherwise.  This was discovered through painful trial and error
  1091. by several people independently, including myself.
  1092.  
  1093. I actually get reasonably good results with 256-byte segments (rather
  1094. than 40), but I still have to push each one.
  1095.  
  1096. I realize this is inefficient, especially in an environment with large
  1097. round-trip delay.  But there is not much that can be done until this
  1098. crummy TCP implementation gets cleaned up.  I don't know when that will
  1099. be for Tops20, but I do for Tenex: probably never.
  1100.  
  1101.     Ed
  1102.  
  1103. 25-Apr-83 19:28:40-PDT,2550;000000000001
  1104. Return-path: <@rand-relay.ARPA:ANDLER.IBM-SJ@Rand-Relay>
  1105. Mail-From: SMTP created at 25-Apr-83 19:27:04
  1106. Received: FROM RAND-RELAY BY USC-ISIF.ARPA WITH TCP ; 25 Apr 83 19:27:06 PDT
  1107. Date: 25 Apr 1983 16:03:03-PST (Monday)
  1108. From: Sten Andler <ANDLER.IBM-SJ@Rand-Relay>
  1109. Return-Path: <ANDLER.IBM-SJ@Rand-Relay>
  1110. Subject: Interesting SMTP interpretation problem
  1111. To: Postel@isif
  1112. Cc: taft@parc, reilly@udel-relay
  1113. Via:  IBM-SJ; 25 Apr 83 19:09-PDT
  1114.  
  1115. Here is a copy of a message I sent to Ed Taft and Brendan Reilly after
  1116. having found that we have received no mail from Xerox PARC since 1/1/83,
  1117. and discovering that Ed Taft's transcripts seemed to show that mail
  1118. had been delivered correctly.
  1119.  
  1120. === Begin forwarded message ===
  1121. Date: 13 Apr 1983 14:12:24-PST (Wednesday)
  1122. From: Sten Andler <ANDLER@IBM-SJ>
  1123. To: taft@parc
  1124. Subject: Mail deliveries from PARC to CSNET
  1125. CC: cic@csnet-sh, reilly@udel-relay
  1126. Via:  IBM-SJ; 13 Apr 83 19:04-PST
  1127.  
  1128. I have now looked at the mail transcript that you sent me together
  1129. with Dick Edmiston of the CSNET CIC (at BBN) and Brendan Reilly of U.
  1130. Delaware.  The reason your mail gets lost (and this has happened to
  1131. all mail delivered by you to CSNET, as far as I can understand) is
  1132. that there is a disagreement between you and CSNET on what commits a
  1133. mail transaction.  You believe that the '.' at the end of the message
  1134. data commits the transaction, whereas Brendan believes the mail
  1135. transaction is not committed until the user quits the mail session by
  1136. issuing the QUIT command (which is REQUIRED by the SMTP protocol as
  1137. the way to terminate a session).  Since PARC never issues the QUIT,
  1138. the CSNET end times out and aborts the mail transaction.
  1139.  
  1140. My view on this follows:
  1141.  
  1142. 1) I think PARC should follow the protocol and end the session with a
  1143.     QUIT command.
  1144.  
  1145. 2) I interpret the SMTP specifications to say that the receiving end
  1146.     (CSNET) should commit the mail transaction when the DATA part of
  1147.     the mail is terminated by the period ('.'), and not respond ' 250
  1148.     Ok' until the transaction has been committed.  The absence of the
  1149.     QUIT command should thus NOT cause the mail transaction to be
  1150.     aborted.
  1151.  
  1152. Either one of the two changes above would cause the immediate problem
  1153. of lost mail to go away, and I will leave it to a shouting match between
  1154. PARC and CIC about who should change it first.  But in my opinion, both
  1155. changes have to be made to be able to say that both sides live up to the
  1156. specifications.
  1157.  
  1158.    Regards,
  1159.    Sten
  1160. === End forwarded message ===
  1161. 26-Apr-83 21:13:59-PDT,3153;000000000001
  1162. Mail-From: POSTEL created at 26-Apr-83 21:09:31
  1163. Date: 26 Apr 1983 2109-PDT
  1164. From: POSTEL at USC-ISIF
  1165. Subject: Andler is right
  1166. To:   Taft at PARC, Reilly at UDEL-RELAY
  1167. cc:   Postel at ISIF, ANDLER.IBM-SJ at RAND-RELAY,
  1168. cc:   FARBER at UDEL-RELAY, Landweber at UWISC
  1169.  
  1170.  
  1171. Folks:
  1172.  
  1173. I agree with Sten.  Every SMTP implementation should do the full protocol
  1174. and complete the session with the Quit command.  And every SMTP implementation
  1175. must take full responsibility for the message when it sends an OK response
  1176. after receiving the dot at the end of the message data.
  1177.  
  1178. --jon.
  1179.  
  1180. *****
  1181.  
  1182. Return-path: <@rand-relay.ARPA:ANDLER.IBM-SJ@Rand-Relay>
  1183. Mail-From: SMTP created at 25-Apr-83 19:27:04
  1184. Received: FROM RAND-RELAY BY USC-ISIF.ARPA WITH TCP ; 25 Apr 83 19:27:06 PDT
  1185. Date: 25 Apr 1983 16:03:03-PST (Monday)
  1186. From: Sten Andler <ANDLER.IBM-SJ@Rand-Relay>
  1187. Return-Path: <ANDLER.IBM-SJ@Rand-Relay>
  1188. Subject: Interesting SMTP interpretation problem
  1189. To: Postel@isif
  1190. Cc: taft@parc, reilly@udel-relay
  1191. Via:  IBM-SJ; 25 Apr 83 19:09-PDT
  1192.  
  1193. Here is a copy of a message I sent to Ed Taft and Brendan Reilly after
  1194. having found that we have received no mail from Xerox PARC since 1/1/83,
  1195. and discovering that Ed Taft's transcripts seemed to show that mail
  1196. had been delivered correctly.
  1197.  
  1198. === Begin forwarded message ===
  1199. Date: 13 Apr 1983 14:12:24-PST (Wednesday)
  1200. From: Sten Andler <ANDLER@IBM-SJ>
  1201. To: taft@parc
  1202. Subject: Mail deliveries from PARC to CSNET
  1203. CC: cic@csnet-sh, reilly@udel-relay
  1204. Via:  IBM-SJ; 13 Apr 83 19:04-PST
  1205.  
  1206. I have now looked at the mail transcript that you sent me together
  1207. with Dick Edmiston of the CSNET CIC (at BBN) and Brendan Reilly of U.
  1208. Delaware.  The reason your mail gets lost (and this has happened to
  1209. all mail delivered by you to CSNET, as far as I can understand) is
  1210. that there is a disagreement between you and CSNET on what commits a
  1211. mail transaction.  You believe that the '.' at the end of the message
  1212. data commits the transaction, whereas Brendan believes the mail
  1213. transaction is not committed until the user quits the mail session by
  1214. issuing the QUIT command (which is REQUIRED by the SMTP protocol as
  1215. the way to terminate a session).  Since PARC never issues the QUIT,
  1216. the CSNET end times out and aborts the mail transaction.
  1217.  
  1218. My view on this follows:
  1219.  
  1220. 1) I think PARC should follow the protocol and end the session with a
  1221.     QUIT command.
  1222.  
  1223. 2) I interpret the SMTP specifications to say that the receiving end
  1224.     (CSNET) should commit the mail transaction when the DATA part of
  1225.     the mail is terminated by the period ('.'), and not respond ' 250
  1226.     Ok' until the transaction has been committed.  The absence of the
  1227.     QUIT command should thus NOT cause the mail transaction to be
  1228.     aborted.
  1229.  
  1230. Either one of the two changes above would cause the immediate problem
  1231. of lost mail to go away, and I will leave it to a shouting match between
  1232. PARC and CIC about who should change it first.  But in my opinion, both
  1233. changes have to be made to be able to say that both sides live up to the
  1234. specifications.
  1235.  
  1236.    Regards,
  1237.    Sten
  1238. === End forwarded message ===
  1239. -------
  1240. 30-Apr-83 08:30:05-PDT,1562;000000000001
  1241. Return-path: <@USC-ISI:Saltzer.CSR@MIT-MULTICS.ARPA>
  1242. Mail-From: SMTP created at 30-Apr-83 08:26:28
  1243. Received: FROM USC-ISI.ARPA BY USC-ISIF.ARPA WITH TCP ; 30 Apr 83 08:26:34 PDT
  1244. Received: FROM [10.0.0.6] BY USC-ISI.ARPA WITH TCP ; 30 Apr 83 08:24:15 PDT
  1245. Redistributed-Date:  30 April 1983 09:20 edt
  1246. Redistributed-By:  Saltzer.CSR at MIT-MULTICS
  1247. Redistributed-To:  Andler.SJRLVM1.IBM at RAND-RELAY, 
  1248.                    Postel at USC-ISI
  1249. Date:  29 April 1983 11:56 edt
  1250. From:  Schiller (Jeffrey I. Schiller)
  1251. Subject:  Re: RAND-Relay mail problems
  1252. To:  Saltzer
  1253. In-Reply-To:  Message of 28 April 1983 20:52 edt from Saltzer
  1254.  
  1255. Well that sounds incredibly bogus! RFC 822 states that once the "OK"
  1256. reply is received, the mail is committed. The "QUIT" command is used to
  1257. gracefully shutdown the SMTP connection. To interpret this any other way
  1258. is to say that if Multics opens a connection to Rand-Relay and sends 50
  1259. pieces of mail down the channel, all 50 pieces aren't commited until the
  1260. QUIT!??
  1261.  
  1262. Btw. What Multics does is keep the connection open (ie. NOT send a quit)
  1263. for about 3 minutes. This is a optimization in case other mail for the
  1264. same site is encountered while scanning the mail queues. If no activity
  1265. is found on the connection after about 3 minutes Multics sends a QUIT
  1266. and closes the connection. Mail transacations on one connection are
  1267. separated by "RSET" commands. Rand-Relay is probably timing out on the
  1268. connection during the quiescent period, thus Multics never gets a chance
  1269. to send the QUIT.
  1270.  
  1271.                     -Jeff
  1272.  2-May-83 14:58:06-PDT,502;000000000001
  1273. Mail-From: WESTINE created at  2-May-83 14:55:05
  1274. Date: 2 May 1983 1454-PDT
  1275. Sender: WESTINE at USC-ISIF
  1276. Subject: Re: Rand-Relay Mail Problems
  1277. From: Postel@isif
  1278. To: Saltzer.CSR at MIT-MULTICS
  1279. Bcc: postel at USC-ISIF
  1280. Message-ID: <[USC-ISIF] 2-May-83 14:54:57.WESTINE>
  1281.  
  1282. Jeff:
  1283.  
  1284. I agree!  It is bogus!!!  The mail is committed when the receiver
  1285. sends the "ok" after processing the "dot" at the end of the data.
  1286. Sending that "ok" means the receiver takes responsibility for
  1287. the mail.
  1288.  
  1289. --jon.
  1290. 10-Jun-83 19:24:41-PDT,2443;000000000001
  1291. Return-path: <@USC-ISI:Saltzer.CSR@MIT-MULTICS.ARPA>
  1292. Mail-From: SMTP created at 10-Jun-83 19:24:23
  1293. Received: FROM USC-ISI.ARPA BY USC-ISIF.ARPA WITH TCP ; 10 Jun 83 19:24:28 PDT
  1294. Received: FROM MIT-MULTICS BY USC-ISI.ARPA WITH TCP ; 10 Jun 83 19:22:47 PDT
  1295. Date:  10 June 1983 22:17 edt
  1296. From:  Saltzer at MIT-MULTICS
  1297. Subject:  SMTP argument again
  1298. To:  postel at USC-ISI
  1299. cc:  Saltzer at MIT-MULTICS, DClark at MIT-MULTICS, 
  1300.      "andler.sjrlvm1.ibm@RAND-Relay" at MIT-MC
  1301.  
  1302. Jon,
  1303. Perhaps I misunderstood, but I thought you, together with
  1304. Sten Andler, had come to a complete resolution on the
  1305. question of when mail is committed in SMTP.  We are again having
  1306. trouble getting the CSNET relays to accept mail from Multics sites.
  1307.  
  1308. Would you please look over this message I just received from
  1309. the Multics mail system maintenance person, and then refresh
  1310. my memory as to what the official position on SMTP commit is?
  1311. Is the position described here of the CSNET relays actually
  1312. correct?  Or is the interpretation used by the Multics implementation
  1313. acceptable?  What seems to be needed is a definitive handing
  1314. down of the law.
  1315.  
  1316. Thanks for you help.
  1317.  
  1318.         Jerry
  1319.  
  1320. ----- ----- ----- ----- ----- -----
  1321.  
  1322.  #17 (18 lines)  06/10/83 18:47  Mailed by: Schiller.SysMaint
  1323. Date:  10 June 1983 18:47 edt
  1324. From:  Schiller (Jeffrey I. Schiller)
  1325. Subject:  Mail to UDEL-RELAY losing
  1326. To:  Saltzer
  1327.  
  1328. Brendan Reilly at UDEL has once again modified their mailer to drop mail
  1329. on the floor that was sent via an SMTP connection that didn't end in a
  1330. QUIT command. For some reason our QUITS aren't getting through to him (I
  1331. will investigate this).
  1332.  
  1333. Brendan told me he will be modifying his mailer to return to addressee
  1334. any mail that was sent on an SMTP connection and was "250 OK'd" but for
  1335. which a QUIT was not received. This is WRONG, it puts the onus of broken
  1336. connections (which should be a temporary error) on the users by
  1337. returning mail that was successfully sent on a connection that broke
  1338. before the QUIT. Note: On MIT-MULTICS when we have several messages to
  1339. go to a host we use 1 smtp connection and separate the messages by
  1340. RSET's. His interpretation of the SMTP spec (which he claims he checked
  1341. through with Postel) says that if we send him 39 out of 40 messages on
  1342. an smtp connection, and then some error breaks that connection, he will
  1343. return the 39 messages to the sender.
  1344.  
  1345.                     -Jeff
  1346.  ---(17)---
  1347.  
  1348.  
  1349. 10-Jun-83 19:39:49-PDT,771;000000000001
  1350. Return-path: <@USC-ISI:POSTEL@USC-ISIF>
  1351. Mail-From: SMTP created at 10-Jun-83 19:38:05
  1352. Received: FROM USC-ISI.ARPA BY USC-ISIF.ARPA WITH TCP ; 10 Jun 83 19:38:10 PDT
  1353. Received: FROM USC-ISIF.ARPA BY USC-ISI.ARPA WITH TCP ; 10 Jun 83 19:36:09 PDT
  1354. Date: 10 Jun 1983 1933-PDT
  1355. From: POSTEL at USC-ISIF
  1356. Subject: Re: SMTP argument again
  1357. To:   Saltzer at MIT-MULTICS, postel at USC-ISI
  1358. cc:   DClark at MIT-MULTICS, "andler.sjrlvm1.ibm at RAND-RELAY,
  1359. cc:   POSTEL at USC-ISIF, reilly at UDEL-RELAY
  1360.  
  1361. In response to the message sent   10 June 1983 22:17 edt from Saltzer@MIT-MULTICS
  1362.  
  1363.  
  1364. Jerry:
  1365.  
  1366. The correct statement of the rules is that saying "OK" to the dot "." at
  1367. the end of the mail data commits the receiver (server) to delivering the
  1368. mail.
  1369.  
  1370. --jon.
  1371. -------
  1372. 10-Jun-83 18:45:02-PDT,4224;000000000001
  1373. Return-path: <@MIT-MC:nowicki%SU-HNV.ARPA@SU-SCORE.ARPA>
  1374. Mail-From: SMTP created at 10-Jun-83 18:43:40
  1375. Received: FROM MIT-MC BY USC-ISIF.ARPA WITH TCP ; 10 Jun 83 18:43:48 PDT
  1376. Received: from Diablo by Score with Pup; Fri 10 Jun 83 18:32:04-PDT
  1377. Date: Fri, 10 Jun 83 18:31 PDT
  1378. From: Bill Nowicki <nowicki%Diablo@SU-Score>
  1379. Subject: Mail Loop explanation
  1380. To: DCrocker@UDel-Relay, KLH@MIT-MC, reid@Glacier
  1381. Cc: HEADER-PEOPLE@MIT-MC, MsgGroup@BRL, mailhax
  1382.  
  1383. Some people have requested a few more details of our
  1384. experience with sendmail and the disaster which caused a
  1385. mail loop on Wednesday June 8. First some background:
  1386.  
  1387. At Stanford we run 4.1BSD Unix with BBN TCP code, with CMU
  1388. packet filtering on 3 Mbit Ethernets connecting about a dozen VAXes (and
  1389. many other machines).  We would like to use 4.2 whenever (if ever?) it
  1390. finally gets done, so we got a 4.1c beta distribution and were trying
  1391. to phase in some of the user programs on that release, like sendmail.
  1392. The predecessor of sendmail, delivermail, 
  1393. we had customized slightly by changing a few tables and recompiling.
  1394. It read the host name by the gethostname() system call, so we could
  1395. take the program (or an entire disk pack for that matter) from one
  1396. system to another and it would work.  Sendmail contains an SMTP server
  1397. as well as the other mail switching and aliasing functions of
  1398. delivermail.
  1399.  
  1400. Integrating the SMTP server and the aliasing turns out to be a good
  1401. idea, but all sorts of other "features" were added to sendmail in the
  1402. mean time.  For example, instead of having compile-time tables and
  1403. modular code, there are enormous configuration files that are read at
  1404. run-time.  You have to specify a "program" to parse your addresses
  1405. using an incredibly unfathomable production language.  The host name is
  1406. hard-wired into the configuration file, so they are not portable
  1407. between machines anymore.  Part of the confusion came from the
  1408. distinction between switches entered on the command line, commands in
  1409. the configuration file, options which can be given on the command line
  1410. OR in the configuration file (with yet another strange syntax), mailer
  1411. flags, and configuration file macros.  All five of these are
  1412. represented by single character case sensitive identifiers, with
  1413. different meanings for the letters in many cases.  A vertiable lesson
  1414. in terrible user interfaces.
  1415.  
  1416. The specific problem came when we discovered a case in which our
  1417. TOPS-20 SMTP mailer would open a connection, send part of a message,
  1418. and then simply give up without sending a RESET packet.  The BBN TCP
  1419. code had no timeouts, so the connection would stay around forever,
  1420. along with the two sendmail processes and the spool files.  I
  1421. remembered reading about a timeout feature, and glancing at the manual
  1422. found it was the "t" option.  So I ran sendmail with the "t" switch on
  1423. the command line.  There were two mistakes: first, the timeout is an
  1424. Option, not a Switch, and secondly it is upper case T not lower case
  1425. t.  I was silly enough to think that since it gave me no error message
  1426. that everything was OK, and went off to our research group meeting.
  1427.  
  1428. When I came back after the meeting I looked at the log file and noted
  1429. some suspicious behaviour.  What it was doing was sending a copy of
  1430. each message to the people listed in the "To:" and "Cc:" fields in the
  1431. header, as well as the person given in the RCPT TO:<> command of SMTP.
  1432. This resulted in the loop back through our local Ethernet, the Arpanet,
  1433. the MIT Chaos Net, as well as several nets at BRL and BBN!  I killed
  1434. the server after about an hour, and restarted it with the right options
  1435. (although the timeout still does not do anything), but the duplicated
  1436. mail took at least two days to stop bouncing through the net.
  1437.  
  1438. Morals (some are my personal opinions):  
  1439. 1. Case sensitivity is a bad idea.  
  1440. 2. Single letter identifiers are a bad idea.  
  1441. 3. Multiple notions that are similar are confusing.  
  1442. 4. Large (multi-domain) mailing lists should have a moderator.  
  1443. 5. Timeouts should be in SMTP servers and TCP implementations by default.  
  1444. 6. internet mail systems are fragile things.  
  1445. 7. "Improved" software with more "features" usually isn't.
  1446.  
  1447.     -- Bill
  1448.  
  1449. ------------------------------
  1450.  
  1451. Date:  8 Jun 1983  9:32:11 EDT (Wednesday)
  1452. From: Dennis Rockwell <drockwel@bbn-vax>
  1453. Subject: TCP problem
  1454. To: Rob Gurwitz <gurwitz@BBN-UNIX>, dpk@brl-vgr
  1455.  
  1456. [ This message was forwarded to the Digest by Doug Kingston, and details
  1457.   a particularly insidious bug in the BBN VAX TCP.  Hopefully, if any site
  1458.   using that code has not heard of this problem yet, this message will
  1459.   have served a purpose.  Note that Berkeley 4.1a and 4.1c code does
  1460.   not have this bug.  -Mike ]
  1461.  
  1462. The fix for this bug is as follows: (I'm afraid I have no
  1463. familiarity whatsoever with the TCP variants, but the
  1464. code should be fairly easy to find)
  1465.  
  1466. In the routine rcv_text (in tcp_procs.c in our code), the routine
  1467. that does the resequencing, there is the following code:
  1468.  
  1469.             /* new overlaps at beginning of successor frags */
  1470.  
  1471.             q = savq->t_next;
  1472.             while ((q != (struct th *)tp) && (t->t_len != 0) && 
  1473.                    SEQ_LEQ(q->t_seq, last))
  1474.  
  1475.                 /* complete cover */
  1476.  
  1477.                     if (SEQ_LEQ(t_end(q), last)) {
  1478.                     p = q->t_next;
  1479.                     tcp_deq(q);
  1480.                     m_freem(dtom(q));
  1481.                     q = p;
  1482.  
  1483.                 } else {        /* overlap */
  1484.  
  1485. In your code, the first SEQ_LEQ is probably a SEQ_LT.  This is the bug.
  1486. There is an analogous bug in ip_input.c:
  1487.  
  1488.             /* new overlaps at beginning of successor frags */
  1489.  
  1490.                 q = savq->ip_next;
  1491.                 while ((q != (struct ip *)fp) &&
  1492.                     (ip->ip_len != 0) && 
  1493.                     (q->ip_off <= ip->ip_end)) 
  1494.  
  1495.                     /* complete cover */
  1496.  
  1497.                     if (q->ip_end <= ip->ip_end) {
  1498.                         p = q->ip_next;
  1499.                         ip_deq(q);
  1500.                         m_freem(dtom(q));
  1501.                         q = p;
  1502.  
  1503. Again, in your code the first <= is probably a <.
  1504.  
  1505. This fix was made just last week, and is slowly percolating out to the
  1506. other local BBN sites.  We are trying to spread this fix around, but
  1507. that's difficult.  Please tell everybody you know who is running this
  1508. code about the fix.
  1509.  
  1510. Good luck!  Feel free to write or call me at (617) 497-2643.
  1511.  
  1512. ------------------------------
  1513.  
  1514.  8-Jul-83 16:13:10-PDT,1916;000000000001
  1515. Return-Path: <mike@brl-vgr>
  1516. Mail-From: SMTP created at  8-Jul-83 15:20:23
  1517. Received: FROM BRL-VGR BY USC-ISIF.ARPA WITH TCP ; 8 Jul 83 15:20:37 PDT
  1518. Date:     Fri, 8 Jul 83 18:11:50 EDT
  1519. From:     Mike Muuss <mike@brl-vgr>
  1520. To:       rogers@usc-isib, postel@usc-isif, koda@usc-isif, mike@brl-vgr
  1521. Subject:  [dan:  tcp_subr.c bug]
  1522.  
  1523. Here is the bug fix announcement -- observe the date on the message.
  1524.  
  1525. If Craig is not getting the UNIX bug fixes for the 4.1a software,
  1526. he should subscribe to "ucbtcp11@sri-tsc";  ask postmaster@sri-unix
  1527. to get him on.
  1528.  
  1529.             Best,
  1530.              -Mike
  1531.  
  1532. PS:  I am assuming that I got a copy of the message to provide help,
  1533. not because there is evidence that we are doing it wrong at BRL, right?
  1534.  
  1535. ----- Forwarded message # 1:
  1536.  
  1537. Date: 20 Jan 1983 at 1455-PST
  1538. To: ucbtcp11@Sri-Tsc.arpa
  1539. Reply-To: dan@Sri-Tsc.arpa
  1540. Subject: tcp_subr.c bug
  1541. From: dan@Sri-Tsc.arpa
  1542. Received: From Sri-Tsc.ARPA via smtptcp;  20 Jan 83 20:58 EST
  1543. Received: From Brl.ARPA via smtptcp;  21 Jan 83 0:40 EST
  1544.  
  1545. Clem Cole mentioned a bug to me a while ago, which I forgot to pass on.  In
  1546. net/tcp_subr.c the variable t_maxseg should be set to 512, not 576.  The
  1547. default packet size should be 512 + header = 576, but t_maxseg should not
  1548. include the header in it's value.  Clem said it might affect transfers to
  1549. and from TENEX systems, but I haven't noticed that problem.  I made the
  1550. change, and it doesn't seem to break anything that wasn't broken before.
  1551.  
  1552. <<<<diff tcp_subr.c tcp_subr.c->>>>
  1553. 154c154
  1554. <     tp->t_maxseg = 512;        /* 512+header = 576, to satisfy the rest of the world */
  1555. ---
  1556. >     tp->t_maxseg = 576;        /* satisfy the rest of the world */
  1557.  
  1558. By the way, I have updated the PRMH sources (added a lot of the bug fixes
  1559. reported through this list) -- changes are in Modlog on PRMH in case anyone is
  1560. trying to stay in sync with us (lord knows why!).
  1561.  
  1562.     -Dan
  1563.  
  1564.  
  1565. ----- End of forwarded messages
  1566.  8-Jul-83 18:16:00-PDT,2961;000000000001
  1567. Return-Path: <@SRI-NIC:CHASE@USC-ISIB>
  1568. Received: FROM SRI-NIC BY USC-ISIF.ARPA WITH TCP ; 8 Jul 83 18:13:16 PDT
  1569. Received:  from USC-ISIB by SRI-NIC via DDN;   8 Jul 83 16:57:00-PDT
  1570. Date: 8 Jul 1983 1515-PDT
  1571. Sender: CHASE at USC-ISIB
  1572. Subject: Re: Possible ISIB TCP bug
  1573. From: CHASE at USC-ISIB
  1574. To: tcp-ip at SRI-NIC
  1575. Message-ID: <[USC-ISIB] 8-Jul-83 15:15:05.CHASE>
  1576. In-Reply-To: Your message of 18 June 1983 02:31 EDT
  1577.  
  1578. The problem reported by KLH with Ftp between ISIB and MIT-MC has been fixed.
  1579. The bug was in the Tops20 monitor code.  Basically, Tops20 couldn't send a Fin
  1580. at the time the Ftp process did its Close% because there was still data queued
  1581. from a previous Send%, and by the time the data went out, the check for
  1582. needing to send a Fin was missed.  Much thanks to Ken for his accurate error
  1583. reports and assistance in tracking this down.
  1584.  
  1585. The fix inserts new check after PKZ23A.  If the send side of the connection is
  1586. still open but the user has done a Close%, ENCPKT is called to "encourage" a
  1587. packet later, when the Fin can be sent.
  1588.  
  1589. ==========
  1590. PKZ23A:
  1591.     LOAD T1,TSSYN,(TCB)    ; Get send state ;;;LDB T1,[110314,,13]
  1592.     CAIE T1,SYNCED        ; Connection synchronized? ;;;CAIE T1,7
  1593.      JRST PKZ24B        ; No.  No FIN can be sent.
  1594.     JN TSUOP,(TCB),PKZ24B    ; Jump if connection still OPEN by user
  1595.                 ;  ;;;MOVE CX,13(14)
  1596.                 ;  ;;;TRNE CX,400 
  1597.                 ;   ;;;JRST PKZ24B
  1598.     MOVEI T1,^D200        ; Try to send FIN later, we must have been
  1599.     CALL ENCPKT        ;  unable to send it this time through
  1600.                 ;  (ie, due to presence of q'd snd data)
  1601. PKZ24B:
  1602. ==========
  1603.  
  1604. While putting this problem to rest, it would be appropriate to put to rest
  1605. some misconceptions that came out of the discussion of this problem.
  1606. The TCPSIM package from BBN running at ISI does not just abort data
  1607. connections in place of trying to close them properly.  A Close% is done,
  1608. and only after the Close% fails to take effect after a timeout period is an
  1609. Abort% done to clean things up.  I'm sure that the above bug caused it to
  1610. appear to certain sites that only the abort was done.  But although the
  1611. package does have its shortcomings (the case in question is an example of its
  1612. skimpy error reporting), it does the best that can be done in this case.
  1613.  
  1614. The characterization of Tops20's TCP implementation as record oriented is not
  1615. quite accurate.  A user program can send one byte, two, ten or a whole page
  1616. worth, without any kind of record or segment considerations.  The monitor will
  1617. buffer these bytes until there are enough of them for efficient transmission,
  1618. or until the user program does a push.  The real fault with the user interface
  1619. is that it requires a different set of monitor calls instead of the Bin/Bout
  1620. flavor, and that these calls are very clumsy to use.  Now, however, the just
  1621. released DEC user interface will hopefully restore consistency and simplicity
  1622. to network i/o, and remove the need for simulation packages altogether.
  1623.  
  1624. <>Dale Chase
  1625. 15-Jul-83 14:11:08-PDT,5415;000000000001
  1626. Return-Path: <jbn@FORD-WDL1>
  1627. Received: FROM BBNCCQ BY USC-ISIF.ARPA WITH TCP ; 15 Jul 83 14:09:08 PDT
  1628. Return-Path:<>
  1629. Date: 15-Jul-83 14:03:40-PDT
  1630. From: jbn@FORD-WDL1.ARPA
  1631. Subject: Outstanding TOPS-20 TCP bug remains in v5.2
  1632. To: ICCB@BBN-UNIX.ARPA, Paetzold@DEC-MARLBORO.ARPA, CLynn@BBNA.ARPA,
  1633.     Tappan@BBNA.ARPA
  1634. Cc: MRC@SU-SCORE.ARPA
  1635.  
  1636.      For some months now, we have observed that the BBN TOPS-20 implementation
  1637. of TCP does not perform the TCP close handshake properly.  This problem has
  1638. been documented and reported to the appropriate people as shown below.
  1639. Crispin at SU-SCORE has just installed a new TOPS-20 monitor (5.2) and
  1640. this outstanding problem has NOT been fixed.
  1641.      The effect of this problem is that when a system which correctly
  1642. performs the handshake is talking to a noncomplying TOPS-20, and the
  1643. TCP close is initiated from the non-TOPS-20 end, the non-TOPS-20 end
  1644. will hang in the close and eventually time out.  This tends to cause
  1645. STOR operations in FTP to TOPS-20 sites to fail.  It also has the
  1646. annoying property for us that every time we get mail from a TOPS-20
  1647. site, our TCP logs a protocol violation.
  1648.      Larson at SRI has located the defective code in TOPS-20 as shown
  1649. below.  The messages below are the previous ones relating to this problem.
  1650.      As we at Ford Aerospace do not run any TOPS-20 systems, we do not
  1651. directly have this problem, but our users who need to communicate with
  1652. some of the TOPS-20 sites find this a continual annoyance.  Because of
  1653. the former importance of TOPS-20 in the ARPANET community, there has been
  1654. an informal tradition that the TOPS-20 implementation has been considered
  1655. the ``standard'' with which others were expected to interoperate.  For this
  1656. reason, it appears that considerable effort has been expended in some of
  1657. the newer implementations (such as the 4.2BSD systems) to interoperate with
  1658. TOPS-20 despite this problem.  (Elaborate FTP strategies regarding data
  1659. connection establishment are a means of getting around this problem).
  1660. Other implementors should be aware of this problem so that such wasted
  1661. effort can be avoided.
  1662.  
  1663.                     John Nagle
  1664.                     Ford Aerospace and Communications Corp.
  1665.   Return-path: <Mailer@SRI-NIC>
  1666.   Mail-From: SMTP created at 27-Apr-83 15:01:09
  1667.   Received: FROM SRI-NIC BY USC-ISID.ARPA WITH TCP ; 27 Apr 83 15:01:22 PDT
  1668.   Received:  from SRI-KL by SRI-NIC via ARPANET/MILNET with TCP/SMTP;
  1669.              Wed 27 Apr 83 14:23-PDT
  1670.   Date: Wed 27 Apr 83 14:18:48-PDT
  1671.   From: LARSON@SRI-KL.ARPA
  1672.   Subject: Re: need help from a tops-20 wizard
  1673.   To: Rudy.Nedved@CMU-CS-A.ARPA
  1674.   cc: HEDRICK@RUTGERS.ARPA, JGoldberger@USC-ISIB.ARPA, don.provan@CMU-CS-A.ARPA,
  1675.       TCP-IP-TOPS20@SRI-NIC.ARPA
  1676.   In-Reply-To: Your message of Tue 26 Apr 83 18:02:00-PDT
  1677.   
  1678.     This discussion  of  wierd  action  with  TCPSIM  related  stuff
  1679.   prompted me to look at the close in TCPSIM.  What wonders does one
  1680.   find!
  1681.     The wait in the flags to the CLOSE is commented out.  Thus,  one
  1682.   never waits for the FIN to  be returned.  If the ABORT is  reached
  1683.   too soon, would it be possible for a queued outgoing FIN to not be
  1684.   sent before the TCB is destroyed?  There appears to be no DISMS in
  1685.   the direct line,  so if GETBU2  is not reached,  there will be  no
  1686.   delay before the ABORT is reached.
  1687.     The MOVX B,... and the AOJN pair  result in a loop that will  be
  1688.   executed 2097152 times.  I  really do not think  this is what  was
  1689.   intended.  AOBJN perhaps?
  1690.   
  1691.     I suspect  that this  may  be part  of why  foreign  connections
  1692.   (especially to  unix  systems) may  be  being left  in  FIN_WAIT_2
  1693.   states.
  1694.       Alan
  1695.   
  1696.   
  1697.   TCPCLS:                ; TPC and TPD should be zero here
  1698.       MOVE A,T.JCN(TFSB)
  1699.   ;    MOVE B,A(TAC0)        ; Flags in left half
  1700.   ;    TXNE B,CO%WCL        ; Wait?
  1701.   ;     TXO A,TCP%WT        ; Yes
  1702.       CLOSE            ; Tell other end to close it up
  1703.         SETZ TOB,        ; Error return
  1704.   
  1705.       MOVX D,<<RXTMOT*2+10>/10> ; Short timeout for GETBUF here
  1706.       MOVX B,<-^D8,,0>    ; Allow 8 buffers
  1707.   TCLOOP:    CALL GETBUF        ; Start input
  1708.       SKIPN A,T.JCN(TFSB)    ; Is it closed yet?
  1709.         JRST TCXT        ; Yes, done
  1710.       AOJN B,TCLOOP        ; No, try next buffer
  1711.   
  1712.       ABORT            ; Tried all 10, give up
  1713.         SETZ TOB,        ; Error return
  1714.   TCXT:    SETZB TPC,TPD        ; Nothing remaining
  1715.   -------
  1716.   Date: 29 Apr 1983 2046-PDT
  1717.   From: MILLS at USC-ISID
  1718.   Subject: Re: need help from a tops-20 wizard
  1719.   To:   LARSON at KL, Rudy.Nedved at CMU-CS-A
  1720.   cc:   HEDRICK at RUTGERS, JGoldberger at ISIF,
  1721.   cc:   don.provan at CMU-CS-A, TCP-IP-TOPS20 at NIC,
  1722.   cc:   MILLS at USC-ISID
  1723.   
  1724.   In response to the message sent  Wed 27 Apr 83 14:18:48-PDT from LARSON@SRI-KL.ARPA
  1725.   
  1726.   Folks,
  1727.   
  1728.   YE GODZ! I have been grousing about this problem for over two years. You mean
  1729.   this is the first time anybody checked?! Your description on the close
  1730.   is a*c*c*u*r*a*t*e.
  1731.   
  1732.   Regards,
  1733.   Dave
  1734.   
  1735.   From root Mon May 16 18:56:21 1983
  1736.   Return-Path: <LARSON@SRI-KL.ARPA>
  1737.   Mail-From: SRI-KL received by FORD-WDL1 at 16-May-83 18:56:06-PDT
  1738.   Date: Mon 16 May 83 18:52:42-PDT
  1739.   From: LARSON@SRI-KL.ARPA
  1740.   Subject: Re: TCP close fix
  1741.   To: jbn@FORD-WDL1.ARPA
  1742.   In-Reply-To: Your message of Mon 16 May 83 18:04:47-PDT
  1743.   
  1744.     No.  I have received no fixes to this stuff.  It is real frustrating.
  1745.   I wish the DOD folks who think TCP/IP is such a wonderful thing would
  1746.   figure out who is to support it.
  1747.       Alan
  1748.