idnits 2.17.1 draft-ietf-msgtrk-mtqp-05.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing expiration date. The document expiration date should appear on the first and last page. ** The document is more than 15 pages and seems to lack a Table of Contents. == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack separate sections for Informative/Normative References. All references will be assumed normative when checking for downward references. ** There are 11 instances of too long lines in the document, the longest one being 16 characters in excess of 72. == There are 5 instances of lines with non-RFC2606-compliant FQDNs in the document. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (January 14, 2002) is 8138 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'POP3' is mentioned on line 135, but not defined == Missing Reference: 'NNTP' is mentioned on line 135, but not defined == Missing Reference: 'TLS' is mentioned on line 540, but not defined -- Possible downref: Non-RFC (?) normative reference: ref. 'RFC-SHA1' ** Obsolete normative reference: RFC 2234 (ref. 'RFC-ABNF') (Obsoleted by RFC 4234) ** Obsolete normative reference: RFC 2554 (ref. 'RFC-SMTPEXT') (Obsoleted by RFC 4954) ** Obsolete normative reference: RFC 2487 (ref. 'RFC-SMTP-TLS') (Obsoleted by RFC 3207) -- No information found for draft-ietf-msgtrk-smtpext- - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'DRAFT-TRACK-ESMTP' -- No information found for draft-ietf-msgtrk-model- - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'DRAFT-TRACK-MODEL' -- No information found for draft-ietf-msgtrk-trkstat- - is the name correct? -- Possible downref: Normative reference to a draft: ref. 'DRAFT-TRACK-TSN' ** Obsolete normative reference: RFC 2396 (ref. 'RFC-URI') (Obsoleted by RFC 3986) Summary: 9 errors (**), 0 flaws (~~), 6 warnings (==), 10 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Internet Draft T. Hansen 3 draft-ietf-msgtrk-mtqp-05.txt AT&T Laboratories 4 Valid for six months January 14, 2002 6 Message Tracking Query Protocol 8 10 Authors' version: 1.13 12 Status of this Memo 14 This document is an Internet-Draft and is in full conformance with 15 all provisions of Section 10 of RFC2026. 17 Internet-Drafts are working documents of the Internet Engineering 18 Task Force (IETF), its areas, and its working groups. Note that other 19 groups may also distribute working documents as Internet-Drafts. 21 Internet-Drafts are draft documents valid for a maximum of six 22 months and may be updated, replaced, or obsoleted by other documents at 23 any time. It is inappropriate to use Internet-Drafts as reference 24 material or to cite them other than as "work in progress." 26 The list of current Internet-Drafts can be accessed at 27 http://www.ietf.org/ietf/1id-abstracts.txt. 29 The list of Internet-Draft Shadow Directories can be accessed at 30 http://www.ietf.org/shadow.html. 32 This memo and its companions are discussed on the MSGTRK working 33 group mailing list, ietf-msgtrk@imc.org. To subscribe, send a message 34 with the word "subscribe" in the body (on a line by itself) to the 35 address ietf-msgtrk-request@imc.org. An archive of the mailing list may 36 be found at http://www.ietf.org/archive/msgtrk. 38 Copyright Notice 40 Copyright (C) The Internet Society (1999). All Rights Reserved. 42 Abstract 44 Customers buying enterprise message systems often ask: Can I track 45 the messages? Message tracking is the ability to find out the path that 46 a particular message has taken through a messaging system and the 47 current routing status of that message. This document describes the 48 Message Tracking Query Protocol that is used in conjunction with exten- 49 sions to the ESMTP protocol to provide a complete message tracking solu- 50 tion for the Internet. 52 1. Introduction 54 The Message Tracking Models and Requirements document [DRAFT- 55 TRACK-MODEL] discusses the models that message tracking solutions could 56 follow, along with requirements for a message tracking solution that can 57 be used with the Internet-wide message infrastructure. This memo and 58 its companions, [DRAFT-TRACK-ESMTP] and [DRAFT-TRACK-TSN], describe a 59 complete message tracking solution that satisfies those requirements. 60 The memo [DRAFT-TRACK-ESMTP] defines an extension to the SMTP service 61 that provides the information necessary to track messages. This memo 62 defines a protocol that can be used to query the status of messages that 63 have been transmitted on the Internet via SMTP. The memo [DRAFT-TRACK- 64 TSN] describes the message/tracking-status [RFC-MIME] media type that is 65 used to report tracking status information. Using the model document's 66 terminology, this solution uses active enabling and active requests with 67 both request and chaining referrals. 69 1.1. Terminology 71 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 72 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 73 document are to be interpreted as described in [RFC-KEYWORDS]. 75 All syntax descriptions use the ABNF specified by [RFC-ABNF]. Ter- 76 minal nodes not defined elsewhere in this document are defined in [RFC- 77 ABNF], [RFC-URI], [DRAFT-TRACK-ESMTP] or [RFC-SMTPEXT]. 79 1.2. Changes Made for -04 81 Reworked the SRV lookup description. 83 Other comments from the list. 85 Changes to the ABNF. 87 Changed "must" to "MUST" in section 4. 89 Changed "may" to "MAY" in section 4. 91 More examples. 93 Eliminated the registry of vnd. options. 95 Eliminated lots of unused references. 97 1.3. Changes Made for -03 99 Changed references. 101 Worked on error codes. 103 Made examples more real with secrets and hashes. 105 Fixes to examples. 107 Added dot-stuffed example. 109 Additional TLS info. 111 Better Security Considerations section. 113 1.4. Changes Made for -02 115 This section will be removed before publication. 117 Provided information on lookup for an MTQP server: SRV MTQP, then 118 MX, then A. 120 Provided a section on firewall considerations 122 Provided a section on service DNS considerations 124 At IANA's request, left the port number as XXXX and added more 125 information on the option registry. 127 Added text on various error conditions and fixed ABNF for error 128 response codes. 130 Fleshed out the tracking examples. 132 2. Basic Operation 134 The Message Tracking Query Protocol (MTQP) is similar to many other 135 line-oriented Internet protocols, such as [POP3] and [NNTP]. Initially, 136 the server host starts the MTQP service by listening on TCP port XXXX 137 (TBD by IANA). 139 When an MTQP client wishes to make use of the message tracking ser- 140 vice, it establishes a TCP connection with the server host, as recorded 141 from the initial message submission or as returned by a previous track- 142 ing request. To find the server host, the MTQP client first does an SRV 143 lookup for the server host using DNS SRV records, with a service name of 144 "mtqp" and a protocol name of "tcp", as in _mtqp._tcp.smtp3.example.com. 146 (See the "Usage rules" section in [RFC-SRV] for details.) If the SRV 147 records do not exist, the MTQP client then does an address record lookup 148 for the server host. 150 When the connection is established, the MTQP server sends a greet- 151 ing. The MTQP client and MTQP server then exchange commands and 152 responses (respectively) until the connection is closed or aborted. 154 2.1. Tracking Service DNS Considerations 156 Because of the ways server host lookups are performed, many dif- 157 ferent tracking server host configurations are supported. 159 A mail system that uses a single mail server host and has the MTQP 160 server host on the same server host will most likely have a single MX 161 record pointing at the server host, and if not, will have an address 162 record. Both mail and MTQP clients will access that host directly. 164 A mail system that uses a single mail server host, but wants track- 165 ing queries to be performed on a different machine, MUST have an SRV 166 MTQP record pointing at that different machine. 168 A mail system that uses multihomed mail servers has two choices for 169 providing tracking services: either all mail servers must be running 170 tracking servers that are able to retrieve information on all messages, 171 or the tracking service must be performed on one (or more) machine(s) 172 that are able to retrieve information on all messages. In the former 173 case, no additional DNS records are needed beyond the MX records already 174 in place for the mail system. In the latter case, SRV MTQP records are 175 needed that point at the machine(s) that are running the tracking ser- 176 vice. In both cases, note that the tracking service MUST be able to 177 handle the queries for all messages accepted by that mail system. 179 2.2. Commands 181 Commands in MTQP consist of a case-insensitive keyword, possibly 182 followed by one or more parameters. All commands are terminated by a 183 CRLF pair. Keywords and parameters consist of printable ASCII charac- 184 ters. Keywords and parameters are separated by whitespace (one or more 185 space or tab characters). A command line is limited to 998 characters 186 before the CRLF. 188 2.3. Responses 190 Responses in MTQP consist of a status indicator that indicates suc- 191 cess or failure. Successful commands may also be followed by additional 192 lines of data. All response lines are terminated by a CRLF pair and are 193 limited to 998 characters before the CRLF. There are several status 194 indicators: "+OK" indicates success; "+OK+" indicates a success fol- 195 lowed by additional lines of data, a multi-line success response; "- 196 TEMP" indicates a temporary failure; "-ERR" indicates a permanent 197 failure; and "-BAD" indicates a protocol error (such as for unrecognized 198 commands). 200 A status indicator MAY be followed by a series of machine-parsable, 201 case-insensitive response information giving more data about the errors. 202 These are separated from the status indicator and each other by a single 203 slash character ("/", decimal code 47). Following that, there MAY be 204 white space and a human-readable text message. The human-readable text 205 message is not intended to be presented to the end user, but should be 206 appropriate for putting in a log for use in debugging problems. 208 In a multi-line success response, each subsequent line is ter- 209 minated by a CRLF pair and limited to 998 characters before the CRLF. 210 When all lines of the response have been sent, a final line is sent con- 211 sisting of a single period (".", decimal code 046) and a CRLF pair. If 212 any line of the multi-line response begins with a period, the line is 213 "dot-stuffed" by prepending the period with a second period. When exa- 214 mining a multi-line response, the client checks to see if the line 215 begins with a period. If so, and octets other than CRLF follow, the 216 first octet of the line (the period) is stripped away. If so, and if 217 CRLF immediately follows the period, then the response from the MTQP 218 server is ended and the line containing the ".CRLF" is not considered 219 part of the multi-line response. 221 An MTQP server MUST respond to an unrecognized, unimplemented, or 222 syntactically invalid command by responding with a negative -BAD status 223 indicator. A server MUST respond to a command issued when the session 224 is in an incorrect state by responding with a negative -ERR status indi- 225 cator. 227 2.4. Optional Timers 229 An MTQP server MAY have an inactivity autologout timer. Such a 230 timer MUST be of at least 10 minutes in duration. The receipt of any 231 command from the client during that interval should suffice to reset the 232 autologout timer. An MTQP server MAY limit the number of commands, 233 unrecognized commands, or total connection time, or MAY use other cri- 234 teria, to prevent denial of service attacks. 236 2.5. Firewall Considerations 238 A firewall mail gateway has two choices when receiving a tracking 239 query for a host within its domain: it may return a response to the 240 query that says the message has been passed on, but no further informa- 241 tion is available; or it may perform a chaining operation itself, 242 gathering information on the message from the mail hosts behind the 243 firewall, and returning to the MTQP client the information for each 244 behind-the-firewall hop, or possibly just the final hop information, 245 possibly also disguising the names of any hosts behind the firewall. 246 Which option is picked is an administrative decision and is not further 247 mandated by this document. 249 3. Initialization and Option Response 251 Once the TCP connection has been opened by an MTQP client, the MTQP 252 server issues an initial status response that indicates its readiness. 253 If the status response is positive (+OK or +OK+), the client may proceed 254 with other commands. 256 The initial status response MUST include the response information 257 "/MTQP". Negative responses MUST include a reason code as response 258 information. The following reason codes are defined here; unrecognized 259 reason codes added in the future may be treated as equivalent to "una- 260 vailable". 261 "/" "unavailable" 262 "/" "admin" 264 The reason code "/admin" SHOULD be used when the service is una- 265 vailable for administrative reasons. The reason code "/unavailable" 266 SHOULD be used when the service is unavailable for other reasons. 268 If the server has any options enabled, they are listed as the 269 multi-line response of the initial status response, one per line. An 270 option specification consists of an identifier, optionally followed by 271 option-specific parameters. An option specification may be continued 272 onto additional lines by starting the continuation lines with white 273 space. The option identifier is case insensitive. Option identifiers 274 beginning with the characters "vnd." are reserved for vendor use. (See 275 below.) 277 One option specification is defined here: 279 STARTTLS 281 This capability MUST be listed if the optional STARTTLS command is sup- 282 ported by the MTQP server. It has no parameters. 284 Example #1 (no options): 285 S: +OK/MTQP MTQP server ready 287 Example #2 (service temporarily unavailable): 288 S: -TEMP/MTQP/admin Service down for admin, call back later 289 Example #3 (service permanently unavailable): 290 S: -ERR/MTQP/unavailable Service down 292 Example #4 (alternative for no options): 293 S: +OK+/MTQP MTQP server ready 294 S: . 296 Example #5 (options available): 297 S: +OK+/MTQP MTQP server ready 298 S: starttls 299 S: vnd.com.example.option2 with parameters private to example.com 300 S: vnd.com.example.option3 with a very long 301 S: list of parameters 302 S: . 304 4. TRACK Command 306 Syntax: 307 "TRACK" 1*WSP envid 1*WSP mtrk-secret CRLF 309 mtrk-secret = base64 311 Envid is defined in [DRAFT-TRACK-ESMTP]. Mtrk-secret is the secret 312 A described in [DRAFT-TRACK-ESMTP], encoded using base64. 314 When the client issues the TRACK command, and the user is vali- 315 dated, the MTQP server retrieves tracking information about an email 316 message. To validate the user, the value of mtrk-secret is hashed using 317 SHA1, as described in [RFC-SHA1]. The hash value is then compared with 318 the value passed with the message when it was originally sent. If the 319 hash values match, the user is validated. 321 A successful response MUST be multi-line, consisting of a [RFC- 322 MIME] body part. The MIME body part MUST be of type multipart/related, 323 with subparts of message/tracking-status, as defined in [DRAFT-TRACK- 324 TSN]. The response contains the tracking information about the email 325 message that used the given tracking-id. 327 In each of the examples below, the envid is "<12345- 328 20010101@example.com>", the secret A is "abcdefgh", and the SHA1 hash B 329 is (in hex) "734ba8b31975d0dbae4d6e249f4e8da270796c94". The message 330 came from example.com and the MTQP server is example2.com. 332 Example #6 Message Delivered: 333 C: TRACK <12345-20010101@example.com> YWJjZGVmZ2gK 334 S: +OK+ Tracking information follows 335 S: Content-Type: multipart/related; boundary=%%%%; type=tracking-status 336 S: 337 S: --%%%% 338 S: Content-Type: message/tracking-status 339 S: 340 S: Original-Envelope-Id: 12345-20010101@example.com 341 S: Reporting-MTA: dns; example2.com 342 S: Arrival-Date: Mon, 1 Jan 2001 15:15:15 -0500 343 S: 344 S: Original-Recipient: rfc822; user1@example1.com 345 S: Final-Recipient: rfc822; user1@example1.com 346 S: Action: delivered 347 S: Status: 2.5.0 348 S: 349 S: --%%%%-- 350 S: . 352 Example #7 Message Transferred: 353 C: TRACK <12345-20010101@example.com> YWJjZGVmZ2gK 354 S: +OK+ Tracking information follows 355 S: Content-Type: multipart/related; boundary=%%%%; type=tracking-status 356 S: 357 S: --%%%% 358 S: Content-Type: message/tracking-status 359 S: 360 S: Original-Envelope-Id: 12345-20010101@example.com 361 S: Reporting-MTA: dns; example2.com 362 S: Arrival-Date: Mon, 1 Jan 2001 15:15:15 -0500 363 S: 364 S: Original-Recipient: rfc822; user1@example1.com 365 S: Final-Recipient: rfc822; user1@example1.com 366 S: Action: transferred 367 S: Remote-MTA: dns; example3.com 368 S: Last-Attempt-Date: Mon, 1 Jan 2001 19:15:03 -0500 369 S: Status: 2.4.0 370 S: 371 S: --%%%%-- 372 S: . 374 Example #8 Message Delayed and a Dot-Stuffed Header: 375 C: TRACK <12345-20010101@example.com> YWJjZGVmZ2gK 376 S: +OK+ Tracking information follows 377 S: Content-Type: multipart/related; boundary=%%%%; type=tracking-status 378 S: ..Dot-Stuffed-Header: as an example 379 S: 380 S: --%%%% 381 S: Content-Type: message/tracking-status 382 S: 383 S: Original-Envelope-Id: 12345-20010101@example.com 384 S: Reporting-MTA: dns; example2.com 385 S: Arrival-Date: Mon, 1 Jan 2001 15:15:15 -0500 386 S: 387 S: Original-Recipient: rfc822; user1@example1.com 388 S: Final-Recipient: rfc822; user1@example1.com 389 S: Action: delayed 390 S: Status: 4.4.1 (No answer from host) 391 S: Remote-MTA: dns; example3.com 392 S: Last-Attempt-Date: Mon, 1 Jan 2001 19:15:03 -0500 393 S: Will-Retry-Until: Thu, 4 Jan 2001 15:15:15 -0500 394 S: 395 S: --%%%%-- 396 S: . 398 Example #9 Two Users, One Relayed, One Failed: 399 C: TRACK <12345-20010101@example.com> YWJjZGVmZ2gK 400 S: +OK+ Tracking information follows 401 S: Content-Type: multipart/related; boundary=%%%%; type=tracking-status 402 S: 403 S: --%%%% 404 S: Content-Type: message/tracking-status 405 S: 406 S: Original-Envelope-Id: 12345-20010101@example.com 407 S: Reporting-MTA: dns; example2.com 408 S: Arrival-Date: Mon, 1 Jan 2001 15:15:15 -0500 409 S: 410 S: Original-Recipient: rfc822; user1@example1.com 411 S: Final-Recipient: rfc822; user1@example1.com 412 S: Action: relayed 413 S: Status: 2.1.9 414 S: Remote-MTA: dns; example3.com 415 S: Last-Attempt-Date: Mon, 1 Jan 2001 19:15:03 -0500 416 S: 417 S: Original-Recipient: rfc822; user2@example1.com 418 S: Final-Recipient: rfc822; user2@example1.com 419 S: Action: failed 420 S: Status 5.2.2 (Mailbox full) 421 S: Remote-MTA: dns; example3.com 422 S: Last-Attempt-Date: Mon, 1 Jan 2001 19:15:03 -0500 423 S: 424 S: --%%%%-- 425 S: . 427 Example #10 Firewall: 428 C: TRACK <12345-20010101@example.com> YWJjZGVmZ2gK 429 S: +OK+ Tracking information follows 430 S: Content-Type: multipart/related; boundary=%%%%; type=tracking-status 431 S: 433 S: --%%%% 434 S: Content-Type: message/tracking-status 435 S: 436 S: Original-Envelope-Id: 12345-20010101@example.com 437 S: Reporting-MTA: dns; example2.com 438 S: Arrival-Date: Mon, 1 Jan 2001 15:15:15 -0500 439 S: 440 S: Original-Recipient: rfc822; user1@example1.com 441 S: Final-Recipient: rfc822; user1@example1.com 442 S: Action: relayed 443 S: Status: 2.1.9 444 S: Remote-MTA: dns; smtp.example3.com 445 S: Last-Attempt-Date: Mon, 1 Jan 2001 19:15:03 -0500 446 S: 447 S: --%%%% 448 S: Content-Type: message/tracking-status 449 S: 450 S: Original-Envelope-Id: 12345-20010101@example.com 451 S: Reporting-MTA: dns; smtp.example3.com 452 S: Arrival-Date: Mon, 1 Jan 2001 15:15:15 -0500 453 S: 454 S: Original-Recipient: rfc822; user2@example1.com 455 S: Final-Recipient: rfc822; user4@example3.com 456 S: Action: delivered 457 S: Status: 2.5.0 458 S: 459 S: --%%%%-- 460 S: . 462 Example #11 Firewall, Combining Per-Recipient Blocks: 463 C: TRACK <12345-20010101@example.com> YWJjZGVmZ2gK 464 S: +OK+ Tracking information follows 465 S: Content-Type: multipart/related; boundary=%%%%; type=tracking-status 466 S: 467 S: --%%%% 468 S: Content-Type: message/tracking-status 469 S: 470 S: Original-Envelope-Id: 12345-20010101@example.com 471 S: Reporting-MTA: dns; example2.com 472 S: Arrival-Date: Mon, 1 Jan 2001 15:15:15 -0500 473 S: 474 S: Original-Recipient: rfc822; user1@example1.com 475 S: Final-Recipient: rfc822; user1@example1.com 476 S: Action: relayed 477 S: Status: 2.1.9 478 S: Remote-MTA: dns; smtp.example3.com 479 S: Last-Attempt-Date: Mon, 1 Jan 2001 19:15:03 -0500 480 S: 482 S: Original-Recipient: rfc822; user2@example1.com 483 S: Final-Recipient: rfc822; user4@example3.com 484 S: Action: delivered 485 S: Status: 2.5.0 486 S: 487 S: --%%%%-- 488 S: . 490 Example #12 Firewall, Hiding System Names Behind the Firewall: 491 C: TRACK <12345-20010101@example.com> YWJjZGVmZ2gK 492 S: +OK+ Tracking information follows 493 S: Content-Type: multipart/related; boundary=%%%%; type=tracking-status 494 S: 495 S: --%%%% 496 S: Content-Type: message/tracking-status 497 S: 498 S: Original-Envelope-Id: 12345-20010101@example.com 499 S: Reporting-MTA: dns; example2.com 500 S: Arrival-Date: Mon, 1 Jan 2001 15:15:15 -0500 501 S: 502 S: Original-Recipient: rfc822; user1@example1.com 503 S: Final-Recipient: rfc822; user1@example1.com 504 S: Action: relayed 505 S: Status: 2.1.9 506 S: Remote-MTA: dns; example2.com 507 S: Last-Attempt-Date: Mon, 1 Jan 2001 19:15:03 -0500 508 S: 509 S: --%%%% 510 S: Content-Type: message/tracking-status 511 S: 512 S: Original-Envelope-Id: 12345-20010101@example.com 513 S: Reporting-MTA: dns; example2.com 514 S: Arrival-Date: Mon, 1 Jan 2001 15:15:15 -0500 515 S: 516 S: Original-Recipient: rfc822; user2@example1.com 517 S: Final-Recipient: rfc822; user4@example1.com 518 S: Action: delivered 519 S: Status: 2.5.0 520 S: 521 S: --%%%%-- 522 S: . 524 5. COMMENT Command 526 Syntax: 527 "COMMENT" opt-text CRLF 529 opt-text = [WSP *(VCHAR / WSP)] 531 When the client issues the COMMENT command, the MTQP server MUST 532 respond with a successful response (+OK or +OK+). All optional text 533 provided with the COMMENT command are ignored. 535 6. STARTTLS Command 537 Syntax: 538 "STARTTLS" CRLF 540 TLS [TLS], more commonly known as SSL, is a popular mechanism for 541 enhancing TCP communications with privacy and authentication. An MTQP 542 server MAY support TLS. If an MTQP server supports TLS, it MUST include 543 "STARTTLS" in the option specifications list on protocol startup. 545 If the server returns a negative response, it MAY use one of the 546 following response codes: 547 "/" "unsupported" 548 "/" "unavailable" 549 "/" "tlsinprogress" 551 If TLS is not supported, then a response code of "/unsupported" 552 SHOULD be used. If TLS is not available for some other reason, then a 553 response code of "/unavailable" SHOULD be used. If a TLS session is 554 already in progress, then it is a protocol error and "-BAD" MUST be 555 returned with a response code of "/tlsinprogress". 557 After receiving a positive response to a STARTTLS command, the 558 client MUST start the TLS negotiation before giving any other MTQP com- 559 mands. 561 If the MTQP client is using pipelining (see below), the STARTTLS 562 command must be the last command in a group. 564 6.1. Processing After the STARTTLS Command 566 If the TLS handshake fails, the server SHOULD abort the connection. 568 After the TLS handshake has been completed, both parties MUST 569 immediately decide whether or not to continue based on the authentica- 570 tion and privacy achieved. The MTQP client and server may decide to move 571 ahead even if the TLS negotiation ended with no authentication and/or no 572 privacy because most MTQP services are performed with no authentication 573 and no privacy, but some MTQP clients or servers may want to continue 574 only if a particular level of authentication and/or privacy was 575 achieved. 577 If the MTQP client decides that the level of authentication or 578 privacy is not high enough for it to continue, it SHOULD issue an MTQP 579 QUIT command immediately after the TLS negotiation is complete. If the 580 MTQP server decides that the level of authentication or privacy is not 581 high enough for it to continue, it SHOULD reply to every MTQP command 582 from the client (other than a QUIT command) with a negative "-ERR" 583 response and a response code of "/insecure". 585 6.2. Result of the STARTTLS Command 587 Upon completion of the TLS handshake, the MTQP protocol is reset to 588 the initial state (the state in MTQP after a server starts up). The 589 server MUST discard any knowledge obtained from the client prior to the 590 TLS negotiation itself. The client MUST discard any knowledge obtained 591 from the server, such as the list of MTQP options, which was not 592 obtained from the TLS negotiation itself. 594 At the end of the TLS handshake, the server acts as if the connec- 595 tion had been initiated and responds with an initial status response 596 and, optionally, a list of server options. The list of MTQP server 597 options received after the TLS handshake MUST be different than the list 598 returned before the TLS handshake. In particular, a server MUST NOT 599 return the STARTTLS option in the list of server options after a TLS 600 handshake has completed. 602 Both the client and the server MUST know if there is a TLS session 603 active. A client MUST NOT attempt to start a TLS session if a TLS ses- 604 sion is already active. 606 7. QUIT Command 608 Syntax: 609 "QUIT" CRLF 611 When the client issues the QUIT command, the MTQP session ter- 612 minates. The QUIT command has no parameters. The server MUST respond 613 with a successful response. The client MAY close the session from its 614 end immediately after issuing this command (if the client is on an 615 operating system where this does not cause problems). 617 8. Pipelining 619 The MTQP client may elect to transmit groups of MTQP commands in 620 batches without waiting for a response to each individual command. The 621 MTQP server MUST process the commands in the order received. 623 Specific commands may place further constraints on pipelining. For 624 example, STARTTLS must be the last command in a batch of MTQP commands. 626 The following two examples are identical: 628 Example #13 : 629 C: TRACK YWJjZGVmZ2gK 630 S: +OK+ Tracking information follows 631 S: 632 S: ... tracking details #1 go here ... 633 S: . 634 C: TRACK QUJDREVGR0gK 635 S: +OK+ Tracking information follows 636 S: 637 S: ... tracking details #2 go here ... 638 S: . 640 Example #14 : 641 C: TRACK YWJjZGVmZ2gK 642 C: TRACK QUJDREVGR0gK 643 S: +OK+ Tracking information follows 644 S: 645 S: ... tracking details #1 go here ... 646 S: . 647 S: +OK+ Tracking information follows 648 S: 649 S: ... tracking details #2 go here ... 650 S: . 652 9. URL Format 654 The MTQP URL scheme is used to designate MTQP servers on Internet 655 hosts accessible using the MTQP protocol. An MTQP URL takes one of the 656 following forms: 658 mtqp:///track// 659 mtqp://:/track// 661 The first form is used to refer to an MTQP server on the standard 662 port, while the second form specifies a non-standard port. Both of 663 these forms specify that the TRACK command is to be issued using the 664 given tracking id (envid) and authorization secret (mtrk-secret). The 665 path element "/track/" is case insensitive, but the envid and mtrk- 666 secret may not be. 668 9.1. MTQP URL Syntax 670 This is an ABNF description of the MTQP URL. 672 mtqp-url = "mtqp://" net_loc "/track/" envid "/" mtrk-secret 674 10. IANA Considerations 676 System port number XXXX - TBD by IANA 678 The service name to be registered with the Internet Assigned Number 679 Authority (IANA) is "MTQP". 681 This document requests that IANA maintain one new registry: MTQP 682 options. The registry's purpose is to register options to this proto- 683 col. Options whose names do not begin with "vnd." MUST be defined in a 684 standards track or IESG approved experimental RFC. New MTQP options 685 MUST include the following information as part of their definition: 687 option identifier 688 option parameters 689 added commands 690 standard commands affected 691 specification reference 692 discussion 694 One MTQP option is defined in this document: 695 option identifier: STARTTLS 696 option parameters: none 697 added commands: STARTTLS 698 standard commands affected: none 699 specification reference: RFC TBD 700 discussion: see RFC TBD 702 Additional vendor-specific options for this protocol have names 703 that begin with "vnd.". After the "vnd." would appear the reversed 704 domain name of the vendor, another dot ".", and a name for the option 705 itself. For example, "vnd.com.example.extinfo" might represent a 706 vendor-specific extension providing extended information by the owner of 707 the "example.com" domain. These names MAY be registered with IANA. 709 11. Security Considerations 711 If the originator of a message were to delegate his or her tracking 712 request to a third party, this would be vulnerable to snooping over 713 unencrypted sessions. The user can decide on a message-by-message basis 714 if this risk is acceptable. 716 The security of tracking information is dependent on the randomness 717 of the secret chosen for each message and the level of exposure of that 718 secret. If different secrets are used for each message, then the max- 719 imum exposure from tracking any message will be that single message for 720 the time that the tracking information is kept on any MTQP server. If 721 this level of exposure is too much, TLS may be used to reduce the 722 exposure further. 724 It should be noted that message tracking is not an end-to-end 725 mechanism. Thus, if an MTQP client/server pair decide to use TLS 726 privacy, they are not securing tracking queries with any prior or suc- 727 cessive MTQP servers. 729 Both the MTQP client and server must check the result of the TLS 730 negotiation to see whether acceptable authentication or privacy was 731 achieved. Ignoring this step completely invalidates using TLS for secu- 732 rity. The decision about whether acceptable authentication or privacy 733 was achieved is made locally, is implementation-dependent, and is beyond 734 the scope of this document. 736 The MTQP client and server should note carefully the result of the 737 TLS negotiation. If the negotiation results in no privacy, or if it 738 results in privacy using algorithms or key lengths that are deemed not 739 strong enough, or if the authentication is not good enough for either 740 party, the client may choose to end the MTQP session with an immediate 741 QUIT command, or the server may choose to not accept any more MTQP com- 742 mands. 744 A man-in-the-middle attack can be launched by deleting the 745 "STARTTLS" option response from the server. This would cause the client 746 not to try to start a TLS session. An MTQP client can protect against 747 this attack by recording the fact that a particular MTQP server offers 748 TLS during one session and generating an alarm if it does not appear in 749 an option response for a later session. 751 If TLS is not used, a tracking request is vulnerable to replay 752 attacks, such that a snoop can later replay the same handshake again to 753 potentially gain more information about a message's status. 755 Before the TLS handshake has begun, any protocol interactions are 756 performed in the clear and may be modified by an active attacker. For 757 this reason, clients and servers MUST discard any knowledge obtained 758 prior to the start of the TLS handshake upon completion of the TLS 759 handshake. 761 If a client/server pair successfully performs a TLS handshake and 762 the server does chaining referrals, then the server SHOULD attempt to 763 negotiate TLS at the same security level at the next hop. In a hop-by- 764 hop scenario, STARTTLS is a request for "best effort" security and 765 should be treated as such. 767 SASL is not used because authentication is per message rather than 768 per user. 770 12. Protocol Syntax 772 This is a collected ABNF description of the MTQP protocol. 773 conversation = command-response *( client-command command-response ) 775 # client side 776 client-command = track-command / starttls-command / quit-command / comment-command 778 track-command = "TRACK" 1*WS envid 1*WS mtrk-secret CRLF 780 mtrk-secret = base64 782 starttls-command = "STARTTLS" CRLF 784 quit-command = "QUIT" CRLF 786 comment-command = "COMMENT" opt-text CRLF 788 # server side 789 command-response = success-response / temp-response / error-response / bad-response 791 temp-response = "-TEMP" response-info opt-text CRLF 793 opt-text = [WSP *(VCHAR / WSP)] 795 error-response = "-ERR" response-info opt-text CRLF 797 bad-response = "-BAD" response-info opt-text CRLF 799 success-response = single-line-success / multi-line-success 801 single-line-success = "+OK" response-info opt-text CRLF 803 multi-line-success = "+OK+" response-info opt-text CRLF *dataline dotcrlf 805 dataline = *998OCTET CRLF 807 dotcrlf = "." CRLF 809 option-list = *option-line 811 option-line = identifier opt-text *(CRLF WSP opt-text) CRLF 813 NAMECHAR = ALPHA / DIGIT / "-" / "_" 815 identifier = (ALPHA / "_") *NAMECHAR) 817 response-info = *( "/" ( "admin" / "unavailable" / "unsupported" / 818 "tlsinprogress" / "insecure" / 1*NAMECHAR ) ) 820 13. Acknowledgements 822 The description of STARTTLS is based on [RFC-SMTP-TLS]. 824 14. References 826 [RFC-SHA1] RFC TBD, D. Eastlake & P. Jones, "US Secure Hash Stan- 827 dard 1 (SHA1)", TBD 2001. 829 [RFC-MIME] RFC 2045, N. Freed & N. Borenstein, "Multipurpose Inter- 830 net Mail Extensions (MIME) Part One: Format of Internet Message Bodies", 831 Innosoft, First Virtual, November 1996. 833 [RFC-ABNF] RFC 2234, D. Crocker, Editor, and P. Overell, "Augmented 834 BNF for Syntax Specifications: ABNF", Internet Mail Consortium, Demon 835 Internet Ltd., November 1997. 837 [RFC-KEYWORDS] RFC 2119, S. Bradner, "Key words for use in RFCs to 838 Indicate Requirement Levels", Harvard University, March 1997. 840 [RFC-SMTPEXT] RFC 2554, J. Myers, "SMTP Service Extension for 841 Authentication", Netscape Communications, March 1999. 843 [RFC-SMTP-TLS] RFC2487, P. Hoffman, "SMTP Service Extension for 844 Secure SMTP over TLS", Internet Mail Consortium, January 1999. 846 [RFC-SRV] RFC 2782, A. Gulbrandsen, P. Vixie, L. Esibov, "A DNS RR 847 for specifying the location of services (DNS SRV)" Troll Technologies, 848 Internet Software Consortium, Microsoft Corp., February 2000 850 [DRAFT-TRACK-ESMTP] draft-ietf-msgtrk-smtpext-*.txt, E. Allman, T. 851 Hansen, "SMTP Service Extension for Message Tracking", Sendmail, Inc., 852 AT&T Laboratories, TBD 2001. 854 [DRAFT-TRACK-MODEL] draft-ietf-msgtrk-model-*.txt, T. Hansen, "Mes- 855 sage Tracking Models and Requirements", AT&T Laboratories, TBD 2001. 857 [DRAFT-TRACK-TSN] draft-ietf-msgtrk-trkstat-*.txt, E. Allman, "The 858 Message/Tracking-Status MIME Extension", Sendmail, Inc., TBD 2001. 860 [RFC-URI] RFC 2396, T. Berners-Lee, R. Fielding, L. Masinter, "Uni- 861 form Resource Identifiers (URI): Generic Syntax", MIT/LCS, U. C. Irvine, 862 Xerox Corporation, August 1998. 864 15. Author's Address 866 Tony Hansen 867 AT&T Laboratories 868 Lincroft, NJ 07738 869 USA 871 Phone: +1.732.576.3207 872 E-Mail: tony@att.com 874 16. Full Copyright Statement 876 Copyright (C) The Internet Society (1999). All Rights Reserved. 878 This document and translations of it may be copied and furnished to 879 others, and derivative works that comment on or otherwise explain it or 880 assist in its implementation may be prepared, copied, published and dis- 881 tributed, in whole or in part, without restriction of any kind, provided 882 that the above copyright notice and this paragraph are included on all 883 such copies and derivative works. However, this document itself may not 884 be modified in any way, such as by removing the copyright notice or 885 references to the Internet Society or other Internet organizations, 886 except as needed for the purpose of developing Internet standards in 887 which case the procedures for copyrights defined in the Internet Stan- 888 dards process must be followed, or as required to translate it into 889 languages other than English. 891 The limited permissions granted above are perpetual and will not be 892 revoked by the Internet Society or its successors or assigns. 894 This document and the information contained herein is provided on 895 an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 896 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT 897 NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL 898 NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR 899 FITNESS FOR A PARTICULAR PURPOSE. 901 This document expires July 14, 2002.