rfc1123.txt revision c7ddab7655021d96211a26f99d9f694396c53284
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David LawrenceNetwork Working Group Internet Engineering Task Force
15a44745412679c30a6d022733925af70a38b715David LawrenceRequest for Comments: 1123 R. Braden, Editor
15a44745412679c30a6d022733925af70a38b715David Lawrence Requirements for Internet Hosts -- Application and Support
15a44745412679c30a6d022733925af70a38b715David LawrenceStatus of This Memo
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff This RFC is an official specification for the Internet community. It
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff incorporates by reference, amends, corrects, and supplements the
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews primary protocol standards documents relating to hosts. Distribution
9c3531d72aeaad6c5f01efe6a1c82023e1379e4dDavid Lawrence of this document is unlimited.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff This RFC is one of a pair that defines and discusses the requirements
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff for Internet host software. This RFC covers the application and
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff support protocols; its companion RFC-1122 covers the communication
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley protocol layers: link layer, IP layer, and transport layer.
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff Table of Contents
9282e3c21a20f354e22ad3f092aea4956abaea5cMichael Graff 1. INTRODUCTION ............................................... 5
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff 1.1 The Internet Architecture .............................. 6
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff 1.2 General Considerations ................................. 6
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff 1.2.1 Continuing Internet Evolution ..................... 6
058eeac2105c39e7cb31fb75ee0b473717ec3bbcMark Andrews 1.2.2 Robustness Principle .............................. 7
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence 1.2.3 Error Logging ..................................... 8
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff 1.2.4 Configuration ..................................... 8
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson 1.3 Reading this Document .................................. 10
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff 1.3.1 Organization ...................................... 10
6028d1ce0380d0ba7f6c6ecd1ad20b31ddd1becbDavid Lawrence 1.3.2 Requirements ...................................... 10
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence 1.3.3 Terminology ....................................... 11
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff 1.4 Acknowledgments ........................................ 12
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 2. GENERAL ISSUES ............................................. 13
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 2.1 Host Names and Numbers ................................. 13
e45d323a2a0f4ca08d4b139546e60a5fa7bd3f0cMichael Graff 2.2 Using Domain Name Service .............................. 13
29f28fe573d4b3b318b3b026d567c1eb86738015Michael Graff 2.3 Applications on Multihomed hosts ....................... 14
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff 2.4 Type-of-Service ........................................ 14
21e7034ec046105c00a0dab86c83732e2e77ad99Michael Graff 2.5 GENERAL APPLICATION REQUIREMENTS SUMMARY ............... 15
09f22ac5b09e70bc526015f37168ba33e21ea91fDavid LawrenceInternet Engineering Task Force [Page 1]
31fab17bcdbe302592a6c0dc5374ef56333ee879Michael GraffRFC1123 INTRODUCTION October 1989
92ef1a9b9dbd48ecb507b42ac62c15afefdaf838David Lawrence 3. REMOTE LOGIN -- TELNET PROTOCOL ............................ 16
31fab17bcdbe302592a6c0dc5374ef56333ee879Michael Graff 3.1 INTRODUCTION ........................................... 16
92ef1a9b9dbd48ecb507b42ac62c15afefdaf838David Lawrence 3.2 PROTOCOL WALK-THROUGH .................................. 16
31fab17bcdbe302592a6c0dc5374ef56333ee879Michael Graff 3.2.1 Option Negotiation ................................ 16
92ef1a9b9dbd48ecb507b42ac62c15afefdaf838David Lawrence 3.2.2 Telnet Go-Ahead Function .......................... 16
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff 3.2.3 Control Functions ................................. 17
92ef1a9b9dbd48ecb507b42ac62c15afefdaf838David Lawrence 3.2.4 Telnet "Synch" Signal ............................. 18
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 3.2.5 NVT Printer and Keyboard .......................... 19
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 3.2.6 Telnet Command Structure .......................... 20
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff 3.2.7 Telnet Binary Option .............................. 20
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 3.2.8 Telnet Terminal-Type Option ....................... 20
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 3.3 SPECIFIC ISSUES ........................................ 21
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 3.3.1 Telnet End-of-Line Convention ..................... 21
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff 3.3.2 Data Entry Terminals .............................. 23
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff 3.3.3 Option Requirements ............................... 24
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff 3.3.4 Option Initiation ................................. 24
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff 3.3.5 Telnet Linemode Option ............................ 25
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff 3.4 TELNET/USER INTERFACE .................................. 25
d947011dc393d9f9988d1349d585b246d19cc3c7Michael Graff 3.4.1 Character Set Transparency ........................ 25
d947011dc393d9f9988d1349d585b246d19cc3c7Michael Graff 3.4.2 Telnet Commands ................................... 26
d947011dc393d9f9988d1349d585b246d19cc3c7Michael Graff 3.4.3 TCP Connection Errors ............................. 26
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff 3.4.4 Non-Default Telnet Contact Port ................... 26
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley 3.4.5 Flushing Output ................................... 26
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff 3.5. TELNET REQUIREMENTS SUMMARY ........................... 27
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 4. FILE TRANSFER .............................................. 29
7b5172166d816efabcdb22519b136ba124bb2619Brian Wellington 4.1 FILE TRANSFER PROTOCOL -- FTP .......................... 29
7b5172166d816efabcdb22519b136ba124bb2619Brian Wellington 4.1.1 INTRODUCTION ...................................... 29
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 4.1.2. PROTOCOL WALK-THROUGH ............................ 29
7b5172166d816efabcdb22519b136ba124bb2619Brian Wellington 4.1.2.1 LOCAL Type ................................... 29
7b5172166d816efabcdb22519b136ba124bb2619Brian Wellington 4.1.2.2 Telnet Format Control ........................ 30
7b5172166d816efabcdb22519b136ba124bb2619Brian Wellington 4.1.2.3 Page Structure ............................... 30
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff 4.1.2.4 Data Structure Transformations ............... 30
acafce24bbc6140464302fb18c729791f1bfddd6Michael Graff 4.1.2.5 Data Connection Management ................... 31
acafce24bbc6140464302fb18c729791f1bfddd6Michael Graff 4.1.2.6 PASV Command ................................. 31
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff 4.1.2.7 LIST and NLST Commands ....................... 31
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff 4.1.2.8 SITE Command ................................. 32
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff 4.1.2.9 STOU Command ................................. 32
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews 4.1.2.10 Telnet End-of-line Code ..................... 32
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews 4.1.2.11 FTP Replies ................................. 33
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff 4.1.2.12 Connections ................................. 34
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 4.1.2.13 Minimum Implementation; RFC-959 Section ..... 34
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff 4.1.3 SPECIFIC ISSUES ................................... 35
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 4.1.3.1 Non-standard Command Verbs ................... 35
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff 4.1.3.2 Idle Timeout ................................. 36
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff 4.1.3.3 Concurrency of Data and Control .............. 36
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 4.1.3.4 FTP Restart Mechanism ........................ 36
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff 4.1.4 FTP/USER INTERFACE ................................ 39
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael GraffInternet Engineering Task Force [Page 2]
3ac63b472022ff92691d1fe69ac715a729671965Michael GraffRFC1123 INTRODUCTION October 1989
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews 4.1.4.1 Pathname Specification ....................... 39
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff 4.1.4.2 "QUOTE" Command .............................. 40
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff 4.1.4.3 Displaying Replies to User ................... 40
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley 4.1.4.4 Maintaining Synchronization .................. 40
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 4.1.5 FTP REQUIREMENTS SUMMARY ......................... 41
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff 4.2 TRIVIAL FILE TRANSFER PROTOCOL -- TFTP ................. 44
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff 4.2.1 INTRODUCTION ...................................... 44
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff 4.2.2 PROTOCOL WALK-THROUGH ............................. 44
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff 4.2.2.1 Transfer Modes ............................... 44
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 4.2.2.2 UDP Header ................................... 44
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 4.2.3 SPECIFIC ISSUES ................................... 44
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 4.2.3.1 Sorcerer's Apprentice Syndrome ............... 44
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 4.2.3.2 Timeout Algorithms ........................... 46
2992344aacdb08e4af936c176d49ef789f5673ddMichael Graff 4.2.3.3 Extensions ................................... 46
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 4.2.3.4 Access Control ............................... 46
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff 4.2.3.5 Broadcast Request ............................ 46
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 4.2.4 TFTP REQUIREMENTS SUMMARY ......................... 47
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff 5. ELECTRONIC MAIL -- SMTP and RFC-822 ........................ 48
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff 5.1 INTRODUCTION ........................................... 48
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 5.2 PROTOCOL WALK-THROUGH .................................. 48
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 5.2.1 The SMTP Model .................................... 48
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff 5.2.2 Canonicalization .................................. 49
6dde125c2f47617ceef1518cf9e5588e8f366b71Michael Graff 5.2.3 VRFY and EXPN Commands ............................ 50
6dde125c2f47617ceef1518cf9e5588e8f366b71Michael Graff 5.2.4 SEND, SOML, and SAML Commands ..................... 50
6dde125c2f47617ceef1518cf9e5588e8f366b71Michael Graff 5.2.5 HELO Command ...................................... 50
6dde125c2f47617ceef1518cf9e5588e8f366b71Michael Graff 5.2.6 Mail Relay ........................................ 51
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff 5.2.7 RCPT Command ...................................... 52
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff 5.2.8 DATA Command ...................................... 53
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff 5.2.9 Command Syntax .................................... 54
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 5.2.10 SMTP Replies ..................................... 54
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 5.2.11 Transparency ..................................... 55
213973a334f92d4aef4ef62b4538fc2e4d0e8082Michael Graff 5.2.12 WKS Use in MX Processing ......................... 55
6dde125c2f47617ceef1518cf9e5588e8f366b71Michael Graff 5.2.13 RFC-822 Message Specification .................... 55
6dde125c2f47617ceef1518cf9e5588e8f366b71Michael Graff 5.2.14 RFC-822 Date and Time Specification .............. 55
784d78b831830bf7b53507e742254f9c49295752Andreas Gustafsson 5.2.15 RFC-822 Syntax Change ............................ 56
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley 5.2.16 RFC-822 Local-part .............................. 56
59c049874bbef182857c57bd9cca292898921c69Bob Halley 5.2.17 Domain Literals .................................. 57
59c049874bbef182857c57bd9cca292898921c69Bob Halley 5.2.18 Common Address Formatting Errors ................. 58
59c049874bbef182857c57bd9cca292898921c69Bob Halley 5.2.19 Explicit Source Routes ........................... 58
59c049874bbef182857c57bd9cca292898921c69Bob Halley 5.3 SPECIFIC ISSUES ........................................ 59
59c049874bbef182857c57bd9cca292898921c69Bob Halley 5.3.1 SMTP Queueing Strategies .......................... 59
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff 5.3.1.1 Sending Strategy .............................. 59
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff 5.3.1.2 Receiving strategy ........................... 61
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 5.3.2 Timeouts in SMTP .................................. 61
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 5.3.3 Reliable Mail Receipt ............................. 63
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 5.3.4 Reliable Mail Transmission ........................ 63
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley 5.3.5 Domain Name Support ............................... 65
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael GraffInternet Engineering Task Force [Page 3]
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob HalleyRFC1123 INTRODUCTION October 1989
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 5.3.6 Mailing Lists and Aliases ......................... 65
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff 5.3.7 Mail Gatewaying ................................... 66
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff 5.3.8 Maximum Message Size .............................. 68
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff 5.4 SMTP REQUIREMENTS SUMMARY .............................. 69
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 6. SUPPORT SERVICES ............................................ 72
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff 6.1 DOMAIN NAME TRANSLATION ................................. 72
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff 6.1.1 INTRODUCTION ....................................... 72
28ab8277a068f273f0a805a83b4811446cb78a5bBob Halley 6.1.2 PROTOCOL WALK-THROUGH ............................. 72
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff 6.1.2.1 Resource Records with Zero TTL ............... 73
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 6.1.2.2 QCLASS Values ................................ 73
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 6.1.2.3 Unused Fields ................................ 73
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff 6.1.2.4 Compression .................................. 73
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff 6.1.2.5 Misusing Configuration Info .................. 73
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff 6.1.3 SPECIFIC ISSUES ................................... 74
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff 6.1.3.1 Resolver Implementation ...................... 74
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff 6.1.3.2 Transport Protocols .......................... 75
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff 6.1.3.3 Efficient Resource Usage ..................... 77
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff 6.1.3.4 Multihomed Hosts ............................. 78
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff 6.1.3.5 Extensibility ................................ 79
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 6.1.3.6 Status of RR Types ........................... 79
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 6.1.3.7 Robustness ................................... 80
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff 6.1.3.8 Local Host Table ............................. 80
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 6.1.4 DNS USER INTERFACE ................................ 81
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 6.1.4.1 DNS Administration ........................... 81
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 6.1.4.2 DNS User Interface ........................... 81
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 6.1.4.3 Interface Abbreviation Facilities ............. 82
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 6.1.5 DOMAIN NAME SYSTEM REQUIREMENTS SUMMARY ........... 84
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 6.2 HOST INITIALIZATION .................................... 87
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 6.2.1 INTRODUCTION ...................................... 87
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 6.2.2 REQUIREMENTS ...................................... 87
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 6.2.2.1 Dynamic Configuration ........................ 87
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 6.2.2.2 Loading Phase ................................ 89
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 6.3 REMOTE MANAGEMENT ...................................... 90
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 6.3.1 INTRODUCTION ...................................... 90
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 6.3.2 PROTOCOL WALK-THROUGH ............................. 90
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 6.3.3 MANAGEMENT REQUIREMENTS SUMMARY ................... 92
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 7. REFERENCES ................................................. 93
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael GraffInternet Engineering Task Force [Page 4]
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael GraffRFC1123 INTRODUCTION October 1989
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff1. INTRODUCTION
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff This document is one of a pair that defines and discusses the
57ecc983c0b37ce7dbccf28f44c6bffdfd6491f7Andreas Gustafsson requirements for host system implementations of the Internet protocol
57ecc983c0b37ce7dbccf28f44c6bffdfd6491f7Andreas Gustafsson suite. This RFC covers the applications layer and support protocols.
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff Its companion RFC, "Requirements for Internet Hosts -- Communications
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff Layers" [INTRO:1] covers the lower layer protocols: transport layer,
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff IP layer, and link layer.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff These documents are intended to provide guidance for vendors,
439c0011e642fb1d26011116144af698125262dbMichael Graff implementors, and users of Internet communication software. They
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff represent the consensus of a large body of technical experience and
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff wisdom, contributed by members of the Internet research and vendor
784d78b831830bf7b53507e742254f9c49295752Andreas Gustafsson This RFC enumerates standard protocols that a host connected to the
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Internet must use, and it incorporates by reference the RFCs and
784d78b831830bf7b53507e742254f9c49295752Andreas Gustafsson other documents describing the current specifications for these
784d78b831830bf7b53507e742254f9c49295752Andreas Gustafsson protocols. It corrects errors in the referenced documents and adds
784d78b831830bf7b53507e742254f9c49295752Andreas Gustafsson additional discussion and guidance for an implementor.
784d78b831830bf7b53507e742254f9c49295752Andreas Gustafsson For each protocol, this document also contains an explicit set of
784d78b831830bf7b53507e742254f9c49295752Andreas Gustafsson requirements, recommendations, and options. The reader must
784d78b831830bf7b53507e742254f9c49295752Andreas Gustafsson understand that the list of requirements in this document is
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff incomplete by itself; the complete set of requirements for an
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff Internet host is primarily defined in the standard protocol
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff specification documents, with the corrections, amendments, and
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff supplements contained in this RFC.
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff A good-faith implementation of the protocols that was produced after
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff careful reading of the RFC's and with some interaction with the
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff Internet technical community, and that followed good communications
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff software engineering practices, should differ from the requirements
439c0011e642fb1d26011116144af698125262dbMichael Graff of this document in only minor ways. Thus, in many cases, the
439c0011e642fb1d26011116144af698125262dbMichael Graff "requirements" in this RFC are already stated or implied in the
439c0011e642fb1d26011116144af698125262dbMichael Graff standard protocol documents, so that their inclusion here is, in a
439c0011e642fb1d26011116144af698125262dbMichael Graff sense, redundant. However, they were included because some past
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff implementation has made the wrong choice, causing problems of
439c0011e642fb1d26011116144af698125262dbMichael Graff interoperability, performance, and/or robustness.
439c0011e642fb1d26011116144af698125262dbMichael Graff This document includes discussion and explanation of many of the
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff requirements and recommendations. A simple list of requirements
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff would be dangerous, because:
d98c74e2ec5b96bd22aa4ed6d893e8993787493bMichael Graff o Some required features are more important than others, and some
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff features are optional.
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff o There may be valid reasons why particular vendor products that
1a0e33bc2044e1902493111db14cbf793083ac47Michael GraffInternet Engineering Task Force [Page 5]
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas GustafssonRFC1123 INTRODUCTION October 1989
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff are designed for restricted contexts might choose to use
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff different specifications.
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff However, the specifications of this document must be followed to meet
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff the general goal of arbitrary host interoperation across the
439c0011e642fb1d26011116144af698125262dbMichael Graff diversity and complexity of the Internet system. Although most
439c0011e642fb1d26011116144af698125262dbMichael Graff current implementations fail to meet these requirements in various
439c0011e642fb1d26011116144af698125262dbMichael Graff ways, some minor and some major, this specification is the ideal
439c0011e642fb1d26011116144af698125262dbMichael Graff towards which we need to move.
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff These requirements are based on the current level of Internet
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley architecture. This document will be updated as required to provide
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff additional clarifications or to include additional information in
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff those areas in which specifications are still evolving.
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews This introductory section begins with general advice to host software
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley vendors, and then gives some guidance on reading the rest of the
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff document. Section 2 contains general requirements that may be
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff applicable to all application and support protocols. Sections 3, 4,
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley and 5 contain the requirements on protocols for the three major
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley applications: Telnet, file transfer, and electronic mail,
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff respectively. Section 6 covers the support applications: the domain
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff name system, system initialization, and management. Finally, all
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff references will be found in Section 7.
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff 1.1 The Internet Architecture
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff For a brief introduction to the Internet architecture from a host
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff viewpoint, see Section 1.1 of [INTRO:1]. That section also
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley contains recommended references for general background on the
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Internet architecture.
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff 1.2 General Considerations
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews There are two important lessons that vendors of Internet host
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff software have learned and which a new vendor should consider
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff 1.2.1 Continuing Internet Evolution
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff The enormous growth of the Internet has revealed problems of
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff management and scaling in a large datagram-based packet
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff communication system. These problems are being addressed, and
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff as a result there will be continuing evolution of the
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff specifications described in this document. These changes will
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff be carefully planned and controlled, since there is extensive
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff participation in this planning by the vendors and by the
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff organizations responsible for operations of the networks.
1a0e33bc2044e1902493111db14cbf793083ac47Michael GraffInternet Engineering Task Force [Page 6]
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael GraffRFC1123 INTRODUCTION October 1989
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff Development, evolution, and revision are characteristic of
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff computer network protocols today, and this situation will
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff persist for some years. A vendor who develops computer
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff communication software for the Internet protocol suite (or any
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff other protocol suite!) and then fails to maintain and update
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff that software for changing specifications is going to leave a
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff trail of unhappy customers. The Internet is a large
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff communication network, and the users are in constant contact
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff through it. Experience has shown that knowledge of
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff deficiencies in vendor software propagates quickly through the
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff Internet technical community.
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff 1.2.2 Robustness Principle
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff At every layer of the protocols, there is a general rule whose
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff application can lead to enormous benefits in robustness and
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff interoperability:
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff "Be liberal in what you accept, and
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff conservative in what you send"
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff Software should be written to deal with every conceivable
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff error, no matter how unlikely; sooner or later a packet will
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff come in with that particular combination of errors and
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff attributes, and unless the software is prepared, chaos can
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff ensue. In general, it is best to assume that the network is
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff filled with malevolent entities that will send in packets
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff designed to have the worst possible effect. This assumption
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley will lead to suitable protective design, although the most
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley serious problems in the Internet have been caused by
24a2d84aedbad12fba2ca319c98745e62ef0bc16Bob Halley unenvisaged mechanisms triggered by low-probability events;
24a2d84aedbad12fba2ca319c98745e62ef0bc16Bob Halley mere human malice would never have taken so devious a course!
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff Adaptability to change must be designed into all levels of
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff Internet host software. As a simple example, consider a
ffd9f879709c5fb35f25368e74e2e12eb6881d9bMichael Graff protocol specification that contains an enumeration of values
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley for a particular header field -- e.g., a type field, a port
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff number, or an error code; this enumeration must be assumed to
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff be incomplete. Thus, if a protocol specification defines four
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff possible error codes, the software must not break when a fifth
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff code shows up. An undefined code might be logged (see below),
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff but it must not cause a failure.
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff The second part of the principle is almost as important:
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff software on other hosts may contain deficiencies that make it
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff unwise to exploit legal but obscure protocol features. It is
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff unwise to stray far from the obvious and simple, lest untoward
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff effects result elsewhere. A corollary of this is "watch out
1a0e33bc2044e1902493111db14cbf793083ac47Michael GraffInternet Engineering Task Force [Page 7]
1a0e33bc2044e1902493111db14cbf793083ac47Michael GraffRFC1123 INTRODUCTION October 1989
78854e02c127f31ab90f56da0531542004b45377Michael Graff for misbehaving hosts"; host software should be prepared, not
78854e02c127f31ab90f56da0531542004b45377Michael Graff just to survive other misbehaving hosts, but also to cooperate
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff to limit the amount of disruption such hosts can cause to the
78854e02c127f31ab90f56da0531542004b45377Michael Graff shared communication facility.
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff 1.2.3 Error Logging
daf83a29374c487a2800333d371e98e77e5a0d64Bob Halley The Internet includes a great variety of host and gateway
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff systems, each implementing many protocols and protocol layers,
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff and some of these contain bugs and mis-features in their
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff Internet protocol software. As a result of complexity,
58cbc05eb0b80510182496ad905cd407f3624dbeBrian Wellington diversity, and distribution of function, the diagnosis of user
58cbc05eb0b80510182496ad905cd407f3624dbeBrian Wellington problems is often very difficult.
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff Problem diagnosis will be aided if host implementations include
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff a carefully designed facility for logging erroneous or
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff "strange" protocol events. It is important to include as much
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff diagnostic information as possible when an error is logged. In
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff particular, it is often useful to record the header(s) of a
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff packet that caused an error. However, care must be taken to
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff ensure that error logging does not consume prohibitive amounts
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff of resources or otherwise interfere with the operation of the
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff There is a tendency for abnormal but harmless protocol events
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff to overflow error logging files; this can be avoided by using a
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff "circular" log, or by enabling logging only while diagnosing a
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson known failure. It may be useful to filter and count duplicate
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson successive messages. One strategy that seems to work well is:
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson (1) always count abnormalities and make such counts accessible
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson through the management protocol (see Section 6.3); and (2)
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson allow the logging of a great variety of events to be
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson selectively enabled. For example, it might useful to be able
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson to "log everything" or to "log everything for host X".
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson Note that different managements may have differing policies
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson about the amount of error logging that they want normally
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff enabled in a host. Some will say, "if it doesn't hurt me, I
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff don't want to know about it", while others will want to take a
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff more watchful and aggressive attitude about detecting and
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff removing protocol abnormalities.
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff 1.2.4 Configuration
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff It would be ideal if a host implementation of the Internet
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff protocol suite could be entirely self-configuring. This would
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff allow the whole suite to be implemented in ROM or cast into
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff silicon, it would simplify diskless workstations, and it would
76c8294c81fb48b1da6e1fc5b83322a4cedb8e58Andreas GustafssonInternet Engineering Task Force [Page 8]
21e7034ec046105c00a0dab86c83732e2e77ad99Michael GraffRFC1123 INTRODUCTION October 1989
21e7034ec046105c00a0dab86c83732e2e77ad99Michael Graff be an immense boon to harried LAN administrators as well as
21e7034ec046105c00a0dab86c83732e2e77ad99Michael Graff system vendors. We have not reached this ideal; in fact, we
21e7034ec046105c00a0dab86c83732e2e77ad99Michael Graff are not even close.
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff At many points in this document, you will find a requirement
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff that a parameter be a configurable option. There are several
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff different reasons behind such requirements. In a few cases,
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff there is current uncertainty or disagreement about the best
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff value, and it may be necessary to update the recommended value
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff in the future. In other cases, the value really depends on
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff external factors -- e.g., the size of the host and the
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff distribution of its communication load, or the speeds and
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff topology of nearby networks -- and self-tuning algorithms are
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff unavailable and may be insufficient. In some cases,
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff configurability is needed because of administrative
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff requirements.
d1fb73ada84ee15ea078c80b1cd0ca8ddc6aa856Michael Graff Finally, some configuration options are required to communicate
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff with obsolete or incorrect implementations of the protocols,
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff distributed without sources, that unfortunately persist in many
d1fb73ada84ee15ea078c80b1cd0ca8ddc6aa856Michael Graff parts of the Internet. To make correct systems coexist with
d1fb73ada84ee15ea078c80b1cd0ca8ddc6aa856Michael Graff these faulty systems, administrators often have to "mis-
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff configure" the correct systems. This problem will correct
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff itself gradually as the faulty systems are retired, but it
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff cannot be ignored by vendors.
c03bb27f0675a6e60ceea66b451548e8481bc05cMark Andrews When we say that a parameter must be configurable, we do not
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff intend to require that its value be explicitly read from a
d1fb73ada84ee15ea078c80b1cd0ca8ddc6aa856Michael Graff configuration file at every boot time. We recommend that
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff implementors set up a default for each parameter, so a
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff configuration file is only necessary to override those defaults
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff that are inappropriate in a particular installation. Thus, the
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff configurability requirement is an assurance that it will be
d1fb73ada84ee15ea078c80b1cd0ca8ddc6aa856Michael Graff POSSIBLE to override the default when necessary, even in a
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff binary-only or ROM-based product.
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff This document requires a particular value for such defaults in
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff some cases. The choice of default is a sensitive issue when
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff the configuration item controls the accommodation to existing
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff faulty systems. If the Internet is to converge successfully to
d1fb73ada84ee15ea078c80b1cd0ca8ddc6aa856Michael Graff complete interoperability, the default values built into
d1fb73ada84ee15ea078c80b1cd0ca8ddc6aa856Michael Graff implementations must implement the official protocol, not
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff "mis-configurations" to accommodate faulty implementations.
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff Although marketing considerations have led some vendors to
f6f4ceece41f040cc43722afa9a5cd1f54a576b6Michael Graff choose mis-configuration defaults, we urge vendors to choose
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff defaults that will conform to the standard.
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff Finally, we note that a vendor needs to provide adequate
2bcb48cfcae36398454c98e40c563e2cde748e07Michael GraffInternet Engineering Task Force [Page 9]
d1fb73ada84ee15ea078c80b1cd0ca8ddc6aa856Michael GraffRFC1123 INTRODUCTION October 1989
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff documentation on all configuration parameters, their limits and
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff 1.3 Reading this Document
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff 1.3.1 Organization
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff In general, each major section is organized into the following
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff (1) Introduction
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff (2) Protocol Walk-Through -- considers the protocol
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff specification documents section-by-section, correcting
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff errors, stating requirements that may be ambiguous or
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff ill-defined, and providing further clarification or
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff (3) Specific Issues -- discusses protocol design and
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff implementation issues that were not included in the walk-
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff (4) Interfaces -- discusses the service interface to the next
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff higher layer.
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff (5) Summary -- contains a summary of the requirements of the
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff Under many of the individual topics in this document, there is
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley parenthetical material labeled "DISCUSSION" or
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff "IMPLEMENTATION". This material is intended to give
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff clarification and explanation of the preceding requirements
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff text. It also includes some suggestions on possible future
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff directions or developments. The implementation material
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff contains suggested approaches that an implementor may want to
d1fb73ada84ee15ea078c80b1cd0ca8ddc6aa856Michael Graff The summary sections are intended to be guides and indexes to
d1fb73ada84ee15ea078c80b1cd0ca8ddc6aa856Michael Graff the text, but are necessarily cryptic and incomplete. The
d1fb73ada84ee15ea078c80b1cd0ca8ddc6aa856Michael Graff summaries should never be used or referenced separately from
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff the complete RFC.
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff 1.3.2 Requirements
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff In this document, the words that are used to define the
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff significance of each particular requirement are capitalized.
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff These words are:
528829aa8ad69238e674cd81078bc14d4199691bMichael GraffInternet Engineering Task Force [Page 10]
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael GraffRFC1123 INTRODUCTION October 1989
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff This word or the adjective "REQUIRED" means that the item
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff is an absolute requirement of the specification.
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff This word or the adjective "RECOMMENDED" means that there
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff may exist valid reasons in particular circumstances to
6dde125c2f47617ceef1518cf9e5588e8f366b71Michael Graff ignore this item, but the full implications should be
6dde125c2f47617ceef1518cf9e5588e8f366b71Michael Graff understood and the case carefully weighed before choosing
6dde125c2f47617ceef1518cf9e5588e8f366b71Michael Graff a different course.
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff This word or the adjective "OPTIONAL" means that this item
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff is truly optional. One vendor may choose to include the
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff item because a particular marketplace requires it or
2bcb48cfcae36398454c98e40c563e2cde748e07Michael Graff because it enhances the product, for example; another
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff vendor may omit the same item.
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff An implementation is not compliant if it fails to satisfy one
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff or more of the MUST requirements for the protocols it
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff implements. An implementation that satisfies all the MUST and
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff all the SHOULD requirements for its protocols is said to be
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff "unconditionally compliant"; one that satisfies all the MUST
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff requirements but not all the SHOULD requirements for its
59c049874bbef182857c57bd9cca292898921c69Bob Halley protocols is said to be "conditionally compliant".
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff 1.3.3 Terminology
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff This document uses the following technical terms:
78854e02c127f31ab90f56da0531542004b45377Michael Graff A segment is the unit of end-to-end transmission in the
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence TCP protocol. A segment consists of a TCP header followed
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff by application data. A segment is transmitted by
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff encapsulation in an IP datagram.
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff This term is used by some application layer protocols
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff (particularly SMTP) for an application data unit.
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff A [UDP] datagram is the unit of end-to-end transmission in
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff the UDP protocol.
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael GraffInternet Engineering Task Force [Page 11]
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael GraffRFC1123 INTRODUCTION October 1989
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff A host is said to be multihomed if it has multiple IP
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff addresses to connected networks.
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff 1.4 Acknowledgments
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff This document incorporates contributions and comments from a large
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley group of Internet protocol experts, including representatives of
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley university and research labs, vendors, and government agencies.
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley It was assembled primarily by the Host Requirements Working Group
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley of the Internet Engineering Task Force (IETF).
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff The Editor would especially like to acknowledge the tireless
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff dedication of the following people, who attended many long
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff meetings and generated 3 million bytes of electronic mail over the
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff past 18 months in pursuit of this document: Philip Almquist, Dave
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff Borman (Cray Research), Noel Chiappa, Dave Crocker (DEC), Steve
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff Deering (Stanford), Mike Karels (Berkeley), Phil Karn (Bellcore),
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff John Lekashman (NASA), Charles Lynn (BBN), Keith McCloghrie (TWG),
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff Paul Mockapetris (ISI), Thomas Narten (Purdue), Craig Partridge
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff (BBN), Drew Perkins (CMU), and James Van Bokkelen (FTP Software).
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff In addition, the following people made major contributions to the
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence effort: Bill Barns (Mitre), Steve Bellovin (AT&T), Mike Brescia
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff (BBN), Ed Cain (DCA), Annette DeSchon (ISI), Martin Gross (DCA),
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff Phill Gross (NRI), Charles Hedrick (Rutgers), Van Jacobson (LBL),
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff John Klensin (MIT), Mark Lottor (SRI), Milo Medin (NASA), Bill
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff Melohn (Sun Microsystems), Greg Minshall (Kinetics), Jeff Mogul
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff (DEC), John Mullen (CMC), Jon Postel (ISI), John Romkey (Epilogue
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff Technology), and Mike StJohns (DCA). The following also made
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff significant contributions to particular areas: Eric Allman
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff (Berkeley), Rob Austein (MIT), Art Berggreen (ACC), Keith Bostic
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff (Berkeley), Vint Cerf (NRI), Wayne Hathaway (NASA), Matt Korn
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff (IBM), Erik Naggum (Naggum Software, Norway), Robert Ullmann
78854e02c127f31ab90f56da0531542004b45377Michael Graff (Prime Computer), David Waitzman (BBN), Frank Wancho (USA), Arun
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff Welch (Ohio State), Bill Westfield (Cisco), and Rayan Zachariassen
7ec42e4be45c0486ce80461293f377fb4b904dc0Michael Graff We are grateful to all, including any contributors who may have
7ec42e4be45c0486ce80461293f377fb4b904dc0Michael Graff been inadvertently omitted from this list.
7ec42e4be45c0486ce80461293f377fb4b904dc0Michael GraffInternet Engineering Task Force [Page 12]
a253e35c2451818fb39f9b808c7641adb5275fb3Michael GraffRFC1123 APPLICATIONS LAYER -- GENERAL October 1989
7ec42e4be45c0486ce80461293f377fb4b904dc0Michael Graff2. GENERAL ISSUES
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff This section contains general requirements that may be applicable to
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff all application-layer protocols.
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff 2.1 Host Names and Numbers
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley The syntax of a legal Internet host name was specified in RFC-952
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff [DNS:4]. One aspect of host name syntax is hereby changed: the
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff restriction on the first character is relaxed to allow either a
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff letter or a digit. Host software MUST support this more liberal
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff Host software MUST handle host names of up to 63 characters and
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff SHOULD handle host names of up to 255 characters.
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Whenever a user inputs the identity of an Internet host, it SHOULD
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews be possible to enter either (1) a host domain name or (2) an IP
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff address in dotted-decimal ("#.#.#.#") form. The host SHOULD check
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews the string syntactically for a dotted-decimal number before
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff looking it up in the Domain Name System.
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff This last requirement is not intended to specify the complete
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews syntactic form for entering a dotted-decimal host number;
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews that is considered to be a user-interface issue. For
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews example, a dotted-decimal number must be enclosed within
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews "[ ]" brackets for SMTP mail (see Section 5.2.17). This
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews notation could be made universal within a host system,
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews simplifying the syntactic checking for a dotted-decimal
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews If a dotted-decimal number can be entered without such
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff identifying delimiters, then a full syntactic check must be
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff made, because a segment of a host domain name is now allowed
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff to begin with a digit and could legally be entirely numeric
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff (see Section 6.1.2.4). However, a valid host name can never
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews have the dotted-decimal form #.#.#.#, since at least the
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews highest-level component label will be alphabetic.
93d3a6fd20aceb9998eca4723bba8810243e7689Michael Graff 2.2 Using Domain Name Service
f788a5704623c1d686b770a0f014fd52834d4a67Michael Graff Host domain names MUST be translated to IP addresses as described
93d3a6fd20aceb9998eca4723bba8810243e7689Michael Graff in Section 6.1.
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff Applications using domain name services MUST be able to cope with
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff soft error conditions. Applications MUST wait a reasonable
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff interval between successive retries due to a soft error, and MUST
081cff0c33514a5dc63ab794fc199c07377ab756Mark AndrewsInternet Engineering Task Force [Page 13]
93d3a6fd20aceb9998eca4723bba8810243e7689Michael GraffRFC1123 APPLICATIONS LAYER -- GENERAL October 1989
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley allow for the possibility that network problems may deny service
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley for hours or even days.
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley An application SHOULD NOT rely on the ability to locate a WKS
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews record containing an accurate listing of all services at a
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley particular host address, since the WKS RR type is not often used
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley by Internet sites. To confirm that a service is present, simply
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley attempt to use it.
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff 2.3 Applications on Multihomed hosts
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff When the remote host is multihomed, the name-to-address
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff translation will return a list of alternative IP addresses. As
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff specified in Section 6.1.3.4, this list should be in order of
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence decreasing preference. Application protocol implementations
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff SHOULD be prepared to try multiple addresses from the list until
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff success is obtained. More specific requirements for SMTP are
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff given in Section 5.3.4.
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff When the local host is multihomed, a UDP-based request/response
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff application SHOULD send the response with an IP source address
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff that is the same as the specific destination address of the UDP
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff request datagram. The "specific destination address" is defined
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff in the "IP Addressing" section of the companion RFC [INTRO:1].
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff Similarly, a server application that opens multiple TCP
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence connections to the same client SHOULD use the same local IP
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff address for all.
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff 2.4 Type-of-Service
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff Applications MUST select appropriate TOS values when they invoke
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff transport layer services, and these values MUST be configurable.
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff Note that a TOS value contains 5 bits, of which only the most-
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff significant 3 bits are currently defined; the other two bits MUST
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff As gateway algorithms are developed to implement Type-of-
a385f150bb21b8b81f70ed7df545357a83f1da82Michael Graff Service, the recommended values for various application
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley protocols may change. In addition, it is likely that
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley particular combinations of users and Internet paths will want
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley non-standard TOS values. For these reasons, the TOS values
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley must be configurable.
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley See the latest version of the "Assigned Numbers" RFC
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley [INTRO:5] for the recommended TOS values for the major
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley application protocols.
a44c12b332b867f29631e235eb11d1263c73d6c0Bob HalleyInternet Engineering Task Force [Page 14]
a44c12b332b867f29631e235eb11d1263c73d6c0Bob HalleyRFC1123 APPLICATIONS LAYER -- GENERAL October 1989
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley 2.5 GENERAL APPLICATION REQUIREMENTS SUMMARY
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | | | | |S| |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | | | | |H| |F
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | | | | |O|M|o
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley | | |S| |U|U|o
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley | | |H| |L|S|t
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | |M|O| |D|T|n
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | |U|U|M| | |o
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff | |S|L|A|N|N|t
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence | |T|D|Y|O|O|t
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael GraffFEATURE |SECTION | | | |T|T|e
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff-----------------------------------------------|----------|-|-|-|-|-|--
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff | | | | | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael GraffUser interfaces: | | | | | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff Allow host name to begin with digit |2.1 |x| | | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff Host names of up to 635 characters |2.1 |x| | | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff Host names of up to 255 characters |2.1 | |x| | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff Support dotted-decimal host numbers |2.1 | |x| | | |
a385f150bb21b8b81f70ed7df545357a83f1da82Michael Graff Check syntactically for dotted-dec first |2.1 | |x| | | |
a385f150bb21b8b81f70ed7df545357a83f1da82Michael Graff | | | | | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael GraffMap domain names per Section 6.1 |2.2 |x| | | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael GraffCope with soft DNS errors |2.2 |x| | | | |
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence Reasonable interval between retries |2.2 |x| | | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff Allow for long outages |2.2 |x| | | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael GraffExpect WKS records to be available |2.2 | | | |x| |
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff | | | | | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael GraffTry multiple addr's for remote multihomed host |2.3 | |x| | | |
0e27dac042d622ff9cde568a90347e1d53b9d784Andreas GustafssonUDP reply src addr is specific dest of request |2.3 | |x| | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael GraffUse same IP addr for related TCP connections |2.3 | |x| | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael GraffSpecify appropriate TOS values |2.4 |x| | | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff TOS values configurable |2.4 |x| | | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff Unused TOS bits zero |2.4 |x| | | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley | | | | | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley | | | | | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob HalleyInternet Engineering Task Force [Page 15]
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael GraffRFC1123 REMOTE LOGIN -- TELNET October 1989
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley3. REMOTE LOGIN -- TELNET PROTOCOL
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley 3.1 INTRODUCTION
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence Telnet is the standard Internet application protocol for remote
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley login. It provides the encoding rules to link a user's
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley keyboard/display on a client ("user") system with a command
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley interpreter on a remote server system. A subset of the Telnet
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley protocol is also incorporated within other application protocols,
0e27dac042d622ff9cde568a90347e1d53b9d784Andreas Gustafsson e.g., FTP and SMTP.
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Telnet uses a single TCP connection, and its normal data stream
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley ("Network Virtual Terminal" or "NVT" mode) is 7-bit ASCII with
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley escape sequences to embed control functions. Telnet also allows
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley the negotiation of many optional modes and functions.
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley The primary Telnet specification is to be found in RFC-854
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley [TELNET:1], while the options are defined in many other RFCs; see
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley Section 7 for references.
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley 3.2 PROTOCOL WALK-THROUGH
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley 3.2.1 Option Negotiation: RFC-854, pp. 2-3
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley Every Telnet implementation MUST include option negotiation and
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley subnegotiation machinery [TELNET:2].
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley A host MUST carefully follow the rules of RFC-854 to avoid
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley option-negotiation loops. A host MUST refuse (i.e, reply
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley WONT/DONT to a DO/WILL) an unsupported option. Option
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley negotiation SHOULD continue to function (even if all requests
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley are refused) throughout the lifetime of a Telnet connection.
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley If all option negotiations fail, a Telnet implementation MUST
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley default to, and support, an NVT.
fbc09123cd0cac8d513165c441ef2b2ed9b3445cBob Halley Even though more sophisticated "terminals" and supporting
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley option negotiations are becoming the norm, all
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley implementations must be prepared to support an NVT for any
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley user-server communication.
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff 3.2.2 Telnet Go-Ahead Function: RFC-854, p. 5, and RFC-858
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff On a host that never sends the Telnet command Go Ahead (GA),
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence the Telnet Server MUST attempt to negotiate the Suppress Go
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff Ahead option (i.e., send "WILL Suppress Go Ahead"). A User or
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff Server Telnet MUST always accept negotiation of the Suppress Go
a253e35c2451818fb39f9b808c7641adb5275fb3Michael GraffInternet Engineering Task Force [Page 16]
14b98cb34eda66c87ce41a207704a2c232280eafMichael GraffRFC1123 REMOTE LOGIN -- TELNET October 1989
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff Ahead option.
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff When it is driving a full-duplex terminal for which GA has no
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff meaning, a User Telnet implementation MAY ignore GA commands.
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff Half-duplex ("locked-keyboard") line-at-a-time terminals
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff for which the Go-Ahead mechanism was designed have largely
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence disappeared from the scene. It turned out to be difficult
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff to implement sending the Go-Ahead signal in many operating
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff systems, even some systems that support native half-duplex
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff terminals. The difficulty is typically that the Telnet
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff server code does not have access to information about
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff whether the user process is blocked awaiting input from
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff the Telnet connection, i.e., it cannot reliably determine
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff when to send a GA command. Therefore, most Telnet Server
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff hosts do not send GA commands.
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff The effect of the rules in this section is to allow either
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff end of a Telnet connection to veto the use of GA commands.
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff There is a class of half-duplex terminals that is still
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff commercially important: "data entry terminals," which
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff interact in a full-screen manner. However, supporting
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff data entry terminals using the Telnet protocol does not
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff require the Go Ahead signal; see Section 3.3.2.
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff 3.2.3 Control Functions: RFC-854, pp. 7-8
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff The list of Telnet commands has been extended to include EOR
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff (End-of-Record), with code 239 [TELNET:9].
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff Both User and Server Telnets MAY support the control functions
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff EOR, EC, EL, and Break, and MUST support AO, AYT, DM, IP, NOP,
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff A host MUST be able to receive and ignore any Telnet control
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff functions that it does not support.
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff Note that a Server Telnet is required to support the
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff Telnet IP (Interrupt Process) function, even if the server
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff host has an equivalent in-stream function (e.g., Control-C
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff in many systems). The Telnet IP function may be stronger
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff than an in-stream interrupt command, because of the out-
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff of-band effect of TCP urgent data.
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff The EOR control function may be used to delimit the
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob HalleyInternet Engineering Task Force [Page 17]
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob HalleyRFC1123 REMOTE LOGIN -- TELNET October 1989
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley stream. An important application is data entry terminal
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley support (see Section 3.3.2). There was concern that since
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley EOR had not been defined in RFC-854, a host that was not
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley prepared to correctly ignore unknown Telnet commands might
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley crash if it received an EOR. To protect such hosts, the
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley End-of-Record option [TELNET:9] was introduced; however, a
c03bb27f0675a6e60ceea66b451548e8481bc05cMark Andrews properly implemented Telnet program will not require this
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley 3.2.4 Telnet "Synch" Signal: RFC-854, pp. 8-10
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley When it receives "urgent" TCP data, a User or Server Telnet
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley MUST discard all data except Telnet commands until the DM (and
d1cbf714097e900ed1703529584d3e1a50e8a4a8Brian Wellington end of urgent) is reached.
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley When it sends Telnet IP (Interrupt Process), a User Telnet
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley SHOULD follow it by the Telnet "Synch" sequence, i.e., send as
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley TCP urgent data the sequence "IAC IP IAC DM". The TCP urgent
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley pointer points to the DM octet.
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley When it receives a Telnet IP command, a Server Telnet MAY send
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley a Telnet "Synch" sequence back to the user, to flush the output
d1cbf714097e900ed1703529584d3e1a50e8a4a8Brian Wellington stream. The choice ought to be consistent with the way the
d1cbf714097e900ed1703529584d3e1a50e8a4a8Brian Wellington server operating system behaves when a local user interrupts a
d1cbf714097e900ed1703529584d3e1a50e8a4a8Brian Wellington When it receives a Telnet AO command, a Server Telnet MUST send
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley a Telnet "Synch" sequence back to the user, to flush the output
d1cbf714097e900ed1703529584d3e1a50e8a4a8Brian Wellington A User Telnet SHOULD have the capability of flushing output
d1cbf714097e900ed1703529584d3e1a50e8a4a8Brian Wellington when it sends a Telnet IP; see also Section 3.4.5.
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley There are three possible ways for a User Telnet to flush
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley the stream of server output data:
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley (1) Send AO after IP.
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley This will cause the server host to send a "flush-
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley buffered-output" signal to its operating system.
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley However, the AO may not take effect locally, i.e.,
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley stop terminal output at the User Telnet end, until
d1cbf714097e900ed1703529584d3e1a50e8a4a8Brian Wellington the Server Telnet has received and processed the AO
d1cbf714097e900ed1703529584d3e1a50e8a4a8Brian Wellington and has sent back a "Synch".
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley (2) Send DO TIMING-MARK [TELNET:7] after IP, and discard
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley all output locally until a WILL/WONT TIMING-MARK is
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob HalleyInternet Engineering Task Force [Page 18]
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob HalleyRFC1123 REMOTE LOGIN -- TELNET October 1989
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley received from the Server Telnet.
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley Since the DO TIMING-MARK will be processed after the
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley IP at the server, the reply to it should be in the
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley right place in the output data stream. However, the
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley TIMING-MARK will not send a "flush buffered output"
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley signal to the server operating system. Whether or
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley not this is needed is dependent upon the server
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley (3) Do both.
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff The best method is not entirely clear, since it must
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff accommodate a number of existing server hosts that do not
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff follow the Telnet standards in various ways. The safest
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff approach is probably to provide a user-controllable option
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence to select (1), (2), or (3).
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff 3.2.5 NVT Printer and Keyboard: RFC-854, p. 11
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff In NVT mode, a Telnet SHOULD NOT send characters with the
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff high-order bit 1, and MUST NOT send it as a parity bit.
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff Implementations that pass the high-order bit to applications
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff SHOULD negotiate binary mode (see Section 3.2.6).
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff Implementors should be aware that a strict reading of
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff RFC-854 allows a client or server expecting NVT ASCII to
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff ignore characters with the high-order bit set. In
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff general, binary mode is expected to be used for
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff transmission of an extended (beyond 7-bit) character set
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff However, there exist applications that really need an 8-
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff bit NVT mode, which is currently not defined, and these
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff existing applications do set the high-order bit during
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff part or all of the life of a Telnet connection. Note that
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff binary mode is not the same as 8-bit NVT mode, since
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff binary mode turns off end-of-line processing. For this
78854e02c127f31ab90f56da0531542004b45377Michael Graff reason, the requirements on the high-order bit are stated
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff as SHOULD, not MUST.
78854e02c127f31ab90f56da0531542004b45377Michael Graff RFC-854 defines a minimal set of properties of a "network
78854e02c127f31ab90f56da0531542004b45377Michael Graff virtual terminal" or NVT; this is not meant to preclude
78854e02c127f31ab90f56da0531542004b45377Michael Graff additional features in a real terminal. A Telnet
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff connection is fully transparent to all 7-bit ASCII
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff characters, including arbitrary ASCII control characters.
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael GraffInternet Engineering Task Force [Page 19]
78854e02c127f31ab90f56da0531542004b45377Michael GraffRFC1123 REMOTE LOGIN -- TELNET October 1989
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff For example, a terminal might support full-screen commands
78854e02c127f31ab90f56da0531542004b45377Michael Graff coded as ASCII escape sequences; a Telnet implementation
78854e02c127f31ab90f56da0531542004b45377Michael Graff would pass these sequences as uninterpreted data. Thus,
78854e02c127f31ab90f56da0531542004b45377Michael Graff an NVT should not be conceived as a terminal type of a
78854e02c127f31ab90f56da0531542004b45377Michael Graff highly-restricted device.
875e88e734b310976b178dc26a74d86fbebc935cBob Halley 3.2.6 Telnet Command Structure: RFC-854, p. 13
78854e02c127f31ab90f56da0531542004b45377Michael Graff Since options may appear at any point in the data stream, a
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff Telnet escape character (known as IAC, with the value 255) to
78854e02c127f31ab90f56da0531542004b45377Michael Graff be sent as data MUST be doubled.
78854e02c127f31ab90f56da0531542004b45377Michael Graff 3.2.7 Telnet Binary Option: RFC-856
78854e02c127f31ab90f56da0531542004b45377Michael Graff When the Binary option has been successfully negotiated,
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff arbitrary 8-bit characters are allowed. However, the data
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff stream MUST still be scanned for IAC characters, any embedded
78854e02c127f31ab90f56da0531542004b45377Michael Graff Telnet commands MUST be obeyed, and data bytes equal to IAC
78854e02c127f31ab90f56da0531542004b45377Michael Graff MUST be doubled. Other character processing (e.g., replacing
78854e02c127f31ab90f56da0531542004b45377Michael Graff CR by CR NUL or by CR LF) MUST NOT be done. In particular,
78854e02c127f31ab90f56da0531542004b45377Michael Graff there is no end-of-line convention (see Section 3.3.1) in
78854e02c127f31ab90f56da0531542004b45377Michael Graff The Binary option is normally negotiated in both
78854e02c127f31ab90f56da0531542004b45377Michael Graff directions, to change the Telnet connection from NVT mode
78854e02c127f31ab90f56da0531542004b45377Michael Graff to "binary mode".
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff The sequence IAC EOR can be used to delimit blocks of data
2a0b8796d46265c078ba7f4dea2979c62ebf5badBob Halley within a binary-mode Telnet stream.
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff 3.2.8 Telnet Terminal-Type Option: RFC-1091
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff The Terminal-Type option MUST use the terminal type names
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff officially defined in the Assigned Numbers RFC [INTRO:5], when
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff they are available for the particular terminal. However, the
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff receiver of a Terminal-Type option MUST accept any name.
78854e02c127f31ab90f56da0531542004b45377Michael Graff RFC-1091 [TELNET:10] updates an earlier version of the
78854e02c127f31ab90f56da0531542004b45377Michael Graff Terminal-Type option defined in RFC-930. The earlier
78854e02c127f31ab90f56da0531542004b45377Michael Graff version allowed a server host capable of supporting
78854e02c127f31ab90f56da0531542004b45377Michael Graff multiple terminal types to learn the type of a particular
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff client's terminal, assuming that each physical terminal
78854e02c127f31ab90f56da0531542004b45377Michael Graff had an intrinsic type. However, today a "terminal" is
78854e02c127f31ab90f56da0531542004b45377Michael Graff often really a terminal emulator program running in a PC,
78854e02c127f31ab90f56da0531542004b45377Michael Graff perhaps capable of emulating a range of terminal types.
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff Therefore, RFC-1091 extends the specification to allow a
78854e02c127f31ab90f56da0531542004b45377Michael GraffInternet Engineering Task Force [Page 20]
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceRFC1123 REMOTE LOGIN -- TELNET October 1989
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley more general terminal-type negotiation between User and
59c049874bbef182857c57bd9cca292898921c69Bob Halley Server Telnets.
59c049874bbef182857c57bd9cca292898921c69Bob Halley 3.3 SPECIFIC ISSUES
59c049874bbef182857c57bd9cca292898921c69Bob Halley 3.3.1 Telnet End-of-Line Convention
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley The Telnet protocol defines the sequence CR LF to mean "end-
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley of-line". For terminal input, this corresponds to a command-
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley completion or "end-of-line" key being pressed on a user
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley terminal; on an ASCII terminal, this is the CR key, but it may
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley also be labelled "Return" or "Enter".
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley When a Server Telnet receives the Telnet end-of-line sequence
59c049874bbef182857c57bd9cca292898921c69Bob Halley CR LF as input from a remote terminal, the effect MUST be the
59c049874bbef182857c57bd9cca292898921c69Bob Halley same as if the user had pressed the "end-of-line" key on a
59c049874bbef182857c57bd9cca292898921c69Bob Halley local terminal. On server hosts that use ASCII, in particular,
59c049874bbef182857c57bd9cca292898921c69Bob Halley receipt of the Telnet sequence CR LF must cause the same effect
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff as a local user pressing the CR key on a local terminal. Thus,
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff CR LF and CR NUL MUST have the same effect on an ASCII server
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff host when received as input over a Telnet connection.
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff A User Telnet MUST be able to send any of the forms: CR LF, CR
59c049874bbef182857c57bd9cca292898921c69Bob Halley NUL, and LF. A User Telnet on an ASCII host SHOULD have a
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff user-controllable mode to send either CR LF or CR NUL when the
59c049874bbef182857c57bd9cca292898921c69Bob Halley user presses the "end-of-line" key, and CR LF SHOULD be the
59c049874bbef182857c57bd9cca292898921c69Bob Halley The Telnet end-of-line sequence CR LF MUST be used to send
59c049874bbef182857c57bd9cca292898921c69Bob Halley Telnet data that is not terminal-to-computer (e.g., for Server
59c049874bbef182857c57bd9cca292898921c69Bob Halley Telnet sending output, or the Telnet protocol incorporated
59c049874bbef182857c57bd9cca292898921c69Bob Halley another application protocol).
59c049874bbef182857c57bd9cca292898921c69Bob Halley To allow interoperability between arbitrary Telnet clients
59c049874bbef182857c57bd9cca292898921c69Bob Halley and servers, the Telnet protocol defined a standard
59c049874bbef182857c57bd9cca292898921c69Bob Halley representation for a line terminator. Since the ASCII
59c049874bbef182857c57bd9cca292898921c69Bob Halley character set includes no explicit end-of-line character,
a385f150bb21b8b81f70ed7df545357a83f1da82Michael Graff systems have chosen various representations, e.g., CR, LF,
a385f150bb21b8b81f70ed7df545357a83f1da82Michael Graff and the sequence CR LF. The Telnet protocol chose the CR
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff LF sequence as the standard for network transmission.
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley Unfortunately, the Telnet protocol specification in RFC-
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff 854 [TELNET:1] has turned out to be somewhat ambiguous on
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff what character(s) should be sent from client to server for
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff the "end-of-line" key. The result has been a massive and
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff continuing interoperability headache, made worse by
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley various faulty implementations of both User and Server
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceInternet Engineering Task Force [Page 21]
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael GraffRFC1123 REMOTE LOGIN -- TELNET October 1989
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff Although the Telnet protocol is based on a perfectly
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence symmetric model, in a remote login session the role of the
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff user at a terminal differs from the role of the server
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff host. For example, RFC-854 defines the meaning of CR, LF,
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff and CR LF as output from the server, but does not specify
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff what the User Telnet should send when the user presses the
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff "end-of-line" key on the terminal; this turns out to be
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff the point at issue.
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley When a user presses the "end-of-line" key, some User
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff Telnet implementations send CR LF, while others send CR
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff NUL (based on a different interpretation of the same
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff sentence in RFC-854). These will be equivalent for a
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff correctly-implemented ASCII server host, as discussed
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff above. For other servers, a mode in the User Telnet is
439c0011e642fb1d26011116144af698125262dbMichael Graff The existence of User Telnets that send only CR NUL when
439c0011e642fb1d26011116144af698125262dbMichael Graff CR is pressed creates a dilemma for non-ASCII hosts: they
439c0011e642fb1d26011116144af698125262dbMichael Graff can either treat CR NUL as equivalent to CR LF in input,
439c0011e642fb1d26011116144af698125262dbMichael Graff thus precluding the possibility of entering a "bare" CR,
439c0011e642fb1d26011116144af698125262dbMichael Graff or else lose complete interworking.
439c0011e642fb1d26011116144af698125262dbMichael Graff Suppose a user on host A uses Telnet to log into a server
439c0011e642fb1d26011116144af698125262dbMichael Graff host B, and then execute B's User Telnet program to log
439c0011e642fb1d26011116144af698125262dbMichael Graff into server host C. It is desirable for the Server/User
439c0011e642fb1d26011116144af698125262dbMichael Graff Telnet combination on B to be as transparent as possible,
439c0011e642fb1d26011116144af698125262dbMichael Graff i.e., to appear as if A were connected directly to C. In
439c0011e642fb1d26011116144af698125262dbMichael Graff particular, correct implementation will make B transparent
439c0011e642fb1d26011116144af698125262dbMichael Graff to Telnet end-of-line sequences, except that CR LF may be
439c0011e642fb1d26011116144af698125262dbMichael Graff translated to CR NUL or vice versa.
439c0011e642fb1d26011116144af698125262dbMichael Graff IMPLEMENTATION:
439c0011e642fb1d26011116144af698125262dbMichael Graff To understand Telnet end-of-line issues, one must have at
439c0011e642fb1d26011116144af698125262dbMichael Graff least a general model of the relationship of Telnet to the
439c0011e642fb1d26011116144af698125262dbMichael Graff local operating system. The Server Telnet process is
439c0011e642fb1d26011116144af698125262dbMichael Graff typically coupled into the terminal driver software of the
439c0011e642fb1d26011116144af698125262dbMichael Graff operating system as a pseudo-terminal. A Telnet end-of-
439c0011e642fb1d26011116144af698125262dbMichael Graff line sequence received by the Server Telnet must have the
439c0011e642fb1d26011116144af698125262dbMichael Graff same effect as pressing the end-of-line key on a real
439c0011e642fb1d26011116144af698125262dbMichael Graff locally-connected terminal.
439c0011e642fb1d26011116144af698125262dbMichael Graff Operating systems that support interactive character-at-
439c0011e642fb1d26011116144af698125262dbMichael Graff a-time applications (e.g., editors) typically have two
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley internal modes for their terminal I/O: a formatted mode,
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley in which local conventions for end-of-line and other
439c0011e642fb1d26011116144af698125262dbMichael GraffInternet Engineering Task Force [Page 22]
439c0011e642fb1d26011116144af698125262dbMichael GraffRFC1123 REMOTE LOGIN -- TELNET October 1989
439c0011e642fb1d26011116144af698125262dbMichael Graff formatting rules have been applied to the data stream, and
439c0011e642fb1d26011116144af698125262dbMichael Graff a "raw" mode, in which the application has direct access
439c0011e642fb1d26011116144af698125262dbMichael Graff to every character as it was entered. A Server Telnet
439c0011e642fb1d26011116144af698125262dbMichael Graff must be implemented in such a way that these modes have
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff the same effect for remote as for local terminals. For
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence example, suppose a CR LF or CR NUL is received by the
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff Server Telnet on an ASCII host. In raw mode, a CR
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff character is passed to the application; in formatted mode,
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff the local system's end-of-line convention is used.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff 3.3.2 Data Entry Terminals
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff In addition to the line-oriented and character-oriented
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff ASCII terminals for which Telnet was designed, there are
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff several families of video display terminals that are
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff sometimes known as "data entry terminals" or DETs. The
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley IBM 3270 family is a well-known example.
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff Two Internet protocols have been designed to support
1f90c108282533a23b8362c34bcde4267c1eb4b1Michael Graff generic DETs: SUPDUP [TELNET:16, TELNET:17], and the DET
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff option [TELNET:18, TELNET:19]. The DET option drives a
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff data entry terminal over a Telnet connection using (sub-)
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff negotiation. SUPDUP is a completely separate terminal
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley protocol, which can be entered from Telnet by negotiation.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Although both SUPDUP and the DET option have been used
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff successfully in particular environments, neither has
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff gained general acceptance or wide implementation.
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff A different approach to DET interaction has been developed
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff for supporting the IBM 3270 family through Telnet,
21e7034ec046105c00a0dab86c83732e2e77ad99Michael Graff although the same approach would be applicable to any DET.
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff The idea is to enter a "native DET" mode, in which the
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff native DET input/output stream is sent as binary data.
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff The Telnet EOR command is used to delimit logical records
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff (e.g., "screens") within this binary stream.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff IMPLEMENTATION:
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff The rules for entering and leaving native DET mode are as
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence o The Server uses the Terminal-Type option [TELNET:10]
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff to learn that the client is a DET.
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff o It is conventional, but not required, that both ends
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff negotiate the EOR option [TELNET:9].
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff o Both ends negotiate the Binary option [TELNET:3] to
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael GraffInternet Engineering Task Force [Page 23]
64828244e04e86dfa40f0a4f0c05f27923da499dMichael GraffRFC1123 REMOTE LOGIN -- TELNET October 1989
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff enter native DET mode.
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff o When either end negotiates out of binary mode, the
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff other end does too, and the mode then reverts to
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff 3.3.3 Option Requirements
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff Every Telnet implementation MUST support the Binary option
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff [TELNET:3] and the Suppress Go Ahead option [TELNET:5], and
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff SHOULD support the Echo [TELNET:4], Status [TELNET:6], End-of-
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff Record [TELNET:9], and Extended Options List [TELNET:8]
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff A User or Server Telnet SHOULD support the Window Size Option
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff [TELNET:12] if the local operating system provides the
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff corresponding capability.
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff Note that the End-of-Record option only signifies that a
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff Telnet can receive a Telnet EOR without crashing;
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff therefore, every Telnet ought to be willing to accept
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff negotiation of the End-of-Record option. See also the
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff discussion in Section 3.2.3.
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff 3.3.4 Option Initiation
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff When the Telnet protocol is used in a client/server situation,
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff the server SHOULD initiate negotiation of the terminal
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff interaction mode it expects.
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff The Telnet protocol was defined to be perfectly
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence symmetrical, but its application is generally asymmetric.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff Remote login has been known to fail because NEITHER side
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff initiated negotiation of the required non-default terminal
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff modes. It is generally the server that determines the
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff preferred mode, so the server needs to initiate the
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff negotiation; since the negotiation is symmetric, the user
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff can also initiate it.
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff A client (User Telnet) SHOULD provide a means for users to
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff enable and disable the initiation of option negotiation.
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff A user sometimes needs to connect to an application
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff service (e.g., FTP or SMTP) that uses Telnet for its
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael GraffInternet Engineering Task Force [Page 24]
439c0011e642fb1d26011116144af698125262dbMichael GraffRFC1123 REMOTE LOGIN -- TELNET October 1989
439c0011e642fb1d26011116144af698125262dbMichael Graff control stream but does not support Telnet options. User
439c0011e642fb1d26011116144af698125262dbMichael Graff Telnet may be used for this purpose if initiation of
439c0011e642fb1d26011116144af698125262dbMichael Graff option negotiation is disabled.
439c0011e642fb1d26011116144af698125262dbMichael Graff 3.3.5 Telnet Linemode Option
439c0011e642fb1d26011116144af698125262dbMichael Graff An important new Telnet option, LINEMODE [TELNET:12], has
439c0011e642fb1d26011116144af698125262dbMichael Graff been proposed. The LINEMODE option provides a standard
439c0011e642fb1d26011116144af698125262dbMichael Graff way for a User Telnet and a Server Telnet to agree that
439c0011e642fb1d26011116144af698125262dbMichael Graff the client rather than the server will perform terminal
439c0011e642fb1d26011116144af698125262dbMichael Graff character processing. When the client has prepared a
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff complete line of text, it will send it to the server in
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence (usually) one TCP packet. This option will greatly
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff decrease the packet cost of Telnet sessions and will also
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff give much better user response over congested or long-
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff delay networks.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff The LINEMODE option allows dynamic switching between local
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff and remote character processing. For example, the Telnet
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff connection will automatically negotiate into single-
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff character mode while a full screen editor is running, and
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff then return to linemode when the editor is finished.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff We expect that when this RFC is released, hosts should
7da0286b540515c82ea83163d6cba59a64fa3eddMichael Graff implement the client side of this option, and may
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff implement the server side of this option. To properly
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley implement the server side, the server needs to be able to
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff tell the local system not to do any input character
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff processing, but to remember its current terminal state and
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff notify the Server Telnet process whenever the state
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff changes. This will allow password echoing and full screen
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff editors to be handled properly, for example.
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff 3.4.1 Character Set Transparency
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff User Telnet implementations SHOULD be able to send or receive
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff any 7-bit ASCII character. Where possible, any special
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff character interpretations by the user host's operating system
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff SHOULD be bypassed so that these characters can conveniently be
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff sent and received on the connection.
439c0011e642fb1d26011116144af698125262dbMichael Graff Some character value MUST be reserved as "escape to command
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff mode"; conventionally, doubling this character allows it to be
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff entered as data. The specific character used SHOULD be user
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael GraffInternet Engineering Task Force [Page 25]
64828244e04e86dfa40f0a4f0c05f27923da499dMichael GraffRFC1123 REMOTE LOGIN -- TELNET October 1989
2992344aacdb08e4af936c176d49ef789f5673ddMichael Graff On binary-mode connections, a User Telnet program MAY provide
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence an escape mechanism for entering arbitrary 8-bit values, if the
2992344aacdb08e4af936c176d49ef789f5673ddMichael Graff host operating system doesn't allow them to be entered directly
519b4a1a27c8b767a57a981dda69a3c6394bd49dMichael Graff from the keyboard.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff IMPLEMENTATION:
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff The transparency issues are less pressing on servers, but
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff implementors should take care in dealing with issues like:
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff masking off parity bits (sent by an older, non-conforming
519b4a1a27c8b767a57a981dda69a3c6394bd49dMichael Graff client) before they reach programs that expect only NVT
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence ASCII, and properly handling programs that request 8-bit
519b4a1a27c8b767a57a981dda69a3c6394bd49dMichael Graff data streams.
a385f150bb21b8b81f70ed7df545357a83f1da82Michael Graff 3.4.2 Telnet Commands
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff A User Telnet program MUST provide a user the capability of
78854e02c127f31ab90f56da0531542004b45377Michael Graff entering any of the Telnet control functions IP, AO, or AYT,
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff and SHOULD provide the capability of entering EC, EL, and
d4d2a13916a114879763562db6a19b70b1444ec1Michael Graff 3.4.3 TCP Connection Errors
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff A User Telnet program SHOULD report to the user any TCP errors
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff that are reported by the transport layer (see "TCP/Application
519b4a1a27c8b767a57a981dda69a3c6394bd49dMichael Graff Layer Interface" section in [INTRO:1]).
519b4a1a27c8b767a57a981dda69a3c6394bd49dMichael Graff 3.4.4 Non-Default Telnet Contact Port
519b4a1a27c8b767a57a981dda69a3c6394bd49dMichael Graff A User Telnet program SHOULD allow the user to optionally
519b4a1a27c8b767a57a981dda69a3c6394bd49dMichael Graff specify a non-standard contact port number at the Server Telnet
519b4a1a27c8b767a57a981dda69a3c6394bd49dMichael Graff 3.4.5 Flushing Output
519b4a1a27c8b767a57a981dda69a3c6394bd49dMichael Graff A User Telnet program SHOULD provide the user the ability to
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff specify whether or not output should be flushed when an IP is
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff sent; see Section 3.2.4.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff For any output flushing scheme that causes the User Telnet to
2992344aacdb08e4af936c176d49ef789f5673ddMichael Graff flush output locally until a Telnet signal is received from the
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff Server, there SHOULD be a way for the user to manually restore
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff normal output, in case the Server fails to send the expected
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael GraffInternet Engineering Task Force [Page 26]
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael GraffRFC1123 REMOTE LOGIN -- TELNET October 1989
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff 3.5. TELNET REQUIREMENTS SUMMARY
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff | | | | |S| |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff | | | | |H| |F
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff | | | | |O|M|o
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff | | |S| |U|U|o
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff | | |H| |L|S|t
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff | |M|O| |D|T|n
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff | |U|U|M| | |o
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff | |S|L|A|N|N|t
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff | |T|D|Y|O|O|t
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael GraffFEATURE |SECTION | | | |T|T|e
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff-------------------------------------------------|--------|-|-|-|-|-|--
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff | | | | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael GraffOption Negotiation |3.2.1 |x| | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Avoid negotiation loops |3.2.1 |x| | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Refuse unsupported options |3.2.1 |x| | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Negotiation OK anytime on connection |3.2.1 | |x| | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Default to NVT |3.2.1 |x| | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Send official name in Term-Type option |3.2.8 |x| | | | |
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence Accept any name in Term-Type option |3.2.8 |x| | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Implement Binary, Suppress-GA options |3.3.3 |x| | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Echo, Status, EOL, Ext-Opt-List options |3.3.3 | |x| | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Implement Window-Size option if appropriate |3.3.3 | |x| | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Server initiate mode negotiations |3.3.4 | |x| | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff User can enable/disable init negotiations |3.3.4 | |x| | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff | | | | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael GraffGo-Aheads | | | | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Non-GA server negotiate SUPPRESS-GA option |3.2.2 |x| | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff User or Server accept SUPPRESS-GA option |3.2.2 |x| | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff User Telnet ignore GA's |3.2.2 | | |x| | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff | | | | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael GraffControl Functions | | | | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Support SE NOP DM IP AO AYT SB |3.2.3 |x| | | | |
5a5b79c5ab0ccdc821dd5498935e5cc7b96d2499Michael Graff Support EOR EC EL Break |3.2.3 | | |x| | |
5a5b79c5ab0ccdc821dd5498935e5cc7b96d2499Michael Graff Ignore unsupported control functions |3.2.3 |x| | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff User, Server discard urgent data up to DM |3.2.4 |x| | | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff User Telnet send "Synch" after IP, AO, AYT |3.2.4 | |x| | | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Server Telnet reply Synch to IP |3.2.4 | | |x| | |
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff Server Telnet reply Synch to AO |3.2.4 |x| | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley User Telnet can flush output when send IP |3.2.4 | |x| | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley | | | | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob HalleyEncoding | | | | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Send high-order bit in NVT mode |3.2.5 | | | |x| |
59c049874bbef182857c57bd9cca292898921c69Bob Halley Send high-order bit as parity bit |3.2.5 | | | | |x|
59c049874bbef182857c57bd9cca292898921c69Bob Halley Negot. BINARY if pass high-ord. bit to applic |3.2.5 | |x| | | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley Always double IAC data byte |3.2.6 |x| | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob HalleyInternet Engineering Task Force [Page 27]
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David LawrenceRFC1123 REMOTE LOGIN -- TELNET October 1989
570234616c3ed331fa74f2c63c336b940840d725Andreas Gustafsson Double IAC data byte in binary mode |3.2.7 |x| | | | |
570234616c3ed331fa74f2c63c336b940840d725Andreas Gustafsson Obey Telnet cmds in binary mode |3.2.7 |x| | | | |
570234616c3ed331fa74f2c63c336b940840d725Andreas Gustafsson End-of-line, CR NUL in binary mode |3.2.7 | | | | |x|
fe14eafefa91fada7cea0a55b09196c01477406cBob HalleyEnd-of-Line | | | | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley EOL at Server same as local end-of-line |3.3.1 |x| | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley ASCII Server accept CR LF or CR NUL for EOL |3.3.1 |x| | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley User Telnet able to send CR LF, CR NUL, or LF |3.3.1 |x| | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley ASCII user able to select CR LF/CR NUL |3.3.1 | |x| | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley User Telnet default mode is CR LF |3.3.1 | |x| | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Non-interactive uses CR LF for EOL |3.3.1 |x| | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley | | | | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob HalleyUser Telnet interface | | | | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Input & output all 7-bit characters |3.4.1 | |x| | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Bypass local op sys interpretation |3.4.1 | |x| | | |
06a960c681566a163af5b9a655cf36023075ddcbMark Andrews Escape character |3.4.1 |x| | | | |
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence User-settable escape character |3.4.1 | |x| | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Escape to enter 8-bit values |3.4.1 | | |x| | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Can input IP, AO, AYT |3.4.2 |x| | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Can input EC, EL, Break |3.4.2 | |x| | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Report TCP connection errors to user |3.4.3 | |x| | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Optional non-default contact port |3.4.4 | |x| | | |
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff Can spec: output flushed when IP sent |3.4.5 | |x| | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Can manually restore output mode |3.4.5 | |x| | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley | | | | | | |
fe14eafefa91fada7cea0a55b09196c01477406cBob HalleyInternet Engineering Task Force [Page 28]
fe14eafefa91fada7cea0a55b09196c01477406cBob HalleyRFC1123 FILE TRANSFER -- FTP October 1989
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley4. FILE TRANSFER
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff 4.1 FILE TRANSFER PROTOCOL -- FTP
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 4.1.1 INTRODUCTION
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley The File Transfer Protocol FTP is the primary Internet standard
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley for file transfer. The current specification is contained in
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley RFC-959 [FTP:1].
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley FTP uses separate simultaneous TCP connections for control and
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley for data transfer. The FTP protocol includes many features,
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley some of which are not commonly implemented. However, for every
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley feature in FTP, there exists at least one implementation. The
c8b60c24abf816a48691ed8a06281c5a4e35e482Bob Halley minimum implementation defined in RFC-959 was too small, so a
c8b60c24abf816a48691ed8a06281c5a4e35e482Bob Halley somewhat larger minimum implementation is defined here.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Internet users have been unnecessarily burdened for years by
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley deficient FTP implementations. Protocol implementors have
5e589b5356a4125b5af32605dead82ab8b467c88Mark Andrews suffered from the erroneous opinion that implementing FTP ought
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley to be a small and trivial task. This is wrong, because FTP has
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley a user interface, because it has to deal (correctly) with the
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley whole variety of communication and operating system errors that
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley may occur, and because it has to handle the great diversity of
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley real file systems in the world.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 4.1.2. PROTOCOL WALK-THROUGH
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 4.1.2.1 LOCAL Type: RFC-959 Section 3.1.1.4
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley An FTP program MUST support TYPE I ("IMAGE" or binary type)
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley as well as TYPE L 8 ("LOCAL" type with logical byte size 8).
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley A machine whose memory is organized into m-bit words, where
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley m is not a multiple of 8, MAY also support TYPE L m.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley The command "TYPE L 8" is often required to transfer
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley binary data between a machine whose memory is organized
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley into (e.g.) 36-bit words and a machine with an 8-bit
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley byte organization. For an 8-bit byte machine, TYPE L 8
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley is equivalent to IMAGE.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley "TYPE L m" is sometimes specified to the FTP programs
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley on two m-bit word machines to ensure the correct
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley transfer of a native-mode binary file from one machine
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley to the other. However, this command should have the
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley same effect on these machines as "TYPE I".
fe14eafefa91fada7cea0a55b09196c01477406cBob HalleyInternet Engineering Task Force [Page 29]
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael GraffRFC1123 FILE TRANSFER -- FTP October 1989
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff 4.1.2.2 Telnet Format Control: RFC-959 Section 3.1.1.5.2
439c0011e642fb1d26011116144af698125262dbMichael Graff A host that makes no distinction between TYPE N and TYPE T
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff SHOULD implement TYPE T to be identical to TYPE N.
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff This provision should ease interoperation with hosts
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff that do make this distinction.
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff Many hosts represent text files internally as strings
439c0011e642fb1d26011116144af698125262dbMichael Graff of ASCII characters, using the embedded ASCII format
5e387b9ce6bafdfadedb5b34e4c33a4404e5d589Brian Wellington effector characters (LF, BS, FF, ...) to control the
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff format when a file is printed. For such hosts, there
439c0011e642fb1d26011116144af698125262dbMichael Graff is no distinction between "print" files and other
439c0011e642fb1d26011116144af698125262dbMichael Graff files. However, systems that use record structured
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff files typically need a special format for printable
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff files (e.g., ASA carriage control). For the latter
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff hosts, FTP allows a choice of TYPE N or TYPE T.
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff 4.1.2.3 Page Structure: RFC-959 Section 3.1.2.3 and Appendix I
d98c74e2ec5b96bd22aa4ed6d893e8993787493bMichael Graff Implementation of page structure is NOT RECOMMENDED in
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff general. However, if a host system does need to implement
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff FTP for "random access" or "holey" files, it MUST use the
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff defined page structure format rather than define a new
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff private FTP format.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff 4.1.2.4 Data Structure Transformations: RFC-959 Section 3.1.2
d98c74e2ec5b96bd22aa4ed6d893e8993787493bMichael Graff An FTP transformation between record-structure and file-
d98c74e2ec5b96bd22aa4ed6d893e8993787493bMichael Graff structure SHOULD be invertible, to the extent possible while
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff making the result useful on the target host.
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff RFC-959 required strict invertibility between record-
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff structure and file-structure, but in practice,
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff efficiency and convenience often preclude it.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff Therefore, the requirement is being relaxed. There are
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff two different objectives for transferring a file:
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff processing it on the target host, or just storage. For
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence storage, strict invertibility is important. For
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff processing, the file created on the target host needs
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff to be in the format expected by application programs on
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff As an example of the conflict, imagine a record-
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff oriented operating system that requires some data files
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff to have exactly 80 bytes in each record. While STORing
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael GraffInternet Engineering Task Force [Page 30]
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael GraffRFC1123 FILE TRANSFER -- FTP October 1989
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff a file on such a host, an FTP Server must be able to
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff pad each line or record to 80 bytes; a later retrieval
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff of such a file cannot be strictly invertible.
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff 4.1.2.5 Data Connection Management: RFC-959 Section 3.3
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff A User-FTP that uses STREAM mode SHOULD send a PORT command
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff to assign a non-default data port before each transfer
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff command is issued.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff This is required because of the long delay after a TCP
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff connection is closed until its socket pair can be
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff reused, to allow multiple transfers during a single FTP
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff session. Sending a port command can avoided if a
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff transfer mode other than stream is used, by leaving the
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff data transfer connection open between transfers.
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff 4.1.2.6 PASV Command: RFC-959 Section 4.1.2
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff A server-FTP MUST implement the PASV command.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff If multiple third-party transfers are to be executed during
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff the same session, a new PASV command MUST be issued before
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff each transfer command, to obtain a unique port pair.
1a286a6613d385b443030a8c932e40ac9e9c301fBob Halley IMPLEMENTATION:
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff The format of the 227 reply to a PASV command is not
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff well standardized. In particular, an FTP client cannot
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff assume that the parentheses shown on page 40 of RFC-959
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff will be present (and in fact, Figure 3 on page 43 omits
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff them). Therefore, a User-FTP program that interprets
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff the PASV reply must scan the reply for the first digit
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff of the host and port numbers.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff Note that the host number h1,h2,h3,h4 is the IP address
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff of the server host that is sending the reply, and that
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff p1,p2 is a non-default data transfer port that PASV has
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff 4.1.2.7 LIST and NLST Commands: RFC-959 Section 4.1.3
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff The data returned by an NLST command MUST contain only a
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff simple list of legal pathnames, such that the server can use
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff them directly as the arguments of subsequent data transfer
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff commands for the individual files.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff The data returned by a LIST or NLST command SHOULD use an
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael GraffInternet Engineering Task Force [Page 31]
64828244e04e86dfa40f0a4f0c05f27923da499dMichael GraffRFC1123 FILE TRANSFER -- FTP October 1989
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff implied TYPE AN, unless the current type is EBCDIC, in which
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff case an implied TYPE EN SHOULD be used.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff Many FTP clients support macro-commands that will get
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff or put files matching a wildcard specification, using
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff NLST to obtain a list of pathnames. The expansion of
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff "multiple-put" is local to the client, but "multiple-
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff get" requires cooperation by the server.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff The implied type for LIST and NLST is designed to
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff provide compatibility with existing User-FTPs, and in
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff particular with multiple-get commands.
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff 4.1.2.8 SITE Command: RFC-959 Section 4.1.3
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff A Server-FTP SHOULD use the SITE command for non-standard
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff features, rather than invent new private commands or
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff unstandardized extensions to existing commands.
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff 4.1.2.9 STOU Command: RFC-959 Section 4.1.3
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff The STOU command stores into a uniquely named file. When it
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff receives an STOU command, a Server-FTP MUST return the
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff actual file name in the "125 Transfer Starting" or the "150
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff Opening Data Connection" message that precedes the transfer
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff (the 250 reply code mentioned in RFC-959 is incorrect). The
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff exact format of these messages is hereby defined to be as
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff 125 FILE: pppp
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff 150 FILE: pppp
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff where pppp represents the unique pathname of the file that
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff will be written.
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff 4.1.2.10 Telnet End-of-line Code: RFC-959, Page 34
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff Implementors MUST NOT assume any correspondence between READ
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff boundaries on the control connection and the Telnet EOL
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff sequences (CR LF).
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff Thus, a server-FTP (or User-FTP) must continue reading
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff characters from the control connection until a complete
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff Telnet EOL sequence is encountered, before processing
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff the command (or response, respectively). Conversely, a
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff single READ from the control connection may include
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael GraffInternet Engineering Task Force [Page 32]
439c0011e642fb1d26011116144af698125262dbMichael GraffRFC1123 FILE TRANSFER -- FTP October 1989
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff more than one FTP command.
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff 4.1.2.11 FTP Replies: RFC-959 Section 4.2, Page 35
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff A Server-FTP MUST send only correctly formatted replies on
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff the control connection. Note that RFC-959 (unlike earlier
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff versions of the FTP spec) contains no provision for a
69a7905cf392ce5ddb6a9c0b090262598cf02294Michael Graff "spontaneous" reply message.
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff A Server-FTP SHOULD use the reply codes defined in RFC-959
69a7905cf392ce5ddb6a9c0b090262598cf02294Michael Graff whenever they apply. However, a server-FTP MAY use a
ffd9f879709c5fb35f25368e74e2e12eb6881d9bMichael Graff different reply code when needed, as long as the general
69a7905cf392ce5ddb6a9c0b090262598cf02294Michael Graff rules of Section 4.2 are followed. When the implementor has
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff a choice between a 4xx and 5xx reply code, a Server-FTP
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff SHOULD send a 4xx (temporary failure) code when there is any
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff reasonable possibility that a failed FTP will succeed a few
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff A User-FTP SHOULD generally use only the highest-order digit
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff of a 3-digit reply code for making a procedural decision, to
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff prevent difficulties when a Server-FTP uses non-standard
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff A User-FTP MUST be able to handle multi-line replies. If
69a7905cf392ce5ddb6a9c0b090262598cf02294Michael Graff the implementation imposes a limit on the number of lines
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff and if this limit is exceeded, the User-FTP MUST recover,
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff e.g., by ignoring the excess lines until the end of the
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff multi-line reply is reached.
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff A User-FTP SHOULD NOT interpret a 421 reply code ("Service
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff not available, closing control connection") specially, but
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff SHOULD detect closing of the control connection by the
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff Server implementations that fail to strictly follow the
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff reply rules often cause FTP user programs to hang.
69a7905cf392ce5ddb6a9c0b090262598cf02294Michael Graff Note that RFC-959 resolved ambiguities in the reply
69a7905cf392ce5ddb6a9c0b090262598cf02294Michael Graff rules found in earlier FTP specifications and must be
69a7905cf392ce5ddb6a9c0b090262598cf02294Michael Graff It is important to choose FTP reply codes that properly
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff distinguish between temporary and permanent failures,
d98c74e2ec5b96bd22aa4ed6d893e8993787493bMichael Graff to allow the successful use of file transfer client
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff daemons. These programs depend on the reply codes to
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff decide whether or not to retry a failed transfer; using
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff a permanent failure code (5xx) for a temporary error
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff will cause these programs to give up unnecessarily.
69a7905cf392ce5ddb6a9c0b090262598cf02294Michael GraffInternet Engineering Task Force [Page 33]
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael GraffRFC1123 FILE TRANSFER -- FTP October 1989
439c0011e642fb1d26011116144af698125262dbMichael Graff When the meaning of a reply matches exactly the text
439c0011e642fb1d26011116144af698125262dbMichael Graff shown in RFC-959, uniformity will be enhanced by using
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff the RFC-959 text verbatim. However, a Server-FTP
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff implementor is encouraged to choose reply text that
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff conveys specific system-dependent information, when
08d131595373326ec4a3af793b536df8c33115ecMichael Graff 4.1.2.12 Connections: RFC-959 Section 5.2
08d131595373326ec4a3af793b536df8c33115ecMichael Graff The words "and the port used" in the second paragraph of
651228967966ba4fb2e52f92d1207c790af4b130Michael Graff this section of RFC-959 are erroneous (historical), and they
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence should be ignored.
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff On a multihomed server host, the default data transfer port
08d131595373326ec4a3af793b536df8c33115ecMichael Graff (L-1) MUST be associated with the same local IP address as
08d131595373326ec4a3af793b536df8c33115ecMichael Graff the corresponding control connection to port L.
08d131595373326ec4a3af793b536df8c33115ecMichael Graff A user-FTP MUST NOT send any Telnet controls other than
08d131595373326ec4a3af793b536df8c33115ecMichael Graff SYNCH and IP on an FTP control connection. In particular, it
08d131595373326ec4a3af793b536df8c33115ecMichael Graff MUST NOT attempt to negotiate Telnet options on the control
59c049874bbef182857c57bd9cca292898921c69Bob Halley connection. However, a server-FTP MUST be capable of
08d131595373326ec4a3af793b536df8c33115ecMichael Graff accepting and refusing Telnet negotiations (i.e., sending
08d131595373326ec4a3af793b536df8c33115ecMichael Graff Although the RFC says: "Server- and User- processes
59c049874bbef182857c57bd9cca292898921c69Bob Halley should follow the conventions for the Telnet
08d131595373326ec4a3af793b536df8c33115ecMichael Graff protocol...[on the control connection]", it is not the
08d131595373326ec4a3af793b536df8c33115ecMichael Graff intent that Telnet option negotiation is to be
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff 4.1.2.13 Minimum Implementation; RFC-959 Section 5.1
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence The following commands and options MUST be supported by
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff every server-FTP and user-FTP, except in cases where the
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff underlying file system or operating system does not allow or
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff support a particular command.
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff Type: ASCII Non-print, IMAGE, LOCAL 8
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff Structure: File, Record*
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff USER, PASS, ACCT,
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff TYPE, MODE, STRU,
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff RETR, STOR, APPE,
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff RNFR, RNTO, DELE,
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley CWD, CDUP, RMD, MKD, PWD,
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael GraffInternet Engineering Task Force [Page 34]
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob HalleyRFC1123 FILE TRANSFER -- FTP October 1989
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff HELP, NOOP, QUIT.
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley *Record structure is REQUIRED only for hosts whose file
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley systems support record structure.
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Vendors are encouraged to implement a larger subset of
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley the protocol. For example, there are important
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews robustness features in the protocol (e.g., Restart,
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley ABOR, block mode) that would be an aid to some Internet
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley users but are not widely implemented.
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley A host that does not have record structures in its file
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley system may still accept files with STRU R, recording
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley the byte stream literally.
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews 4.1.3 SPECIFIC ISSUES
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews 4.1.3.1 Non-standard Command Verbs
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews FTP allows "experimental" commands, whose names begin with
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews "X". If these commands are subsequently adopted as
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews standards, there may still be existing implementations using
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews the "X" form. At present, this is true for the directory
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews RFC-959 "Experimental"
419dd7129fe3447544b68c220b09a4968cf98d75Michael Graff All FTP implementations SHOULD recognize both forms of these
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley commands, by simply equating them with extra entries in the
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley command lookup table.
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff IMPLEMENTATION:
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff A User-FTP can access a server that supports only the
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff "X" forms by implementing a mode switch, or
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence automatically using the following procedure: if the
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff RFC-959 form of one of the above commands is rejected
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff with a 500 or 502 response code, then try the
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff experimental form; any other response would be passed
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley to the user.
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael GraffInternet Engineering Task Force [Page 35]
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael GraffRFC1123 FILE TRANSFER -- FTP October 1989
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff 4.1.3.2 Idle Timeout
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff A Server-FTP process SHOULD have an idle timeout, which will
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff terminate the process and close the control connection if
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff the server is inactive (i.e., no command or data transfer in
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff progress) for a long period of time. The idle timeout time
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley SHOULD be configurable, and the default should be at least 5
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley A client FTP process ("User-PI" in RFC-959) will need
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence timeouts on responses only if it is invoked from a program.
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Without a timeout, a Server-FTP process may be left
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley pending indefinitely if the corresponding client
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley crashes without closing the control connection.
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley 4.1.3.3 Concurrency of Data and Control
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley The intent of the designers of FTP was that a user
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley should be able to send a STAT command at any time while
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley data transfer was in progress and that the server-FTP
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley would reply immediately with status -- e.g., the number
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley of bytes transferred so far. Similarly, an ABOR
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff command should be possible at any time during a data
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff Unfortunately, some small-machine operating systems
419dd7129fe3447544b68c220b09a4968cf98d75Michael Graff make such concurrent programming difficult, and some
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews other implementers seek minimal solutions, so some FTP
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff implementations do not allow concurrent use of the data
419dd7129fe3447544b68c220b09a4968cf98d75Michael Graff and control connections. Even such a minimal server
651228967966ba4fb2e52f92d1207c790af4b130Michael Graff must be prepared to accept and defer a STAT or ABOR
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff command that arrives during data transfer.
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff 4.1.3.4 FTP Restart Mechanism
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff The description of the 110 reply on pp. 40-41 of RFC-959 is
58aaab3687aac838542ee4ef65a9c094a5d34ab0Michael Graff incorrect; the correct description is as follows. A restart
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff reply message, sent over the control connection from the
0e27dac042d622ff9cde568a90347e1d53b9d784Andreas Gustafsson receiving FTP to the User-FTP, has the format:
419dd7129fe3447544b68c220b09a4968cf98d75Michael Graff 110 MARK ssss = rrrr
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff * ssss is a text string that appeared in a Restart Marker
419dd7129fe3447544b68c220b09a4968cf98d75Michael GraffInternet Engineering Task Force [Page 36]
294802790e8030f1c19b6c2c5d5204b6f464c729Michael GraffRFC1123 FILE TRANSFER -- FTP October 1989
84c46a7acb961cac19c0d857bfdd00f3383a9bc6Michael Graff in the data stream and encodes a position in the
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff sender's file system;
c6715d23151ab9948c7191b1ed1b99a14e6def7dDavid Lawrence * rrrr encodes the corresponding position in the
c6715d23151ab9948c7191b1ed1b99a14e6def7dDavid Lawrence receiver's file system.
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff The encoding, which is specific to a particular file system
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews and network implementation, is always generated and
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews interpreted by the same system, either sender or receiver.
c6715d23151ab9948c7191b1ed1b99a14e6def7dDavid Lawrence When an FTP that implements restart receives a Restart
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Marker in the data stream, it SHOULD force the data to that
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff point to be written to stable storage before encoding the
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff corresponding position rrrr. An FTP sending Restart Markers
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff MUST NOT assume that 110 replies will be returned
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff synchronously with the data, i.e., it must not await a 110
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff reply before sending more data.
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff Two new reply codes are hereby defined for errors
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence encountered in restarting a transfer:
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff 554 Requested action not taken: invalid REST parameter.
08d131595373326ec4a3af793b536df8c33115ecMichael Graff A 554 reply may result from a FTP service command that
08d131595373326ec4a3af793b536df8c33115ecMichael Graff follows a REST command. The reply indicates that the
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff existing file at the Server-FTP cannot be repositioned
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff as specified in the REST.
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff 555 Requested action not taken: type or stru mismatch.
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff A 555 reply may result from an APPE command or from any
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff FTP service command following a REST command. The
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff reply indicates that there is some mismatch between the
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff current transfer parameters (type and stru) and the
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff attributes of the existing file.
6dde125c2f47617ceef1518cf9e5588e8f366b71Michael Graff Note that the FTP Restart mechanism requires that Block
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff or Compressed mode be used for data transfer, to allow
5e387b9ce6bafdfadedb5b34e4c33a4404e5d589Brian Wellington the Restart Markers to be included within the data
5e387b9ce6bafdfadedb5b34e4c33a4404e5d589Brian Wellington stream. The frequency of Restart Markers can be low.
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff Restart Markers mark a place in the data stream, but
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews the receiver may be performing some transformation on
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff the data as it is stored into stable storage. In
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff general, the receiver's encoding must include any state
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff information necessary to restart this transformation at
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff any point of the FTP data stream. For example, in TYPE
66bd3b3c6b171271c705b897823dcdcf29464698Michael GraffInternet Engineering Task Force [Page 37]
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael GraffRFC1123 FILE TRANSFER -- FTP October 1989
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff A transfers, some receiver hosts transform CR LF
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff sequences into a single LF character on disk. If a
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff Restart Marker happens to fall between CR and LF, the
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff receiver must encode in rrrr that the transfer must be
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff restarted in a "CR has been seen and discarded" state.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff Note that the Restart Marker is required to be encoded
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff as a string of printable ASCII characters, regardless
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff of the type of the data.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff RFC-959 says that restart information is to be returned
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff "to the user". This should not be taken literally. In
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff general, the User-FTP should save the restart
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff information (ssss,rrrr) in stable storage, e.g., append
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff it to a restart control file. An empty restart control
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff file should be created when the transfer first starts
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff and deleted automatically when the transfer completes
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff successfully. It is suggested that this file have a
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff name derived in an easily-identifiable manner from the
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff name of the file being transferred and the remote host
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff name; this is analogous to the means used by many text
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff editors for naming "backup" files.
bb143613cf26e0f27dfd9caf1a7336065d064b26Michael Graff There are three cases for FTP restart.
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff (1) User-to-Server Transfer
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews The User-FTP puts Restart Markers <ssss> at
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff convenient places in the data stream. When the
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff Server-FTP receives a Marker, it writes all prior
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff data to disk, encodes its file system position and
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley transformation state as rrrr, and returns a "110
59c049874bbef182857c57bd9cca292898921c69Bob Halley MARK ssss = rrrr" reply over the control
59c049874bbef182857c57bd9cca292898921c69Bob Halley connection. The User-FTP appends the pair
59c049874bbef182857c57bd9cca292898921c69Bob Halley (ssss,rrrr) to its restart control file.
59c049874bbef182857c57bd9cca292898921c69Bob Halley To restart the transfer, the User-FTP fetches the
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews last (ssss,rrrr) pair from the restart control
59c049874bbef182857c57bd9cca292898921c69Bob Halley file, repositions its local file system and
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff transformation state using ssss, and sends the
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews command "REST rrrr" to the Server-FTP.
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff (2) Server-to-User Transfer
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff The Server-FTP puts Restart Markers <ssss> at
651228967966ba4fb2e52f92d1207c790af4b130Michael Graff convenient places in the data stream. When the
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael Graff User-FTP receives a Marker, it writes all prior
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff data to disk, encodes its file system position and
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob HalleyInternet Engineering Task Force [Page 38]
3024dbecbac365171bc6de0f3fa04951d6558be3Michael GraffRFC1123 FILE TRANSFER -- FTP October 1989
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff transformation state as rrrr, and appends the pair
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff (rrrr,ssss) to its restart control file.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff To restart the transfer, the User-FTP fetches the
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff last (rrrr,ssss) pair from the restart control
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff file, repositions its local file system and
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff transformation state using rrrr, and sends the
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff command "REST ssss" to the Server-FTP.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff (3) Server-to-Server ("Third-Party") Transfer
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley The sending Server-FTP puts Restart Markers <ssss>
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley at convenient places in the data stream. When it
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley receives a Marker, the receiving Server-FTP writes
6dde125c2f47617ceef1518cf9e5588e8f366b71Michael Graff all prior data to disk, encodes its file system
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff position and transformation state as rrrr, and
3024dbecbac365171bc6de0f3fa04951d6558be3Michael Graff sends a "110 MARK ssss = rrrr" reply over the
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff control connection to the User. The User-FTP
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff appends the pair (ssss,rrrr) to its restart
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff control file.
64574939c4a591a457bdd352f86375d6bb1d5435David Lawrence To restart the transfer, the User-FTP fetches the
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff last (ssss,rrrr) pair from the restart control
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff file, sends "REST ssss" to the sending Server-FTP,
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff and sends "REST rrrr" to the receiving Server-FTP.
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael Graff 4.1.4 FTP/USER INTERFACE
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff This section discusses the user interface for a User-FTP
64574939c4a591a457bdd352f86375d6bb1d5435David Lawrence 4.1.4.1 Pathname Specification
64574939c4a591a457bdd352f86375d6bb1d5435David Lawrence Since FTP is intended for use in a heterogeneous
64574939c4a591a457bdd352f86375d6bb1d5435David Lawrence environment, User-FTP implementations MUST support remote
64574939c4a591a457bdd352f86375d6bb1d5435David Lawrence pathnames as arbitrary character strings, so that their form
64574939c4a591a457bdd352f86375d6bb1d5435David Lawrence and content are not limited by the conventions of the local
64574939c4a591a457bdd352f86375d6bb1d5435David Lawrence operating system.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff In particular, remote pathnames can be of arbitrary
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff length, and all the printing ASCII characters as well
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff as space (0x20) must be allowed. RFC-959 allows a
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff pathname to contain any 7-bit ASCII character except CR
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David LawrenceInternet Engineering Task Force [Page 39]
3ac63b472022ff92691d1fe69ac715a729671965Michael GraffRFC1123 FILE TRANSFER -- FTP October 1989
419dd7129fe3447544b68c220b09a4968cf98d75Michael Graff 4.1.4.2 "QUOTE" Command
419dd7129fe3447544b68c220b09a4968cf98d75Michael Graff A User-FTP program MUST implement a "QUOTE" command that
419dd7129fe3447544b68c220b09a4968cf98d75Michael Graff will pass an arbitrary character string to the server and
419dd7129fe3447544b68c220b09a4968cf98d75Michael Graff display all resulting response messages to the user.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff To make the "QUOTE" command useful, a User-FTP SHOULD send
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff transfer control commands to the server as the user enters
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff them, rather than saving all the commands and sending them
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff to the server only when a data transfer is started.
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff The "QUOTE" command is essential to allow the user to
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff access servers that require system-specific commands
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff (e.g., SITE or ALLO), or to invoke new or optional
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff features that are not implemented by the User-FTP. For
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff example, "QUOTE" may be used to specify "TYPE A T" to
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff send a print file to hosts that require the
3ac63b472022ff92691d1fe69ac715a729671965Michael Graff distinction, even if the User-FTP does not recognize
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff 4.1.4.3 Displaying Replies to User
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff A User-FTP SHOULD display to the user the full text of all
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff error reply messages it receives. It SHOULD have a
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff "verbose" mode in which all commands it sends and the full
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff text and reply codes it receives are displayed, for
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff diagnosis of problems.
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff 4.1.4.4 Maintaining Synchronization
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff The state machine in a User-FTP SHOULD be forgiving of
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff missing and unexpected reply messages, in order to maintain
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff command synchronization with the server.
66bd3b3c6b171271c705b897823dcdcf29464698Michael GraffInternet Engineering Task Force [Page 40]
9b8057fce9ee7cdc39ad35f6e16d4ff5e623a941Mark AndrewsRFC1123 FILE TRANSFER -- FTP October 1989
9b8057fce9ee7cdc39ad35f6e16d4ff5e623a941Mark Andrews 4.1.5 FTP REQUIREMENTS SUMMARY
9b8057fce9ee7cdc39ad35f6e16d4ff5e623a941Mark Andrews | | | | |S| |
9b8057fce9ee7cdc39ad35f6e16d4ff5e623a941Mark Andrews | | | | |H| |F
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff | | | | |O|M|o
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence | | |S| |U|U|o
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff | | |H| |L|S|t
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff | |M|O| |D|T|n
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff | |U|U|M| | |o
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff | |S|L|A|N|N|t
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff | |T|D|Y|O|O|t
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael GraffFEATURE |SECTION | | | |T|T|e
ad3a5c4b7e21af04d1b872f933c2e19e5c0a135bMichael Graff-------------------------------------------|---------------|-|-|-|-|-|--
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael GraffImplement TYPE T if same as TYPE N |4.1.2.2 | |x| | | |
30251e07d1705d1a85b0e1d5a969496e1aed612eMichael GraffFile/Record transform invertible if poss. |4.1.2.4 | |x| | | |
a385f150bb21b8b81f70ed7df545357a83f1da82Michael GraffUser-FTP send PORT cmd for stream mode |4.1.2.5 | |x| | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyServer-FTP implement PASV |4.1.2.6 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley PASV is per-transfer |4.1.2.6 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyNLST reply usable in RETR cmds |4.1.2.7 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyImplied type for LIST and NLST |4.1.2.7 | |x| | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleySITE cmd for non-standard features |4.1.2.8 | |x| | | |
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid LawrenceSTOU cmd return pathname as specified |4.1.2.9 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyUse TCP READ boundaries on control conn. |4.1.2.10 | | | | |x|
59c049874bbef182857c57bd9cca292898921c69Bob Halley | | | | | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob HalleyServer-FTP send only correct reply format |4.1.2.11 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyServer-FTP use defined reply code if poss. |4.1.2.11 | |x| | | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley New reply code following Section 4.2 |4.1.2.11 | | |x| | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyUser-FTP use only high digit of reply |4.1.2.11 | |x| | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyUser-FTP handle multi-line reply lines |4.1.2.11 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyUser-FTP handle 421 reply specially |4.1.2.11 | | | |x| |
59c049874bbef182857c57bd9cca292898921c69Bob Halley | | | | | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyDefault data port same IP addr as ctl conn |4.1.2.12 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyUser-FTP send Telnet cmds exc. SYNCH, IP |4.1.2.12 | | | | |x|
59c049874bbef182857c57bd9cca292898921c69Bob HalleyUser-FTP negotiate Telnet options |4.1.2.12 | | | | |x|
59c049874bbef182857c57bd9cca292898921c69Bob HalleyServer-FTP handle Telnet options |4.1.2.12 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyHandle "Experimental" directory cmds |4.1.3.1 | |x| | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyIdle timeout in server-FTP |4.1.3.2 | |x| | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley Configurable idle timeout |4.1.3.2 | |x| | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob HalleyReceiver checkpoint data at Restart Marker |4.1.3.4 | |x| | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob HalleySender assume 110 replies are synchronous |4.1.3.4 | | | | |x|
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley | | | | | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob HalleySupport TYPE: | | | | | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley ASCII - Non-Print (AN) |4.1.2.13 |x| | | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley ASCII - Telnet (AT) -- if same as AN |4.1.2.2 | |x| | | |
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence ASCII - Carriage Control (AC) |959 3.1.1.5.2 | | |x| | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley EBCDIC - (any form) |959 3.1.1.2 | | |x| | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley IMAGE |4.1.2.1 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley LOCAL 8 |4.1.2.1 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleyInternet Engineering Task Force [Page 41]
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael GraffRFC1123 FILE TRANSFER -- FTP October 1989
59c049874bbef182857c57bd9cca292898921c69Bob Halley LOCAL m |4.1.2.1 | | |x| | |2
59c049874bbef182857c57bd9cca292898921c69Bob Halley | | | | | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleySupport MODE: | | | | | | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley Stream |4.1.2.13 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley Block |959 3.4.2 | | |x| | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley | | | | | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleySupport STRUCTURE: | | | | | | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley File |4.1.2.13 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley Record |4.1.2.13 |x| | | | |3
59c049874bbef182857c57bd9cca292898921c69Bob Halley Page |4.1.2.3 | | | |x| |
59c049874bbef182857c57bd9cca292898921c69Bob Halley | | | | | | |
59c049874bbef182857c57bd9cca292898921c69Bob HalleySupport commands: | | | | | | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley USER |4.1.2.13 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley PASS |4.1.2.13 |x| | | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews ACCT |4.1.2.13 |x| | | | |
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff CWD |4.1.2.13 |x| | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley CDUP |4.1.2.13 |x| | | | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley SMNT |959 5.3.1 | | |x| | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley REIN |959 5.3.1 | | |x| | |
59c049874bbef182857c57bd9cca292898921c69Bob Halley QUIT |4.1.2.13 |x| | | | |
08d131595373326ec4a3af793b536df8c33115ecMichael Graff | | | | | | |
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff PORT |4.1.2.13 |x| | | | |
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff PASV |4.1.2.6 |x| | | | |
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff TYPE |4.1.2.13 |x| | | | |1
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff STRU |4.1.2.13 |x| | | | |1
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff MODE |4.1.2.13 |x| | | | |1
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley | | | | | | |
d98c74e2ec5b96bd22aa4ed6d893e8993787493bMichael Graff RETR |4.1.2.13 |x| | | | |
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff STOR |4.1.2.13 |x| | | | |
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff STOU |959 5.3.1 | | |x| | |
439c0011e642fb1d26011116144af698125262dbMichael Graff APPE |4.1.2.13 |x| | | | |
439c0011e642fb1d26011116144af698125262dbMichael Graff ALLO |959 5.3.1 | | |x| | |
d1cc210d2091916df6f9858fae20a1c760f3b257Andreas Gustafsson REST |959 5.3.1 | | |x| | |
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff RNFR |4.1.2.13 |x| | | | |
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff RNTO |4.1.2.13 |x| | | | |
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley ABOR |959 5.3.1 | | |x| | |
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff DELE |4.1.2.13 |x| | | | |
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff RMD |4.1.2.13 |x| | | | |
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff MKD |4.1.2.13 |x| | | | |
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff PWD |4.1.2.13 |x| | | | |
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff LIST |4.1.2.13 |x| | | | |
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff NLST |4.1.2.13 |x| | | | |
439c0011e642fb1d26011116144af698125262dbMichael Graff SITE |4.1.2.8 | | |x| | |
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff STAT |4.1.2.13 |x| | | | |
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff SYST |4.1.2.13 |x| | | | |
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley HELP |4.1.2.13 |x| | | | |
e51511aa3281f8dc384eb1283115c7f8d5c402aeMichael Graff NOOP |4.1.2.13 |x| | | | |
3edb3c8e7da482d00acb35341f44bff6844c3193Michael Graff | | | | | | |
4a3ad0da975d7115d401700f955814a0dff1adb0Bob HalleyInternet Engineering Task Force [Page 42]
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael GraffRFC1123 FILE TRANSFER -- FTP October 1989
f181f94ec8da8b1dbcc6353e8be965ea4a5ea282Michael GraffUser Interface: | | | | | | |
50b5857f1ad137624a18ce67b26b9941e316b007Michael Graff Arbitrary pathnames |4.1.4.1 |x| | | | |
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley Implement "QUOTE" command |4.1.4.2 |x| | | | |
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley Transfer control commands immediately |4.1.4.2 | |x| | | |
439c0011e642fb1d26011116144af698125262dbMichael Graff Display error messages to user |4.1.4.3 | |x| | | |
50b5857f1ad137624a18ce67b26b9941e316b007Michael Graff Verbose mode |4.1.4.3 | |x| | | |
50b5857f1ad137624a18ce67b26b9941e316b007Michael Graff Maintain synchronization with server |4.1.4.4 | |x| | | |
439c0011e642fb1d26011116144af698125262dbMichael Graff(1) For the values shown earlier.
50b5857f1ad137624a18ce67b26b9941e316b007Michael Graff(2) Here m is number of bits in a memory word.
50b5857f1ad137624a18ce67b26b9941e316b007Michael Graff(3) Required for host with record-structured file system, optional
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael GraffInternet Engineering Task Force [Page 43]
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael GraffRFC1123 FILE TRANSFER -- TFTP October 1989
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff 4.2 TRIVIAL FILE TRANSFER PROTOCOL -- TFTP
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff 4.2.1 INTRODUCTION
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff The Trivial File Transfer Protocol TFTP is defined in RFC-783
1a286a6613d385b443030a8c932e40ac9e9c301fBob Halley TFTP provides its own reliable delivery with UDP as its
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff transport protocol, using a simple stop-and-wait acknowledgment
f3d059d1155aa016f75a4047a2a15b4b2c5b7e01Michael Graff system. Since TFTP has an effective window of only one 512
f3d059d1155aa016f75a4047a2a15b4b2c5b7e01Michael Graff octet segment, it can provide good performance only over paths
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff that have a small delay*bandwidth product. The TFTP file
f3d059d1155aa016f75a4047a2a15b4b2c5b7e01Michael Graff interface is very simple, providing no access control or
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley TFTP's most important application is bootstrapping a host over
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley a local network, since it is simple and small enough to be
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley easily implemented in EPROM [BOOT:1, BOOT:2]. Vendors are
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley urged to support TFTP for booting.
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley 4.2.2 PROTOCOL WALK-THROUGH
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley The TFTP specification [TFTP:1] is written in an open style,
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley and does not fully specify many parts of the protocol.
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley 4.2.2.1 Transfer Modes: RFC-783, Page 3
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley The transfer mode "mail" SHOULD NOT be supported.
f3d059d1155aa016f75a4047a2a15b4b2c5b7e01Michael Graff 4.2.2.2 UDP Header: RFC-783, Page 17
f20c9d340a9c91186d8548d1437ce3a05330bba2Andreas Gustafsson The Length field of a UDP header is incorrectly defined; it
f20c9d340a9c91186d8548d1437ce3a05330bba2Andreas Gustafsson includes the UDP header length (8).
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff 4.2.3 SPECIFIC ISSUES
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff 4.2.3.1 Sorcerer's Apprentice Syndrome
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff There is a serious bug, known as the "Sorcerer's Apprentice
78854e02c127f31ab90f56da0531542004b45377Michael Graff Syndrome," in the protocol specification. While it does not
8ed2c82a73a6c0a9c04ad26a4ef39b5a738099f6Andreas Gustafsson cause incorrect operation of the transfer (the file will
21e7034ec046105c00a0dab86c83732e2e77ad99Michael Graff always be transferred correctly if the transfer completes),
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff this bug may cause excessive retransmission, which may cause
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff the transfer to time out.
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley Implementations MUST contain the fix for this problem: the
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley sender (i.e., the side originating the DATA packets) must
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley never resend the current DATA packet on receipt of a
4abed3e3563c7ad346178433130e6d150d3ffeafBob HalleyInternet Engineering Task Force [Page 44]
294802790e8030f1c19b6c2c5d5204b6f464c729Michael GraffRFC1123 FILE TRANSFER -- TFTP October 1989
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff duplicate ACK.
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff The bug is caused by the protocol rule that either
f20c9d340a9c91186d8548d1437ce3a05330bba2Andreas Gustafsson side, on receiving an old duplicate datagram, may
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff resend the current datagram. If a packet is delayed in
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff the network but later successfully delivered after
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff either side has timed out and retransmitted a packet, a
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff duplicate copy of the response may be generated. If
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff the other side responds to this duplicate with a
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff duplicate of its own, then every datagram will be sent
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley in duplicate for the remainder of the transfer (unless
ea6228c9ce45dafa26e4cd79d71629c8ba5cd7c7Michael Graff a datagram is lost, breaking the repetition). Worse
ea6228c9ce45dafa26e4cd79d71629c8ba5cd7c7Michael Graff yet, since the delay is often caused by congestion,
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff this duplicate transmission will usually causes more
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff congestion, leading to more delayed packets, etc.
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff The following example may help to clarify this problem.
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff TFTP A TFTP B
8ed2c82a73a6c0a9c04ad26a4ef39b5a738099f6Andreas Gustafsson (1) Receive ACK X-1
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley (2) Receive DATA X
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff (ACK X is delayed in network,
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley and A times out):
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley (3) Retransmit DATA X
02a0f2f08328c23d414306ce0bab81e54e22f6afMichael Graff (4) Receive DATA X again
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley Send ACK X again
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley (5) Receive (delayed) ACK X
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley Send DATA X+1
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley (6) Receive DATA X+1
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley Send ACK X+1
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley (7) Receive ACK X again
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley Send DATA X+1 again
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff (8) Receive DATA X+1 again
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff Send ACK X+1 again
907620b5e0d898da324192cbbe5a5b518f55d175Bob Halley (9) Receive ACK X+1
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff Send DATA X+2
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff (10) Receive DATA X+2
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff (11) Receive ACK X+1 again
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff Send DATA X+2 again
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff (12) Receive DATA X+2 again
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff Send ACK X+3 again
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael GraffInternet Engineering Task Force [Page 45]
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael GraffRFC1123 FILE TRANSFER -- TFTP October 1989
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff Notice that once the delayed ACK arrives, the protocol
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff settles down to duplicate all further packets
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff (sequences 5-8 and 9-12). The problem is caused not by
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff either side timing out, but by both sides
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff retransmitting the current packet when they receive a
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff The fix is to break the retransmission loop, as
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff indicated above. This is analogous to the behavior of
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff TCP. It is then possible to remove the retransmission
daf83a29374c487a2800333d371e98e77e5a0d64Bob Halley timer on the receiver, since the resent ACK will never
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley cause any action; this is a useful simplification where
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley TFTP is used in a bootstrap program. It is OK to allow
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley the timer to remain, and it may be helpful if the
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley retransmitted ACK replaces one that was genuinely lost
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff in the network. The sender still requires a retransmit
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley timer, of course.
d1cc210d2091916df6f9858fae20a1c760f3b257Andreas Gustafsson 4.2.3.2 Timeout Algorithms
d1cc210d2091916df6f9858fae20a1c760f3b257Andreas Gustafsson A TFTP implementation MUST use an adaptive timeout.
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley IMPLEMENTATION:
d1cc210d2091916df6f9858fae20a1c760f3b257Andreas Gustafsson TCP retransmission algorithms provide a useful base to
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff work from. At least an exponential backoff of
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley retransmission timeout is necessary.
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley 4.2.3.3 Extensions
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff A variety of non-standard extensions have been made to TFTP,
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley including additional transfer modes and a secure operation
24a2d84aedbad12fba2ca319c98745e62ef0bc16Bob Halley mode (with passwords). None of these have been
24a2d84aedbad12fba2ca319c98745e62ef0bc16Bob Halley standardized.
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley 4.2.3.4 Access Control
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley A server TFTP implementation SHOULD include some
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley configurable access control over what pathnames are allowed
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff in TFTP operations.
8ed2c82a73a6c0a9c04ad26a4ef39b5a738099f6Andreas Gustafsson 4.2.3.5 Broadcast Request
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley A TFTP request directed to a broadcast address SHOULD be
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley silently ignored.
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley Due to the weak access control capability of TFTP,
4a3ad0da975d7115d401700f955814a0dff1adb0Bob Halley directed broadcasts of TFTP requests to random networks
21e7034ec046105c00a0dab86c83732e2e77ad99Michael GraffInternet Engineering Task Force [Page 46]
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael GraffRFC1123 FILE TRANSFER -- TFTP October 1989
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff could create a significant security hole.
5a675fa40aa755b21ab2906e90b1b80e2105291fMichael Graff 4.2.4 TFTP REQUIREMENTS SUMMARY
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff | | | | |S| |
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff | | | | |H| |F
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff | | | | |O|M|o
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff | | |S| |U|U|o
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff | | |H| |L|S|t
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff | |M|O| |D|T|n
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff | |U|U|M| | |o
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff | |S|L|A|N|N|t
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff | |T|D|Y|O|O|t
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael GraffFEATURE |SECTION | | | |T|T|e
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff-------------------------------------------------|--------|-|-|-|-|-|--
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael GraffFix Sorcerer's Apprentice Syndrome |4.2.3.1 |x| | | | |
517274e709a3c730cd42f37dc1260dde95d1ea38Michael GraffTransfer modes: | | | | | | |
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff netascii |RFC-783 |x| | | | |
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff octet |RFC-783 |x| | | | |
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley mail |4.2.2.1 | | | |x| |
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley extensions |4.2.3.3 | | |x| | |
517274e709a3c730cd42f37dc1260dde95d1ea38Michael GraffUse adaptive timeout |4.2.3.2 |x| | | | |
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael GraffConfigurable access control |4.2.3.4 | |x| | | |
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael GraffSilently ignore broadcast request |4.2.3.5 | |x| | | |
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff-------------------------------------------------|--------|-|-|-|-|-|--
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff-------------------------------------------------|--------|-|-|-|-|-|--
4abed3e3563c7ad346178433130e6d150d3ffeafBob HalleyInternet Engineering Task Force [Page 47]
306a93530536f05edfb477cac1c2667d90129a8fMichael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff5. ELECTRONIC MAIL -- SMTP and RFC-822
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff 5.1 INTRODUCTION
439c0011e642fb1d26011116144af698125262dbMichael Graff In the TCP/IP protocol suite, electronic mail in a format
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff specified in RFC-822 [SMTP:2] is transmitted using the Simple Mail
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff Transfer Protocol (SMTP) defined in RFC-821 [SMTP:1].
78854e02c127f31ab90f56da0531542004b45377Michael Graff While SMTP has remained unchanged over the years, the Internet
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff community has made several changes in the way SMTP is used. In
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff particular, the conversion to the Domain Name System (DNS) has
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff caused changes in address formats and in mail routing. In this
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff section, we assume familiarity with the concepts and terminology
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff of the DNS, whose requirements are given in Section 6.1.
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff RFC-822 specifies the Internet standard format for electronic mail
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff messages. RFC-822 supercedes an older standard, RFC-733, that may
439c0011e642fb1d26011116144af698125262dbMichael Graff still be in use in a few places, although it is obsolete. The two
439c0011e642fb1d26011116144af698125262dbMichael Graff formats are sometimes referred to simply by number ("822" and
3c5148c4d98af51d6dcb449c6dbd45fe8c645f61Michael Graff RFC-822 is used in some non-Internet mail environments with
3c5148c4d98af51d6dcb449c6dbd45fe8c645f61Michael Graff different mail transfer protocols than SMTP, and SMTP has also
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff been adapted for use in some non-Internet environments. Note that
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence this document presents the rules for the use of SMTP and RFC-822
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff for the Internet environment only; other mail environments that
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff use these protocols may be expected to have their own rules.
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff 5.2 PROTOCOL WALK-THROUGH
11fcc67616fac1bc6a28b3d4fed24641137888e7Michael Graff This section covers both RFC-821 and RFC-822.
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff The SMTP specification in RFC-821 is clear and contains numerous
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff examples, so implementors should not find it difficult to
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff understand. This section simply updates or annotates portions of
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff RFC-821 to conform with current usage.
2d083fead27c474feff3a6f79fc3da09d3637a09Andreas Gustafsson RFC-822 is a long and dense document, defining a rich syntax.
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff Unfortunately, incomplete or defective implementations of RFC-822
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff are common. In fact, nearly all of the many formats of RFC-822
a385f150bb21b8b81f70ed7df545357a83f1da82Michael Graff are actually used, so an implementation generally needs to
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff recognize and correctly interpret all of the RFC-822 syntax.
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff 5.2.1 The SMTP Model: RFC-821 Section 2
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff Mail is sent by a series of request/response transactions
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff between a client, the "sender-SMTP," and a server, the
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael GraffInternet Engineering Task Force [Page 48]
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff "receiver-SMTP". These transactions pass (1) the message
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff proper, which is composed of header and body, and (2) SMTP
6d14fe95e9ea5bbc5e863e5aab4618f7b3dbcc0fMichael Graff source and destination addresses, referred to as the
a385f150bb21b8b81f70ed7df545357a83f1da82Michael Graff The SMTP programs are analogous to Message Transfer Agents
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff (MTAs) of X.400. There will be another level of protocol
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff software, closer to the end user, that is responsible for
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff composing and analyzing RFC-822 message headers; this
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff component is known as the "User Agent" in X.400, and we
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff use that term in this document. There is a clear logical
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff distinction between the User Agent and the SMTP
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff implementation, since they operate on different levels of
a385f150bb21b8b81f70ed7df545357a83f1da82Michael Graff protocol. Note, however, that this distinction is may not
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff be exactly reflected the structure of typical
a253e35c2451818fb39f9b808c7641adb5275fb3Michael Graff implementations of Internet mail. Often there is a
08d131595373326ec4a3af793b536df8c33115ecMichael Graff program known as the "mailer" that implements SMTP and
66bd3b3c6b171271c705b897823dcdcf29464698Michael Graff also some of the User Agent functions; the rest of the
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff User Agent functions are included in a user interface used
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff for entering and reading mail.
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff The SMTP envelope is constructed at the originating site,
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff typically by the User Agent when the message is first
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff queued for the Sender-SMTP program. The envelope
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff addresses may be derived from information in the message
a44bd6a6edccd4c8e3884a13fcff037e7e2dd868Michael Graff header, supplied by the user interface (e.g., to implement
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff a bcc: request), or derived from local configuration
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff information (e.g., expansion of a mailing list). The SMTP
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff envelope cannot in general be re-derived from the header
78854e02c127f31ab90f56da0531542004b45377Michael Graff at a later stage in message delivery, so the envelope is
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff transmitted separately from the message itself using the
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff MAIL and RCPT commands of SMTP.
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff The text of RFC-821 suggests that mail is to be delivered
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff to an individual user at a host. With the advent of the
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff domain system and of mail routing using mail-exchange (MX)
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff resource records, implementors should now think of
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff delivering mail to a user at a domain, which may or may
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff not be a particular host. This DOES NOT change the fact
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff that SMTP is a host-to-host mail exchange protocol.
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff 5.2.2 Canonicalization: RFC-821 Section 3.1
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff The domain names that a Sender-SMTP sends in MAIL and RCPT
a44bd6a6edccd4c8e3884a13fcff037e7e2dd868Michael Graff commands MUST have been "canonicalized," i.e., they must be
a44bd6a6edccd4c8e3884a13fcff037e7e2dd868Michael Graff fully-qualified principal names or domain literals, not
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff nicknames or domain abbreviations. A canonicalized name either
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff identifies a host directly or is an MX name; it cannot be a
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael GraffInternet Engineering Task Force [Page 49]
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff 5.2.3 VRFY and EXPN Commands: RFC-821 Section 3.3
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff A receiver-SMTP MUST implement VRFY and SHOULD implement EXPN
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff (this requirement overrides RFC-821). However, there MAY be
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff configuration information to disable VRFY and EXPN in a
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff particular installation; this might even allow EXPN to be
78854e02c127f31ab90f56da0531542004b45377Michael Graff disabled for selected lists.
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff A new reply code is defined for the VRFY command:
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff 252 Cannot VRFY user (e.g., info is not local), but will
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff take message for this user and attempt delivery.
897c9ddb4d745b2bfecf98b17e5487bb6656299aMichael Graff SMTP users and administrators make regular use of these
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff commands for diagnosing mail delivery problems. With the
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence increasing use of multi-level mailing list expansion
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff (sometimes more than two levels), EXPN has been
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff increasingly important for diagnosing inadvertent mail
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff loops. On the other hand, some feel that EXPN represents
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff a significant privacy, and perhaps even a security,
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff 5.2.4 SEND, SOML, and SAML Commands: RFC-821 Section 3.4
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff An SMTP MAY implement the commands to send a message to a
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff user's terminal: SEND, SOML, and SAML.
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff It has been suggested that the use of mail relaying
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff through an MX record is inconsistent with the intent of
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff SEND to deliver a message immediately and directly to a
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff user's terminal. However, an SMTP receiver that is unable
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson to write directly to the user terminal can return a "251
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson User Not Local" reply to the RCPT following a SEND, to
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson inform the originator of possibly deferred delivery.
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson 5.2.5 HELO Command: RFC-821 Section 3.5
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson The sender-SMTP MUST ensure that the <domain> parameter in a
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson HELO command is a valid principal host domain name for the
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff client host. As a result, the receiver-SMTP will not have to
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff perform MX resolution on this name in order to validate the
11e89b9b44862128b46994a87484027b3c7d533aMichael Graff HELO parameter.
58aaab3687aac838542ee4ef65a9c094a5d34ab0Michael Graff The HELO receiver MAY verify that the HELO parameter really
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas GustafssonInternet Engineering Task Force [Page 50]
64828244e04e86dfa40f0a4f0c05f27923da499dMichael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff corresponds to the IP address of the sender. However, the
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff receiver MUST NOT refuse to accept a message, even if the
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff sender's HELO command fails verification.
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff Verifying the HELO parameter requires a domain name lookup
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff and may therefore take considerable time. An alternative
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff tool for tracking bogus mail sources is suggested below
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson (see "DATA Command").
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson Note also that the HELO argument is still required to have
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson valid <domain> syntax, since it will appear in a Received:
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson line; otherwise, a 501 error is to be sent.
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson IMPLEMENTATION:
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson When HELO parameter validation fails, a suggested
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson procedure is to insert a note about the unknown
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson authenticity of the sender into the message header (e.g.,
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson in the "Received:" line).
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley 5.2.6 Mail Relay: RFC-821 Section 3.6
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley We distinguish three types of mail (store-and-) forwarding:
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff (1) A simple forwarder or "mail exchanger" forwards a message
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson using private knowledge about the recipient; see section
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson 3.2 of RFC-821.
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff (2) An SMTP mail "relay" forwards a message within an SMTP
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson mail environment as the result of an explicit source route
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson (as defined in section 3.6 of RFC-821). The SMTP relay
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson function uses the "@...:" form of source route from RFC-
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas Gustafsson 822 (see Section 5.2.19 below).
a9ece9973c35d4d780338e89e288fb6a59575324Michael Graff (3) A mail "gateway" passes a message between different
d5874af5a577963aad13f21ec8c7cc9c7c8b880cAndreas Gustafsson environments. The rules for mail gateways are discussed
d5874af5a577963aad13f21ec8c7cc9c7c8b880cAndreas Gustafsson below in Section 5.3.7.
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson An Internet host that is forwarding a message but is not a
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson gateway to a different mail environment (i.e., it falls under
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson (1) or (2)) SHOULD NOT alter any existing header fields,
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson although the host will add an appropriate Received: line as
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff required in Section 5.2.8.
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff A Sender-SMTP SHOULD NOT send a RCPT TO: command containing an
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff explicit source route using the "@...:" address form. Thus,
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff the relay function defined in section 3.6 of RFC-821 should
9e992ecf375cd1eaa5351d06eca8cf7f543d5938Andreas GustafssonInternet Engineering Task Force [Page 51]
d5874af5a577963aad13f21ec8c7cc9c7c8b880cAndreas GustafssonRFC1123 MAIL -- SMTP & RFC-822 October 1989
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson The intent is to discourage all source routing and to
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson abolish explicit source routing for mail delivery within
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson the Internet environment. Source-routing is unnecessary;
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson the simple target address "user@domain" should always
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson suffice. This is the result of an explicit architectural
a349fd680c4a8a173adc398a8779c9536329b8fcAndreas Gustafsson decision to use universal naming rather than source
a349fd680c4a8a173adc398a8779c9536329b8fcAndreas Gustafsson routing for mail. Thus, SMTP provides end-to-end
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson connectivity, and the DNS provides globally-unique,
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson location-independent names. MX records handle the major
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson case where source routing might otherwise be needed.
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson A receiver-SMTP MUST accept the explicit source route syntax in
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff the envelope, but it MAY implement the relay function as
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence defined in section 3.6 of RFC-821. If it does not implement
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff the relay function, it SHOULD attempt to deliver the message
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff directly to the host to the right of the right-most "@" sign.
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff For example, suppose a host that does not implement the
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff relay function receives a message with the SMTP command:
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff "RCPT TO:<@ALPHA,@BETA:joe@GAMMA>", where ALPHA, BETA, and
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff GAMMA represent domain names. Rather than immediately
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff refusing the message with a 550 error reply as suggested
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff on page 20 of RFC-821, the host should try to forward the
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff message to GAMMA directly, using: "RCPT TO:<joe@GAMMA>".
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff Since this host does not support relaying, it is not
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson required to update the reverse path.
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff Some have suggested that source routing may be needed
78854e02c127f31ab90f56da0531542004b45377Michael Graff occasionally for manually routing mail around failures;
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson however, the reality and importance of this need is
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff controversial. The use of explicit SMTP mail relaying for
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff this purpose is discouraged, and in fact it may not be
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff successful, as many host systems do not support it. Some
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff have used the "%-hack" (see Section 5.2.16) for this
d98c74e2ec5b96bd22aa4ed6d893e8993787493bMichael Graff 5.2.7 RCPT Command: RFC-821 Section 4.1.1
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff A host that supports a receiver-SMTP MUST support the reserved
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff mailbox "Postmaster".
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff The receiver-SMTP MAY verify RCPT parameters as they arrive;
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff however, RCPT responses MUST NOT be delayed beyond a reasonable
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff time (see Section 5.3.2).
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff Therefore, a "250 OK" response to a RCPT does not necessarily
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael GraffInternet Engineering Task Force [Page 52]
d5874af5a577963aad13f21ec8c7cc9c7c8b880cAndreas GustafssonRFC1123 MAIL -- SMTP & RFC-822 October 1989
d43c2cc7bc4022701f141e299ea8f3fb1d0640c2Michael Graff imply that the delivery address(es) are valid. Errors found
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff after message acceptance will be reported by mailing a
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff notification message to an appropriate address (see Section
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff The set of conditions under which a RCPT parameter can be
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence validated immediately is an engineering design choice.
e605e98f3e4be079f545b26bb53ba02a6d04b0b6Andreas Gustafsson Reporting destination mailbox errors to the Sender-SMTP
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff before mail is transferred is generally desirable to save
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff time and network bandwidth, but this advantage is lost if
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff RCPT verification is lengthy.
bf16dd59979ab5cd818ad16486e6a0b13ae2cf8fAndreas Gustafsson For example, the receiver can verify immediately any
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff simple local reference, such as a single locally-
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff registered mailbox. On the other hand, the "reasonable
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff time" limitation generally implies deferring verification
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson of a mailing list until after the message has been
d5874af5a577963aad13f21ec8c7cc9c7c8b880cAndreas Gustafsson transferred and accepted, since verifying a large mailing
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson list can take a very long time. An implementation might
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff or might not choose to defer validation of addresses that
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff are non-local and therefore require a DNS lookup. If a
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson DNS lookup is performed but a soft domain system error
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson (e.g., timeout) occurs, validity must be assumed.
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson 5.2.8 DATA Command: RFC-821 Section 4.1.1
5fca48054b5e791a2fa0c5015bc3b6fef4fcdce1Andreas Gustafsson Every receiver-SMTP (not just one that "accepts a message for
d5874af5a577963aad13f21ec8c7cc9c7c8b880cAndreas Gustafsson relaying or for final delivery" [SMTP:1]) MUST insert a
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff "Received:" line at the beginning of a message. In this line,
64828244e04e86dfa40f0a4f0c05f27923da499dMichael Graff called a "time stamp line" in RFC-821:
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff * The FROM field SHOULD contain both (1) the name of the
6d12fdf96621801e80f3f4c2a8a569fe48766a20David Lawrence source host as presented in the HELO command and (2) a
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff domain literal containing the IP address of the source,
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff determined from the TCP connection.
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff * The ID field MAY contain an "@" as suggested in RFC-822,
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff but this is not required.
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff * The FOR field MAY contain a list of <path> entries when
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff multiple RCPT commands have been given.
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff An Internet mail program MUST NOT change a Received: line that
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence was previously added to the message header.
517274e709a3c730cd42f37dc1260dde95d1ea38Michael GraffInternet Engineering Task Force [Page 53]
517274e709a3c730cd42f37dc1260dde95d1ea38Michael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff Including both the source host and the IP source address
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence in the Received: line may provide enough information for
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff tracking illicit mail sources and eliminate a need to
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff explicitly verify the HELO parameter.
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff Received: lines are primarily intended for humans tracing
b5492be2c7c3792a1b6c03995fe378703fc814cbMichael Graff mail routes, primarily of diagnosis of faults. See also
c803787146cadcb2d7e10cbf4491f3be513dfa1aMichael Graff the discussion under 5.3.7.
86944a4c8002e80ae9b6eb5a5e29b797879be45fMichael Graff When the receiver-SMTP makes "final delivery" of a message,
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff then it MUST pass the MAIL FROM: address from the SMTP envelope
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff with the message, for use if an error notification message must
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence be sent later (see Section 5.3.3). There is an analogous
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff requirement when gatewaying from the Internet into a different
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff mail environment; see Section 5.3.7.
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley Note that the final reply to the DATA command depends only
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley upon the successful transfer and storage of the message.
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff Any problem with the destination address(es) must either
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff (1) have been reported in an SMTP error reply to the RCPT
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff command(s), or (2) be reported in a later error message
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff mailed to the originator.
d8590892d10fc9528b0dde7e2781935e7b8d7a87Michael Graff IMPLEMENTATION:
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley The MAIL FROM: information may be passed as a parameter or
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley in a Return-Path: line inserted at the beginning of the
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff 5.2.9 Command Syntax: RFC-821 Section 4.1.2
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff The syntax shown in RFC-821 for the MAIL FROM: command omits
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff the case of an empty path: "MAIL FROM: <>" (see RFC-821 Page
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff 15). An empty reverse path MUST be supported.
c6715d23151ab9948c7191b1ed1b99a14e6def7dDavid Lawrence 5.2.10 SMTP Replies: RFC-821 Section 4.2
13090db2b1c210b8386793ff0cbbb0b4348c1ecaBrian Wellington A receiver-SMTP SHOULD send only the reply codes listed in
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff section 4.2.2 of RFC-821 or in this document. A receiver-SMTP
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff SHOULD use the text shown in examples in RFC-821 whenever
419590499823ce15b5d2ad4fe71eaf04bd5a86c0Michael Graff A sender-SMTP MUST determine its actions only by the reply
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff code, not by the text (except for 251 and 551 replies); any
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff text, including no text at all, must be acceptable. The space
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff (blank) following the reply code is considered part of the
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff text. Whenever possible, a sender-SMTP SHOULD test only the
306a93530536f05edfb477cac1c2667d90129a8fMichael GraffInternet Engineering Task Force [Page 54]
daf83a29374c487a2800333d371e98e77e5a0d64Bob HalleyRFC1123 MAIL -- SMTP & RFC-822 October 1989
daf83a29374c487a2800333d371e98e77e5a0d64Bob Halley first digit of the reply code, as specified in Appendix E of
daf83a29374c487a2800333d371e98e77e5a0d64Bob Halley Interoperability problems have arisen with SMTP systems
daf83a29374c487a2800333d371e98e77e5a0d64Bob Halley using reply codes that are not listed explicitly in RFC-
daf83a29374c487a2800333d371e98e77e5a0d64Bob Halley 821 Section 4.3 but are legal according to the theory of
daf83a29374c487a2800333d371e98e77e5a0d64Bob Halley reply codes explained in Appendix E.
daf83a29374c487a2800333d371e98e77e5a0d64Bob Halley 5.2.11 Transparency: RFC-821 Section 4.5.2
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff Implementors MUST be sure that their mail systems always add
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff and delete periods to ensure message transparency.
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff 5.2.12 WKS Use in MX Processing: RFC-974, p. 5
daf83a29374c487a2800333d371e98e77e5a0d64Bob Halley RFC-974 [SMTP:3] recommended that the domain system be queried
daf83a29374c487a2800333d371e98e77e5a0d64Bob Halley for WKS ("Well-Known Service") records, to verify that each
daf83a29374c487a2800333d371e98e77e5a0d64Bob Halley proposed mail target does support SMTP. Later experience has
daf83a29374c487a2800333d371e98e77e5a0d64Bob Halley shown that WKS is not widely supported, so the WKS step in MX
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff processing SHOULD NOT be used.
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff The following are notes on RFC-822, organized by section of that
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley 5.2.13 RFC-822 Message Specification: RFC-822 Section 4
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff The syntax shown for the Return-path line omits the possibility
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff of a null return path, which is used to prevent looping of
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff error notifications (see Section 5.3.3). The complete syntax
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff return = "Return-path" ":" route-addr
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff / "Return-path" ":" "<" ">"
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff The set of optional header fields is hereby expanded to include
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff the Content-Type field defined in RFC-1049 [SMTP:7]. This
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff field "allows mail reading systems to automatically identify
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff the type of a structured message body and to process it for
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley display accordingly". [SMTP:7] A User Agent MAY support this
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff 5.2.14 RFC-822 Date and Time Specification: RFC-822 Section 5
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley The syntax for the date is hereby changed to:
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff date = 1*2DIGIT month 2*4DIGIT
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael GraffInternet Engineering Task Force [Page 55]
1a0e33bc2044e1902493111db14cbf793083ac47Michael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff All mail software SHOULD use 4-digit years in dates, to ease
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff the transition to the next century.
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley There is a strong trend towards the use of numeric timezone
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley indicators, and implementations SHOULD use numeric timezones
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley instead of timezone names. However, all implementations MUST
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley accept either notation. If timezone names are used, they MUST
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley be exactly as defined in RFC-822.
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley The military time zones are specified incorrectly in RFC-822:
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley they count the wrong way from UT (the signs are reversed). As
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley a result, military time zones in RFC-822 headers carry no
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley information.
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff Finally, note that there is a typo in the definition of "zone"
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff in the syntax summary of appendix D; the correct definition
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff occurs in Section 3 of RFC-822.
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley 5.2.15 RFC-822 Syntax Change: RFC-822 Section 6.1
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff The syntactic definition of "mailbox" in RFC-822 is hereby
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff mailbox = addr-spec ; simple address
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff / [phrase] route-addr ; name & addr-spec
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff That is, the phrase preceding a route address is now OPTIONAL.
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff This change makes the following header field legal, for
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff From: <craig@nnsc.nsf.net>
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff 5.2.16 RFC-822 Local-part: RFC-822 Section 6.2
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley The basic mailbox address specification has the form: "local-
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff part@domain". Here "local-part", sometimes called the "left-
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff hand side" of the address, is domain-dependent.
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff A host that is forwarding the message but is not the
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff destination host implied by the right-hand side "domain" MUST
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff NOT interpret or modify the "local-part" of the address.
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff When mail is to be gatewayed from the Internet mail environment
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley into a foreign mail environment (see Section 5.3.7), routing
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley information for that foreign environment MAY be embedded within
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff the "local-part" of the address. The gateway will then
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff interpret this local part appropriately for the foreign mail
c6715d23151ab9948c7191b1ed1b99a14e6def7dDavid LawrenceInternet Engineering Task Force [Page 56]
e883738546c7c73b761bce8a15e08661863d3ae1Michael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff Although source routes are discouraged within the Internet
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff (see Section 5.2.6), there are non-Internet mail
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff environments whose delivery mechanisms do depend upon
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff source routes. Source routes for extra-Internet
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff environments can generally be buried in the "local-part"
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff of the address (see Section 5.2.16) while mail traverses
59c049874bbef182857c57bd9cca292898921c69Bob Halley the Internet. When the mail reaches the appropriate
dfa0badebe5a8260281228d94dbe28e4314a9df6Andreas Gustafsson Internet mail gateway, the gateway will interpret the
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff local-part and build the necessary address or route for
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff the target mail environment.
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley For example, an Internet host might send mail to:
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley "a!b!c!user@gateway-domain". The complex local part
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley "a!b!c!user" would be uninterpreted within the Internet
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley domain, but could be parsed and understood by the
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley specified mail gateway.
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley An embedded source route is sometimes encoded in the
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley "local-part" using "%" as a right-binding routing
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley operator. For example, in:
e1db5e817f89b1b9ec7dab366f1bfe1c7b299438Michael Graff user%domain%relay3%relay2@relay1
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley the "%" convention implies that the mail is to be routed
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff from "relay1" through "relay2", "relay3", and finally to
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff "user" at "domain". This is commonly known as the "%-
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff hack". It is suggested that "%" have lower precedence
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff than any other routing operator (e.g., "!") hidden in the
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley local-part; for example, "a!b%c" would be interpreted as
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff Only the target host (in this case, "relay1") is permitted
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff to analyze the local-part "user%domain%relay3%relay2".
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff 5.2.17 Domain Literals: RFC-822 Section 6.2.3
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley A mailer MUST be able to accept and parse an Internet domain
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff literal whose content ("dtext"; see RFC-822) is a dotted-
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff decimal host address. This satisfies the requirement of
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff Section 2.1 for the case of mail.
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff An SMTP MUST accept and recognize a domain literal for any of
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff its own IP addresses.
4abed3e3563c7ad346178433130e6d150d3ffeafBob HalleyInternet Engineering Task Force [Page 57]
4abed3e3563c7ad346178433130e6d150d3ffeafBob HalleyRFC1123 MAIL -- SMTP & RFC-822 October 1989
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley 5.2.18 Common Address Formatting Errors: RFC-822 Section 6.1
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff Errors in formatting or parsing 822 addresses are unfortunately
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff common. This section mentions only the most common errors. A
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff User Agent MUST accept all valid RFC-822 address formats, and
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff MUST NOT generate illegal address syntax.
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff o A common error is to leave out the semicolon after a group
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff o Some systems fail to fully-qualify domain names in
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence messages they generate. The right-hand side of an "@"
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff sign in a header address field MUST be a fully-qualified
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff For example, some systems fail to fully-qualify the From:
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff address; this prevents a "reply" command in the user
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff interface from automatically constructing a return
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley Although RFC-822 allows the local use of abbreviated
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff domain names within a domain, the application of
e02884167b7c969b56413f76c48c3802c4dca14dAndreas Gustafsson RFC-822 in Internet mail does not allow this. The
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff intent is that an Internet host must not send an SMTP
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff message header containing an abbreviated domain name
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff in an address field. This allows the address fields
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff of the header to be passed without alteration across
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff the Internet, as required in Section 5.2.6.
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff o Some systems mis-parse multiple-hop explicit source routes
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff @relay1,@relay2,@relay3:user@domain.
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff o Some systems over-qualify domain names by adding a
c68421fffe3dd7fcc4ae5a228d9eb888df4b5e72Michael Graff trailing dot to some or all domain names in addresses or
c68421fffe3dd7fcc4ae5a228d9eb888df4b5e72Michael Graff message-ids. This violates RFC-822 syntax.
c68421fffe3dd7fcc4ae5a228d9eb888df4b5e72Michael Graff 5.2.19 Explicit Source Routes: RFC-822 Section 6.2.7
c68421fffe3dd7fcc4ae5a228d9eb888df4b5e72Michael Graff Internet host software SHOULD NOT create an RFC-822 header
c68421fffe3dd7fcc4ae5a228d9eb888df4b5e72Michael Graff containing an address with an explicit source route, but MUST
c68421fffe3dd7fcc4ae5a228d9eb888df4b5e72Michael Graff accept such headers for compatibility with earlier systems.
528829aa8ad69238e674cd81078bc14d4199691bMichael GraffInternet Engineering Task Force [Page 58]
528829aa8ad69238e674cd81078bc14d4199691bMichael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff In an understatement, RFC-822 says "The use of explicit
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff source routing is discouraged". Many hosts implemented
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff RFC-822 source routes incorrectly, so the syntax cannot be
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff used unambiguously in practice. Many users feel the
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff syntax is ugly. Explicit source routes are not needed in
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff the mail envelope for delivery; see Section 5.2.6. For
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff all these reasons, explicit source routes using the RFC-
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff 822 notations are not to be used in Internet mail headers.
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff As stated in Section 5.2.16, it is necessary to allow an
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff explicit source route to be buried in the local-part of an
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff address, e.g., using the "%-hack", in order to allow mail
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff to be gatewayed into another environment in which explicit
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley source routing is necessary. The vigilant will observe
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley that there is no way for a User Agent to detect and
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley prevent the use of such implicit source routing when the
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley destination is within the Internet. We can only
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley discourage source routing of any kind within the Internet,
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley as unnecessary and undesirable.
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff 5.3 SPECIFIC ISSUES
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley 5.3.1 SMTP Queueing Strategies
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley The common structure of a host SMTP implementation includes
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley user mailboxes, one or more areas for queueing messages in
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley transit, and one or more daemon processes for sending and
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff receiving mail. The exact structure will vary depending on the
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff needs of the users on the host and the number and size of
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff mailing lists supported by the host. We describe several
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff optimizations that have proved helpful, particularly for
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley mailers supporting high traffic levels.
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff Any queueing strategy MUST include:
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff o Timeouts on all activities. See Section 5.3.2.
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff o Never sending error messages in response to error
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff 5.3.1.1 Sending Strategy
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff The general model of a sender-SMTP is one or more processes
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff that periodically attempt to transmit outgoing mail. In a
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff typical system, the program that composes a message has some
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff method for requesting immediate attention for a new piece of
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff outgoing mail, while mail that cannot be transmitted
294802790e8030f1c19b6c2c5d5204b6f464c729Michael GraffInternet Engineering Task Force [Page 59]
306a93530536f05edfb477cac1c2667d90129a8fMichael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff immediately MUST be queued and periodically retried by the
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff sender. A mail queue entry will include not only the
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff message itself but also the envelope information.
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley The sender MUST delay retrying a particular destination
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley after one attempt has failed. In general, the retry
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley interval SHOULD be at least 30 minutes; however, more
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff sophisticated and variable strategies will be beneficial
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley when the sender-SMTP can determine the reason for non-
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley Retries continue until the message is transmitted or the
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley sender gives up; the give-up time generally needs to be at
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley least 4-5 days. The parameters to the retry algorithm MUST
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley be configurable.
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley A sender SHOULD keep a list of hosts it cannot reach and
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley corresponding timeouts, rather than just retrying queued
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley Experience suggests that failures are typically
8cdfd17426179ae6f629a9b7475d46a22f535047Bob Halley transient (the target system has crashed), favoring a
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff policy of two connection attempts in the first hour the
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff message is in the queue, and then backing off to once
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff every two or three hours.
ef5e39139c46f8b953845dbfd37339fcf4472e44Michael Graff The sender-SMTP can shorten the queueing delay by
ef5e39139c46f8b953845dbfd37339fcf4472e44Michael Graff cooperation with the receiver-SMTP. In particular, if
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff mail is received from a particular address, it is good
ef5e39139c46f8b953845dbfd37339fcf4472e44Michael Graff evidence that any mail queued for that host can now be
ef5e39139c46f8b953845dbfd37339fcf4472e44Michael Graff The strategy may be further modified as a result of
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff multiple addresses per host (see Section 5.3.4), to
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff optimize delivery time vs. resource usage.
ef5e39139c46f8b953845dbfd37339fcf4472e44Michael Graff A sender-SMTP may have a large queue of messages for
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff each unavailable destination host, and if it retried
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff all these messages in every retry cycle, there would be
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff excessive Internet overhead and the daemon would be
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff blocked for a long period. Note that an SMTP can
58aaab3687aac838542ee4ef65a9c094a5d34ab0Michael Graff generally determine that a delivery attempt has failed
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley only after a timeout of a minute or more; a one minute
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley timeout per connection will result in a very large
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff delay if it is repeated for dozens or even hundreds of
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff queued messages.
306a93530536f05edfb477cac1c2667d90129a8fMichael GraffInternet Engineering Task Force [Page 60]
528829aa8ad69238e674cd81078bc14d4199691bMichael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff When the same message is to be delivered to several users on
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff the same host, only one copy of the message SHOULD be
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff transmitted. That is, the sender-SMTP should use the
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley command sequence: RCPT, RCPT,... RCPT, DATA instead of the
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence sequence: RCPT, DATA, RCPT, DATA,... RCPT, DATA.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Implementation of this efficiency feature is strongly urged.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Similarly, the sender-SMTP MAY support multiple concurrent
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley outgoing mail transactions to achieve timely delivery.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley However, some limit SHOULD be imposed to protect the host
59c049874bbef182857c57bd9cca292898921c69Bob Halley from devoting all its resources to mail.
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley The use of the different addresses of a multihomed host is
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley discussed below.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley 5.3.1.2 Receiving strategy
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley The receiver-SMTP SHOULD attempt to keep a pending listen on
e44487bfc23599b6b240e09d83d1c862fecfcc82Michael Graff the SMTP port at all times. This will require the support
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley of multiple incoming TCP connections for SMTP. Some limit
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley MAY be imposed.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley IMPLEMENTATION:
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley When the receiver-SMTP receives mail from a particular
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley host address, it could notify the sender-SMTP to retry
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley any mail pending for that host address.
288f9443ac447c9c14f3722dd6d32c1faef0f009Michael Graff 5.3.2 Timeouts in SMTP
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley There are two approaches to timeouts in the sender-SMTP: (a)
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley limit the time for each SMTP command separately, or (b) limit
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley the time for the entire SMTP dialogue for a single mail
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley message. A sender-SMTP SHOULD use option (a), per-command
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley timeouts. Timeouts SHOULD be easily reconfigurable, preferably
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley without recompiling the SMTP code.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence Timeouts are an essential feature of an SMTP
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley implementation. If the timeouts are too long (or worse,
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley there are no timeouts), Internet communication failures or
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley software bugs in receiver-SMTP programs can tie up SMTP
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley processes indefinitely. If the timeouts are too short,
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley resources will be wasted with attempts that time out part
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley way through message delivery.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley If option (b) is used, the timeout has to be very large,
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley e.g., an hour, to allow time to expand very large mailing
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley lists. The timeout may also need to increase linearly
fe14eafefa91fada7cea0a55b09196c01477406cBob HalleyInternet Engineering Task Force [Page 61]
fe14eafefa91fada7cea0a55b09196c01477406cBob HalleyRFC1123 MAIL -- SMTP & RFC-822 October 1989
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley with the size of the message, to account for the time to
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley transmit a very large message. A large fixed timeout
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley leads to two problems: a failure can still tie up the
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley sender for a very long time, and very large messages may
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley still spuriously time out (which is a wasteful failure!).
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley Using the recommended option (a), a timer is set for each
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley SMTP command and for each buffer of the data transfer.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley The latter means that the overall timeout is inherently
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley proportional to the size of the message.
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley Based on extensive experience with busy mail-relay hosts, the
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley minimum per-command timeout values SHOULD be as follows:
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley o Initial 220 Message: 5 minutes
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley A Sender-SMTP process needs to distinguish between a
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley failed TCP connection and a delay in receiving the initial
58aaab3687aac838542ee4ef65a9c094a5d34ab0Michael Graff 220 greeting message. Many receiver-SMTPs will accept a
59c049874bbef182857c57bd9cca292898921c69Bob Halley TCP connection but delay delivery of the 220 message until
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley their system load will permit more mail to be processed.
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff o MAIL Command: 5 minutes
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff o RCPT Command: 5 minutes
8b858da2bb0af31268f6f724fa2fc58671f66dadBrian Wellington A longer timeout would be required if processing of
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff mailing lists and aliases were not deferred until after
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff the message was accepted.
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff o DATA Initiation: 2 minutes
a14eb88840e06b8d458c1556e5452b6d2a50012eMichael Graff This is while awaiting the "354 Start Input" reply to a
3115cd89bc1e1fd3ecc4705d253e3484a3f5c555Michael Graff DATA command.
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff o Data Block: 3 minutes
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff This is while awaiting the completion of each TCP SEND
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff call transmitting a chunk of data.
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff o DATA Termination: 10 minutes.
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff This is while awaiting the "250 OK" reply. When the
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff receiver gets the final period terminating the message
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley data, it typically performs processing to deliver the
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob Halley message to a user mailbox. A spurious timeout at this
4abed3e3563c7ad346178433130e6d150d3ffeafBob Halley point would be very wasteful, since the message has been
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob HalleyInternet Engineering Task Force [Page 62]
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob HalleyRFC1123 MAIL -- SMTP & RFC-822 October 1989
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob Halley successfully sent.
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob Halley A receiver-SMTP SHOULD have a timeout of at least 5 minutes
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob Halley while it is awaiting the next command from the sender.
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob Halley 5.3.3 Reliable Mail Receipt
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob Halley When the receiver-SMTP accepts a piece of mail (by sending a
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob Halley "250 OK" message in response to DATA), it is accepting
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob Halley responsibility for delivering or relaying the message. It must
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob Halley take this responsibility seriously, i.e., it MUST NOT lose the
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob Halley message for frivolous reasons, e.g., because the host later
fe197676cc48d9b81940a0031a340bb5d23e1dcbBob Halley crashes or because of a predictable resource shortage.
65f6d2e1c1fce0989c13c2efb44b8dd26cd977f3Michael Graff If there is a delivery failure after acceptance of a message,
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff the receiver-SMTP MUST formulate and mail a notification
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff message. This notification MUST be sent using a null ("<>")
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff reverse path in the envelope; see Section 3.6 of RFC-821. The
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff recipient of this notification SHOULD be the address from the
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff envelope return path (or the Return-Path: line). However, if
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff this address is null ("<>"), the receiver-SMTP MUST NOT send a
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff notification. If the address is an explicit source route, it
1a0e33bc2044e1902493111db14cbf793083ac47Michael Graff SHOULD be stripped down to its final hop.
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff For example, suppose that an error notification must be
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff sent for a message that arrived with:
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff "MAIL FROM:<@a,@b:user@d>". The notification message
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff should be sent to: "RCPT TO:<user@d>".
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff Some delivery failures after the message is accepted by
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff SMTP will be unavoidable. For example, it may be
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff impossible for the receiver-SMTP to validate all the
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff delivery addresses in RCPT command(s) due to a "soft"
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff domain system error or because the target is a mailing
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff list (see earlier discussion of RCPT).
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff To avoid receiving duplicate messages as the result of
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff timeouts, a receiver-SMTP MUST seek to minimize the time
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff required to respond to the final "." that ends a message
294802790e8030f1c19b6c2c5d5204b6f464c729Michael Graff transfer. See RFC-1047 [SMTP:4] for a discussion of this
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff 5.3.4 Reliable Mail Transmission
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff To transmit a message, a sender-SMTP determines the IP address
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley of the target host from the destination address in the
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff envelope. Specifically, it maps the string to the right of the
14b98cb34eda66c87ce41a207704a2c232280eafMichael GraffInternet Engineering Task Force [Page 63]
14b98cb34eda66c87ce41a207704a2c232280eafMichael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley "@" sign into an IP address. This mapping or the transfer
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley itself may fail with a soft error, in which case the sender-
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley SMTP will requeue the outgoing mail for a later retry, as
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley required in Section 5.3.1.1.
59c049874bbef182857c57bd9cca292898921c69Bob Halley When it succeeds, the mapping can result in a list of
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley alternative delivery addresses rather than a single address,
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley because of (a) multiple MX records, (b) multihoming, or both.
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley To provide reliable mail transmission, the sender-SMTP MUST be
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley able to try (and retry) each of the addresses in this list in
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley order, until a delivery attempt succeeds. However, there MAY
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff also be a configurable limit on the number of alternate
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley addresses that can be tried. In any case, a host SHOULD try at
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley least two addresses.
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff The following information is to be used to rank the host
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley (1) Multiple MX Records -- these contain a preference
4281fe4a80af7402613f0d5c3eeff8829a4ede1fMichael Graff indication that should be used in sorting. If there are
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley multiple destinations with the same preference and there
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley is no clear reason to favor one (e.g., by address
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley preference), then the sender-SMTP SHOULD pick one at
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley random to spread the load across multiple mail exchanges
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley for a specific organization; note that this is a
fe14eafefa91fada7cea0a55b09196c01477406cBob Halley refinement of the procedure in [DNS:3].
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence (2) Multihomed host -- The destination host (perhaps taken
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff from the preferred MX record) may be multihomed, in which
c44072c2995121195aadee03e0b39802c1ea0e76Andreas Gustafsson case the domain name resolver will return a list of
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff alternative IP addresses. It is the responsibility of the
24a2d84aedbad12fba2ca319c98745e62ef0bc16Bob Halley domain name resolver interface (see Section 6.1.3.4 below)
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley to have ordered this list by decreasing preference, and
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley SMTP MUST try them in the order presented.
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff Although the capability to try multiple alternative
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff addresses is required, there may be circumstances where
ff9bb3fc5453bbf310b67c560fbf04a5c0fb60daMichael Graff specific installations want to limit or disable the use of
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff alternative addresses. The question of whether a sender
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff should attempt retries using the different addresses of a
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff multihomed host has been controversial. The main argument
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff for using the multiple addresses is that it maximizes the
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff probability of timely delivery, and indeed sometimes the
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley probability of any delivery; the counter argument is that
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley it may result in unnecessary resource use.
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence Note that resource use is also strongly determined by the
24a2d84aedbad12fba2ca319c98745e62ef0bc16Bob HalleyInternet Engineering Task Force [Page 64]
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob HalleyRFC1123 MAIL -- SMTP & RFC-822 October 1989
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley sending strategy discussed in Section 5.3.1.
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff 5.3.5 Domain Name Support
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff SMTP implementations MUST use the mechanism defined in Section
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff 6.1 for mapping between domain names and IP addresses. This
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff means that every Internet SMTP MUST include support for the
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff Internet DNS.
06a960c681566a163af5b9a655cf36023075ddcbMark Andrews In particular, a sender-SMTP MUST support the MX record scheme
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff [SMTP:3]. See also Section 7.4 of [DNS:2] for information on
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley domain name support for SMTP.
3d12fa7e76c02d06e1adeaa7846b60378a3cd204Michael Graff 5.3.6 Mailing Lists and Aliases
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff An SMTP-capable host SHOULD support both the alias and the list
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff form of address expansion for multiple delivery. When a
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff message is delivered or forwarded to each address of an
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff expanded list form, the return address in the envelope
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff ("MAIL FROM:") MUST be changed to be the address of a person
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff who administers the list, but the message header MUST be left
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff unchanged; in particular, the "From" field of the message is
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley An important mail facility is a mechanism for multi-
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley destination delivery of a single message, by transforming
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff or "expanding" a pseudo-mailbox address into a list of
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff destination mailbox addresses. When a message is sent to
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff such a pseudo-mailbox (sometimes called an "exploder"),
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff copies are forwarded or redistributed to each mailbox in
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff the expanded list. We classify such a pseudo-mailbox as
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff an "alias" or a "list", depending upon the expansion
06a960c681566a163af5b9a655cf36023075ddcbMark Andrews To expand an alias, the recipient mailer simply
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff replaces the pseudo-mailbox address in the envelope
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff with each of the expanded addresses in turn; the rest
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff of the envelope and the message body are left
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff unchanged. The message is then delivered or
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff forwarded to each expanded address.
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff A mailing list may be said to operate by
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff "redistribution" rather than by "forwarding". To
528829aa8ad69238e674cd81078bc14d4199691bMichael GraffInternet Engineering Task Force [Page 65]
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob HalleyRFC1123 MAIL -- SMTP & RFC-822 October 1989
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff expand a list, the recipient mailer replaces the
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff pseudo-mailbox address in the envelope with each of
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff the expanded addresses in turn. The return address in
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff the envelope is changed so that all error messages
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff generated by the final deliveries will be returned to
59e22acc4f79ff481f7bfa46ef0558957ae53cfcMichael Graff a list administrator, not to the message originator,
528829aa8ad69238e674cd81078bc14d4199691bMichael Graff who generally has no control over the contents of the
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff list and will typically find error messages annoying.
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff 5.3.7 Mail Gatewaying
1c3bc66ada38236cc81c41b7174a9f0a872c9ab6Michael Graff Gatewaying mail between different mail environments, i.e.,
ea6228c9ce45dafa26e4cd79d71629c8ba5cd7c7Michael Graff different mail formats and protocols, is complex and does not
ea6228c9ce45dafa26e4cd79d71629c8ba5cd7c7Michael Graff easily yield to standardization. See for example [SMTP:5a],
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff [SMTP:5b]. However, some general requirements may be given for
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence a gateway between the Internet and another mail environment.
8358be5851b039fff1aa5a0ccd4068dbca820046Brian Wellington (A) Header fields MAY be rewritten when necessary as messages
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff are gatewayed across mail environment boundaries.
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley This may involve interpreting the local-part of the
1a286a6613d385b443030a8c932e40ac9e9c301fBob Halley destination address, as suggested in Section 5.2.16.
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff The other mail systems gatewayed to the Internet
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff generally use a subset of RFC-822 headers, but some
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff of them do not have an equivalent to the SMTP
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff envelope. Therefore, when a message leaves the
517274e709a3c730cd42f37dc1260dde95d1ea38Michael Graff Internet environment, it may be necessary to fold the
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff SMTP envelope information into the message header. A
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff possible solution would be to create new header
306a93530536f05edfb477cac1c2667d90129a8fMichael Graff fields to carry the envelope information (e.g., "X-
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley SMTP-MAIL:" and "X-SMTP-RCPT:"); however, this would
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley require changes in mail programs in the foreign
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley environment.
1a286a6613d385b443030a8c932e40ac9e9c301fBob Halley (B) When forwarding a message into or out of the Internet
24a2d84aedbad12fba2ca319c98745e62ef0bc16Bob Halley environment, a gateway MUST prepend a Received: line, but
24a2d84aedbad12fba2ca319c98745e62ef0bc16Bob Halley it MUST NOT alter in any way a Received: line that is
24a2d84aedbad12fba2ca319c98745e62ef0bc16Bob Halley already in the header.
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley This requirement is a subset of the general
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley "Received:" line requirement of Section 5.2.8; it is
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley restated here for emphasis.
1a286a6613d385b443030a8c932e40ac9e9c301fBob Halley Received: fields of messages originating from other
e883738546c7c73b761bce8a15e08661863d3ae1Michael GraffInternet Engineering Task Force [Page 66]
e883738546c7c73b761bce8a15e08661863d3ae1Michael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff environments may not conform exactly to RFC822.
16508d9185e5eb96af2ebe900a08c46a6e5eb7edBob Halley However, the most important use of Received: lines is
1a286a6613d385b443030a8c932e40ac9e9c301fBob Halley for debugging mail faults, and this debugging can be
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff severely hampered by well-meaning gateways that try
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff to "fix" a Received: line.
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff The gateway is strongly encouraged to indicate the
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff environment and protocol in the "via" clauses of
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff Received field(s) that it supplies.
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff (C) From the Internet side, the gateway SHOULD accept all
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff valid address formats in SMTP commands and in RFC-822
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff headers, and all valid RFC-822 messages. Although a
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff gateway must accept an RFC-822 explicit source route
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff ("@...:" format) in either the RFC-822 header or in the
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley envelope, it MAY or may not act on the source route; see
eafe61bee806a89893e5339e372a4bdc4fc5b5a5Bob Halley Sections 5.2.6 and 5.2.19.
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff It is often tempting to restrict the range of
e883738546c7c73b761bce8a15e08661863d3ae1Michael Graff addresses accepted at the mail gateway to simplify
f58cfa95f77ae2c26847b41c731dc17366e273b2Andreas Gustafsson the translation into addresses for the remote
f58cfa95f77ae2c26847b41c731dc17366e273b2Andreas Gustafsson environment. This practice is based on the
f58cfa95f77ae2c26847b41c731dc17366e273b2Andreas Gustafsson assumption that mail users have control over the
14b98cb34eda66c87ce41a207704a2c232280eafMichael Graff addresses their mailers send to the mail gateway. In
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff practice, however, users have little control over the
f00d96a15cdd11e764437f9359e67328631caaeaMichael Graff addresses that are finally sent; their mailers are
f00d96a15cdd11e764437f9359e67328631caaeaMichael Graff free to change addresses into any legal RFC-822
f00d96a15cdd11e764437f9359e67328631caaeaMichael Graff (D) The gateway MUST ensure that all header fields of a
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff message that it forwards into the Internet meet the
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff requirements for Internet mail. In particular, all
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff addresses in "From:", "To:", "Cc:", etc., fields must be
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff transformed (if necessary) to satisfy RFC-822 syntax, and
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff they must be effective and useful for sending replies.
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff (E) The translation algorithm used to convert mail from the
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff Internet protocols to another environment's protocol
f00d96a15cdd11e764437f9359e67328631caaeaMichael Graff SHOULD try to ensure that error messages from the foreign
f00d96a15cdd11e764437f9359e67328631caaeaMichael Graff mail environment are delivered to the return path from the
f00d96a15cdd11e764437f9359e67328631caaeaMichael Graff SMTP envelope, not to the sender listed in the "From:"
f00d96a15cdd11e764437f9359e67328631caaeaMichael Graff field of the RFC-822 message.
f00d96a15cdd11e764437f9359e67328631caaeaMichael Graff Internet mail lists usually place the address of the
f36a81c88493985ee2d1c53cc6fe88f4b00dbbc8Michael Graff mail list maintainer in the envelope but leave the
beb2b4f19624af46230a8e3df97e54d6c596573eMichael GraffInternet Engineering Task Force [Page 67]
beb2b4f19624af46230a8e3df97e54d6c596573eMichael GraffRFC1123 MAIL -- SMTP & RFC-822 October 1989
42fe494186d386ddda15eb9403038c3558bbd5bfMichael Graff original message header intact (with the "From:"
beb2b4f19624af46230a8e3df97e54d6c596573eMichael Graff field containing the original sender). This yields
beb2b4f19624af46230a8e3df97e54d6c596573eMichael Graff the behavior the average recipient expects: a reply
beb2b4f19624af46230a8e3df97e54d6c596573eMichael Graff to the header gets sent to the original sender, not
beb2b4f19624af46230a8e3df97e54d6c596573eMichael Graff to a mail list maintainer; however, errors get sent
42fe494186d386ddda15eb9403038c3558bbd5bfMichael Graff to the maintainer (who can fix the problem) and not
42fe494186d386ddda15eb9403038c3558bbd5bfMichael Graff the sender (who probably cannot).
beb2b4f19624af46230a8e3df97e54d6c596573eMichael Graff (F) Similarly, when forwarding a message from another
beb2b4f19624af46230a8e3df97e54d6c596573eMichael Graff environment into the Internet, the gateway SHOULD set the
beb2b4f19624af46230a8e3df97e54d6c596573eMichael Graff envelope return path in accordance with an error message
beb2b4f19624af46230a8e3df97e54d6c596573eMichael Graff return address, if any, supplied by the foreign
4f6dd51441290a9feacbe62991a2cdfdc7554e8bMichael Graff 5.3.8 Maximum Message Size
4f6dd51441290a9feacbe62991a2cdfdc7554e8bMichael Graff Mailer software MUST be able to send and receive messages of at
4f6dd51441290a9feacbe62991a2cdfdc7554e8bMichael Graff least 64K bytes in length (including header), and a much larger
4f6dd51441290a9feacbe62991a2cdfdc7554e8bMichael Graff maximum size is highly desirable.
4f6dd51441290a9feacbe62991a2cdfdc7554e8bMichael Graff Although SMTP does not define the maximum size of a
4f6dd51441290a9feacbe62991a2cdfdc7554e8bMichael Graff message, many systems impose implementation limits.
4f6dd51441290a9feacbe62991a2cdfdc7554e8bMichael Graff The current de facto minimum limit in the Internet is 64K
70b065bd9297ae7baf203a2335211fc7b4544818Bob Halley bytes. However, electronic mail is used for a variety of
70b065bd9297ae7baf203a2335211fc7b4544818Bob Halley purposes that create much larger messages. For example,
70b065bd9297ae7baf203a2335211fc7b4544818Bob Halley mail is often used instead of FTP for transmitting ASCII
70b065bd9297ae7baf203a2335211fc7b4544818Bob Halley files, and in particular to transmit entire documents. As
70b065bd9297ae7baf203a2335211fc7b4544818Bob Halley a result, messages can be 1 megabyte or even larger. We
70b065bd9297ae7baf203a2335211fc7b4544818Bob Halley note that the present document together with its lower-
4f6dd51441290a9feacbe62991a2cdfdc7554e8bMichael Graff layer companion contains 0.5 megabytes.
a44c12b332b867f29631e235eb11d1263c73d6c0Bob HalleyInternet Engineering Task Force [Page 68]
a44c12b332b867f29631e235eb11d1263c73d6c0Bob HalleyRFC1123 MAIL -- SMTP & RFC-822 October 1989
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley 5.4 SMTP REQUIREMENTS SUMMARY
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | | | | |S| |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | | | | |H| |F
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | | | | |O|M|o
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | | |S| |U|U|o
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | | |H| |L|S|t
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | |M|O| |D|T|n
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | |U|U|M| | |o
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | |S|L|A|N|N|t
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | |T|D|Y|O|O|t
a44c12b332b867f29631e235eb11d1263c73d6c0Bob HalleyFEATURE |SECTION | | | |T|T|e
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley-----------------------------------------------|----------|-|-|-|-|-|--
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | | | | | | |
d98c74e2ec5b96bd22aa4ed6d893e8993787493bMichael GraffRECEIVER-SMTP: | | | | | | |
d98c74e2ec5b96bd22aa4ed6d893e8993787493bMichael Graff Implement VRFY |5.2.3 |x| | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Implement EXPN |5.2.3 | |x| | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley EXPN, VRFY configurable |5.2.3 | | |x| | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Implement SEND, SOML, SAML |5.2.4 | | |x| | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Verify HELO parameter |5.2.5 | | |x| | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Refuse message with bad HELO |5.2.5 | | | | |x|
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Accept explicit src-route syntax in env. |5.2.6 |x| | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Support "postmaster" |5.2.7 |x| | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Process RCPT when received (except lists) |5.2.7 | | |x| | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Long delay of RCPT responses |5.2.7 | | | | |x|
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | | | | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Add Received: line |5.2.8 |x| | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Received: line include domain literal |5.2.8 | |x| | | |
1a69a1a78cfaa86f3b68bbc965232b7876d4da2aDavid Lawrence Change previous Received: line |5.2.8 | | | | |x|
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Pass Return-Path info (final deliv/gwy) |5.2.8 |x| | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Support empty reverse path |5.2.9 |x| | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Send only official reply codes |5.2.10 | |x| | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Send text from RFC-821 when appropriate |5.2.10 | |x| | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley Delete "." for transparency |5.2.11 |x| | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Accept and recognize self domain literal(s) |5.2.17 |x| | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley | | | | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Error message about error message |5.3.1 | | | | |x|
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Keep pending listen on SMTP port |5.3.1.2 | |x| | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Provide limit on recv concurrency |5.3.1.2 | | |x| | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Wait at least 5 mins for next sender cmd |5.3.2 | |x| | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Avoidable delivery failure after "250 OK" |5.3.3 | | | | |x|
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Send error notification msg after accept |5.3.3 |x| | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Send using null return path |5.3.3 |x| | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Send to envelope return path |5.3.3 | |x| | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Send to null address |5.3.3 | | | | |x|
40f53fa8d9c6a4fc38c0014495e7a42b08f52481David Lawrence Strip off explicit src route |5.3.3 | |x| | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Minimize acceptance delay (RFC-1047) |5.3.3 |x| | | | |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley-----------------------------------------------|----------|-|-|-|-|-|--
a44c12b332b867f29631e235eb11d1263c73d6c0Bob HalleyInternet Engineering Task Force [Page 69]
a44c12b332b867f29631e235eb11d1263c73d6c0Bob HalleyRFC1123 MAIL -- SMTP & RFC-822 October 1989
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley | | | | | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob HalleySENDER-SMTP: | | | | | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley Canonicalized domain names in MAIL, RCPT |5.2.2 |x| | | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley Implement SEND, SOML, SAML |5.2.4 | | |x| | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley Send valid principal host name in HELO |5.2.5 |x| | | | |
45dadd25ba4b72ec2d8eecc342edc787d8421e3aBob Halley Send explicit source route in RCPT TO: |5.2.6 | | | |x| |
a44c12b332b867f29631e235eb11d1263c73d6c0Bob Halley Use only reply code to determine action |5.2.10 |x| | | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Use only high digit of reply code when poss. |5.2.10 | |x| | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Add "." for transparency |5.2.11 |x| | | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington | | | | | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Retry messages after soft failure |5.3.1.1 |x| | | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Delay before retry |5.3.1.1 |x| | | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Configurable retry parameters |5.3.1.1 |x| | | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Retry once per each queued dest host |5.3.1.1 | |x| | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Multiple RCPT's for same DATA |5.3.1.1 | |x| | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Support multiple concurrent transactions |5.3.1.1 | | |x| | |
0e27dac042d622ff9cde568a90347e1d53b9d784Andreas Gustafsson Provide limit on concurrency |5.3.1.1 | |x| | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington | | | | | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Timeouts on all activities |5.3.1 |x| | | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Per-command timeouts |5.3.2 | |x| | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Timeouts easily reconfigurable |5.3.2 | |x| | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Recommended times |5.3.2 | |x| | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Try alternate addr's in order |5.3.4 |x| | | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Configurable limit on alternate tries |5.3.4 | | |x| | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Try at least two alternates |5.3.4 | |x| | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Load-split across equal MX alternates |5.3.4 | |x| | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Use the Domain Name System |5.3.5 |x| | | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Support MX records |5.3.5 |x| | | | |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington Use WKS records in MX processing |5.2.12 | | | |x| |
c20ffa38dee7efa0dc01822d4bac5e41729b9b61Brian Wellington-----------------------------------------------|----------|-|-|-|-|-|--
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews | | | | | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark AndrewsMAIL FORWARDING: | | | | | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Alter existing header field(s) |5.2.6 | | | |x| |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Implement relay function: 821/section 3.6 |5.2.6 | | |x| | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews If not, deliver to RHS domain |5.2.6 | |x| | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Interpret 'local-part' of addr |5.2.16 | | | | |x|
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews | | | | | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark AndrewsMAILING LISTS AND ALIASES | | | | | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Support both |5.3.6 | |x| | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Report mail list error to local admin. |5.3.6 |x| | | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews | | | | | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark AndrewsMAIL GATEWAYS: | | | | | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Embed foreign mail route in local-part |5.2.16 | | |x| | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Rewrite header fields when necessary |5.3.7 | | |x| | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Prepend Received: line |5.3.7 |x| | | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Change existing Received: line |5.3.7 | | | | |x|
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Accept full RFC-822 on Internet side |5.3.7 | |x| | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Act on RFC-822 explicit source route |5.3.7 | | |x| | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark AndrewsInternet Engineering Task Force [Page 70]
081cff0c33514a5dc63ab794fc199c07377ab756Mark AndrewsRFC1123 MAIL -- SMTP & RFC-822 October 1989
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Send only valid RFC-822 on Internet side |5.3.7 |x| | | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Deliver error msgs to envelope addr |5.3.7 | |x| | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Set env return path from err return addr |5.3.7 | |x| | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews | | | | | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark AndrewsUSER AGENT -- RFC-822 | | | | | | |
081cff0c33514a5dc63ab794fc199c07377ab756Mark Andrews Allow user to enter <route> address |5.2.6 | | | |x| |
Accept and parse dot.dec. domain literals |5.2.17 |x| | | | |
Send/recv at least 64KB messages |5.3.8 |x| | | | |
the translation between printable (i.e., master file)
a list of alias/domain name pairs. The list can be
associated with different functions, e.g. one list for
(a) The local resolver/name server can implement
o ICMP Information Request/Reply messages
o ICMP Address Mask Request/Reply messages
management of applications (e.g., the ability to partially
[TELNET:15] "Telnet Protocol," MIL-STD-1782, U.S. Department of
[FTP:3] "File Transfer Protocol," MIL-STD-1780, U.S. Department of
[SMTP:6] "Simple Mail Transfer Protocol," MIL-STD-1781, U.S.
TCP/IP-based internets," M. Rose and K. McCloghrie, RFC-1065,
TCP/IP-based internets," M. Rose and K. McCloghrie, RFC-1066,
over TCP/IP," U. Warrier and L. Besaw, RFC-1095, April 1989.
USC/Information Sciences Institute