idnits 2.17.1 draft-ietf-nntpext-base-09.txt: ** The Abstract section seems to be numbered Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Cannot find the required boilerplate sections (Copyright, IPR, etc.) in this document. Expected boilerplate is as follows today (2024-04-18) according to https://trustee.ietf.org/license-info : IETF Trust Legal Provisions of 28-dec-2009, Section 6.a: This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 2: Copyright (c) 2024 IETF Trust and the persons identified as the document authors. All rights reserved. IETF Trust Legal Provisions of 28-dec-2009, Section 6.b(i), paragraph 3: This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** Missing document type: Expected "INTERNET-DRAFT" in the upper left hand corner of the first page ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. ** The document seems to lack a 1id_guidelines paragraph about 6 months document validity -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document seems to lack a 1id_guidelines paragraph about the list of current Internet-Drafts -- however, there's a paragraph with a matching beginning. Boilerplate error? ** The document seems to lack a 1id_guidelines paragraph about the list of Shadow Directories. ** 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 == The page length should not exceed 58 lines per page, but there was 7 longer pages, the longest (page 60) being 71 lines == It seems as if not all pages are separated by form feeds - found 0 form feeds but 60 pages Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an Abstract section. (A line matching the expected section header was found, but with an unexpected indentation: ' 2. Abstract' ) ** The document seems to lack a Security Considerations section. (A line matching the expected section header was found, but with an unexpected indentation: ' 14. Security Considerations' ) ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The document seems to lack an Authors' Addresses Section. ** There are 391 instances of too long lines in the document, the longest one being 3 characters in excess of 72. ** The abstract seems to contain references ([2], [3], [4], [0-9a-zA-Z], [5], [6], [C], [7], [8], [9], [GMT], [S], [XX], [1]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. == There are 6 instances of lines with non-RFC2606-compliant FQDNs in the document. == There are 4 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- -- 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 (November 1999) is 8921 days in the past. Is this intentional? 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 section? '1' on line 62 looks like a reference -- Missing reference section? '2' on line 65 looks like a reference -- Missing reference section? '3' on line 66 looks like a reference -- Missing reference section? '4' on line 81 looks like a reference -- Missing reference section? '5' on line 261 looks like a reference -- Missing reference section? '0-9a-zA-Z' on line 303 looks like a reference -- Missing reference section? 'GMT' on line 2664 looks like a reference -- Missing reference section? '6' on line 326 looks like a reference -- Missing reference section? 'C' on line 2707 looks like a reference -- Missing reference section? 'S' on line 2709 looks like a reference -- Missing reference section? '7' on line 2116 looks like a reference -- Missing reference section? '8' on line 2547 looks like a reference -- Missing reference section? '9' on line 2804 looks like a reference Summary: 14 errors (**), 0 flaws (~~), 5 warnings (==), 15 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 INTERNET DRAFT S. Barber 2 Expires: May 14, 2000 Academ Consulting Services 3 November 1999 5 Network News Transport Protocol 7 draft-ietf-nntpext-base-09.txt 9 1. Status of this Document 11 This document is an Internet-Draft and is in full conformance 12 with Section 10 of RFC 2026. Internet-Drafts are working 13 documents of the Internet Engineering Task Force (IETF), its 14 areas, and its working groups. Note that other groups may 15 also distribute working documents as Internet-Drafts. 17 Internet-Drafts are draft documents valid for a maximum of six 18 months and may be updated, replaced, or made obsolete by other 19 documents at any time. It is inappropriate to use Internet- 20 Drafts as reference material or to cite them other than as 21 "work in progress." 23 The list of current Internet-Drafts can be accesses at 24 http://www.ietf.org/ietf/1id-abstracts.txt. 26 The list of Internet-Draft shadow directories can be accessed 27 at http://www.ietf.org/shadow.html. 29 This section will be updated with the appropriate verbiage 30 from RFC 2223 should this document has been found ready for 31 publication as an RFC. 33 This document is a product of the NNTP Working Group, chaired 34 by Ned Freed and Stan Barber. 36 2. Abstract 37 The Network News Transport Protocol has been in use in the 38 Internet for a decade and remains one of the most popular 39 protocols (by volume) in use today. This document is a 40 replacement for RFC 977 and officially updates the protocol 41 specification. It clarifies some vagueness in RFC 977, 42 includes some new base functionality and provides a specific 43 mechanism to add standardized extensions to NNTP. 45 3. Introduction 46 This document specifies the Network News Transport Protocol 47 (NNTP), which is used for the distribution, inquiry, 48 retrieval, and posting of net news articles using a reliable 49 stream-based mechanism. For news reading clients, NNTP enables 50 retrieval of news articles that are stored in a central 51 database, giving subscribers the ability to select only those 52 articles they wish to read. 54 The netnews model provides for indexing, cross-referencing, 55 and expiration of aged messages. For server-to-server 56 interaction, NNTP is designed for efficient transmission of 57 net news articles over a reliable full duplex communication 58 method. 60 Every attempt is made to insure that the protocol 61 specification in this document is compatible with the version 62 specified in RFC 977[1]. However, this version does not 63 support the ill-defined SLAVE command and permits four digit 64 years to be specified in the NEWNEWS and NEWGROUPS commands. 65 It changes the default character set to UTF-8[2] instead of 66 US-ASCII[3]. It also extends the newsgroup name matching 67 capabilities already documented in RFC 977. 69 Generally, new functionality is available using new keywords. 70 Part of that new functionality involves a mechanism to 71 discover what new functionality is available to clients from a 72 server. 74 This mechanism can also be used to add more functionality as 75 needs merit such additions. 77 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL 78 NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and 79 "OPTIONAL" in this document are to be interpreted as described 80 in RFC 2119[4]. 82 An implementation is not compliant if it fails to satisfy one 83 or more of the MUST requirements for this protocol. An 84 implementation that satisfies all the MUST and all the SHOULD 85 requirements for its protocols is said to be "unconditionally 86 compliant"; one that satisfies all the MUST requirements but 87 not all the SHOULD requirements for NNTP is said to be 88 "conditionally compliant". 90 For the remainder of this memo, the term "client host" refers 91 to a host making use of the NNTP service, while the term 92 "server host" refers to a host that offers the NNTP service. 93 In addition, where examples of interactions between a client 94 host and a server host are provided a "[C]" will be used to 95 represent the client host and a "[S]" will be used to 96 represent the server host. 98 4. Basic Operation. 100 Every NNTP session MUST involve the following in this order: 102 CONNECTION 103 GREETING 104 DISCONNECTION 105 Other steps may occur between the GREETING and DISCONNECTION 106 step. They are: 108 CAPABILITIES DISCOVERY 109 NEWS EXCHANGE 110 CONCLUSION 112 NNTP operates over any reliable data stream 8-bit-wide 113 channel. When running over TCP/IP, the official port for the 114 NNTP service is 119. Initially, the server host starts the 115 NNTP service by listening on a TCP port. When a client host 116 wishes to make use of the service, it MUST establish a TCP 117 connection with the server host by connecting to that host on 118 the same port on which the server is listening. This is the 119 CONNECTION step. When the connection is established, the NNTP 120 server host MUST send a greeting. This is the GREETING step. 121 The client host and server host SHOULD then exchange commands 122 and responses (respectively) until the connection is closed or 123 aborted. This final step is called the DISCONNECTION step. 125 If there is a CONCLUSION step, it MUST immediately precede the 126 DISCONNECTION step. There MUST be only one CONNECTION, 127 CONCLUSION and DISCONNECTION step for each NNTP session. All 128 other steps MAY be repeated as needed. 130 The character set for all NNTP commands is UTF-8. Commands in 131 the NNTP MUST consist of an US-ASCII case-insensitive keyword, 132 which MAY be followed by one or more arguments. An US-ASCII 133 CRLF pair MUST terminate all commands. Multiple commands MUST 134 NOT be on the same line. Keywords MUST consist of printable 135 US-ASCII characters. Unless otherwise noted elsewhere in this 136 document, arguments SHOULD consist of printable US-ASCII 137 characters. Keywords and arguments MUST be each separated by 138 one or more US-ASCII SPACE or US-ASCII TAB characters. 139 Keywords MUST be at least three US-ASCII characters and MUST 140 NOT exceed 12 US-ASCII characters. Command lines MUST NOT 141 exceed 512 octets, which includes the terminating US-ASCII 142 CRLF pair. Arguments MUST NOT exceed 497 octets. 144 Each response MUST start with a three-digit response code that 145 is sufficient to distinguish all responses. Unless 146 specifically specified as one of the valid responses for a 147 command (such as those described later in this document), each 148 response is contained in a single line. However, certain 149 commands MAY permit multi-line responses. All multi-line 150 responses MUST adhere to the following format: After sending 151 the first line of the response and an US-ASCII CRLF, any 152 additional lines are sent, each terminated by an US-ASCII CRLF 153 pair. When all lines of the response have been sent, a final 154 line MUST be sent, consisting of a termination octet (US-ASCII 155 decimal code 046, ".") and an US-ASCII CRLF pair. If any line 156 of the multi-line response begins with the termination octet, 157 the line MUST be "byte-stuffed" by pre-pending the termination 158 octet to that line of the response. Hence, a multi-line 159 response is terminated with the five octets "CRLF.CRLF" (in 160 US-ASCII). When examining a multi-line response, the client 161 MUST check to see if the line begins with the termination 162 octet. If so and if octets other than US-ASCII CRLF follow, 163 the first octet of the line (the termination octet) MUST be 164 stripped away. If so and if US-ASCII CRLF immediately follows 165 the termination character, then the response from the NNTP 166 server is ended and the line containing ".CRLF" (in US-ASCII) 167 MUST NOT considered part of the multi-line response. The 168 keywords that support multi-line responses have the format of 169 those responses described in the responses section. 171 A NNTP server MAY have an inactivity autologout timer. Such a 172 timer MUST be of at least three minutes duration. The receipt 173 of any command from the client during that interval should 174 suffice to reset the autologout timer. When the timer 175 expires, the server should close the TCP connection without 176 sending any response to the client. 178 4.1 Response Codes 180 Each response MUST begin with a three-digit status indicator. 181 These are status reports from the server and indicate the 182 response to the last command received from the client. 184 The first digit of the response broadly indicates the success, 185 failure, or progress of the previous command. 187 1xx - Informative message 188 2xx - Command ok 189 3xx - Command ok so far, send the rest of it. 190 4xx - Command was correct, but couldn't be performed for some 191 reason. 192 5xx - Command unimplemented, or incorrect, or a serious 193 program error occurred. 194 The next digit in the code indicates the function response 195 category. 197 x0x - Connection, setup, and miscellaneous messages 198 x1x - Newsgroup selection 199 x2x - Article selection 200 x3x - Distribution functions 201 x4x - Posting 202 x8x - Nonstandard (private implementation) extensions 203 x9x - Debugging output 205 The exact response codes that can be returned in response to a 206 given command are detailed in the description of the keyword 207 that is the first part of the command. In addition, below is 208 listed a general set of response codes that MAY be received at 209 any time. 211 Certain response codes contain parameters such as numbers and 212 names in addition to the status indicator. In those cases, the 213 number and type of such parameters MUST be fixed for each 214 response code to simplify interpretation of the response. In 215 all other cases, the client MUST only use the status indicator 216 itself to determine the nature of the response. 218 Parameters MUST be separated from the numeric status indicator 219 and from each other by a single US-ASCII space. All numeric 220 parameters MUST be in base 10 (decimal) format, and may have 221 leading zeros. All string parameters MUST begin after the 222 separating space, and MUST end before the following separating 223 space or the US-ASCII CRLF pair at the end of the line. 224 (Therefore, string parameters MUST NOT contain US-ASCII 225 spaces.) All text, if any, in the response which is not a 226 parameter of the response must follow and be separated from 227 the last parameter by an US-ASCII space. Also, note that the 228 text following a response number may vary in different 229 implementations of the server. The 3-digit numeric status 230 indicator should be used to determine what response was sent. 232 Response codes not specified in this standard MAY be used for 233 any installation-specific additional commands also not 234 specified. These SHOULD be chosen to fit the pattern of x8x 235 specified above. (Note that debugging is provided for 236 explicitly in the x9x response codes.) 238 The use of unspecified response codes for a standard command 239 is prohibited. 241 The status indicator pattern x9x is provided for debugging. 242 Since much debugging output may be classed as "informative 243 messages", it MUST be the case that responses 190 through 199 244 WILL be used for various debugging outputs. There is no 245 requirement in this specification for debugging output. 246 However, if such is provided over the connected stream, it 247 MUST use these response codes. If appropriate to a specific 248 implementation, other x9x codes MAY be used for debugging. 249 (For example, response code 290 could be used to acknowledge a 250 remote debugging request.) 252 A server MUST respond to an unrecognized, unimplemented, or 253 syntactically invalid command with a negative response 254 code(status indicators of the form 5XX). A server MUST 255 respond to a command issued when the session is in an 256 incorrect state by responding with a negative status 257 indicator. This may be from either the 4XX or 5XX group as 258 appropriate. 260 5. The WILDMAT format 261 The WILDMAT format[5] described here is based on the version 262 first developed by Rich Salz which was derived from the format 263 used in the UNIX "find" command to articulate file names. It 264 was developed to provide a uniform mechanism for matching 265 patterns in the same manner that the UNIX shell matches 266 filenames. Patterns are implicitly anchored at the beginning 267 and end of each string when testing for a match. There are 268 five pattern-matching operations other than a strict one-to- 269 one match between the pattern and the source to be checked for 270 a match. The first is an asterisk (*) to match any sequence of 271 zero or more UTF-8 characters. The second is a question mark 272 (?) to match any single UTF-8 character. The third specifies a 273 specific set of characters. The set is specified as a list of 274 characters, or as a range of characters where the beginning 275 and end of the range are separated by a minus (or dash) 276 character, or as any combination of lists and ranges. The dash 277 can also be included in the set as a character it if is the 278 beginning or end of the set. This set is enclosed in square 279 brackets. The close square bracket (]) may be used in a set if 280 it is the first character in the set. The fourth operation is 281 the same as the logical not of the third operation and is 282 specified the same way as the third with the addition of a 283 caret character (^) at the beginning of the test string just 284 inside the open square bracket. The final operation uses the 285 backslash character to invalidate the special meaning of the 286 open square bracket ([), the asterisk, backslash, or the 287 question mark. The meaning of the backslash operator cannot be 288 negated by the exclamation point. Two backslashes in sequence 289 will result in the evaluation of the backslash as a character 290 with no special meaning. 292 5.1 Negating the expression 293 The exclamation point can be used at the beginning of a 294 wildmat to negate it. If it appears as any other character 295 other than the first one, it has no special meaning. 297 5.2 Examples 299 a) [^]-] -- matches any single character other than a 300 close square bracket or a minus sign/dash. 301 b) *bdc -- matches any string that ends with the string 302 "bdc" including the string "bdc" (without quotes). 303 c) [0-9a-zA-Z] -- matches any single printable 304 alphanumeric ASCII character. 305 d) a??d -- matches any four character string which 306 begins with a and ends with d. 307 e)!bc*d -- matches any string that does not start with 308 "bc" and end with "d" (without quotes) 310 6. Format for Keyword Descriptions 311 On the following pages are descriptions of each keyword 312 recognized by the NNTP server and the responses that will be 313 returned by those commands. These keywords are grouped by the 314 functional step in which they are used. 316 Each keyword is shown in upper case for clarity, although the 317 NNTP server ignores case in the interpretation of commands. 318 Any parameters are shown in lower case. A parameter shown in 319 [square brackets] is optional. For example, [GMT] indicates 320 that the triglyph GMT may be present or omitted. A parameter 321 that may be repeated is followed by an ellipsis. Mutually 322 exclusive parameters are separated by a vertical bar (|) 323 character. For example, ggg| indicates that a 324 group name or a may be specified, but not both. 325 Some parameters may be case or language specific. See RFC 326 1036[6] for these details. 328 In addition, certain commands make use of a pattern for 329 selection of multiple news groups. The pattern in all cases is 330 based on the WILDMAT format. Arguments expected to be in 331 wildmat format will be represented by the string wildmat. This 332 format is discussed in detail in section 5 of this memo. 334 7. The GREETING Step 336 7.1 Initial Connection 338 There is no keyword presented by the client upon initial 339 connection to the server. The server MUST present an 340 appropriate response code as a greeting to the client. This 341 response informs the client about what steps the client should 342 take to reach the news exchange step. 344 The server MUST present a 200 greeting code if the client is 345 authorized to post articles though the use of the POST keyword 346 on this server. 348 The server MUST present a 201 greeting code if the client is 349 not authorized to post articles using the POST keyword. 351 The server MUST present a 502 greeting code if the client is 352 not permitted under any circumstances to interact with the 353 server. The server should immediately close the connection 354 with the client after presenting this code. 356 In all other cases, the server MUST present a 400 greeting 357 code. 359 7.1.1 Initial Connection Example 361 Example of a normal connection from an authorized client 363 [C] Initial TCP connection completed 365 [S] 200 NNTP Service Ready, posting permitted 367 Client can send commands at this point. In this example, the 368 client jumps directly to the conclusion step (See section 369 10.1). 371 [C] QUIT 373 [S] 205 NNTP Service exits normally 375 Example of a normal connection from an unauthorized client 377 [C] Initial TCP connection completed 379 [S] 502 NNTP Service Unavailable 381 At this point, the server closes the TCP connection. 383 Example of a normal connection from an authorized client that 384 is not permitted to post 386 [C] Initial TCP connection completed 388 [S] 201 NNTP Service Ready, posting prohibited 390 Client can send commands at this point. In this example, the 391 client jumps directly to the conclusion step (See section 392 10.1). 394 [C] QUIT 396 [S] 205 NNTP Service exits normally 398 Example of a connection from any client where the server is 399 unable to provide service 401 [C] Initial TCP connection completed 403 [S] 400 NNTP Service temporarily unavailable 405 At this point, the server closes the TCP connection. 407 7.1.2 MODE READER 409 MODE READER 410 MODE READER MAY be used by the client to indicate to the 411 server that it is a news reading client. This command may be 412 entered at any time. The server must present a greeting code 413 (as described in section 7.1.2.1) appropriate to the server's 414 ability to provide service to this client in this mode. 416 7.1.2.1 Responses 417 200 Hello, you can post 418 201 Hello, you can't post 419 400 Service temporarily unavailable 420 502 Service unavailable 422 7.1.2.2 MODE READER Examples 424 Example of use of the MODE READER command by an authorized 425 client 427 [C] MODE READER 429 [S] 200 NNTP Service Ready, posting permitted 431 Client can send commands at this point. In this example, the 432 client jumps directly to the conclusion step (See section 433 10.1). 435 [C] QUIT 437 [S] 205 NNTP Service exits normally 439 Example of use of MODE READER by a client not authorized to 440 receive service from the server as a news reader 442 [C] MODE READER 444 [S] 502 NNTP Service Unavailable 446 At this point, the server closes the TCP connection. 448 Example of a normal connection from an authorized client that 449 is not permitted to post 451 [C] MODE READER 453 [S] 201 NNTP Service Ready, posting prohibited 455 Client can send commands at this point. In this example, the 456 client jumps directly to the conclusion step (See section 457 10.1). 459 [C] QUIT 461 [S] 205 NNTP Service exits normally 463 Example of a connection from any client where the server is 464 unable to provide news reader service 466 [C] MODE READER 468 [S] 400 NNTP Service temporarily unavailable 470 At this point, the server closes the TCP connection. 472 8. The CAPABILITIES DISCOVERY Step 474 A client NNTP supporting NNTP service extensions should query 475 a server early in the session for extensions session by 476 issuing the LIST EXTENSIONS command. If the NNTP server 477 supports the NNTP service extensions it MUST give a successful 478 response (see section 8.1.1), a failure response (see section 479 8.1.2), or an error response (see section 8.1.3). If the NNTP 480 server does not support any NNTP service extensions, it MUST 481 generate an error response (see section 8.1.4). 483 8.1 LIST EXTENSIONS 485 If successful, the server NNTP MUST respond with code 202. On 486 failure, the server NNTP MUST respond with code 503. On error, 487 the server NNTP MUST respond with one of codes 400, 402, 500, 488 501 and 502. 490 This command MAY be issued at anytime during a session. It is 491 not required that the client issues this command before 492 attempting to make use of any extension. The response 493 generated by this command MAY change during a session because 494 of other state information. However, a client NNTP MUST NOT 495 cache (for use in another session) any information returned if 496 the LIST EXTENSIONS command succeeds. That is, a client NNTP 497 is only able to get the current and correct information 498 concerning available extensions during a session by issuing a 499 LIST EXTENSIONS command during that session and processing 500 that response. 502 8.1.1 Successful response 504 If the server NNTP implements and is able to perform the LIST 505 EXTENSIONS command, it MUST return code 202. 507 Text following the return code on the first line of the reply 508 is free form, and not interpreted, and has no practical use, 509 as this text is not expected to be revealed to end users. The 510 syntax of other reply lines is precisely defined, and if 511 present, MUST be exactly as specified. 513 Each line listing an extension in the extension-listing begins 514 with a single space. That space IS NOT optional, nor does it 515 indicate general white space. This space guarantees that the 516 line can never be misinterpreted as the end of the extension- 517 listing, but is required even where there is no possibility of 518 ambiguity. 520 Each extension supported MUST be listed on a separate line to 521 facilitate the possible inclusion of parameters supported by 522 each extension command. The extension-label to be used in the 523 response to the LIST EXTENSIONS command will be specified as 524 each new extension is added to the NNTP command set. Often it 525 will be the name of a new command added; however this IS NOT 526 required. In fact, it IS NOT required that a new feature 527 actually adds a new command or keyword. Any parameters 528 included are to be specified with the definition of the 529 command concerned. 531 That specification SHALL also specify how any parameters 532 present are to be interpreted and how each parameter is 533 separated from other parameters. 535 The extension-label is nominally case sensitive, however the 536 definitions of specific labels and parameters specify the 537 precise interpretation, and it is to be expected that those 538 definitions will usually specify the label in a case 539 independent manner. Where this is done, implementations are 540 recommended to use US-ASCII upper case letters when 541 transmitting the extension response. 543 The LIST EXTENSIONS command itself is not included in the list 544 of features supported, support for the LIST EXTENSIONS command 545 is indicated by return of a reply other than a 500 or 502 546 reply. 548 The end of the list is defined by the usual period on a line 549 by itself. 551 A typical example reply to the LIST EXTENSIONS command might 552 be a multiline reply of the form: 554 [C] LIST EXTENSIONS 556 [S] 202 Extensions supported: 558 [S] OVER 560 [S] PAT 562 [S] LISTGROUP 564 [S] . 566 The particular extensions shown here are simply examples of 567 what may be defined in other places, no particular meaning 568 should be attributed to them. Recall also, that the extension 569 names returned are not command names, as such, but simply 570 indications that the server possesses some attribute or other. 572 The order in which the extensions are returned is of no 573 importance, NNTP server processes are not required to 574 implement any particular order, or even to consistently return 575 the same order when the command is repeated. 577 8.1.2 Failure response 579 If for some reason the server NNTP is unable to list the 580 service extensions it supports, it MUST return code 503. No 581 list (not even an empty one) will be returned. 583 In the case of a failure response, the client NNTP may try the 584 extensions either as the need arises or configure itself for 585 the basic NNTP functionality defined in this document. 587 8.1.3 Error responses from extended servers 589 If the server NNTP recognizes the LIST EXTENSIONS command, but 590 due to various conditions cannot make any extensions available 591 to the client at the time the client issued the LIST 592 EXTENSIONS command, it MUST return code 402. No list (not even 593 an empty one) will be returned. 595 The client NNTP should configure itself for the basic NNTP 596 functionality defined in this document, or issue commands that 597 might change the state of the server, or issue the QUIT 598 command (see section 10.1) if a particular extension is 599 required for the client to properly operate. 601 If the server NNTP determines that the NNTP service is no 602 longer available (e.g., due to imminent system shutdown), it 603 must return code 400. Note that this is response code should 604 not be generated due to an inactivity timeout as described in 605 section 4. 607 In the case of any error response outlined in this section, 608 the client NNTP should issue the QUIT command (see section 609 10.1). 611 8.1.4 Responses from servers without extensions 613 A server NNTP that conforms to this memo but does not support 614 the extensions specified here will not recognize the LIST 615 EXTENSIONS command and MUST consequently return code 500 or 616 code 501. The server NNTP SHALL stay in the same state after 617 returning this code. The client NNTP may try the extensions 618 either as the need arises or configure itself for the basic 619 NNTP functionality defined in this document. 621 8.1.5 Responses from improperly implemented servers 623 A server NNTP that improperly implements the LIST EXTENSIONS 624 command may return an empty list. Clients SHALL accommodate 625 this protocol violation and interpret it as a response code 626 402. 628 The client NNTP should configure itself for the basic NNTP 629 functionality defined in this document, or issue commands that 630 might change the state of the server, or issue the QUIT 631 command (see section 10.1) if a particular extension is 632 required for the client to properly operate. 634 9. The NEWS EXCHANGE Step 636 During this step, two basic types of transactions occur: 638 . article retrieval from the server 639 . article posting to the server 641 9.1 Article Retrieval 643 News reading clients have available a variety of mechanisms to 644 retrieve articles via NNTP. The news articles are stored and 645 indexed using three types of keys. One key is the message id 646 of an article. According to RFC 1036, this identifier should 647 be globally unique. Another key is composed of the news group 648 name and the article number within that news group. That key 649 MUST be unique to a particular server (there will be only one 650 article with that number within a particular news group), but 651 is not required to be globally unique. Additionally, because 652 the same article can be cross-posted to multiple news groups, 653 there may be multiple keys that point to the same article on 654 the same server. The final key is the arrival timestamp, 655 giving the time that the article arrived at the server. 657 The server MUST ensure that article numbers are issued in 658 order of arrival timestamp; that is, articles arriving later 659 MUST have higher numbers than those that arrive earlier. The 660 server SHOULD allocate the next sequential unused number to 661 each new article. 663 Article numbers MUST lie between 1 and 4,294,967,295 664 inclusive. The client and server SHOULD NOT use leading zeroes 665 in specifying article numbers, and MUST NOT use more than 16 666 digits. In some situations, the value zero replaces an article 667 number to show some special situation. One case involves 668 responses to the ARTICLE, STAT, BODY and HEAD commands where a 669 is specified as the argument. In those cases, the 670 "current article pointer" is not changed. 672 9.1.1 Article Retrieval by News Group Name and Article Number 674 The following commands are used to set the current news group 675 name and the "current article pointer" which is used by other 676 commands for article retrieval. 678 9.1.1.1 GROUP 680 GROUP ggg 682 The required parameter ggg is the name of the news group to be 683 selected (e.g. "news.software.b"). A list of valid news groups 684 may be obtained by using the LIST keyword. See section 9.4 685 for more information on the LIST keyword. 687 The successful selection response will return the article 688 numbers of the first and last articles in the group at the 689 moment of selection (these numbers are referred to as the 690 "reported low water mark" and the "reported high water mark"), 691 and an estimate of the number of articles on file in the 692 group. 694 If the group is not empty, the estimate MUST be at least the 695 actual number of articles available, and MUST be no greater 696 than one more than the difference between the reported low and 697 high water marks. (Some implementations will actually count 698 the number of articles on file. Others will just subtract the 699 low water mark from the high water mark and add one to get an 700 estimate.) 701 If the group is empty, one of the following three situations 702 will occur. Clients MUST accept all three cases; servers MUST 703 NOT represent an empty group in any other way. 705 . The high water mark will be one less than the low water mark, 706 and the estimated article count will be zero. Servers SHOULD 707 use this method to show an empty group. This is the only time 708 that the high water mark can be less than the low water mark. 709 . All three numbers will be zero. 710 . The high water mark is greater than or equal to the low water 711 mark; the estimated article count might be zero or non-zero; 712 if non-zero, the same requirements apply as for a non-empty 713 group. 715 The set of articles in a group may change after the GROUP 716 command is carried out. That is: 718 . articles may be removed from the group 719 . articles may be reinstated in the group with the same article 720 number, but those articles MUST have numbers no less than the 721 reported low water mark (note that this is a reinstatement of 722 the previous article, not a new article reusing the number) 723 . new articles may be added with article numbers greater than 724 the reported high water mark (if an article that was the one 725 with the highest number has been removed, the next new article 726 will not have the number one greater than the reported high 727 water mark) 729 Except when the group is empty and all three numbers are zero, 730 whenever a subsequent GROUP command for the same news group is 731 issued, either by the same client or a different client, the 732 reported low water mark in the response MUST be no less than 733 that in any previous response for that news group sent to any 734 client. The client may make use of the low water mark to 735 remove all remembered information about articles with lower 736 numbers, as these will never recur. This includes the 737 situation when the high water mark is one less than the low 738 water mark. 740 No similar assumption can be made about the high water mark, 741 as this can decrease if an article is removed, and then 742 increase again if it is reinstated or if new articles arrive. 744 When a valid group is selected by means of this command, the 745 internally maintained "current article pointer" MUST be set to 746 the first article in the group and the name of the current 747 news group MUST be set to the selected news group name. If an 748 invalid group is specified, the previously selected group and 749 article MUST remain selected. If an empty news group is 750 selected, the "current article pointer" is in an indeterminate 751 state and MUST NOT be used. 753 The GROUP keyword MUST be used by a client and a successful 754 response received before the any other command is used that 755 depends on having the "current article pointer" be valid. 757 9.1.1.1.1 Responses 759 211 n f l s group selected 760 (n = estimated number of articles in group, f = first 761 article number in the group, l = last article number in 762 the group, s = name of the group.) 763 411 no such news group 765 9.1.1.1.2 GROUP Examples 766 Example for a group known to the server 768 [C] GROUP misc.test 770 [S] 211 1234 3000234 3002322 misc.test 772 Example for a group unknown to the server 774 [C] GROUP example.is.sob.bradner.or.barber 776 [S] 411 example.is.sob.bradner.or.barber is unknown 778 9.1.1.2 LAST 780 LAST 782 The internally maintained "current article pointer" MUST be 783 set to the previous article in the current news group. If 784 already positioned at the first article of the news group, an 785 error message MUST be returned and the current article MUST 786 remain selected. 788 There MAY be no previous article in the group, although the 789 current article number is not the reported low water mark. 790 There MUST NOT be a previous article when the current article 791 number is the reported low water mark. 793 Because articles can be removed and added, the results of 794 multiple LAST and NEXT commands MAY not be consistent over the 795 life of a particular NNTP session. 797 The internally-maintained "current article pointer" MUST be 798 set by this command. 800 A response indicating the current article number and a 801 message-id string MUST be returned. No article text is sent in 802 response to this command. 804 9.1.1.2.1 Responses 806 223 n a article retrieved - request text separately (n = 807 article number, a = unique article id) 808 412 no news group selected 809 420 no current article has been selected 810 422 no previous article in this group 812 9.1.1.2.2 LAST Examples 814 Example of a successful article retrieval using LAST 815 [S] 200 NNTP Service Ready 817 [C] GROUP misc.test 819 [S] 211 1234 3000234 3002322 misc.test 821 [C] NEXT 823 [S] 223 3000237 <668929@domain.com> retrieved 825 [C] LAST 827 [S] 223 3000234 <45223423@to.to> retrieved 829 Example of an attempt to retrieve an article without having 830 selected a group (via the GROUP command) first 832 [S] 200 NNTP Service ready 834 [C] LAST 836 [S] 412 no newsgroup selected 838 Example of an attempt to retrieve an article using the LAST 839 command when the current article pointer is pointing at the 840 first article in the group 842 [S] 200 NNTP Service Ready 844 [C] GROUP misc.test 846 [S] 211 1234 3000234 3002322 misc.test 848 [C] LAST 850 [S] 422 No previous article to retrieve 852 Example of an attempt to retrieve an article using the LAST 853 command when the current group selected is empty 855 [S] 200 NNTP Service Ready 857 [C] GROUP example.empty.newsgroup 859 [S] 211 0 0 0 example.empty.newsgroup 861 [C] LAST 863 [S] 420 No current article selected 865 9.1.1.3 NEXT 867 NEXT 869 The internally maintained "current article pointer" MUST be 870 advanced to the next article in the current news group. If no 871 more articles remain in the current group, an error message 872 MUST be returned and the current article MUST remain selected. 874 The internally-maintained "current article pointer" MUST be 875 set by this command. 877 A response indicating the current article number and the 878 message-id string MUST be returned. No text is sent in 879 response to this command. 881 9.1.1.3.1 Responses 883 223 n a article retrieved - request text separately (n = 884 article number, a = unique article id) 885 412 no news group selected 886 420 no current article has been selected 887 421 no next article in this group 889 9.1.1.3.2 NEXT Examples 891 Example of a successful article retrieval using NEXT 892 [S] 200 NNTP Service Ready 894 [C] GROUP misc.test 896 [S] 211 1234 3000234 3002322 misc.test 898 [C] NEXT 900 [S] 223 3000237 <668929@domain.com> retrieved 902 Example of an attempt to retrieve an article without having 903 selected a group (via the GROUP command) first 905 [S] 200 NNTP Service ready 907 [C] NEXT 909 [S] 412 no newsgroup selected 911 Example of an attempt to retrieve an article using the NEXT 912 command when the current article pointer is pointing at the 913 first article in the group 915 [S] 200 NNTP Service Ready 917 [C] GROUP misc.test 919 [S] 211 1234 3000234 3002322 misc.test 921 [C] ARTICLE 3002322 923 [S] 220 3002322 <411@whitehouse.gov> retrieved 925 Path: pathost!demo!whitehouse!not-for-mail 927 From: nobody@whitehouse.gov(Demo User) 929 Newsgroups: misc.test 931 Subject: I am just a test article 933 Date: 6 Oct 1998 04:38:40 -0500 935 Organization: The White House, Washington, DC 937 Message-ID: <411@whitehouse.gov> 939 This is just a test article. 941 . 943 [C] NEXT 945 [S] 422 No next article to retrieve 947 Example of an attempt to retrieve an article using the NEXT 948 command when the current group selected is empty 950 [S] 200 NNTP Service Ready 952 [C] GROUP example.empty.newsgroup 954 [S] 211 0 0 0 example.empty.newsgroup 956 [C] NEXT 958 [S] 420 No current article selected 960 9.2 Retrieval of Articles and Article Sections 962 There are two forms to the ARTICLE command (and the related 963 BODY, HEAD, and STAT commands), each using a different method 964 of specifying which article is to be retrieved. When the 965 ARTICLE keyword is followed by a message-id in angle brackets 966 ("<" and ">"), the first form of the command MUST be used; 967 when a numeric parameter or no parameter is supplied, the 968 second form MUST be invoked. In the cases where the argument 969 is a message-id, the article number specified in the response 970 must be zero. This is one of the special cases described in 971 section 9.1. 973 An article, as defined by RFC 1036, consists of two parts: the 974 article headers and the article body. When responding to an 975 article command, the server returns the entire article 976 contents and does not attempt to alter or translate them in 977 any way. 979 9.2.1 ARTICLE 981 ARTICLE [|nnn] 983 This response displays the header, a blank line, then the body 984 (text) of the specified article. The optional parameter nnn is 985 the numeric id of an article in the current news group and 986 SHOULD be chosen from the range of articles provided when the 987 news group was selected. If it is omitted, the current 988 article is assumed. Message-id is the message id of an article 989 as shown in that article's header. 991 The internally maintained "current article pointer" MUST NOT 992 be altered when the message-id argument is used. This is both 993 to facilitate the presentation of articles that may be 994 referenced within an article being read, and because of the 995 semantic difficulties of determining the proper sequence and 996 membership of an article which may have been posted to more 997 than one news group. 999 The internally-maintained "current article pointer" MUST be 1000 set when a valid article number is specified as the argument. 1001 This includes the case when an article number is implied by 1002 the use of no argument. 1004 A previously valid article number MAY become invalid if the 1005 article has been removed. A previously invalid article number 1006 MAY become valid if the article has been reinstated, but such 1007 an article number MUST be no less than the reported low water 1008 mark for that group. 1010 If there is a valid article to present in a reply to this 1011 command, a response indicating the current article number (or 1012 zero when the message-id argument is used), a message-id 1013 string, and that text is to follow MUST be returned. 1015 The message-id string is an identification string contained 1016 within angle brackets ("<" and ">"), which is derived from the 1017 header of the article itself. The Message-ID header line 1018 (required by RFC 1036) from the article must be used to supply 1019 this information. If the message-id header line is missing 1020 from the article, a single digit "0" (zero) should be supplied 1021 within the angle brackets. 1023 Since the message-id field is unique for each article, it may 1024 be used by a news reading program to skip duplicate displays 1025 of articles that have been posted more than once, or to more 1026 than one news group. 1028 9.2.1.1 Responses 1029 220 n article retrieved - head and body follow (n = 1030 article number, = message-id) 1031 412 no news group has been selected 1032 420 no current article has been selected 1033 423 no such article number in this group 1034 430 no such article found 1035 502 Service unavailable 1037 9.2.1.2 Examples 1038 Example of a successful retrieval of an article (using no 1039 article number) 1041 [S] 200 NNTP Service Ready 1043 [C] GROUP misc.test 1045 [S] 211 1234 3000234 3002322 misc.test 1047 [C] ARTICLE 1049 [S] 220 3000234 <45223423@to.to> 1051 Path: pathost!demo!somewhere!not-for-mail 1052 From: nobody@nowhere.to (Demo User) 1054 Newsgroups: misc.test 1056 Subject: I am just a test article 1058 Date: 6 Oct 1998 04:38:40 -0500 1060 Organization: Nowhere, To 1062 Message-ID: <45223423@to.to> 1064 This is just a test article. 1066 . 1068 Example of a successful retrieval of an article by message-id 1070 [S] 200 NNTP Service Ready 1072 [C] ARTICLE <45223423@to.to> 1074 [S] 220 0 <45223423@to.to> 1076 Path: pathost!demo!somewhere!not-for-mail 1078 From: nobody@nowhere.to (Demo User) 1080 Newsgroups: misc.test 1082 Subject: I am just a test article 1084 Date: 6 Oct 1998 04:38:40 -0500 1086 Organization: Nowhere, To 1088 Message-ID: <45223423@to.to> 1090 This is just a test article. 1092 . 1094 Example of an unsuccessful retrieval of an article by message- 1095 id 1097 [S] 200 NNTP Service Ready 1099 [C] ARTICLE 1101 [S] 430 No Such Article Found 1103 Example of an unsuccessful retrieval of an article by number 1105 [S] 200 NNTP Service Ready 1107 [C] GROUP misc.test 1109 [S] 211 1234 3000234 3002322 news.groups 1111 [C] ARTICLE 300256 1113 [S] 423 No such article number in this group 1115 Example of an unsuccessful retrieval of an article by number 1116 because no news group was selected first 1118 [S] 200 NNTP Service Ready 1120 [C] ARTICLE 300256 1122 [S] 412 No news group selected 1124 Example of an attempt to retrieve an article when the current 1125 group selected is empty 1127 [S] 200 NNTP Service Ready 1129 [C] GROUP example.empty.newsgroup 1131 [S] 211 0 0 0 example.empty.newsgroup 1133 [C] ARTICLE 1135 [S] 420 No current article selected 1137 Example of a failure due to the service being unavailable 1139 [S] 200 NNTP Service Ready 1141 [C] ARTICLE 1143 [S] 500 Service unavailable 1145 9.2.2 HEAD 1146 HEAD [|nnn] 1148 This response displays the header of the specified article. 1149 The optional parameter nnn is the numeric id of an article in 1150 the current news group and SHOULD be chosen from the range of 1151 articles provided when the news group was selected. If it is 1152 omitted, the current article is assumed. Message-id is the 1153 message id of an article as shown in that article's header. 1155 The internally maintained "current article pointer" MUST NOT 1156 be altered when the message-id argument is used. This is both 1157 to facilitate the presentation of articles that may be 1158 referenced within an article being read, and because of the 1159 semantic difficulties of determining the proper sequence and 1160 membership of an article which may have been posted to more 1161 than one news group. 1163 The internally-maintained "current article pointer" MUST be 1164 set when a valid article number is specified as the argument. 1165 This includes the case when an article number is implied by 1166 the use of no argument. 1168 A previously valid article number MAY become invalid if the 1169 article has been removed. A previously invalid article number 1170 MAY become valid if the article has been reinstated, but such 1171 an article number MUST be no less than the reported low water 1172 mark for that group. 1174 If there is a valid article to present in a reply to this 1175 command, a response indicating the current article number (or 1176 zero when the message-id argument is used), a message-id 1177 string, and that text is to follow MUST be returned. 1179 The message-id string returned is an identification string 1180 contained within angle brackets ("<" and ">"), which is 1181 derived from the header of the article itself. The Message-ID 1182 header line (required by RFC 1036) from the article must be 1183 used to supply this information. If the message-id header line 1184 is missing from the article, a single digit "0" (zero) should 1185 be supplied within the angle brackets. 1187 Since the message-id field is unique for each article, it may 1188 be used by a news reading program to skip duplicate displays 1189 of articles that have been posted more than once, or to more 1190 than one news group. 1192 9.2.2.1 Responses 1193 221 n article retrieved - head follows 1194 412 no news group has been selected 1195 420 no current article has been selected 1196 423 no such article number in this group 1197 430 no such article found 1198 502 Service unavailable 1200 9.2.2.2 Examples 1201 Example of a successful retrieval of the headers in an article 1202 (using no article number) 1204 [S] 200 NNTP Service Ready 1206 [C] GROUP misc.test 1208 [S] 211 1234 3000234 3002322 misc.test 1210 [C] HEAD 1212 [S] 220 3000234 <45223423@to.to> 1214 Path: pathost!demo!somewhere!not-for-mail 1216 From: nobody@nowhere.to (Demo User) 1218 Newsgroups: misc.test 1220 Subject: I am just a test article 1222 Date: 6 Oct 1998 04:38:40 -0500 1224 Organization: Nowhere, To 1226 Message-ID: <45223423@to.to> 1228 . 1230 Example of a successful retrieval of the headers in an article 1231 by message-id 1233 [S] 200 NNTP Service Ready 1235 [C] HEAD <45223423@to.to> 1237 [S] 220 0 <45223423@to.to> 1239 Path: pathost!demo!somewhere!not-for-mail 1241 From: nobody@nowhere.to (Demo User) 1243 Newsgroups: misc.test 1245 Subject: I am just a test article 1247 Date: 6 Oct 1998 04:38:40 -0500 1249 Organization: Nowhere, To 1251 Message-ID: <45223423@to.to> 1253 . 1255 Example of an unsuccessful retrieval of the header of an 1256 article by message-id 1258 [S] 200 NNTP Service Ready 1260 [C] HEAD 1262 [S] 430 No Such Article Found 1264 Example of an unsuccessful retrieval of the header of an 1265 article by number 1267 [S] 200 NNTP Service Ready 1269 [C] GROUP misc.test 1271 [S] 211 1234 3000234 3002322 misc.test 1273 [C] HEAD 300256 1275 [S] 423 No such article number in this group 1277 Example of an unsuccessful retrieval the header of an article 1278 by number because no news group was selected first 1280 [S] 200 NNTP Service Ready 1282 [C] HEAD 300256 1284 [S] 412 No news group selected 1286 Example of an attempt to retrieve the header of an article 1287 when the current group selected is empty 1289 [S] 200 NNTP Service Ready 1291 [C] GROUP example.empty.newsgroup 1293 [S] 211 0 0 0 example.empty.newsgroup 1295 [C] HEAD 1297 [S] 420 No current article selected 1299 Example of a failure due to the service being unavailable 1301 [S] 200 NNTP Service Ready 1303 [C] HEAD 1305 [S] 500 Service unavailable 1307 9.2.3 BODY 1308 BODY [|nnn] 1310 This response displays the body (text) of the specified 1311 article. The optional parameter nnn is the numeric id of an 1312 article in the current news group and SHOULD be chosen from 1313 the range of articles provided when the news group was 1314 selected. If it is omitted, the current article is assumed. 1315 Message-id is the message id of an article as shown in that 1316 article's header. 1318 The internally maintained "current article pointer" MUST NOT 1319 be altered when the message-id argument is used. This is both 1320 to facilitate the presentation of articles that may be 1321 referenced within an article being read, and because of the 1322 semantic difficulties of determining the proper sequence and 1323 membership of an article which may have been posted to more 1324 than one news group. 1326 The internally-maintained "current article pointer" MUST be 1327 set when a valid article number is specified as the argument. 1328 This includes the case when an article number is implied by 1329 the use of no argument. 1331 A previously valid article number MAY become invalid if the 1332 article has been removed. A previously invalid article number 1333 MAY become valid if the article has been reinstated, but such 1334 an article number MUST be no less than the reported low water 1335 mark for that group. 1337 If there is a valid article to present in a reply to this 1338 command, a response indicating the current article number (or 1339 zero when the message-id argument is used), a message-id 1340 string, and that text is to follow MUST be returned. 1342 The message-id string returned is an identification string 1343 contained within angle brackets ("<" and ">"), which is 1344 derived from the header of the article itself. The Message-ID 1345 header line (required by RFC 1036) from the article must be 1346 used to supply this information. If the message-id header line 1347 is missing from the article, a single digit "0" (zero) should 1348 be supplied within the angle brackets. 1350 Since the message-id field is unique for each article, it may 1351 be used by a news reading program to skip duplicate displays 1352 of articles that have been posted more than once, or to more 1353 than one news group. 1355 9.2.3.1 Responses 1356 222 n article retrieved - body follows 1357 412 no news group has been selected 1358 420 no current article has been selected 1359 423 no such article number in this group 1360 430 no such article found 1361 502 Service unavailable 1363 9.2.3.2 Examples 1364 Example of a successful retrieval of the body of an article 1365 (using no article number) 1367 [S] 200 NNTP Service Ready 1369 [C] GROUP misc.test 1371 [S] 211 1234 3000234 3002322 misc.test 1373 [C] BODY 1375 [S] 222 3000234 <45223423@to.to> 1377 This is just a test article. 1379 . 1381 Example of a successful retrieval of the body of an article by 1382 message-id 1384 [S] 200 NNTP Service Ready 1386 [C] BODY <45223423@to.to> 1388 [S] 222 0 <45223423@to.to> 1390 This is just a test article. 1392 . 1394 Example of an unsuccessful retrieval of the body of an article 1395 by message-id 1397 [S] 200 NNTP Service Ready 1399 [C] BODY 1401 [S] 430 No Such Article Found 1403 Example of an unsuccessful retrieval of the body of an article 1404 by number 1406 [S] 200 NNTP Service Ready 1408 [C] GROUP misc.test 1410 [S] 211 1234 3000234 3002322 misc.test 1412 [C] BODY 300256 1414 [S] 423 No such article number in this group 1416 Example of an unsuccessful retrieval of the body of an article 1417 by number because no news group was selected first 1419 [S] 200 NNTP Service Ready 1421 [C] BODY 300256 1423 [S] 412 No news group selected 1425 Example of an attempt to retrieve the body of an article when 1426 the current group selected is empty 1428 [S] 200 NNTP Service Ready 1430 [C] GROUP example.empty.newsgroup 1432 [S] 211 0 0 0 example.empty.newsgroup 1434 [C] BODY 1436 [S] 420 No current article selected 1438 Example of a failure due to the service being unavailable 1440 [S] 200 NNTP Service Ready 1442 [C] BODY 1444 [S] 500 Service unavailable 1446 9.2.4 STAT 1447 STAT [|nnn] 1449 This response returns only status information; no article 1450 contents are returned. The optional parameter nnn is the 1451 numeric id of an article in the current news group and SHOULD 1452 be chosen from the range of articles provided when the news 1453 group was selected. If it is omitted, the current article is 1454 assumed. Message-id is the message id of an article as shown 1455 in that article's header. 1457 The internally maintained "current article pointer" MUST NOT 1458 be altered when the message-id argument is used. This is both 1459 to facilitate the presentation of articles that may be 1460 referenced within an article being read, and because of the 1461 semantic difficulties of determining the proper sequence and 1462 membership of an article which may have been posted to more 1463 than one news group. 1465 The internally-maintained "current article pointer" MUST be 1466 set when a valid article number is specified as the argument. 1467 This includes the case when an article number is implied by 1468 the use of no argument. 1470 A previously valid article number MAY become invalid if the 1471 article has been removed. A previously invalid article number 1472 MAY become valid if the article has been reinstated, but such 1473 an article number MUST be no less than the reported low water 1474 mark for that group. 1476 If there is a valid article to present in a reply to this 1477 command, a response indicating the current article number (or 1478 zero when the message-id argument is used) and a message-id 1479 string MUST be returned. 1481 The message-id string returned is an identification string 1482 contained within angle brackets ("<" and ">"), which is 1483 derived from the header of the article itself. The Message-ID 1484 header line (required by RFC 1036) from the article must be 1485 used to supply this information. If the message-id header line 1486 is missing from the article, a single digit "0" (zero) should 1487 be supplied within the angle brackets. 1489 Since the message-id field is unique for each article, it may 1490 be used by a news reading program to skip duplicate displays 1491 of articles that have been posted more than once, or to more 1492 than one news group. 1494 9.2.4.1 Responses 1495 223 n article retrieved - request text separately 1496 412 no news group has been selected 1497 420 no current article has been selected 1498 423 no such article number in this group 1499 430 no such article found 1500 502 Service unavailable 1502 9.2.4.2 Examples 1503 Example of STAT on an existing article (using no article 1504 number) 1506 [S] 200 NNTP Service Ready 1508 [C] GROUP misc.test 1510 [S] 211 1234 3000234 3002322 misc.test 1512 [C] STAT 1514 [S] 223 3000234 <45223423@to.to> 1516 Example of a STAT of an existing article by message-id 1518 [S] 200 NNTP Service Ready 1520 [C] STAT <45223423@to.to> 1522 [S] 223 0 <45223423@to.to> 1524 Example of an STAT of an article not on the server by message- 1525 id 1527 [S] 200 NNTP Service Ready 1529 [C] STAT 1531 [S] 430 No Such Article Found 1533 Example of STAT of an article not in the server by number 1535 [S] 200 NNTP Service Ready 1537 [C] GROUP misc.test 1539 [S] 211 1234 3000234 3002322 misc.test 1541 [C] STAT 300256 1543 [S] 423 No such article number in this group 1545 Example of STAT of an article by number when no news group was 1546 selected first 1548 [S] 200 NNTP Service Ready 1550 [C] STAT 300256 1552 [S] 412 No news group selected 1554 Example of STAT of an article when the current group selected 1555 is empty 1557 [S] 200 NNTP Service Ready 1559 [C] GROUP example.empty.newsgroup 1561 [S] 211 0 0 0 example.empty.newsgroup 1563 [C] STAT 1565 [S] 420 No current article selected 1567 Example of a failure due to the service being unavailable 1569 [S] 200 NNTP Service Ready 1571 [C] STAT 1573 [S] 500 Service unavailable 1575 9.3 Article Posting 1576 Article posting is done in one of two modes: individual 1577 article posting from news reading clients and article transfer 1578 from other news servers. 1580 9.3.1 POST 1582 POST 1584 If posting is allowed, response code 340 MUST be returned to 1585 indicate that the article to be posted should be sent. 1586 Response code 440 MUST be sent if that posting is prohibited 1587 for some installation-dependent reason. 1589 If posting is permitted, the article MUST be presented to the 1590 server by the client in the format specified by RFC 1036. The 1591 text forming the header and body of the message to be posted 1592 MUST be sent by the client using the conventions for text 1593 received from the news server: A single period (".") on a line 1594 indicates the end of the text, with lines starting with a 1595 period in the original text having that period doubled during 1596 transmission. 1598 Following the presentation of the termination sequence by the 1599 client, the server MUST return a response code indicating 1600 success or failure of the article transfer. 1602 No attempt shall be made by the server to filter characters, 1603 fold or limit lines, or otherwise process incoming text. The 1604 intent is that the server just passes the incoming message to 1605 be posted to the server installation's news posting software, 1606 which is not part of this specification. 1608 9.3.1.1 Responses 1610 240 article received ok 1611 340 send article to be posted. End with . 1612 440 posting not allowed 1613 441 posting failed 1615 9.3.1.2 Examples 1616 Example of a successful posting 1618 [S] 200 NNTP Service Ready 1620 [C] POST 1622 [S] 340 Input article. End with . 1624 [C] From: demo@testdomain.com(Demo User) 1626 Newsgroups: misc.test 1627 Subject: I am just a test article 1629 Organization: Testdomain, USA 1631 This is just a test article. 1633 . 1635 [S] 240 Article received ok 1637 Example of an unsuccessful posting 1639 [S] 200 NNTP Service Ready 1641 [C] POST 1643 [S] 340 Input article. End with . 1645 [C] From: demo@testdomain.com(Demo User) 1647 Newsgroups: misc.test 1649 Subject: I am just a test article 1651 Organization: Testdomain, USA 1653 This is just a test article. 1655 . 1657 [S] 441 Posting failed 1659 Example of an attempt to posting when posting is not allowed 1661 [S] 201 NNTP Service Ready, read-only 1663 [C] POST 1665 [S] 440 Posting not permitted 1667 9.3.2 IHAVE 1669 IHAVE 1671 The IHAVE command informs the server that the client has an 1672 article whose id is . If the server desires a copy 1673 of that article, it MUST return a response instructing the 1674 client to send the entire article. If the server does not want 1675 the article (if, for example, the server already has a copy of 1676 it), a response indicating that the article is not wanted MUST 1677 be returned. 1679 If transmission of the article is requested, the client MUST 1680 send the entire article, including header and body, in the 1681 manner specified for text transmission from the server. The 1682 server MUST return a response code indicating success or 1683 failure of the transferal of the article. 1685 This function differs from the POST command in that it is 1686 intended for use in transferring already-posted articles 1687 between hosts. It SHOULD NOT be used when the client is a 1688 personal news reading program. In particular, this function 1689 will invoke the server's news posting program with the 1690 appropriate settings (flags, options, etc.) to indicate that 1691 the forthcoming article is being forwarded from another host. 1693 However, the server MAY elect not to post or forward the 1694 article if after further examination of the article it deems 1695 it inappropriate to do so. Reasons for such subsequent 1696 rejection of an article may include such problems as 1697 inappropriate news groups or distributions, disk space 1698 limitations, article lengths, garbled headers, and the like. 1699 These are typically restrictions enforced by the server host's 1700 news software and not necessarily the NNTP server itself. 1702 9.3.2.1 Responses 1704 235 article transferred ok 1705 335 send article to be transferred. End with . 1707 435 article not wanted - do not send it 1708 436 transfer failed - try again later 1709 437 article rejected - do not try again 1711 Because some host news posting software may not be able to 1712 immediately render status on the whether an article is 1713 inappropriate for posting or forwarding, an NNTP server MAY 1714 acknowledge the successful transfer of the article and later 1715 silently discard it. Thus, an NNTP server MAY return the 235 1716 acknowledgment code and later discard the received article. 1718 9.3.2.2 Examples 1719 Example of successfully sending an article to another site 1721 [S] 200 NNTP Service Ready 1723 [C] IHAVE 1725 [S] 335 Send it. End with . 1727 [C] Path: pathost!demo!somewhere!not-for-mail 1729 From: nobody@nowhere.to (Demo User) 1731 Newsgroups: misc.test 1733 Subject: I am just a test article 1735 Date: 6 Oct 1998 04:38:40 -0500 1737 Organization: Nowhere, To 1739 Message-ID: 1741 This is just a test article. 1743 . 1745 [S] 235 Article transferred ok 1747 Example of sending an article to another site that rejects it 1749 [S] 200 NNTP Service Ready 1751 [C] IHAVE 1753 [S] 335 Send it. End with . 1755 [C] Path: pathost!demo!somewhere!not-for-mail 1757 From: nobody@nowhere.to (Demo User) 1759 Newsgroups: misc.test 1761 Subject: I am just a test article 1763 Date: 6 Oct 1998 04:38:40 -0500 1765 Organization: Nowhere, To 1767 Message-ID: 1769 This is just a test article. 1771 . 1773 [S] 437 Article rejected. Don't send again 1775 Example of sending an article to another site where the 1776 transfer fails 1778 [S] 200 NNTP Service Ready 1780 [C] IHAVE 1782 [S] 335 Send it. End with . 1784 [C] Path: pathost!demo!somewhere!not-for-mail 1786 From: nobody@nowhere.to (Demo User) 1788 Newsgroups: misc.test 1790 Subject: I am just a test article 1792 Date: 6 Oct 1998 04:38:40 -0500 1794 Organization: Nowhere, To 1796 Message-ID: 1798 This is just a test article. 1800 . 1802 [S] 436 Transfer failed 1804 Example of sending an article to another site that rejects it 1806 [S] 200 NNTP Service Ready 1808 [C] IHAVE 1810 [S] 335 Send it. End with . 1812 [C] Path: pathost!demo!somewhere!not-for-mail 1814 From: nobody@nowhere.to (Demo User) 1816 Newsgroups: misc.test 1818 Subject: I am just a test article 1820 Date: 6 Oct 1998 04:38:40 -0500 1822 Organization: Nowhere, To 1824 Message-ID: 1826 This is just a test article. 1828 . 1830 [S] 435 Don't send it again 1832 9.4 The LIST Keyword 1834 9.4.1 LIST 1836 LIST [ACTIVE [wildmat]] 1838 The response to the LIST keyword with no parameters returns a 1839 list of valid news groups and associated information. Each 1840 news group is sent as a line of text in the following format: 1842 group first last status 1844 where is the name of the news group, is the 1845 number of the last known article currently in that news group, 1846 is the number of the first article currently in the 1847 news group, and indicates the current status of the 1848 group on this server. Typically, the will be consist 1849 of the US-ASCII character `y' where posting is permitted, `n' 1850 where posting is not permitted and `m' where postings will be 1851 forwarded to the news group moderator by the news server. 1852 Other status strings may exist. The definition of these other 1853 values is covered in other specifications. 1855 The and fields will always be numeric. They 1856 may have leading zeros. The field corresponds to the 1857 "reported low water mark" and the field corresponds to 1858 the "reported high water mark" described in the GROUP command 1859 (see Section 9.1.1.1). 1861 Note that posting may still be prohibited to a client although 1862 the LIST command indicates that posting is permitted to a 1863 particular news group. See the POST command for an explanation 1864 of client prohibitions. The posting flag exists for each news 1865 group because some news groups are moderated or are digests, 1866 and therefore cannot be posted to; that is, articles posted to 1867 them must be mailed to a moderator who will post them for the 1868 original poster. This is independent of the posting 1869 permission granted to a client by the NNTP server. 1871 Please note that an empty list (i.e., the text body returned 1872 by this command consists only of the terminating period) is a 1873 possible valid response, and indicates that there are 1874 currently no valid news groups. 1876 If the optional matching parameter is specified, the list is 1877 limited to only the groups that match the pattern. 1879 Specifying a single group is usually very efficient for the 1880 server. Multiple groups may be specified by using wildmat 1881 patterns (described in section 5), not regular expressions. 1883 9.4.1.1 Responses 1884 215 list of news groups follows 1886 9.4.1.2 Examples 1887 Example of LIST returning a list of news groups 1888 [S] 200 NNTP Service Ready 1890 [C] LIST 1892 [S] 215 list of news groups follows 1894 misc.test 3000234 3002322 y 1896 alt.fc-writers.recovery 1 4 y 1898 tx.natives.recovery 56 89 y 1900 . 1902 Example of LIST returning no news groups 1904 [S] 200 NNTP Service Ready 1906 [C] LIST 1908 [S] 215 list of news groups follows 1910 . 1912 9.4.2 LIST ACTIVE.TIMES 1914 LIST ACTIVE.TIMES [wildmat] 1916 The active.times file is maintained by some news transport 1917 systems to contain information about when and who created a 1918 particular news group. The format of this file generally 1919 includes three fields. The first field is the name of the news 1920 group. The second is the time when this group was created on 1921 this news server measured in seconds since the start of 1922 January 1, 1970. The third is the email address of the entity 1923 that created the news group. When executed, the information is 1924 displayed following the 215 response. When display is 1925 completed, the server will send a period on a line by itself. 1926 If the information is not available, the server will return 1927 the 503 error response. 1929 If the optional matching parameter is specified, the list is 1930 limited to only the groups that match the pattern. 1932 Specifying a single group is usually very efficient for the 1933 server. Multiple groups may be specified by using wildmat 1934 patterns (described in section 5), not regular expression 1936 9.4.2.1 Responses 1938 215 information follows 1939 503 program error, function not performed 1941 9.4.2.2 Examples 1942 Example of LIST ACTIVE.TIMES returning a list of news groups 1943 [S] 200 NNTP Service Ready 1945 [C] LIST ACTIVE.TIMES 1947 [S] 215 information follows 1949 misc.test 930445408 1951 alt.rfc-writers.recovery 930562309 1953 tx.natives.recovery 930678923 1955 . 1957 Example of LIST ACTIVE.TIMES returning an error 1959 [S] 200 NNTP Service Ready 1961 [C] LIST ACTIVE.TIMES 1963 [S] 503 program error, function not performed 1965 9.4.3 LIST DISTRIBUTIONS 1967 LIST DISTRIBUTIONS 1969 The distributions file is maintained by some news transport 1970 systems to contain information about valid values for the 1971 Distribution: line in a news article header and about what the 1972 values mean. Each line contains two fields, the value and a 1973 short explanation on the meaning of the value. When executed, 1974 the information is displayed following the 215 response. When 1975 display is completed, the server will send a period on a line 1976 by itself. If the information is not available, the server 1977 will return the 503 error response. 1979 9.4.3.1 Responses 1981 215 information follows 1982 503 program error, function not performed 1984 9.4.3.2 Examples 1985 Example of LIST DISTRIBUTIONS returning a list of news groups 1986 [S] 200 NNTP Service Ready 1988 [C] LIST DISTRIBUTIONS 1990 [S] 215 information follows 1992 usa United States of America 1994 na North America 1996 world All over the World 1998 . 2000 Example of LIST DISTRIBUTIONS returning an error 2002 [S] 200 NNTP Service Ready 2004 [C] LIST DISTRIBUTIONS 2006 [S] 503 program error, function not performed 2008 9.4.4 LIST DISTRIB.PATS 2010 LIST DISTRIB.PATS 2012 The distrib.pats file is maintained by some news transport 2013 systems to contain default values for the Distribution: line 2014 in a news article header when posting to particular news 2015 groups. This information could be used to provide a default 2016 value for the Distribution: line in the header when posting an 2017 article. The information returned contains three fields 2018 separated by colons. The first column is a weight. The second 2019 is a group name or a wildmat pattern that can be used to match 2020 a group name. The third is the value of the Distribution: 2021 line that should be used when the group name matches and the 2022 weight value is the highest. All this processing is done by 2023 the news posting client and not by the server itself. The 2024 server provides this information to the client for it to use 2025 or ignore as it chooses. When executed, the information is 2026 displayed following the 215 response. When display is 2027 completed, the server will send a period on a line by itself. 2028 If the information is not available, the server will return 2029 the 503 error response. 2031 9.4.4.1 Responses 2033 215 information follows 2034 503 program error, function not performed 2036 9.4.4.2 Examples 2037 Example of LIST DISTRIB.PATS returning a list of news groups 2038 [S] 200 NNTP Service Ready 2040 [C] LIST DISTRIB.PATS 2042 [S] 215 information follows 2044 10:local.*:local 2046 . 2048 Example of LIST DISTRIB.PATS returning an error 2050 [S] 200 NNTP Service Ready 2052 [C] LIST DISTRIB.PATS 2054 [S] 503 program error, function not performed 2056 9.4.5 LIST NEWSGROUPS 2058 LIST NEWSGROUPS [wildmat] 2060 The newsgroups file is maintained by some news transport 2061 systems to contain the name of each news group that is 2062 active on the server and a short description about the 2063 purpose of each news group. Each line in the file contains 2064 two fields, the news group name and a short explanation of 2065 the purpose of that news group. When executed, the 2066 information is displayed following the 215 response. When 2067 display is completed, the server will send a period on a 2068 line by itself. If the information is not available, the 2069 server will return the 503 response. If the optional 2070 matching parameter is specified, the list is limited to only 2071 the groups that match the pattern (no matching is done on 2072 the group descriptions). Specifying a single group is 2073 usually very efficient for the server, and multiple groups 2074 may be specified by using wildmat patterns (see section 5), 2075 not regular expressions. If nothing is matched an empty list 2076 is returned, not an error. 2078 9.4.5.1 Responses 2079 215 information follows 2080 503 program error, function not performed 2082 9.4.5.2 Examples 2083 Example of LIST NEWSGROUPS returning a list of news groups 2085 [S] 200 NNTP Service Ready 2087 [C] LIST NEWSGROUPS 2089 [S] 215 information follows 2091 misc.test General Usenet testing 2093 alt.rfc-writers.recovery RFC Writers Recovery 2095 tx.natives.recovery Texas Natives Recovery 2097 . 2099 Example of LIST NEWSGROUPS returning an error 2101 [S] 200 NNTP Service Ready 2103 [C] LIST NEWSGROUPS 2105 [S] 503 program error, function not performed 2107 9.4.6 LIST OVERVIEW.FMT 2109 LIST OVERVIEW.FMT 2111 The overview.fmt file is maintained by some news transport 2112 systems to contain the order in which header information is 2113 stored in the overview databases for each news group. When 2114 executed, news article header fields are displayed one line at 2115 a time in the order in which they are stored in the overview 2116 database[7] following the 215 response. When display is 2117 completed, the server will send a period on a line by itself. 2118 If the information is not available, the server will return 2119 the 503 response. 2121 If the header has the word "full" (without quotes) after the 2122 colon, the header's name is prepended to its field in the 2123 output returned by the server. 2125 This is command is part of the optional OVER extension which 2126 includes the OVER command defined in section 9.4.8. If the 2127 OVER extension is not implemented, then this command MUST NOT 2128 be implemented. 2130 9.4.6.1 Responses 2132 215 information follows 2133 503 program error, function not performed 2135 9.4.6.2 Examples 2136 Example of LIST OVERVIEW.FMT returning a list of news groups 2138 [S] 200 NNTP Service Ready 2140 [C] LIST OVERVIEW.FMT 2142 [S] 215 Order of fields in overview database. 2144 Subject: 2146 From: 2148 Date: 2150 Message-ID: 2152 . 2154 Example of LIST OVERVIEW.FMT returning an error 2156 [S] 200 NNTP Service Ready 2158 [C] LIST OVERVIEW.FMT 2160 [S] 503 program error, function not performed 2162 9.4.7 LISTGROUP 2164 LISTGROUP [ggg] 2166 The LISTGROUP command is used to get a listing of all the 2167 article numbers in a particular news group. 2169 The optional parameter ggg is the name of the news group to 2170 be selected (e.g. "news.software.b"). A list of valid news 2171 groups may be obtained from the LIST command. If no group is 2172 specified, the current group is used as the default 2173 argument. 2175 The successful selection response will be a list of the 2176 article numbers in the group followed by a period on a line 2177 by itself. The list starts on the next line following the 2178 211 response code. 2180 When a valid group is selected by means of this command, the 2181 internally maintained "current article pointer" MUST be set 2182 to the first article in the group. If an invalid group is 2183 specified, the previously selected group and article remain 2184 selected. If an empty news group is selected, the "current 2185 article pointer" may be in an indeterminate state and should 2186 not be used. 2188 The group name MUST match a news group obtained from the 2189 LIST command or an error will result, else the server will 2190 respond with the 411 error code. 2192 The LISTGROUP command is an optional extension. It MAY be 2193 implemented. If it is not implemented, then the LISTGROUP 2194 label MUST NOT be included in the response to the LIST 2195 EXTENSIONS command. 2197 9.4.7.1 Responses 2199 211 list of article numbers follow 2200 411 No such group 2201 412 Not currently in news group 2203 9.4.7.2 Examples 2204 Example of a successful execution with a group that exists on 2205 the server 2207 [S] 200 NNTP Service Ready 2209 [C] LISTGROUP misc.test 2211 [S] 211 list of article numbers follow 2213 3000234 2215 3000237 2217 3000238 2219 3000239 2221 3002322 2223 . 2225 Example of an unsuccessful execution with a group that does 2226 not exist on the server 2228 [S] 200 NNTP Service Ready 2230 [C] LISTGROUP this.group.is.not.here 2232 [S] 411 no such group 2234 Example of an attempt to retrieve an article when the current 2235 group selected is empty 2237 [S] 200 NNTP Service Ready 2239 [C] LISTGROUP example.empty.newsgroup 2241 [S] 412 No current article selected 2243 9.4.8 OVER 2245 OVER [range] 2247 The OVER command returns information from the overview 2248 database for the article(s) specified. The information 2249 returned in the response to this command can be used by 2250 clients to follow discussion threads. 2252 The optional range argument may be any of the following: 2254 . an article number 2255 . an article number followed by a dash to indicate all following 2256 . an article number followed by a dash followed by another 2257 article number 2259 If no argument is specified, then information from the current 2260 article is displayed. Successful responses start with a 224 2261 response followed by the overview information for all matched 2262 messages. Once the output is complete, a period is sent on a 2263 line by itself. If no argument is specified, the information 2264 for the current article is returned. A news group must have 2265 been selected earlier, else a 412 error response is returned. 2266 If no articles are in the range specified, the server returns 2267 a 420 error response. A 502 response will be returned if the 2268 client only has permission to transfer articles. 2270 Each line of output MUST be formatted with the article number, 2271 followed by each of the headers in the overview database or 2272 the article itself (when the data is not available in the 2273 overview database) for that article separated by a US-ASCII 2274 tab character. The sequence of fields must be in this order: 2275 subject, author, date, message-id, references, byte count, and 2276 line count. Other optional fields may follow line count. These 2277 fields are specified by examining the response to the LIST 2278 OVERVIEW.FMT command. Where no data exists, a null field must 2279 be provided (i.e. the output will have two tab characters 2280 adjacent to each other). Servers should not output fields for 2281 articles that have been removed since the overview database 2282 was created. 2284 Note that all US-ASCII tab characters in any header data that 2285 is returned will be converted to a single US-ASCII space 2286 character. A contiguous sequence of US-ASCII non-printing 2287 characters will be compressed to a single US-ASCII space 2288 character in any output response. 2290 The OVER command is part of the OVER extension, which includes 2291 the LIST OVERVIEW.FMT command. The OVER extension is optional. 2292 If it is not implemented, the response to the LIST EXTENSIONS 2293 command must not include the OVER label. 2295 9.4.8.1 Responses 2297 224 Overview information follows 2298 412 No news group current selected 2299 420 No article(s) selected 2300 502 Service Unavailable 2302 9.4.8.2 Examples 2303 Example of a successful retrieval of overview information for 2304 an article (using no article number) 2306 [S] 200 NNTP Service Ready 2308 [C] GROUP misc.test 2310 [S] 211 1234 3000234 3002322 misc.test 2312 [C] OVER 2314 [S] 224 Overview information follows 2316 300234|I am just a test article|nobody@nowhere.to 2318 (Demo User)|6 Oct 1998 04:38:40 -0500| 2320 <45223423@to.to> 2322 . 2324 [Please note that the line that begins with 200234 is all one 2325 line that has been wrapped for readability. A vertical bar has 2326 been inserted to show where the US-ASCII TAB should actually 2327 be.] 2329 Example of an unsuccessful retrieval of overview information 2330 on an article by number 2332 [S] 200 NNTP Service Ready 2334 [C] GROUP misc.test 2336 [S] 211 1234 3000234 3002322 misc.test 2338 [C] OVER 300256 2340 [S] 420 No such article in this group 2342 Example of an unsuccessful retrieval of overview information 2343 by number because no news group was selected first 2345 [S] 200 NNTP Service Ready 2347 [C] OVER 2349 [S] 412 No news group selected 2351 Example of an attempt to retrieve an article when the current 2352 group selected is empty 2354 [S] 200 NNTP Service Ready 2356 [C] GROUP example.empty.newsgroup 2358 [S] 211 0 0 0 example.empty.newsgroup 2360 [C] OVER 2362 [S] 420 No current article selected 2364 9.4.9 PAT 2366 PAT header range| [wildmat[ wildmat"]] 2368 The PAT command is used to retrieve specific headers from 2369 specific articles, based on pattern matching on the contents 2370 of the header. 2372 The required header parameter is the name of a header line 2373 (e.g. "subject") in a news group article. See RFC-1036 for a 2374 list of valid header lines. The required range argument may be 2375 any of the following: 2377 . an article number 2378 . an article number followed by a dash to indicate all following 2379 . an article number followed by a dash followed by another 2380 article number. 2381 The required message-id argument indicates a specific article. 2382 The range and message-id arguments are mutually exclusive. An 2383 additional argument consisting of one wildmat or two or more 2384 wildmats separated by a space may be specified. If there are 2385 no additional argument, a wildmat "*" is the default. 2386 Successful responses start with a 221 response followed by 2387 article number, an US-ASCII space, and the header from that 2388 message in which the argument pattern matches the contents of 2389 the specified header line. A valid response includes an empty 2390 list (indicating that there were no matches). Once the output 2391 is complete, a period is sent on a line by itself. If the 2392 optional argument is a message-id and no such article exists, 2393 a 430 error response shall be returned. A 502 response shall 2394 be returned if the client only has permission to transfer 2395 articles. 2397 The PAT command is optional. If it is not implemented, the 2398 response to the LIST EXTENSIONS command must not include the 2399 PAT label. 2401 9.4.9.1 Responses 2403 221 Header follows 2404 412 no newsgroup selected 2405 430 no such article 2406 502 Service Unavailable 2408 9.4.9.2 Examples 2409 Example of a successful retrieval of subject lines from a 2410 range of articles 2412 [S] 200 NNTP Service Ready 2414 [C] GROUP misc.test 2416 [S] 211 1234 3000234 3002322 misc.test 2418 [C] PAT Subject 3000234-300238 2420 [S] 221 Header Follows 2422 3000234 I am just a test article 2424 3000237 Re: I am just a test article 2426 3000238 Ditto 2428 . 2430 Example of a successful retrieval of subject lines from a 2431 range of articles with header pattern matching 2433 [S] 200 NNTP Service Ready 2435 [C] GROUP misc.test 2437 [S] 211 1234 3000234 3002322 misc.test 2439 [C] PAT Subject 3000234-300238 j* ? *est 2441 [S] 221 Header Follows 2443 3000234 I am just a test article 2445 3000237 Re: I am just a test article 2446 . 2448 Example of a successful retrieval of header from an article by 2449 message-id 2451 [S] 200 NNTP Service Ready 2453 [C] PAT subject 2455 [S] 221 Header information follows 2457 3000345 I am just a test article 2459 . 2461 Example of an unsuccessful retrieval of a header from an 2462 article by message-id 2464 [S] 200 NNTP Service Ready 2466 [C] PAT subject 2468 [S] 430 No Such Article Found 2470 Example of an unsuccessful retrieval of headers from articles 2471 by number because no news group was selected first 2473 [S] 200 NNTP Service Ready 2475 [C] PAT subject 300256- 2477 [S] 412 No news group selected 2479 Example of retrieving header information when the current 2480 group selected is empty 2482 [S] 200 NNTP Service Ready 2484 [C] GROUP example.empty.newsgroup 2486 [S] 211 0 0 0 example.empty.newsgroup 2488 [C] PAT subject 0- 2490 [S] 221 Headers follow 2492 . 2494 Example of a failure due to restrictions configured into the 2495 server 2497 [S] 200 NNTP Service Ready 2499 [C] GROUP news.group 2501 [S] 211 1234 3000234 3002322 misc.test 2503 [C] PAT Subject 3000234-300238 2505 [S] 502 Service Unavailable 2507 10. The CONCLUSION Step 2509 10.1 QUIT 2511 QUIT 2513 The server process MUST acknowledge the QUIT command and then 2514 closes the connection to the client. This is the preferred 2515 method for a client to indicate that it has finished all its 2516 transactions with the NNTP server. 2518 If a client simply disconnects (or the connection times out or 2519 some other fault occurs), the server SHALL gracefully cease 2520 its attempts to service the client. 2522 10.1.1 Responses 2524 205 closing connection - goodbye! 2526 10.1.2 Example 2527 [S] 200 NNTP Service Ready 2529 [C] QUIT 2531 [S] 205 closing connection 2533 11. Other Keywords 2535 There are other keywords that may be used at any time between 2536 the beginning of a session and its termination. Using these 2537 keywords do not alter any state information, but the response 2538 generated from the use of these keywords may provide useful 2539 information to clients that use them. 2541 11.1 DATE 2543 DATE 2545 This command exists to help clients find out the current time 2546 from the server's perspective. This command SHOULD NOT be 2547 used as a substitute for NTP[8], but to provide information 2548 that might be useful when using the NEWNEWS command (see 2549 section 0). 2551 This command returns a one-line response code of 111 followed 2552 by the UTC (or GMT) date and time on the server in the form 2553 YYYYMMDDhhmmss. 2555 11.1.1 Responses 2557 111 YYYYMMDDhhmmss 2559 11.1.2 Example 2560 [S] 200 NNTP Service Ready 2562 [C] DATE 2564 [S] 19990623135624 2566 11.2 The HELP Command 2568 HELP 2570 This command provides a short summary of commands that are 2571 understood by this implementation of the server. The help text 2572 will be presented as a textual response terminated by a single 2573 period on a line by itself. 2575 This text is not guaranteed to be in any particular format and 2576 SHALL NOT be used by clients as a replacement for the LIST 2577 EXTENSIONS command described in section 8.1. 2579 11.2.1 Responses 2581 100 help text follows 2583 11.2.2 Example 2584 [S] 200 NNTP Service Ready 2586 [C] HELP 2588 [S] 100 Help text follows 2590 This is some help text. There is no specific 2592 formatting requirement for this test, though 2594 it is customary for it to list the valid commands 2596 and give a brief definition of what they do 2598 . 2600 11.3 NEWGROUPS 2602 NEWGROUPS date time [GMT|UTC] 2604 A list of newsgroups created since MUST be 2605 listed in the same format as the LIST command. 2607 The date is sent as 6 or 8 digits in the format [XX]YYMMDD, 2608 where XX is the first two digits of the year, YY is the last 2609 two digits of the year, MM is the two digits of the month 2610 (with leading zero, if appropriate), and DD is the day of the 2611 month (with leading zero, if appropriate). If the first two 2612 digits of the year are not specified, the year is to be taken 2613 from the current century if YY is smaller than or equal to the 2614 current year, otherwise the year is from the previous century. 2616 Time must also be specified. It must be as 6 digits HHMMSS 2617 with HH being hours in the 24-hour clock 00-23, MM minutes 00- 2618 59, and SS seconds 00-60, which allows for leap seconds. The 2619 tokens "GMT" and "UTC" specifies that the date and time are 2620 given in UTC. If the tokens "GMT" and "UTC" are omitted then 2621 the date and time are specified in the server's local 2622 timezone. Note that there is no way within this specification 2623 of NNTP to establish the server's local timezone. 2625 Note that an empty list (i.e., the text body returned by this 2626 command consists only of the terminating period) is a possible 2627 valid response, and indicates that there are currently no new 2628 newsgroups. 2630 Clients SHOULD make all queries using GMT/UTC time when 2631 possible. 2633 11.3.1 Responses 2635 231 list of new newsgroups follows 2637 11.3.2 Examples 2638 Example where there are new groups 2640 [S] 200 NNTP Service Ready 2642 [C] NEWGROUPS 19990624 000000 UTC 2644 [S] 230 list of new newsgroups follows 2646 alt.rfc-writers.recovery 2648 tx.natives.recovery 2650 . 2652 Example where there are no new groups 2654 [S] 200 NNTP Service Ready 2656 [C] NEWGROUPS 19990624 000000 UTC 2658 [S] 230 list of new newsgroups follows 2660 . 2662 11.4 NEWNEWS 2664 NEWNEWS newsgroups date time [GMT] 2666 A list of message-ids of articles posted or received to the 2667 specified news group since "date" will be listed. The format 2668 of the listing will be one message-id per line, as though text 2669 were being sent. A single line consisting solely of one 2670 period followed by CR-LF will terminate the list. 2672 Date and time are in the same format as the NEWGROUPS command. 2673 The newsgroups parameter MUST be in wildmat format and MAY 2674 consist of multiple wildmat constructs separated by an US- 2675 ASCII comma character. 2677 Note that an empty list (i.e., the text body returned by this 2678 command consists only of the terminating period) is a possible 2679 valid response, and indicates that there is currently no new 2680 news. 2682 Clients SHOULD make all queries in GMT/UTC time when possible. 2684 11.4.1 Responses 2686 230 list of new articles by message-id follows 2688 11.4.2 Examples 2689 Example where there are new articles 2691 [S] 200 NNTP Service Ready 2693 [C] NEWNEWS news.*,sci.* 19990624 000000 2695 [S] 230 list of new articles by message-id follows 2697 2699 2701 . 2703 Example where there are no new articles 2705 [S] 200 NNTP Service Ready 2707 [C] NEWNEWS alt.* 19990624 000000 2709 [S] 230 list of new articles by message-id follows 2711 . 2713 12. Framework for NNTP Extensions 2715 Although NNTP is widely and robustly deployed, some parts of 2716 the Internet community might wish to extend the NNTP service. 2717 This memo defines a means whereby an extended NNTP client may 2718 query the server to determine the service extensions that it 2719 supports. 2721 It must be emphasized that any extension to the NNTP service 2722 should not be considered lightly. NNTP's strength comes 2723 primarily from its simplicity. Experience with many protocols 2724 has shown that: 2726 Protocols with few options tend towards ubiquity, whilst 2727 protocols with many options tend towards obscurity. 2729 This means that each and every extension, regardless of its 2730 benefits, must be carefully scrutinized with respect to its 2731 implementation, deployment, and interoperability costs. In 2732 many cases, the cost of extending the NNTP service will likely 2733 outweigh the benefit. 2735 Given this environment, the framework for the extensions 2736 described in this memo consists of: 2738 a) a mechanism for clients to determine a server's available 2739 extensions 2740 b) a registry of NNTP service extensions 2742 The LIST EXTENSIONS command is described in section 8.1 of 2743 this memo and is the mechanism for clients to use to determine 2744 what extensions are available for client use. 2746 The IANA shall maintain a registry of NNTP service extensions. 2748 Associated with each such extension is a corresponding NNTP 2749 keyword value. Each service extension registered with the IANA 2750 MUST be defined in an RFC. Such RFCs either must be on the 2751 standards-track or must define an IESG-approved experimental 2752 protocol. The definition must include: 2754 . the textual name of the NNTP service extension 2755 . the label that is returned by LIST EXTENSIONS that would 2756 indicate to the client that the server supports this 2757 particular extension 2759 . any new NNTP keywords associated with the extension 2760 . the syntax and possible values of parameters associated with 2761 the new NNTP keywords 2762 . any new parameters the extension associates with any other 2763 pre-existing NNTP verbs 2764 . how support for the extension affects the behavior of a server 2765 and client NNTP 2766 . the increment by which the extension is increasing the maximum 2767 length of the any commands over that specified in this 2768 document. 2770 In addition, any NNTP keyword value that starts with an upper 2771 or lower case "X" refers to a local NNTP service extension, 2772 which is used through bilateral, rather than standardized, 2773 agreement. Keywords beginning with "X" MUST NOT be used in a 2774 registered service extension. 2776 Any keyword values presented in the NNTP response that do not 2777 begin with "X" must correspond to a standard, standards-track, 2778 or IESG-approved experimental NNTP service extension 2779 registered with IANA. A conforming server MUST NOT offer non 2780 "X" prefixed keyword values that are not described in a 2781 registered extension. 2783 Additional verbs are bound by the same rules as NNTP keywords; 2784 specifically, verbs beginning with "X" are local extensions 2785 that MUST NOT be registered or standardized and verbs not 2786 beginning with "X" must always be registered. 2788 12.1 Initial IANA Registry 2790 The IANA's initial registry of NNTP service extensions 2791 consists of these entries: 2793 Service Extension NNTP Extension Label Added Behavior 2795 Overview Support OVER Defined in this 2796 document 2798 Specific Article LISTGROUP Defined in this 2799 Numbers document 2801 Header Pattern PAT Defined in this 2802 Matching document 2804 13. Augmented BNF[9] Syntax for NNTP Commands 2805 This syntax defines the non-terminal "command". The non-terminal 2806 "parameter" is used for command parameters whose syntax is 2807 specified elsewhere. The syntax is in alphabetical order. Note 2808 that ABNF strings are case insensitive. 2810 article-command = "ARTICLE" [1*WSP (msg-id / article-number)] 2811 *WSP CRLF 2812 article-number = 1*16DIGIT 2813 augument = parameter ; excluding sequence ".." 2814 body-command = "BODY" [1*WSP (msg-id / article-number)] *WSP 2815 CRLF 2816 command = article-command / 2817 body-command / 2818 date-command / 2819 group-command / 2820 head-command / 2821 help-command / 2822 ihave-command / 2823 last-command / 2824 list-active-times-command / 2825 list-distrib-pats-command / 2826 list-distributions-command / 2827 list-extensions-command / 2828 list-newsgroups-command / 2829 list-overview-fmt-command / 2830 list-command / 2831 listgroup-command / 2832 mode-reader-command / 2833 newgroups-command / 2834 newnews-command / 2835 next-command / 2836 over-command / 2837 pat-command / 2838 post-command / 2839 quit-command / 2840 stat-command 2841 CR = %x0D 2842 CRLF = CR LF 2843 date-command = "DATE" *WSP CRLF 2844 date = 6*8DIGIT 2845 DIGIT = %x30-39 2846 group-command = "GROUP" 1*WSP newsgroup *WSP CRLF 2847 head-command = "HEAD" [1*WSP (msg-id / article-number)] *WSP 2848 CRLF 2849 header = parameter 2850 help-command = "HELP" *WSP CRLF 2851 HT = %x09 2852 ihave-command = "IHAVE" 1*WSP msg-id *WSP CRLF 2853 last-command = "LAST" *WSP CRLF 2854 LF = %x0A 2855 list-active-times-command = "LIST" 1*WSP "ACTIVE.TIMES" 2856 [1*WSP wildmat] *WSP CRLF 2857 list-command = "LIST" [1*WSP "ACTIVE" [1*WSP wildmat]] *WSP 2858 CRLF 2860 list-distrib-pats-command = "LIST" 1*WSP "DISTRIB.PATS" *WSP 2861 CRLF 2862 list-distributions-command = "LIST" 1*WSP "DISTRIBUTIONS" *WSP 2863 CRLF 2864 list-extensions-command = "LIST" 1*WSP "EXTENSIONS" *WSP CRLF 2865 list-newsgroups-command = "LIST" 1*WSP "NEWSGROUPS" [1*WSP 2866 wildmat] 2867 *WSP CRLF 2868 list-overview-fmt-command = "LIST" 1*WSP "OVERVIEW.FMT" *WSP 2869 CRLF 2870 listgroup-command = "LISTGROUP" [1*WSP newsgroup] *WSP CRLF 2871 mode-reader-command = "MODE" 1*WSP "READER" *WSP CRLF 2872 msg-id = 2873 newgroups-command = "NEWGROUPS" 1*WSP date 1*WSP time [1*WSP 2874 "GMT"/"UTC"] *WSP CRLF 2875 newnews-command = "NEWNEWS" 1*WSP newsgroup *("," newsgroup) 2876 1*WSP date 1*WSP time [1*WSP "GMT"/"UTC"] 2877 *WSP CRLF 2878 newsgroup = parameter 2879 next-command = "NEXT" *WSP CRLF 2880 over-command = "OVER" [1*WSP range] *WSP CRLF 2881 parameter = 1*(%x21-FF) ; generic command parameter 2882 pat-command = "PAT" 1*WSP header 1*WSP (range / msg-id) 2883 *(1*WSP wildmat) *WSP CRLF 2884 post-command = "POST" *WSP CRLF 2885 quit-command = "QUIT" *WSP CRLF 2886 range = article-number ["-" [article-number]] 2887 SP = %x20 2888 stat-command = "STAT" [1*WSP (msg-id / article-number)] *WSP 2889 CRLF 2890 time = 6DIGIT 2891 UTF-8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4 / UTF8-5 / UTF8-6 2892 UTF8-1 = %x80-BF 2893 UTF8-2 = %xC0-DF UTF8-1 2894 UTF8-3 = %xE0-EF 2UTF8-1 2895 UTF8-4 = %xF0-F7 3UTF8-1 2896 UTF8-5 = %xF8-FB 4UTF8-1 2897 UTF8-6 = %xFC-FD 5UTF8-1 2898 wildmat = ["!"]1*("*" / "?" / wildmat-exact / wildmat-set / 2899 "\" (%x22-7F / UTF-8-non-ascii)) 2900 wildmat-exact = %x22-29 / %x2B-3E / %x40-5A / %x5D-7F / UTF-8- 2901 non-ascii ; exclude space ! * ? [ \ 2902 wildmat-non-hyphen = %x21-2C / %x2E-7F / UTF-8-non-ascii ; 2903 exclude space - 2904 wildmat-set = "[" ["^"] ["]" / "-"] *(wildmat-non-hyphen"["-" 2905 wildmat-non-hyphen]) ["-"] 2906 WSP = SP / HT 2908 14. Security Considerations 2910 This section is meant to inform application developers, 2911 information providers, and users of the security limitations 2912 in NNTP as described by this document. The discussion does not 2913 include definitive solutions to the problems revealed, though 2914 it does make some suggestions for reducing security risks. 2916 14.1 Personal and Proprietary Information 2918 NNTP, because it was created to distribute network news 2919 articles, will forward whatever information is stored in those 2920 articles. Specification of that information is outside this 2921 scope of this document, but it is likely that some personal 2922 and/or proprietary information is available in some of those 2923 articles. It is very important that designers and implementors 2924 provide informative warnings to users so personal and/or 2925 proprietary information is not disclosed inadvertently. 2926 Additionally, effective and easily understood mechanisms to 2927 manage the distribution of news articles must be provided to 2928 NNTP Server administrators, so that they are able to report 2929 with confidence what information is and is not being forwarded 2930 in news articles passing though their servers. 2932 14.2 Abuse of Server Log Information 2934 A server is in the position to save session data about a 2935 user's requests which might identify their reading patterns or 2936 subjects of interest. This information is clearly confidential 2937 in nature and its handling can be constrained by law in 2938 certain countries. People using the NNTP protocol to provide 2939 data are responsible for ensuring that such material is not 2940 distributed without the permission of any individuals that are 2941 identifiable by the published results. 2943 14.3 DNS Spoofing 2945 Clients and Servers using NNTP rely heavily on the Domain Name 2946 Service, and are thus generally prone to security attacks 2947 based on the deliberate mis-association of IP addresses and 2948 DNS names. Clients and Servers need to be cautious in assuming 2949 the continuing validity of an IP number/DNS name association. 2951 In particular, NNTP clients and servers SHOULD rely on their 2952 name resolver for confirmation of an IP number/DNS name 2953 association, rather than caching the result of previous host 2954 name lookups. Many platforms already can cache host name 2955 lookups locally when appropriate, and they SHOULD be 2956 configured to do so. It is proper for these lookups to be 2957 cached, however, only when the TTL (Time To Live) information 2958 reported by the name server makes it likely that the cached 2959 information will remain useful. 2961 If NNTP clients or servers cache the results of host name 2962 lookups in order to achieve a performance improvement, they 2963 MUST observe the TTL information reported by DNS. 2965 If NNTP clients or servers do not observe this rule, they 2966 could be spoofed when a previously-accessed server's IP 2967 address changes. As network renumbering is expected to become 2968 increasingly common, the possibility of this form of attack 2969 will grow. Observing this requirement thus reduces this 2970 potential security vulnerability. 2972 This requirement also improves the load-balancing behavior of 2973 clients for replicated servers using the same DNS name and 2974 reduces the likelihood of a user's experiencing failure in 2975 accessing sites which use that strategy. 2977 14.4 Weak Authentication and Access Control 2979 There is no user-based or token-based authentication in the 2980 basic NNTP specification. Access is normally controlled by 2981 server configuration files. Those files specify access by 2982 using domain names or ip addresses. However, this 2983 specification does permit the creation of extensions to the 2984 NNTP protocol itself for such purposes. While including such 2985 mechanisms is optional, doing so is strongly encouraged. 2987 Other mechanisms are also available. For example, a proxy 2988 server could be put in place that requires authentication 2989 before connecting via the proxy to the NNTP server. 2991 15. Notes 2993 UNIX is a registered trademark of the X/Open Consortium. 2995 16. References 2997 1 Kantor, B and P. Lapsley, "Network News Transfer Protocol", 2998 RFC-977, U.C. San Diego and U.C. Berkeley. 3000 2 Yergeau, F., "UTF-8, a transformation format of ISO 10646", 3001 RFC 2278, Alis Technologies. 3003 3 Coded Character Set-7-bit American Standard Code for 3004 Information Interchange, ANSI x3.4-1986. 3006 4 Bradner, Scott, "Key words for use in RFCs to Indicate 3007 Requirement Levels", RFC-2119, Harvard University. 3009 5 Salz, Rich, Manual Page for wildmat(3) from the INN 1.4 3010 distribution, UUNET Technologies, Revision 1.10, April, 1992. 3012 6 Horton, M.R. and R. Adams, "Standard for interchange of 3013 USENET messages", RFC-1036, AT&T Bell Laboratories and Center 3014 for Seismic Studies, December, 1987. 3016 7 Robertson, Rob, "FAQ: Overview database / NOV General 3017 Information", ftp://ftp.uu.net/networking/news/nntp/inn/faq- 3018 nov.Z, January, 1995. 3020 8 Mills, David L., "Network Time Protocol (Version 3), 3021 Specification, Implementation and Analysis", RFC-1305, 3022 University of Delaware, March 1992. 3024 9 Crocker, D. and Overell, P., "Augmented BNF for Syntax 3025 Specifications: ABNF", RFC-2234, Internet Mail Consortium and 3026 Demon Internet, Ltd. 3028 17. Acknowledgments 3030 The author acknowledges the original authors of NNTP as 3031 documented in RFC 977: Brian Kantor and Phil Lapsey. 3033 The author gratefully acknowledges the work of the NNTP 3034 committee chaired by Eliot Lear. The organization of this 3035 document was influenced by the last available draft from this 3036 working group. A special thanks to Eliot for generously 3037 providing the original machine readable sources for that 3038 document. 3040 The author gratefully acknowledges the work of the Marshall 3041 Rose & John G. Meyers in RFC 1939 and the work of the DRUMS 3042 working group, specifically RFC 1869, which is the basis of 3043 the NNTP extensions mechanism detailed in this document. 3045 The author gratefully acknowledges the authors of RFC 2616 for 3046 providing specific and relevant examples of security issues 3047 that should be considered for HTTP. Since many of the same 3048 considerations exist for NNTP, those examples that are 3049 relevant have been included here with some minor rewrites. 3051 The author gratefully acknowledges the comments and additional 3052 information provided by the following individuals in preparing 3053 one of the progenitors of this document: 3055 . Wayne Davison 3056 . Clive D.W. Feather 3057 . Chris Lewis 3058 . Tom Limoncelli 3059 . Eric Schnoebelen 3060 . Rich Salz 3062 This work was precipitated by the work of various newsreader 3063 authors and newsserver authors, which includes those listed 3064 below: 3066 . Rick Adams -- Original author of the NNTP extensions to the RN 3067 newsreader and last maintainer of Bnews 3068 . Stan Barber -- Original author of the NNTP extensions to the 3069 newsreaders that are part of Bnews. 3070 . Geoff Collyer -- Original author of the OVERVIEW database 3071 proposal and one of the original authors of CNEWS 3072 . Dan Curry -- Original author of the xvnews newsreader 3073 . Wayne Davision -- Author of the first threading extensions to 3074 the 3075 RN newsreader (commonly called TRN). 3076 . Geoff Huston -- Original author of ANU NEWS 3077 . Phil Lapsey -- Original author of the UNIX reference 3078 implementation 3079 . Ian Lea -- Long time maintainer of the TIN newsreader 3080 . Chris Lewis -- First known implementor of the AUTHINFO GENERIC 3081 extension 3082 . Rich Salz -- Original author of INN 3083 . Henry Spencer -- One of the original authors of CNEWS 3084 . Kim Storm -- Original author of the NN newsreader 3086 18. Author's Address 3088 Stan Barber 3089 P.O. Box 300481 3090 Houston, Texas 77230 3091 Email: 3093 This document expires May 15, 2000.