idnits 2.17.1 draft-ietf-nntpext-base-14.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-25) 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: ---------------------------------------------------------------------------- ** 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 1 longer page, the longest (page 1) being 2922 lines 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 816 instances of too long lines in the document, the longest one being 6 characters in excess of 72. ** The abstract seems to contain references ([32], [11], [34], [13], [36], [C], [15], [2], [38], [17], [XX], [4], [42], [19], [21], [6], [23], [8], [0-9a-zA-Z], [25], [GMT], [27], [29], [31], [10], [33], [12], [S], [35], [14], [1], [37], [16], [3], [41], [39], [18], [20], [5], [22], [7], [24], [9], [26], [28], [30]), 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 2 instances of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == Line 380 has weird spacing: '...wercase ind...' == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'SHOULD not' in this paragraph: The server SHOULD not produce output for articles that no longer exist. -- 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 2001) is 8197 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? '2' on line 2657 looks like a reference -- Missing reference section? '3' on line 2659 looks like a reference -- Missing reference section? '4' on line 2661 looks like a reference -- Missing reference section? '1' on line 2655 looks like a reference -- Missing reference section? '5' on line 2667 looks like a reference -- Missing reference section? '0-9a-zA-Z' on line 359 looks like a reference -- Missing reference section? '6' on line 2669 looks like a reference -- Missing reference section? 'C' on line 2354 looks like a reference -- Missing reference section? 'S' on line 2360 looks like a reference -- Missing reference section? '7' on line 2672 looks like a reference -- Missing reference section? '8' on line 2674 looks like a reference -- Missing reference section? '9' on line 2677 looks like a reference -- Missing reference section? '10' on line 718 looks like a reference -- Missing reference section? '11' on line 789 looks like a reference -- Missing reference section? '12' on line 847 looks like a reference -- Missing reference section? '13' on line 899 looks like a reference -- Missing reference section? '14' on line 970 looks like a reference -- Missing reference section? '15' on line 1026 looks like a reference -- Missing reference section? '16' on line 1089 looks like a reference -- Missing reference section? '17' on line 1146 looks like a reference -- Missing reference section? '18' on line 1211 looks like a reference -- Missing reference section? '19' on line 1276 looks like a reference -- Missing reference section? '20' on line 1334 looks like a reference -- Missing reference section? '21' on line 1403 looks like a reference -- Missing reference section? '22' on line 1472 looks like a reference -- Missing reference section? '23' on line 1523 looks like a reference -- Missing reference section? '24' on line 1592 looks like a reference -- Missing reference section? '25' on line 1653 looks like a reference -- Missing reference section? '26' on line 1715 looks like a reference -- Missing reference section? '27' on line 1780 looks like a reference -- Missing reference section? '28' on line 1843 looks like a reference -- Missing reference section? '29' on line 1905 looks like a reference -- Missing reference section? '30' on line 1969 looks like a reference -- Missing reference section? '31' on line 2041 looks like a reference -- Missing reference section? '32' on line 2108 looks like a reference -- Missing reference section? '33' on line 2165 looks like a reference -- Missing reference section? '34' on line 2228 looks like a reference -- Missing reference section? 'GMT' on line 2317 looks like a reference -- Missing reference section? '35' on line 2295 looks like a reference -- Missing reference section? '36' on line 2357 looks like a reference -- Missing reference section? '37' on line 2436 looks like a reference -- Missing reference section? '38' on line 2512 looks like a reference -- Missing reference section? '39' on line 2588 looks like a reference -- Missing reference section? '41' on line 2735 looks like a reference -- Missing reference section? '42' on line 2752 looks like a reference Summary: 13 errors (**), 0 flaws (~~), 6 warnings (==), 47 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 INTERNET DRAFT S. Barber 3 Expires: May 15, 2002 Academ Consulting Services 4 November 2001 6 Network News Transport Protocol 7 draft-ietf-nntpext-base-14.txt 9 1. Status of this Document 11 This document is an Internet-Draft and is in full conformance with 12 Section 10 of RFC 2026. Internet-Drafts are working documents of the 13 Internet Engineering Task Force (IETF), its areas, and its working 14 groups. Note that other groups may also distribute working documents 15 as Internet-Drafts. 17 Internet-Drafts are draft documents valid for a maximum of six months 18 and may be updated, replaced, or made obsolete by other documents at 19 any time. It is inappropriate to use Internet-Drafts as reference 20 material or to cite them other than as "work in progress." 22 The list of current Internet-Drafts can be accesses at 23 http://www.ietf.org/ietf/1id-abstracts.txt. 25 The list of Internet-Draft shadow directories can be accessed at 26 http://www.ietf.org/shadow.html. 28 This section will be updated with the appropriate verbiage from RFC 29 2223 should this document has been found ready for publication as an 30 RFC. 32 This document is a product of the NNTP Working Group, chaired by Ned 33 Freed and Stan Barber. 35 2. Abstract 37 The Network News Transport Protocol has been in use in the Internet 38 for a decade and remains one of the most popular protocols (by volume) 39 in use today. This document is a replacement for RFC 977 and 40 officially updates the protocol specification. It clarifies some 41 vagueness in RFC 977, includes some new base functionality and 42 provides a specific mechanism to add standardized extensions to NNTP. 44 3. Introduction 46 This document specifies the Network News Transport Protocol (NNTP), 47 which is used for the distribution, inquiry, retrieval, and posting of 48 net news articles using a reliable stream-based mechanism. For news 49 reading clients, NNTP enables retrieval of news articles that are 50 stored in a central database, giving subscribers the ability to select 51 only those articles they wish to read. 53 The netnews model provides for indexing, cross-referencing, and 54 expiration of aged messages. For server-to-server interaction, NNTP is 55 designed for efficient transmission of net news articles over a 56 reliable full duplex communication method. 58 Every attempt is made to insure that the protocol specification in 59 this document is compatible with the version specified in RFC 60 977[[1]. However, this version does not support the ill-defined SLAVE 61 command and permits four digit years to be specified in the NEWNEWS 62 and NEWGROUPS commands. It changes the default character set to 63 UTF-8[2] instead of US-ASCII[3]. It also extends the newsgroup 64 name matching capabilities already documented in RFC 977. 66 Generally, new functionality is available using new keywords. Part of 67 that new functionality involves a mechanism to discover what new 68 functionality is available to clients from a server. 69 This mechanism can also be used to add more functionality as needs 70 merit such additions. 72 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 73 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 74 document are to be interpreted as described in RFC 2119[4]. 75 An implementation is not compliant if it fails to satisfy one or more 76 of the MUST requirements for this protocol. An implementation that 78 Barber Page [1] 79 Expires: May 15, 2002 Academ Consulting Services 80 November 2001 81 satisfies all the MUST and all the SHOULD requirements for its 82 protocols is said to be "unconditionally compliant"; one that 83 satisfies all the MUST requirements but not all the SHOULD 84 requirements for NNTP is said to be "conditionally compliant". 86 For the remainder of this memo, the term "client host" refers to a 87 host making use of the NNTP service, while the term "server host" 88 refers to a host that offers the NNTP service. In addition, where 89 examples of interactions between a client host and a server host are 90 provided a "[C]" will be used to represent the client host and a "[S]" 91 will be used to represent the server host. 93 For the remainder of this memo, responses will be described in tables 94 listing the required format of a response followed by the meaning that 95 should be ascribed to that response. 97 4. Basic Operation. 99 Every NNTP session MUST involve the following in this order: 100 CONNECTION 101 GREETING 102 DISCONNECTION 104 Other steps may occur between the GREETING and DISCONNECTION step. 106 They are: 108 CAPABILITIES DISCOVERY 109 NEWS EXCHANGE 110 CONCLUSION 112 NNTP operates over any reliable data stream 8-bit-wide channel. When 113 running over TCP/IP, the official port for the NNTP service is 119. 114 Initially, the server host starts the NNTP service by listening on a 115 TCP port. When a client host wishes to make use of the service, it 116 MUST establish a TCP connection with the server host by connecting to 117 that host on the same port on which the server is listening. This is 118 the CONNECTION step. When the connection is established, the NNTP 119 server host MUST send a greeting. This is the GREETING step. The 120 client host and server host SHOULD then exchange commands and 121 responses (respectively) until the connection is closed or aborted. 123 This final step is called the DISCONNECTION step. 124 If there is a CONCLUSION step, it MUST immediately precede the 125 DISCONNECTION step. There MUST be only one CONNECTION, CONCLUSION and 126 DISCONNECTION step for each NNTP session. All other steps MAY be 127 repeated as needed. For example, the GREETING step may be repeated if 128 the client makes use of the MODE READER command (See Section 7.2 for 129 more on the MODE READER command). 131 The character set for all NNTP commands is UTF-8. Commands in the NNTP 132 MUST consist of an US-ASCII case-insensitive keyword, which MAY be 133 followed by one or more arguments. An US-ASCII CRLF pair MUST 134 terminate all commands. Multiple commands MUST NOT be on the same 135 line. Keywords MUST consist of printable US-ASCII characters. Unless 136 otherwise noted elsewhere in this document, arguments SHOULD consist 137 of printable US-ASCII characters. Keywords and arguments MUST be each 138 separated by one or more US-ASCII SPACE or US-ASCII TAB characters. 139 Keywords MUST be at least three US-ASCII characters and MUST NOT 140 exceed 12 US-ASCII characters. Command lines MUST NOT exceed 512 141 octets, which includes the terminating US-ASCII CRLF pair. Arguments 142 MUST NOT exceed 497 octets. 144 Each response MUST start with a three-digit response code that is 145 sufficient to distinguish all responses. Certain valid responses are 146 defined to be multi-line; for all others, the response is contained in 147 a single line. All multi-line responses MUST adhere to the following 148 format: 150 1. The repsonse consists of a sequence of one or more "lines", each 151 being a stream of octets ending with 0x0D 0x0A (US-ASCII CRLF). 152 Apart from those line endings, the stream MUST NOT include the 153 octets 0x00, 0x0A, or 0x0D (US-ASCII NUL, LF, and CR). 155 Barber Page [2] 156 Expires: May 15, 2002 Academ Consulting Services 157 November 2001 158 2. The first such line contains the response code as with a single 159 line response. 160 3. If any subsequent line begins with the "termination octet" (0x2E 161 or US_ASCII "."), that line MUST be "byte-stuffed" by pre-pending an 162 additional termination octet (0x2E) to that line of the response. 163 4. The lines of the response MUST be followed by a terminating line 164 consisting of a single termination octet (0x2E or US_ASCII 165 ".")followed by CRLF in the normal way. Thus a multi-line response 166 is always terminated with the five octets "CRLF.CRLF" (in US-ASCII). 167 5. There is NO limit on the length of a line. 168 6. When interpreting a multi-line response, the "byte stuffing" MUST 169 be undone; i.e. the client MUST ensure that, in any line beginning 170 with the termination octet followed by octets other than US-ASCII 171 CRLF, that initial termination octet is disregarded. 172 7. Likewise, the terminating line ".CRLF" (in US-ASCII) MUST NOT be 173 considered part of the multi-line response; i.e. the client MUST 174 ensure that any line beginning with the termination octet followed 175 immediately by US-ASCII CRLF is disregarded; (the first CRLF of the 176 terminating "CRLF.CRLF" is, of course, part of the last line of the 177 response). 179 NOTE: Texts using encodings (such as UTF-16 or UTF-32) that may 180 contain the NUL octet or the CR or LF octets in contexts other than 181 the CRLF line ending cannot be reliably conveyed in the above format. 182 Note also that, although this standard does not limit the length of a 183 line in any way, the standards that define the format of articles may 184 do so. 186 An NNTP server MAY have an inactivity autologout timer. Such a timer 187 SHOULD be of at least three minutes duration, with the exception that 188 there MAY be a shorter limit on how long the server is willing to wait 189 for the first command from the client. The receipt of any command 190 from the client during the timer interval SHOULD suffice to reset the 191 autologout timer. Similarly, the receipt of any significant amount of 192 data from the client while in the midst of sending a multilane message 193 to the server (such as during a POST or IHAVE command) SHOULD suffice 194 to reset the autologout timer. When the timer expires, the server 195 SHOULD close the TCP connection without sending any response to the 196 client, including when the client is in the middle of sending a 197 multi-line message to the server. 199 4.1 Response Codes 201 Each response MUST begin with a three-digit status indicator. These 202 are status reports from the server and indicate the response to the 203 last command received from the client. 205 The first digit of the response broadly indicates the success, 206 failure, or progress of the previous command. 208 1xx - Informative message 209 2xx - Command ok 210 3xx - Command ok so far, send the rest of it. 211 4xx - Command was correct, but couldn't be performed for some reason. 212 5xx - Command unimplemented, or incorrect, or a serious program error 213 occurred. 215 The next digit in the code indicates the function response category. 216 x0x - Connection, setup, and miscellaneous messages 217 x1x - Newsgroup selection 218 x2x - Article selection 219 x3x - Distribution functions 220 x4x - Posting 221 x8x - Reserved for authentication and authorization extensions 222 x9x - Reserved for private use (non-standard extensions) 224 Certain responses contain parameters such as numbers and names in 225 addition to the status indicator. In those cases, the number and type 226 of such parameters is fixed for each response code to simplify 227 interpretation by the client (any extension MUST follow this principle 228 as well). In all other cases, the client MUST only use the status 229 indicator itself to determine the nature of the response. The exact 231 Barber Page [3] 232 Expires: May 15, 2002 Academ Consulting Services 233 November 2001 235 response codes that can be returned in response to a given command are 236 detailed in the description of the keyword that is the first part of 237 the command. 239 Parameters MUST be separated from the numeric status indicator and 240 from each other by a single US-ASCII space. All numeric parameters 241 MUST be in base 10 (decimal) format, and MAY have leading zeros. 243 String parameters MUST contain at least one character and MUST NOT 244 contain US-ASCII spaces, CR, LF, or tab). The server MAY add any text 245 after the response code or last parameter as appropriate, and the 246 client MUST NOT make decisions based on this text. Such text MUST be 247 separated from the numeric status indicator or the last parameter by 248 at least one US-ASCII space. 250 The server MUST respond to any command with the appropriate generic 251 response (given in section 4.1.1) if it represents the situation. 252 Otherwise, each recognized command MUST return one of the response 253 codes specifically listed in its description or in an extension. A 254 server MAY provide extensions to this specification, including new 255 commands, new features of existing commands, and other ways of 256 changing the internal state of the server. However, the server MUST 257 NOT produce any other responses to a client that does not invoke any 258 of the additional features. (Therefore a client that restricts itself 259 to this specification will only receive the responses that are 260 listed). 262 If a client receives an unexpected response, it SHOULD use the first 263 digit of the response to determine the result. For example, an 264 unexpected 2xx should be taken as success and an unexpected 4xx or 5xx 265 as failure. 267 Response codes not specified in this standard MAY be used for any 268 installation-specific additional commands also not specified. These 269 SHOULD be chosen to fit the pattern of x9x specified above. 270 Neither this document nor any extension registered with IANA (see 271 section 12) will specify any response codes of the x9x pattern. 272 (Implementers of extensions are accordingly cautioned not to use such 273 responses for extensions that may subsequently be submitted for 274 registration.) 276 4.1.1 Generic Response Codes 278 The server MUST respond to any command with the appropriate one of the 279 following generic responses if it represents the situation. 280 If the command is not recognized, or it is an optional command or 281 extension that is not implemented by the server, the response code 500 282 MUST be returned. 284 If there is a syntax error in the arguments of a recognized command, 285 the response code 501 MUST be returned. Note that where a command has 286 variants depending on a keyword (e.g. LIST ACTIVE and LIST 287 NEWSGROUPS), then 501 MUST be used when the requested variant is not 288 implemented but the base command is. 290 If the client is not authorized to use the specified facility when the 291 server is in its current state, the response code 502 MUST be 292 returned. A different command might change the server state and permit 293 the command if it is retried. 295 If the server does not provide an optional feature, then the response 296 code 403 MUST be returned if the omission is temporary (e.g. because a 297 necessary facility is unavailable) and the code 503 if it is 298 permanent (e.g. because the server does not store the required 299 information). 301 If the server has to terminate the connection for some reason, it MUST 302 give a 400 response code to the next command and then immediately 303 close the TCP connection. It MAY give a 401 response code to any 304 command to indicate that termination is imminent (following a 401 305 response, it MUST NOT close the TCP connection immediately). 307 5. The WILDMAT format 309 The WILDMAT format[5] described here is based on the version first 311 Barber Page [4] 312 Expires: May 15, 2002 Academ Consulting Services 313 November 2001 314 developed by Rich Salz which was derived from the format used in the 315 UNIX "find" command to articulate file names. It was developed to 316 provide a uniform mechanism for matching patterns in the same manner 317 that the UNIX shell matches filenames. Patterns are implicitly 318 anchored at the beginning and end of each string when testing for a 319 match. There are five pattern-matching operations other than a strict 320 one-to-one match between the pattern and the source to be checked for 321 a match. The first is an asterisk (*) to match any sequence of zero or 322 more UTF-8 characters. The second is a question mark (?) to match any 323 single UTF-8 character. The third specifies a specific set of 324 characters. The set is specified as a list of characters, or as a 325 range of characters where the beginning and end of the range are 326 separated by a minus (or dash) character, or as any combination of 327 lists and ranges. The dash can also be included in the set as a 328 character it if is the beginning or end of the set. This set is 329 enclosed in square brackets. The close square bracket (]) may be used 330 in a set if it is the first character in the set. The fourth operation 331 is the same as the logical not of the third operation and is specified 332 the same way as the third with the addition of a caret character (^) 333 at the beginning of the test string just inside the open square 334 bracket. The final operation uses the backslash character to 335 invalidate the special meaning of the open square bracket ([), the 336 asterisk, backslash, or the question mark. Two backslashes in sequence 337 will result in the evaluation of the backslash as a character with no 338 special meaning. 340 Implementers must be careful to apply the pattern-matching operators 341 to whole characters encoded in UTF-8, and not to individual octets. 343 5.1 Negating the wildmat pattern 345 The exclamation point can be used at the beginning of a wildmat to 346 negate it. That is, if the remainder of the pattern would match the 347 string then the negated pattern does not, and vice versa. If it 348 appears as any other character other than the first one, it has no 349 special meaning. 351 5.2 Examples 353 [^]-] matches any single character other than 354 a close square bracket or a minus 355 sign/dash 356 *bdc matches any string that ends with the 357 string "bdc" including the string "bdc" 358 (without quotes) 359 [0-9a-zA-Z] matches any single printable 360 alphanumeric ASCII character 361 a??d matches any four character string which 362 begins with a and ends with d 363 !bc*d matches any string that does not start 364 with "bc" and end with "d" (without 365 quotes) 366 !\\x matches any string that does not start 367 with "\x" (without quotes) 369 6. Format for Keyword Descriptions 371 On the following pages are descriptions of each keyword recognized by 372 the NNTP server and the responses that will be returned by those 373 commands. These keywords are grouped by the functional step in which 374 they are used. 375 Each keyword is shown in upper case for clarity, although the NNTP 376 server ignores case in the interpretation of commands. 377 Parameters are shown as follows: 378 o UPPERCASE indicates literal text to be included in the 379 command; 380 o lowercase indicates a token described elsewhere; 382 Barber Page [5] 383 Expires: May 15, 2002 Academ Consulting Services 384 November 2001 385 o [brackets] indicate that the parameter is optional; 386 o ellipsis... indicates that the parameter may be repeated 387 any number of times (it must occur at least once); 388 o vertical|bar indicates a choice of two mutually exclusive 389 parameters (exactly one must be provided). 391 Parameters are case or language specific only when specified (either 392 in this document or in RFC 1036[6]). 394 The name "wildmat" for a parameter indicates that it is a wildmat 395 format pattern as defined in section 5. 397 7. The GREETING Step 399 7.1 Initial Connection 401 There is no keyword presented by the client upon initial connection to 402 the server. The server MUST present an appropriate response code as a 403 greeting to the client. This response informs the client about what 404 steps the client should take to reach the news exchange step. 405 If the server will accept further commands from the client including 406 POST, the server MUST present a 200 greeting code. 408 If the server will accept further commands from the client, but it is 409 not authorized to post articles using the POST command, the server 410 MUST present a 201 greeting code. 412 Otherwise the server MUST present a 400 or 502 greeting code and then 413 immediately close the connection. 502 MUST be used if the client is 414 not permitted under any circumstances to interact with the server and 415 400 otherwise. 417 7.1.1 Responses 419 200 Service available, posting allowed 420 201 Service available, posting prohibited 421 400 Service temporarily unavailable 422 502 Service unavailable 424 Following a 400 or 502 response the server MUST immediately close the 425 connection. 427 7.1.2 Initial Connection Example 429 Example of a normal connection from an authorized client 430 [Initial TCP connection setup completed.] 431 [C] Initial TCP connection completed 432 [S] 200 NNTP Service Ready, posting permitted 433 Client can send commands at this point. In this example, the client 434 jumps directly to the conclusion step (See section 10). 435 [C] QUIT 436 [S] 205 NNTP Service exits normally 437 [Server closes connection.] 438 Example of a normal connection from an unauthorized client 439 [C] Initial TCP connection completed 440 [S] 502 NNTP Service Unavailable 441 [Server closes connection.] 442 Example of a normal connection from an authorized client that is not 443 permitted to post 444 [Initial TCP connection setup completed.] 445 [S] 201 NNTP Service Ready, posting prohibited 447 Barber Page[6] 448 Expires: May 15, 2002 Academ Consulting Services 449 November 2001 451 Client can send commands at this point. In this example, the client 452 jumps directly to the conclusion step (See section 10). 453 [C] QUIT 454 [S] 205 NNTP Service exits normally 455 [Server closes connection.] 456 Example of a connection from any client where the server is unable to 457 provide service 458 [Initial TCP connection setup completed.] 459 [S] 400 NNTP Service temporarily unavailable 460 [Server closes connection.] 462 7.2 MODE READER 464 MODE READER 466 MODE READER SHOULD be sent by any client that intends to use any 467 command other than IHAVE, HEAD, STAT, LIST, LIST EXTENSIONS, or 468 commands advertised by the server as available via LIST EXTENSIONS. 469 Servers MAY require that this command be issued before any other 470 commands are sent and MAY reject any other commands until after a MODE 471 READER command has been sent. 473 The server MUST present a response using the same codes as the 474 initial greeting (as described in section 7.1) to indicate its 475 ability to provide reading service to the client. 477 Clients SHOULD wait for a response to MODE READER after sending this 478 command and SHOULD NOT send any additional commands until that 479 response has been received from the server. 481 Once MODE READER is sent, IHAVE (and any extensions intended for 482 peer-to-peer article transfer) MAY no longer be permitted, even if it 483 were permitted before the MODE READER command. The results of LIST 484 EXTENSIONS MAY be different following a MODE READER command than prior 485 to the issuing of that command. 487 Servers are encouraged to not require this command even though clients 488 SHOULD send it when appropriate. It is present to support some news 489 architectures that switch between modes based on whether a given 490 connection is a peer-to-peer connection with another server or a news 491 reading client. 493 7.2.1 Responses 494 200 Posting permitted 495 201 Posting prohibited 496 400 Service temporarily unavailable 497 502 Service unavailable 499 Following a 400 or 502 response the server MUST immediately close the 500 connection. 501 Note that the response need not be the same as the one presented 502 during the initial greeting. 504 7.2.2 MODE READER Examples 506 Example of use of the MODE READER command by an authorized client 507 [C] MODE READER 508 [S] 200 NNTP Service Ready, posting permitted 509 Client can send commands at this point. In this example, the client 510 jumps directly to the conclusion step (See section 10). 511 [C] QUIT 512 [S] 205 NNTP Service exits normally 513 [Server closes connection.] 515 Barber Page[7] 516 Expires: May 15, 2002 Academ Consulting Services 517 November 2001 518 Example of use of MODE READER by a client not authorized to receive 519 service from the server as a news reader 520 [C] MODE READER 521 [S] 502 Service Unavailable 522 [Server closes connection.] 524 Example of a normal connection from an authorized client that is not 525 permitted to post 526 [C] MODE READER 527 [S] 201 NNTP Service Ready, posting prohibited 528 Client can send commands at this point. In this example, the client 529 jumps directly to the conclusion step (See section 10). 530 [C] QUIT 531 [S] 205 NNTP Service exits normally 532 [Server closes connection.] 534 Example of a connection from any client where the server is unable to 535 provide news reader service 536 [C] MODE READER 537 [S] 400 NNTP Service temporarily unavailable 538 [Server closes connection.] 540 8. The CAPABILITIES DISCOVERY Step 542 To discover what extensions are available, an NNTP client can query 543 the server with the LIST EXTENSIONS command. 544 If a particular extension is unavailable, the client can attempt to 545 work around it or it may wish to terminate the session. 546 See section 12 for further discussion of extensions. 548 8.1 LIST EXTENSIONS 550 The LIST EXTENSIONS command allows a client to determine which 551 extensions are supported by the server. 553 To discover what extensions are available, an NNTP client SHOULD query 554 the server early in the session for extensions information by issuing 555 the LIST EXTENSIONS command. This command MAY be issued at anytime 556 during a session. It is not required that the client issues this 557 command before attempting to make use of any extension. The response 558 generated by this command MAY change during a session because of other 559 state information. However, an NNTP client MUST NOT cache (for use in 560 another session) any information returned if the LIST EXTENSIONS 561 command succeeds. That is, an NNTP client is only able to get the 562 current and correct information concerning available extensions during 563 a session by issuing a LIST EXTENSIONS command during that session and 564 processing that response. 566 A successful response starts with a 202 code and is followed by a list 567 of extensions, one per line. Each line MUST begin with an 568 extension-label and optionally one or more parameters (separated by 569 single spaces). The extension-label and the meaning of the parameters 570 are specified as part of the definition of the extension. The 571 extension-label MUST be in uppercase. 573 The server MUST NOT list the same extension twice in the response, and 574 MUST list all supported extensions. The order in which the extensions 575 are listed is not significant. The server need not even consistently 576 return the same order. 578 Barber Page[8] 579 Expires: May 15, 2002 Academ Consulting Services 580 November 2001 582 If the server does not support any extensions, it SHOULD return a 402 583 failure response but MAY return an empty list instead. 585 8.1.1 Responses 587 202 Extension list follows (multi-line response) 588 400 Service temporarily unavailable 589 402 Server has no extensions 590 500 Unknown Command 591 501 Syntax Error 592 502 Program error, function not performed 594 Following a 503 response an extension might still be available, and 595 the client MAY attempt to use it 596 The LIST EXTENSIONS command is optional, and a server MAY issue a 500 597 (unknown command) or 501 (syntax error) response to it. 599 8.1.1.1 LIST EXTENSIONS Examples 601 Example of a successful response: 603 [C] LIST EXTENSIONS 604 [S] 202 Extensions supported: 605 [S] OVER 606 [S] PAT 607 [S] LISTGROUP 608 [S] . 610 The particular extensions shown here are simply examples of what might 611 be defined in other places, and no particular meaning should be 612 attributed to them. 613 Example where no extensions are available, using preferred 614 format: 615 [C] LIST EXTENSIONS 616 [S] 402 Server has no extensions 618 Example where no extensions are available, using an empty list: 619 [C] LIST EXTENSIONS 620 [S] 202 Extensions supported: 621 [S] . 623 9. The NEWS EXCHANGE Step 625 During this step, two basic types of transactions occur: 627 o article retrieval from the server 628 o article posting to the server 630 9.1 Article Retrieval 632 News reading clients have available a variety of mechanisms to 633 retrieve articles via NNTP. The news articles are stored and indexed 634 using three types of keys. One key is the message id of an article. 635 According to RFC 1036, this identifier should be globally unique. 637 Another key is composed of the newsgroup name and the article number 638 within that newsgroup. That key MUST be unique to a particular server 639 (there will be only one article with that number within a particular 640 newsgroup), but is not required to be globally unique. Additionally, 641 because the same article can be cross-posted to multiple newsgroups, 642 there may be multiple keys that point to the same article on the same 644 Barber Page [9] 645 Expires: May 15, 2002 Academ Consulting Services 646 November 2001 647 server. The final key is the arrival timestamp, giving the time that 648 the article arrived at the server. 650 The server MUST ensure that article numbers are issued in order of 651 arrival timestamp; that is, articles arriving later MUST have higher 652 numbers than those that arrive earlier. The server SHOULD allocate the 653 next sequential unused number to each new article. 655 Article numbers MUST lie between 1 and 4,294,967,295 inclusive. The 656 client and server SHOULD NOT use leading zeroes in specifying article 657 numbers, and MUST NOT use more than 16 digits. In some situations, the 658 value zero replaces an article number to show some special situation. 660 9.1.1 Article Retrieval by Newsgroup Name and Article Number 662 The following commands are used to set the current newsgroup name and 663 the "current article pointer" which is used by other commands for 664 article retrieval. At the start of an NNTP session, both of these 665 values are undefined. 667 9.1.1.1 GROUP 669 GROUP ggg 670 The required parameter ggg is the name of the newsgroup to be selected 671 (e.g. "news.software.b"). A list of valid newsgroups may be obtained 672 by using the LIST keyword. See section 9.4 for more information on 673 the LIST keyword. 675 The successful selection response will return the article numbers of 676 the first and last articles in the group at the moment of selection 677 (these numbers are referred to as the "reported low water mark" and 678 the "reported high water mark"), and an estimate of the number of 679 articles on file in the group. 681 If the group is not empty, the estimate MUST be at least the actual 682 number of articles available, and MUST be no greater than one more 683 than the difference between the reported low and high water marks. 684 (Some implementations will actually count the number of articles on 685 file. Others will just subtract the low water mark from the high water 686 mark and add one to get an estimate.) 688 If the group is empty, one of the following three situations will 689 occur. Clients MUST accept all three cases; servers MUST NOT represent 690 an empty group in any other way. 691 o The high water mark will be one less than the low water 692 mark, and the estimated article count will be zero. Servers 693 SHOULD use this method to show an empty group. This is the only 694 time that the high water mark can be less than the low water 695 mark. 696 o All three numbers will be zero. 697 o The high water mark is greater than or equal to the low 698 water mark; the estimated article count might be zero or 699 non-zero; if non-zero, the same requirements apply as for a 700 non-empty group. 702 The set of articles in a group may change after the GROUP command is 703 carried out. That is: 704 o articles may be removed from the group 705 o articles may be reinstated in the group with the same 706 article number, but those articles MUST have numbers no less than 707 the reported low water mark (note that this is a reinstatement of 708 the previous article, not a new article reusing the number) 709 o new articles may be added with article numbers greater than 710 the reported high water mark (if an article that was the one with 711 the highest number has been removed, the next new article will 712 not have the number one greater than the reported high water 713 mark) 715 Except when the group is empty and all three numbers are zero, 716 whenever a subsequent GROUP command for the same newsgroup is issued, 718 Barber Page [10] 719 Expires: May 15, 2002 Academ Consulting Services 720 November 2001 721 either by the same client or a different client, the reported low 722 water mark in the response MUST be no less than that in any previous 723 response for that newsgroup sent to any client. The client may make 724 use of the low water mark to remove all remembered information about 725 articles with lower numbers, as these will never recur. This includes 726 the situation when the high water mark is one less than the low water 727 mark. 729 No similar assumption can be made about the high water mark, as this 730 can decrease if an article is removed, and then increase again if it 731 is reinstated or if new articles arrive. 733 When a valid group is selected by means of this command, the 734 internally maintained "current article pointer" MUST be set to the 735 first article in the group and the name of the current newsgroup MUST 736 be set to the selected newsgroup name. If an invalid group is 737 specified, the previously selected group, if any, and article MUST 738 remain selected. If an empty newsgroup is selected, the "current 739 article pointer" is in an indeterminate state and MUST NOT be used. 741 The GROUP keyword (or the LISTGROUP keyword, if implemented) MUST be 742 used by a client and a successful response received before the any 743 other command is used that depends on having the "current article 744 pointer" be valid. 746 If the group specified is not available on the server MUST return a 747 411 error code. 749 9.1.1.1.1 Responses 751 211 n l h ggg Group successfully selected (n = 752 estimated number of articles in the 753 group, l = low water mark, h = high 754 water mark, ggg = name of the group 755 411 No such newsgroup 757 9.1.1.1.2 GROUP Examples 759 Example for a group known to the server 760 [C] GROUP misc.test 761 [S] 211 1234 3000234 3002322 misc.test 763 Example for a group unknown to the server 764 [C] GROUP example.is.sob.bradner.or.barber 765 [S] 411 example.is.sob.bradner.or.barber is unknown 767 9.1.1.2 LAST 769 LAST 771 If the current newsgroup is valid, the internally maintained "current 772 article pointer" MUST be set to the previous article in the current 773 newsgroup. If already positioned at the first article of the 774 newsgroup, an error message MUST be returned and the current article 775 MUST remain selected. 777 There MAY be no previous article in the group, although the current 778 article number is not the reported low water mark. There MUST NOT be a 779 previous article when the current article number is the reported low 780 water mark. 782 Because articles can be removed and added, the results of multiple 783 LAST and NEXT commands MAY not be consistent over the life of a 784 particular NNTP session. 786 If successful, a response indicating the current article number and a 787 message-id string MUST be returned. No article text is sent in 789 Barber Page [11] 790 Expires: May 15, 2002 Academ Consulting Services 791 November 2001 792 response to this command. 794 9.1.1.2.1 Responses 796 223 n a Article found (n = number, a = message-id) 797 412 No newsgroup selected 798 420 Current article pointer is invalid 799 422 No previous article in this group 801 9.1.1.2.2 LAST Examples 803 Example of a successful article retrieval using LAST 804 [S] 200 NNTP Service Ready 805 [C] GROUP misc.test 806 [S] 211 1234 3000234 3002322 misc.test 807 [C] NEXT 808 [S] 223 3000237 <668929@domain.com> retrieved 809 [C] LAST 810 [S] 223 3000234 <45223423@to.to> retrieved 812 Example of an attempt to retrieve an article without having selected a 813 group (via the GROUP command) first 814 [S] 200 NNTP Service ready 815 [C] LAST 816 [S] 412 no newsgroup selected 818 Example of an attempt to retrieve an article using the LAST command 819 when the current article pointer is pointing at the first article in 820 the group 821 [S] 200 NNTP Service Ready 822 [C] GROUP misc.test 823 [S] 211 1234 3000234 3002322 misc.test 824 [C] LAST 825 [S] 422 No previous article to retrieve 827 Example of an attempt to retrieve an article using the LAST command 828 when the current group selected is empty 829 [S] 200 NNTP Service Ready 830 [C] GROUP example.empty.newsgroup 831 [S] 211 0 0 0 example.empty.newsgroup 832 [C] LAST 833 [S] 420 No current article selected 835 9.1.1.3 NEXT 837 NEXT 839 If the current newsgroup is valid, the internally maintained "current 840 article pointer" MUST be advanced to the next article in the current 841 newsgroup. If no more articles remain in the current group, an error 842 message MUST be returned and the current article MUST remain selected. 843 If successful, a response indicating the current article number and 844 the message-id string MUST be returned. No article text is sent in 845 response to this command. 847 Barber Page [12] 848 Expires: May 15, 2002 Academ Consulting Services 849 November 2001 850 9.1.1.3.1 Responses 852 223 n a Article found (n = number, a = message-id) 853 412 No newsgroup selected 854 420 Current article pointer is invalid 855 421 No next article in this group 857 9.1.1.3.2 NEXT Examples 859 Example of a successful article retrieval using NEXT 860 [S] 200 NNTP Service Ready 861 [C] GROUP misc.test 862 [S] 211 1234 3000234 3002322 misc.test 863 [C] NEXT 864 [S] 223 3000237 <668929@domain.com> retrieved 866 Example of an attempt to retrieve an article without having selected a 867 group (via the GROUP command) first 868 [S] 200 NNTP Service ready 869 [C] NEXT 870 [S] 412 no newsgroup selected 872 Example of an attempt to retrieve an article using the NEXT command 873 when the current article pointer is pointing at the last article in 874 the group 875 [S] 200 NNTP Service Ready 876 [C] GROUP misc.test 877 [S] 211 1234 3000234 3002322 misc.test 878 [C] ARTICLE 3002322 879 [S] 220 3002322 <411@whitehouse.gov> retrieved 880 [S] Path: pathost!demo!whitehouse!not-for-mail 881 [S] From: nobody@whitehouse.gov(Demo User) 882 [S] Newsgroups: misc.test 883 [S] Subject: I am just a test article 884 [S] Date: 6 Oct 1998 04:38:40 -0500 885 [S] Organization: The White House, Washington, DC 886 [S] Message-ID: <411@whitehouse.gov> 887 [S] 888 [S] This is just a test article. 889 [S] . 890 [C] NEXT 891 [S] 421 No next article to retrieve 893 Example of an attempt to retrieve an article using the NEXT command 894 when the current group selected is empty 895 [S] 200 NNTP Service Ready 896 [C] GROUP example.empty.newsgroup 897 [S] 211 0 0 0 example.empty.newsgroup 899 Barber Page [13] 900 Expires: May 15, 2002 Academ Consulting Services 901 November 2001 902 [C] NEXT 903 [S] 420 No current article selected 905 9.2 Retrieval of Articles and Article Sections 907 The ARTICLE, BODY, HEAD, and STAT commands are very similar. They 908 differ only in the parts of the article that are presented to the 909 client and in the successful response code. The ARTICLE command is 910 described here in full, while the other commands are described in 911 terms of the differences. 913 An article, as defined by RFC 1036, consists of two parts: the article 914 headers and the article body. When responding to one of these 915 commands, the server presents the entire article or appropriate part 916 and does not attempt to alter or translate it in any way. 918 9.2.1 ARTICLE 920 ARTICLE 921 ARTICLE [number] 923 The ARTICLE command selects an article based on the arguments and 924 presents the header, a blank line, and the body of that article. The 925 command has two forms. 927 In the first form, a message-id is specified (including the angle 928 brackets), and the server presents the article with that message-id in 929 its headers. In this case, the server MUST NOT alter the "current 930 article pointer". This is both to facilitate the presentation of 931 articles that may be referenced within another article being read, and 932 because of the semantic difficulties of determining the proper 933 sequence and membership of an article which may have been posted to 934 more than one newsgroup. 936 In the second form, an article number may be specified. If so, and if 937 there is an article with that number in the currently selected group, 938 the server MUST set the current article pointer to that number. 939 Then, whether or not a number was specified, the article indicated by 940 the current article pointer is presented to the client. 941 Note that a previously valid article number MAY become invalid if the 942 article has been removed. A previously invalid article number MAY 943 become valid if the article has been reinstated, but such an article 944 number MUST be no less than the reported low water mark for that 945 group. 947 The server MUST NOT change the currently selected group as a result of 948 this command. The server MUST NOT change the current selected article 949 except when an article number argument was provided and the article 950 exists; in particular, it MUST NOT change it following an unsuccessful 951 response. 953 9.2.1.1 Responses 954 First form (message-id specified): 956 220 0 a Article follows (multi-line response, a = 957 message-id) 958 430 No article found with that message-id 959 502 Program error, function not performed 961 Second form (optional article number specified): 963 220 n a Article follows (multi-line response, n = 964 article number, a = message-id) 965 412 No newsgroup selected 966 420 No current article selected 967 423 No such article in this newsgroup 968 502 Program error, function no performed 970 Barber Page [14] 971 Expires: May 15, 2002 Academ Consulting Services 972 November 2001 974 The 420 response only occurs if no article number has been specified. 975 In the 220 response, the first parameter is 0 for the first form and 976 the article number (within the current group) for the second form. The 977 second parameter is the message-id of the article (within angle 978 brackets). This is taken from the message-id header line of the 979 article (required by RFC 1036). If there is no such line, the 980 message-id "<0>" MUST be used instead (without the double quotes). 981 Since the message-id field is unique for each article, it may be used 982 by a client to skip duplicate displays of articles that have been 983 posted more than once, or to more than one newsgroup. 984 The article headers and body are returned as a multilane response 985 following the initial response line. 987 9.2.1.2 Examples 988 Example of a successful retrieval of an article (using no article 989 number) 990 [S] 200 NNTP Service Ready 991 [C] GROUP misc.test 992 [S] 211 1234 3000234 3002322 misc.test 993 [C] ARTICLE 994 [S] 220 3000234 <45223423@to.to> 995 [S] Path: pathost!demo!somewhere!not-for-mail 996 [S] From: nobody@nowhere.to (Demo User) 997 [S] Newsgroups: misc.test 998 [S] Subject: I am just a test article 999 [S] Date: 6 Oct 1998 04:38:40 -0500 1000 [S] Organization: Nowhere, To 1001 [S] Message-ID: <45223423@to.to> 1002 [S] 1003 [S] This is just a test article. 1004 [S] . 1006 Example of a successful retrieval of an article by message-id 1007 [S] 200 NNTP Service Ready 1008 [C] ARTICLE <45223423@to.to> 1009 [S] 220 0 <45223423@to.to> 1010 [S] Path: pathost!demo!somewhere!not-for-mail 1011 [S] From: nobody@nowhere.to (Demo User) 1012 [S] Newsgroups: misc.test 1013 [S] Subject: I am just a test article 1014 [S] Date: 6 Oct 1998 04:38:40 -0500 1015 [S] Organization: Nowhere, To 1016 [S] Message-ID: <45223423@to.to> 1017 [S] 1018 [S] This is just a test article. 1019 [S] . 1021 Example of an unsuccessful retrieval of an article by message-id 1022 [S] 200 NNTP Service Ready 1023 [C] ARTICLE 1024 [S] 430 No Such Article Found 1026 Barber Page [15] 1027 Expires: May 15, 2002 Academ Consulting Services 1028 November 2001 1029 Example of an unsuccessful retrieval of an article by number 1030 [S] 200 NNTP Service Ready 1031 [C] GROUP misc.test 1032 [S] 211 1234 3000234 3002322 news.groups 1033 [C] ARTICLE 300256 1034 [S] 423 No such article number in this group 1036 Example of an unsuccessful retrieval of an article by number because 1037 no newsgroup was selected first 1038 [S] 200 NNTP Service Ready 1039 [C] ARTICLE 300256 1040 [S] 412 No newsgroup selected 1042 Example of an attempt to retrieve an article when the current group 1043 selected is empty 1044 [S] 200 NNTP Service Ready 1045 [C] GROUP example.empty.newsgroup 1046 [S] 211 0 0 0 example.empty.newsgroup 1047 [C] ARTICLE 1048 [S] 420 No current article selected 1050 Example of a failure due to the service being unavailable 1051 [S] 200 NNTP Service Ready 1052 [C] ARTICLE 1053 [S] 502 Service unavailable 1055 9.2.2 HEAD 1056 HEAD 1057 HEAD [number] 1059 The HEAD command behaves identically to the ARTICLE command except 1060 that, if the article exists, only the headers are presented (the blank 1061 line separating the headers and body MUST NOT be included). 1063 9.2.2.1 Responses 1064 First form (message-id specified): 1066 221 0 a Article follows (multi-line response, a = 1067 message-id) 1068 430 No article found with that message-id 1069 502 Program error, function not performed 1071 Second form (optional article number specified): 1073 221 n a Article follows (multi-line response, n = 1074 article number, a = message-id) 1075 412 No newsgroup selected 1076 420 No current article selected 1077 423 No such article in this newsgroup 1078 502 Program error, function no performed 1080 Except that only the headers are included in the response, the 221 1081 response behaves identically to the 220 response of the ARTICLE 1082 command. 1084 9.2.2.2 Examples 1086 Example of a successful retrieval of the headers in an article (using 1087 no article number) 1089 Barber Page [16] 1090 Expires: May 15, 2002 Academ Consulting Services 1091 November 2001 1093 [S] 200 NNTP Service Ready 1094 [C] GROUP misc.test 1095 [S] 211 1234 3000234 3002322 misc.test 1096 [C] HEAD 1097 [S] 221 3000234 <45223423@to.to> 1098 [S] Path: pathost!demo!somewhere!not-for-mail 1099 [S] From: nobody@nowhere.to (Demo User) 1100 [S] Newsgroups: misc.test 1101 [S] Subject: I am just a test article 1102 [S] Date: 6 Oct 1998 04:38:40 -0500 1103 [S] Organization: Nowhere, To 1104 [S] Message-ID: <45223423@to.to> 1105 [S] . 1107 Example of a successful retrieval of the headers in an article by 1108 message-id 1109 [S] 200 NNTP Service Ready 1110 [C] HEAD <45223423@to.to> 1111 [S] 221 0 <45223423@to.to> 1112 [S] Path: pathost!demo!somewhere!not-for-mail 1113 [S] From: nobody@nowhere.to (Demo User) 1114 [S] Newsgroups: misc.test 1115 [S] Subject: I am just a test article 1116 [S] Date: 6 Oct 1998 04:38:40 -0500 1117 [S] Organization: Nowhere, To 1118 [S] Message-ID: <45223423@to.to> 1119 [S] . 1121 Example of an unsuccessful retrieval of the header of an article by 1122 message-id 1123 [S] 200 NNTP Service Ready 1124 [C] HEAD 1125 [S] 430 No Such Article Found 1127 Example of an unsuccessful retrieval of the header of an article by 1128 number 1129 [S] 200 NNTP Service Ready 1130 [C] GROUP misc.test 1131 [S] 211 1234 3000234 3002322 misc.test 1132 [C] HEAD 300256 1133 [S] 423 No such article number in this group 1135 Example of an unsuccessful retrieval the header of an article by 1136 number because no newsgroup was selected first 1137 [S] 200 NNTP Service Ready 1138 [C] HEAD 300256 1139 [S] 412 No newsgroup selected 1141 Example of an attempt to retrieve the header of an article when the 1142 current group selected is empty 1143 [S] 200 NNTP Service Ready 1144 [C] GROUP example.empty.newsgroup 1146 Barber Page [17] 1147 Expires: May 15, 2002 Academ Consulting Services 1148 November 2001 1149 [S] 211 0 0 0 example.empty.newsgroup 1150 [C] HEAD 1151 [S] 420 No current article selected 1153 Example of a failure due to the service being unavailable 1154 [S] 200 NNTP Service Ready 1155 [C] HEAD 1156 [S] 502 Service unavailable 1158 9.2.3 BODY 1160 BODY 1161 BODY [number] 1163 The BODY command behaves identically to the ARTICLE command except 1164 that, if the article exists, only the body is presented (the blank 1165 line separating the headers and body MUST NOT be included). 1167 9.2.3.1 Responses 1169 First form (message-id specified): 1171 222 0 a Article follows (multi-line response, a = 1172 message-id) 1173 430 No article found with that message-id 1174 502 Program error, function not performed 1176 Second form (optional article number specified): 1178 222 n a Article follows (multi-line response, n = 1179 article number, a = message-id) 1180 412 No newsgroup selected 1181 420 No current article selected 1182 423 No such article in this newsgroup 1183 502 Program error, function no performed 1185 Except that only the body is included in the response, the 222 1186 response behaves identically to the 220 response of the ARTICLE 1187 command. 1189 9.2.3.2 Examples 1191 Example of a successful retrieval of the body of an article (using no 1192 article number) 1193 [S] 200 NNTP Service Ready 1194 [C] GROUP misc.test 1195 [S] 211 1234 3000234 3002322 misc.test 1196 [C] BODY 1197 [S] 222 3000234 <45223423@to.to> 1198 [S] This is just a test article. 1199 [S] . 1201 Example of a successful retrieval of the body of an article by 1202 message-id 1203 [S] 200 NNTP Service Ready 1204 [C] BODY <45223423@to.to> 1205 [S] 222 0 <45223423@to.to> 1206 [S] This is just a test article. 1207 [S] . 1209 Example of an unsuccessful retrieval of the body of an article by 1211 Barber Page [18] 1212 Expires: May 15, 2002 Academ Consulting Services 1213 November 2001 1214 message-id 1216 [S] 200 NNTP Service Ready 1217 [C] BODY 1218 [S] 430 No Such Article Found 1220 Example of an unsuccessful retrieval of the body of an article by 1221 number 1222 [S] 200 NNTP Service Ready 1223 [C] GROUP misc.test 1224 [S] 211 1234 3000234 3002322 misc.test 1225 [C] BODY 300256 1226 [S] 423 No such article number in this group 1228 Example of an unsuccessful retrieval of the body of an article by 1229 number because no newsgroup was selected first 1230 [S] 200 NNTP Service Ready 1231 [C] BODY 300256 1232 [S] 412 No newsgroup selected 1234 Example of an attempt to retrieve the body of an article when the 1235 current group selected is empty 1236 [S] 200 NNTP Service Ready 1237 [C] GROUP example.empty.newsgroup 1238 [S] 211 0 0 0 example.empty.newsgroup 1239 [C] BODY 1240 [S] 420 No current article selected 1242 Example of a failure due to the service being unavailable 1243 [S] 200 NNTP Service Ready 1244 [C] BODY 1245 [S] 502 Service unavailable 1247 9.2.4 STAT 1248 STAT 1249 STAT [number] 1251 The STAT command behaves identically to the ARTICLE command except 1252 that, if the article exists, it is NOT presented to the client. 1253 This command allows the client to determine whether an article exists, 1254 and in the second form what its message-id is, without having to 1255 process an arbitrary amount of text. 1257 9.2.4.1 Responses 1259 First form (message-id specified): 1261 223 0 a Article follows (a = message-id) 1262 430 No article found with that message-id 1263 502 Program error, function not performed 1265 Second form (optional article number specified): 1267 223 n a Article follows (n = article number, a = 1268 message-id) 1269 412 No newsgroup selected 1270 420 No current article selected 1271 423 No such article in this newsgroup 1272 502 Program error, function no performed 1274 The parameters of the 223 response are identical to those that would 1276 Barber Page [19] 1277 Expires: May 15, 2002 Academ Consulting Services 1278 November 2001 1279 have been given in a 220 response to the equivalent ARTICLE command. 1280 However, the response is NOT multi-line. 1282 9.2.4.2 Examples 1284 Example of STAT on an existing article (using no article number) 1285 [S] 200 NNTP Service Ready 1286 [C] GROUP misc.test 1287 [S] 211 1234 3000234 3002322 misc.test 1288 [C] STAT 1289 [S] 223 3000234 <45223423@to.to> 1291 Example of a STAT of an existing article by message-id 1292 [S] 200 NNTP Service Ready 1293 [C] STAT <45223423@to.to> 1294 [S] 223 0 <45223423@to.to> 1296 Example of an STAT of an article not on the server by message-id 1297 [S] 200 NNTP Service Ready 1298 [C] STAT 1299 [S] 430 No Such Article Found 1301 Example of STAT of an article not in the server by number 1302 [S] 200 NNTP Service Ready 1303 [C] GROUP misc.test 1304 [S] 211 1234 3000234 3002322 misc.test 1305 [C] STAT 300256 1306 [S] 423 No such article number in this group 1308 Example of STAT of an article by number when no newsgroup was selected 1309 first 1310 [S] 200 NNTP Service Ready 1311 [C] STAT 300256 1312 [S] 412 No newsgroup selected 1314 Example of STAT of an article when the current group selected is empty 1315 [S] 200 NNTP Service Ready 1316 [C] GROUP example.empty.newsgroup 1317 [S] 211 0 0 0 example.empty.newsgroup 1318 [C] STAT 1319 [S] 420 No current article selected 1321 Example of a failure due to the service being unavailable 1322 [S] 200 NNTP Service Ready 1323 [C] STAT 1324 [S] 502 Service unavailable 1326 9.3 Article Posting 1328 Article posting is done in one of two modes: individual article 1329 posting from news reading clients and article transfer from other news 1330 servers. 1332 9.3.1 POST 1334 Barber Page [20] 1335 Expires: May 15, 2002 Academ Consulting Services 1336 November 2001 1338 POST 1340 If posting is allowed, response code 340 MUST be returned to indicate 1341 that the article to be posted should be sent. Response code 440 MUST 1342 be sent if that posting is prohibited for some installation-dependent 1343 reason. 1345 If posting is permitted, the article MUST be presented to the server 1346 by the client in the format specified by RFC 1036 (or by any of its 1347 successors or extensions). The text forming the header and body of the 1348 message to be posted MUST be sent by the client in the format defined 1349 above (section 4) for multi-line responses (except that there is no 1350 initial line containing a response code). Thus a single period (".") 1351 on a line indicates the end of the text, and lines starting with a 1352 period in the original text have that period doubled during 1353 transmission. 1355 Following the presentation of the termination sequence by the client, 1356 the server MUST return a response code indicating success or failure 1357 of the article transfer. Note that response codes 340 and 440 are used 1358 in direct response to the POST command. Others are returned following 1359 the sending of the article. 1361 No attempt shall be made by the server to filter characters, fold or 1362 limit lines, or otherwise process incoming text. The intent is that 1363 the server just passes the incoming message to be posted to the server 1364 installation's news posting software, which is not part of this 1365 specification. 1367 The client SHOULD NOT assume that the article has been successfully 1368 transferred unless it receives an affirmative response from the 1369 server. Since, however, the affirmative response may have been sent 1370 and lost, the client SHOULD use the same message-id in the article 1371 when resending it or check whether the article was successfully posted 1372 before resending it to ensure that the resend will not result in a 1373 duplicate article. 1375 9.3.1.1 Responses 1377 240 Article received ok 1378 340 Send article to be posted 1379 440 Posting not permitted 1380 441 Posting failed 1382 9.3.1.2 Examples 1384 Example of a successful posting 1385 [S] 200 NNTP Service Ready 1386 [C] POST 1387 [S] 340 Input article. End with . 1388 [C] From: demo@testdomain.com(Demo User) 1389 [C] Newsgroups: misc.test 1390 [C] Subject: I am just a test article 1391 [C] Organization: Testdomain, USA 1392 [C] 1393 [C] This is just a test article. 1394 [C] . 1395 [S] 240 Article received ok 1397 Example of an unsuccessful posting 1398 [S] 200 NNTP Service Ready 1399 [C] POST 1400 [S] 340 Input article. End with . 1401 [C] From: demo@testdomain.com(Demo User) 1403 Barber Page [21] 1404 Expires: May 15, 2002 Academ Consulting Services 1405 November 2001 1407 [C] Newsgroups: misc.test 1408 [C] Subject: I am just a test article 1409 [C] Organization: Testdomain, USA 1410 [C] 1411 [C] This is just a test article. 1412 [C] . 1413 [S] 441 Posting failed 1415 Example of an attempt to posting when posting is not allowed 1416 [S] 201 NNTP Service Ready, read-only 1417 [C] POST 1418 [S] 440 Posting not permitted 1420 9.3.2 IHAVE 1422 IHAVE 1424 The IHAVE command informs the server that the client has an article 1425 whose id is . If the server desires a copy of that 1426 article, it MUST return response code 335 instructing the client to 1427 send the entire article. If the server does not want the article (if, 1428 for example, the server already has a copy of it), response code 435 1429 indicating that the article is not wanted MUST be returned. Finally, 1430 if the article isn't wanted immediately but the client should retry 1431 later if possible (if, for example, another client is in the process 1432 of sending the same article to the server), response code 436 MUST be 1433 returned. 1435 If transmission of the article is requested, the client MUST send the 1436 entire article, including header and body, in the format defined above 1437 (section 4) for multi-line responses (except that there is no initial 1438 line containing a response code). Thus a single period (".") on a line 1439 indicates the end of the text, and lines starting with a period in the 1440 original text have that period doubled during transmission. The server 1441 MUST then return a response code indicating success or failure of the 1442 transferal of the article. 1444 This function differs from the POST command in that it is intended for 1445 use in transferring already-posted articles between hosts. It SHOULD 1446 NOT be used when the client is a personal news reading program, since 1447 this command indicates that the forthcoming article has already been 1448 posted at another site and is being forwarded from another host. 1449 However, the server MAY elect not to post or forward the article if 1450 after further examination of the article it deems it inappropriate to 1451 do so. Reasons for such subsequent rejection of an article may include 1452 such problems as inappropriate newsgroups or distributions, disk space 1453 limitations, article lengths, garbled headers, and the like. These are 1454 typically restrictions enforced by the server host's news software and 1455 not necessarily the NNTP server itself. 1457 The client SHOULD NOT assume that the article has been successfully 1458 transferred unless it receives an affirmative response from the 1459 server. A lack of response (such as a dropped network connection or a 1460 network timeout) SHOULD be treated the same as a 436 error response. 1461 Because some news server software may not be able to immediately 1462 determine whether or not an article is suitable for posting or 1463 forwarding, an NNTP server MAY acknowledge the successful transfer of 1464 the article (with a 235 response) but later silently discard it. 1466 9.3.2.1 Responses 1468 235 Article transferred ok 1469 335 Send article to be transferred 1470 435 Article not wanted, please don't send it. 1472 Barber Page [22] 1473 Expires: May 15, 2002 Academ Consulting Services 1474 November 2001 1476 436 Transfer failed, try again later. 1477 437 Article rejected, please don't sent it again. 1479 9.3.2.2 Examples 1481 Example of successfully sending an article to another site 1482 [S] 200 NNTP Service Ready 1483 [C] IHAVE 1484 [S] 335 Send it. End with . 1485 [C] Path: pathost!demo!somewhere!not-for-mail 1486 [C] From: nobody@nowhere.to (Demo User) 1487 [C] Newsgroups: misc.test 1488 [C] Subject: I am just a test article 1489 [C] Date: 6 Oct 1998 04:38:40 -0500 1490 [C] Organization: Nowhere, To 1491 [C] Message-ID: 1492 [C] 1493 [C] This is just a test article. 1494 [C] . 1495 [S] 235 Article transferred ok 1497 Example of sending an article to another site that rejects it 1498 [S] 200 NNTP Service Ready 1499 [C] IHAVE 1500 [S] 335 Send it. End with . 1501 [C] Path: pathost!demo!somewhere!not-for-mail 1502 [C] From: nobody@nowhere.to (Demo User) 1503 [C] Newsgroups: misc.test 1504 [C] Subject: I am just a test article 1505 [C] Date: 6 Oct 1998 04:38:40 -0500 1506 [C] Organization: Nowhere, To 1507 [C] Message-ID: 1508 [C] 1509 [C] This is just a test article. 1510 [C] . 1511 [S] 437 Article rejected. Don't send again 1513 Example of sending an article to another site where the transfer fails 1514 [S] 200 NNTP Service Ready 1515 [C] IHAVE 1516 [S] 335 Send it. End with . 1517 [C] Path: pathost!demo!somewhere!not-for-mail 1518 [C] From: nobody@nowhere.to (Demo User) 1519 [C] Newsgroups: misc.test 1520 [C] Subject: I am just a test article 1521 [C] Date: 6 Oct 1998 04:38:40 -0500 1523 Barber Page [23] 1524 Expires: May 15, 2002 Academ Consulting Services 1525 November 2001 1526 [C] Organization: Nowhere, To 1527 [C] Message-ID: 1528 [C] 1529 [C] This is just a test article. 1530 [C] . 1531 [S] 436 Transfer failed 1533 Example of sending an article to a site that already has it 1534 [S] 200 NNTP Service Ready 1535 [C] IHAVE 1536 [S] 435 Duplicate 1538 Example of sending an article to a site that requests the article be 1539 tried again later 1540 [S] 200 NNTP Service Ready 1541 [C] IHAVE 1542 [S] 436 Retry later 1544 9.4 The LIST Keyword 1546 9.4.1 LIST 1548 LIST [ACTIVE [wildmat]] 1550 The response to the LIST keyword with no parameters returns a list of 1551 valid newsgroups and associated information. Each newsgroup is sent 1552 as a line of text in the following format: 1554 group first last status 1556 where is the name of the newsgroup, is the number of 1557 the last known article currently in that newsgroup, is the 1558 number of the first article currently in the newsgroup, and 1559 indicates the current status of the group on this server. Typically, 1560 the will be consist of the US-ASCII character 'y' where 1561 posting is permitted, 'n' where posting is not permitted and 'm' where 1562 postings will be forwarded to the newsgroup moderator by the news 1563 server. Other status strings may exist. The definition of these other 1564 values and the circumstances under which they are returned is covered 1565 in other specifications. Each field in the line is separated from its 1566 neighboring fields by one or more US-ASCII spaces. 1568 The and fields will always be numeric. They may have 1569 leading zeros. The field corresponds to the "reported low 1570 water mark" and the field corresponds to the "reported high 1571 water mark" described in the GROUP command (see Section 9.1.1.1). 1573 The status of a newsgroup only indicates how posts to that newsgroup 1574 are processed. It does not indicate if the current client is permitted 1575 to post. That is indicated by the status code returned as part of the 1576 greeting. 1578 Please note that an empty list (i.e., the text body returned by this 1579 command consists only of the terminating period) is a possible valid 1580 response, and indicates that there are currently no valid newsgroups. 1582 If the optional wildmat parameter is specified, the list is limited to 1583 only the groups that match the pattern. 1585 Specifying a single group is usually very efficient for the server. 1586 Multiple groups may be specified by using wildmat patterns (described 1587 in section 5). 1589 9.4.1.1 Responses 1590 215 Information Follows (multi-line response) 1592 Barber Page [24] 1593 Expires: May 15, 2002 Academ Consulting Services 1594 November 2001 1595 9.4.1.2 Examples 1597 Example of LIST returning a list of newsgroups 1598 [S] 200 NNTP Service Ready 1599 [C] LIST 1600 [S] 215 list of newsgroups follows 1601 [S] misc.test 3000234 3002322 y 1602 [S] alt.fc-writers.recovery 1 4 y 1603 [S] tx.natives.recovery 56 89 y 1604 [S] . 1606 Example of LIST returning no newsgroups 1607 [S] 200 NNTP Service Ready 1608 [C] LIST 1609 [S] 215 list of newsgroups follows 1610 [S] . 1612 9.4.2 LIST ACTIVE.TIMES 1614 LIST ACTIVE.TIMES [wildmat] 1615 The active.times file is maintained by some news transport systems to 1616 contain information about who created a particular newsgroup and when. 1618 The format of this file includes three fields separated from each 1619 other by one or more US-ASCII space characters. The first field is the 1620 name of the newsgroup. The second is the time when this group was 1621 created on this news server measured in seconds since the start of 1622 January 1, 1970. The third is the email address of the entity that 1623 created the newsgroup and must be a mailbox as defined in RFC 2822. 1625 When executed, the information is displayed following the 215 1626 response. When display is completed, the server will send a period on 1627 a line by itself. If the information is not available, the server will 1628 return the 503 error response. If the server does not recognize the 1629 command, it SHOULD return the 501 error response. 1631 If the optional wildmat parameter is specified, the list is limited to 1632 only the groups that match the pattern. 1633 Multiple groups may be specified by using wildmat patterns(described 1634 in section 5). 1636 9.4.2.1 Responses 1638 215 Information Follows (multi-line response) 1639 501 Syntax error 1640 503 Program error, function not performed 1642 9.4.2.2 Examples 1644 Example of LIST ACTIVE.TIMES returning a list of newsgroups 1645 [S] 200 NNTP Service Ready 1646 [C] LIST ACTIVE.TIMES 1647 [S] 215 information follows 1648 [S] misc.test 930445408 1649 [S] alt.rfc-writers.recovery 930562309 1650 [S] tx.natives.recovery 930678923 1651 [S] . 1653 Barber Page [25] 1654 Expires: May 15, 2002 Academ Consulting Services 1655 November 2001 1657 Example of LIST ACTIVE.TIMES returning an error (The server software is 1658 not configured to maintain this information, but does recognize the 1659 command as valid.) 1660 [S] 200 NNTP Service Ready 1661 [C] LIST ACTIVE.TIMES 1662 [S] 503 program error, function not performed 1664 Example of LIST ACTIVE.TIMES sent to a server that does not recognize 1665 this argument (e.g. The software does not maintain this information.) 1666 [S] 200 NNTP Service Ready 1667 [C] LIST ACTIVE.TIMES 1668 [S] 501 Syntax Error 1670 9.4.3 LIST DISTRIBUTIONS 1672 LIST DISTRIBUTIONS 1673 The distributions file is maintained by some news transport systems to 1674 contain information about valid values for the Distribution: line in a 1675 news article header and about what the values mean. Each line contains 1676 two fields, the value and a short explanation on the meaning of the 1677 value. The first field is separated from the second field by one or 1678 more US-ASCII spaces. When executed, the information is displayed 1679 following the 215 response. When display is completed, the server will 1680 send a period on a line by itself. If the information is not 1681 available, the server will return the 503 error response. If the 1682 server does not recognize this command, it SHOULD return the 501 error 1683 response. 1685 9.4.3.1 Responses 1687 215 Information Follows (multi-line response) 1688 501 Syntax error 1689 503 Program error, function not performed 1691 9.4.3.2 Examples 1693 Example of LIST DISTRIBUTIONS returning a list of newsgroups 1694 [S] 200 NNTP Service Ready 1695 [C] LIST DISTRIBUTIONS 1696 [S] 215 information follows 1697 [S] usa United States of America 1698 [S] na North America 1699 [S] world All over the World 1700 [S] . 1702 Example of LIST DISTRIBUTIONS returning an error (e.g. The server 1703 software is not configured to maintain this information, but does 1704 recognize the command as valid.) 1705 [S] 200 NNTP Service Ready 1706 [C] LIST DISTRIBUTIONS 1707 [S] 503 program error, function not performed 1709 Example of LIST DISTRIBUTIONS sent to a server that does not recognize 1710 the command (e.g. The server does not maintain this information 1711 regardless of configuration.) 1712 [S] 200 NNTP Service Ready 1713 [C] LIST DISTRIBUTIONS 1715 Barber Page [26] 1716 Expires: May 15, 2002 Academ Consulting Services 1717 November 2001 1718 [S] 501 Syntax Error 1720 9.4.4 LIST DISTRIB.PATS 1722 LIST DISTRIB.PATS 1723 The distrib.pats file is maintained by some news transport systems to 1724 allow clients to choose a value for the Distribution: line in the 1725 header of a news article being posted. The information returned 1726 consists of lines, in no particular order, each of which contains 1727 three fields separated by colons. These fields are a weight, a group 1728 name or wildmat pattern, and a Distribution: value, in that order. 1729 The client MAY use this information to select a Distribution: value 1730 based on the name of a newsgroup. To do so, it should determine the 1731 lines whose second field matches the newsgroup name, select that line 1732 with the highest weight (with 0 being the lowest), and use the 1733 Distribution: field from that line. 1735 When executed, the information is displayed following the 215 1736 response. When display is completed, the server will send a period on 1737 a line by itself. If the information is not available, the server will 1738 return the 503 error response. If this command is not recognized, the 1739 server SHOULD return the 501 error response. 1741 9.4.4.1 Responses 1743 215 Information Follows (multi-line response) 1744 501 Syntax error 1745 503 Program error, function not performed 1747 9.4.4.2 Examples 1749 Example of LIST DISTRIB.PATS returning a list of newsgroups 1750 [S] 200 NNTP Service Ready 1751 [C] LIST DISTRIB.PATS 1752 [S] 215 information follows 1753 [S] 10:local.*:local 1754 [S] . 1756 Example of LIST DISTRIB.PATS returning an error (e.g. The server software 1757 is not configured to maintain this information, but does recognize the 1758 command as valid.) 1759 [S] 200 NNTP Service Ready 1760 [C] LIST DISTRIB.PATS 1761 [S] 503 program error, function not performed 1763 Example of LIST DISTRIB.PATS sent to a server that does not recognize the 1764 command (e.g. The software does not maintain this information regardless 1765 of configuration.) 1766 [S] 200 NNTP Service Ready 1767 [C] LIST DISTRIB.PATS 1768 [S] 501 Syntax Error 1770 9.4.5 LIST NEWSGROUPS 1772 LIST NEWSGROUPS [wildmat] 1773 The newsgroups file is maintained by some news transport systems to 1774 contain the name of each newsgroup that is active on the server and 1775 a short description about the purpose of each newsgroup. Each line 1776 in the file contains two fields, the newsgroup name and a short 1777 explanation of the purpose of that newsgroup. The first field is 1778 separated from the second field by one or more US-ASCII spaces. When 1780 Barber Page [27] 1781 Expires: May 15, 2002 Academ Consulting Services 1782 November 2001 1783 executed, the information is displayed following the 215 response. 1784 When display is completed, the server will send a period on a line 1785 by itself. If the information is not available, the server will 1786 return the 503 response. If the server does not recognize the 1787 command it should return a 501 response. If the optional matching 1788 parameter is specified, the list is limited to only the groups that 1789 match the pattern (no matching is done on the group descriptions). 1790 Multiple groups may be specified by using a wildmat(see section 5), 1791 not regular expressions. If nothing is matched an empty list is 1792 returned, not an error. 1794 9.4.5.1 Responses 1796 215 Information Follows (multi-line response) 1797 501 Syntax error 1798 503 Program error, function not performed 1800 9.4.5.2 Examples 1802 Example of LIST NEWSGROUPS returning a list of newsgroups 1803 [S] 200 NNTP Service Ready 1804 [C] LIST NEWSGROUPS 1805 [S] 215 information follows 1806 [S] misc.test General Usenet testing 1807 [S] alt.rfc-writers.recovery RFC Writers Recovery 1808 [S] tx.natives.recovery Texas Natives Recovery 1809 [S] . 1811 Example of LIST NEWSGROUPS returning an error (e.g. The server 1812 software recognizes the command as valid, but the information is not 1813 available.) 1814 [S] 200 NNTP Service Ready 1815 [C] LIST NEWSGROUPS 1816 [S] 503 program error, function not performed 1818 9.5 Standard extensions 1820 Each of the following sections describes an extension that a server 1821 MAY provide. If the server provides the extension, it MUST include the 1822 appropriate extension label in the response to LIST EXTENSIONS. If it 1823 does not provide it, it MUST NOT include the appropriate extension 1824 label. The descriptions of facilities in each section are written as 1825 if the extension is provided. If it is not provided, the entire 1826 section should be ignored. 1828 9.5.1 LISTGROUP extension 1830 This extension provides one command and has the extension label 1831 LISTGROUP. 1833 9.5.1.1 The LISTGROUP Command 1835 LISTGROUP [ggg] 1836 The LISTGROUP command is used to get a listing of all the article 1837 numbers in a particular newsgroup. 1838 The optional parameter ggg is the name of the newsgroup to be 1839 selected (e.g. "news.software.b"). A list of valid newsgroups may 1840 be obtained from the LIST command. If no group is specified, the 1841 current group is used as the default argument. 1843 Barber Page [28] 1844 Expires: May 15, 2002 Academ Consulting Services 1845 November 2001 1847 The successful selection response will be a list of the article 1848 numbers in the group followed by a period on a line by itself. The 1849 list starts on the next line following the 211 response code. 1851 When a valid group is selected by means of this command, the 1852 internally maintained "current article pointer" MUST be set to the 1853 first article in the group and the name of the current newsgroup 1854 MUST be set to the selected newsgroup name. If an invalid group is 1855 specified, the previously selected group and article remain 1856 selected. If an empty newsgroup is selected, the "current article 1857 pointer" may be in an indeterminate state and should not be used. 1859 The LISTGROUP keyword MAY be used by a client as a replacement for 1860 the GROUP command in establishing a valid "current article pointer." 1861 After a successful response is received, any other command may be 1862 used that depends on having the "current article pointer" be valid. 1864 If a group name is specified and that group is not available on that 1865 server, the server MUST respond with the 411 error code. 1867 A server that does not implement this command SHOULD return a 500 1868 error response. 1870 9.5.1.1.1 Responses 1872 211 List of article numbers follow (multi-line 1873 response) 1874 411 No such group 1875 412 No newsgroup currently selected 1876 500 Command not recognized 1878 9.5.1.1.2 Examples 1880 Example of LISTGROUP on an empty group: 1881 [S] 200 NNTP Service Ready 1882 [C] LISTGROUP example.empty.newsgroup 1883 [S] 211 list of article numbers follows 1884 [S] . 1886 Example of LISTGROUP on a valid current group: 1887 [S] 200 NNTP Service Ready 1888 [C] GROUP misc.test 1889 [S] 211 2000 3000234 3002322 misc.test selected 1890 [C] LISTGROUP 1891 [S] 211 list follows 1892 [S] 3000234 1893 [S] 3000237 1894 [S] 3000238 1895 [S] 3000239 1896 [S] 3002322 1897 [S] . 1899 Example of LISTGROUP failing because no group has been selected: 1900 [S] 200 NNTP Service Ready 1901 [C] LISTGROUP 1902 [S] 412 no current group 1903 [C] GROUP example.is.sob.bradner.or.barber 1905 Barber Page [29] 1906 Expires: May 15, 2002 Academ Consulting Services 1907 November 2001 1908 [S] 411 no such group 1909 [C] LISTGROUP 1910 [S] 412 no current group 1912 9.5.2 The OVER Extension 1914 This extension provides two commands, OVER and LIST OVERVIEW.FMT. The 1915 label for this extension is OVER. 1917 9.5.2.1 LIST OVERVIEW.FMT 1919 LIST OVERVIEW.FMT 1921 The overview.fmt file is maintained by some news transport systems to 1922 contain the order in which header information is stored in the 1923 overview databases for each newsgroup. When executed, news article 1924 header fields are displayed one line at a time in the order in which 1925 they are stored in the overview database[6] following the 215 1926 response. When display is completed, the server will send a period on 1927 a line by itself. If the information is not available, the server will 1928 return the 503 response. 1930 If the header has the word "full" (without quotes) after the colon, 1931 the header's name is prepended to its field in the output returned by 1932 the server. 1934 This is command is part of the optional OVER extension which includes 1935 the OVER command defined in section . If the OVER extension is not 1936 implemented, then this command MUST NOT be implemented. If that case, 1937 the server MUST return a 501 error response when this command is 1938 presented by the client. 1940 9.5.2.1.1 Responses 1942 215 Information follows (multi-line response) 1943 501 Syntax Error 1944 503 Program error, function not performed 1946 9.5.2.1.2 Examples 1948 Example of LIST OVERVIEW.FMT returning a list of newsgroups 1949 [S] 200 NNTP Service Ready 1950 [C] LIST OVERVIEW.FMT 1951 [S] 215 Order of fields in overview database. 1952 [S] Subject: 1953 [S] From: 1954 [S] Date: 1955 [S] Message-ID: 1956 [S] . 1958 Example of LIST OVERVIEW.FMT returning an error 1959 [S] 200 NNTP Service Ready 1960 [C] LIST OVERVIEW.FMT 1961 [S] 503 program error, function not performed 1963 9.5.2.2 OVER 1965 OVER [range] 1966 The OVER command returns specific header information for the 1967 article(s) specified from the current selected group. The information 1969 Barber Page [30] 1970 Expires: May 15, 2002 Academ Consulting Services 1971 November 2001 1973 returned in the response to this command can be used by clients to 1974 follow discussion threads. 1976 The optional range argument may be any of the following: 1978 o an article number 1979 o an article number followed by a dash to indicate all 1980 following 1981 o an article number followed by a dash followed by another 1982 article number 1984 If no argument is specified, then information from the current article 1985 is displayed. Successful responses start with a 224 response followed 1986 by the overview information for all matched messages. Once the output 1987 is complete, a period is sent on a line by itself. If no argument is 1988 specified, the information for the current article is returned. A 1989 newsgroup must have been selected earlier, else a 412 error response 1990 is returned. If no articles are in the range specified, the server 1991 returns a 420 error response. A 502 response will be returned if the 1992 client only has permission to transfer articles. A 500 response SHOULD 1993 be returned by servers do not implement this command. 1995 The output consists of one line per article, sorted in numerical order 1996 of article number. Each line consists of a number of fields separated 1997 by an US-ASCII TAB character. The first 8 fields MUST be the 1998 following, in order: 2000 article number, subject, author, date, message-ID, references, 2001 byte count, line count. 2003 The content of each field is formed by taking the original content 2004 (such as the raw subject line from the article), removing all US-ASCII 2005 CRLF pairs, and then replacing each remaining US-ASCII NUL, TAB, CR, 2006 or LF character with a single US-ASCII space. 2008 The content of any subsequent field is given by the response to the 2009 LIST OVERVIEW.FMT command. A field may be empty (in which case there 2010 will be two adjacent US-ASCII tabs, and a sequence of trailing 2011 US-ASCII tabs may be omitted). 2013 The server SHOULD not produce output for articles that no longer 2014 exist. 2016 9.5.2.2.1 Responses 2018 224 Overview information follows (multi-line 2019 response) 2020 412 No newsgroup currently selected 2021 420 No article(s) selected 2022 500 Command not recognized 2023 502 Program error, functions no performed 2025 9.5.2.2.2 Examples 2027 Example of a successful retrieval of overview information for an article 2028 (using no article number) 2029 [S] 200 NNTP Service Ready 2030 [C] GROUP misc.test 2031 [S] 211 1234 3000234 3002322 misc.test 2032 [C] OVER 2033 [S] 224 Overview information follows 2034 300234|I am just a test article|nobody@nowhere.to 2035 (Demo User)|6 Oct 1998 04:38:40 -0500| 2036 <45223423@to.to> 2037 [S] . 2038 [Please note that the line that begins with 300234 is all one line that 2039 has been wrapped for readability. A vertical bar has been inserted to 2041 Barber Page [31] 2042 Expires: May 15, 2002 Academ Consulting Services 2043 November 2001 2044 show where the US-ASCII TAB should actually be.] 2046 Example of an unsuccessful retrieval of overview information on an 2047 article by number 2048 [S] 200 NNTP Service Ready 2049 [C] GROUP misc.test 2050 [S] 211 1234 3000234 3002322 misc.test 2051 [C] OVER 300256 2052 [S] 420 No such article in this group 2054 Example of an unsuccessful retrieval of overview information by number 2055 because no newsgroup was selected first 2056 [S] 200 NNTP Service Ready 2057 [C] OVER 2058 [S] 412 No newsgroup selected 2060 Example of an attempt to retrieve an article when the current group 2061 selected is empty 2062 [S] 200 NNTP Service Ready 2063 [C] GROUP example.empty.newsgroup 2064 [S] 211 0 0 0 example.empty.newsgroup 2065 [C] OVER 2066 [S] 420 No current article selected 2068 9.5.3 The HDR Extension 2070 This extension provides one new command, HDR. The label for this 2071 extension is PAT. 2073 9.5.3.1 HDR 2075 HDR range| 2077 The HDR command is used to retrieve specific headers from specific 2078 articles in the currently selected group. 2079 The required header parameter is the name of a header line (e.g. 2080 "subject") in a newsgroup article. See RFC-1036 for a list of valid 2081 header lines. The required range argument may be any of the following: 2082 o an article number 2083 o an article number followed by a dash to indicate all 2084 following 2085 o an article number followed by a dash followed by another 2086 article number. 2088 The required message-id argument indicates a specific article. The 2089 range and message-id arguments are mutually exclusive. 2091 A successful response consists of a 221 code followed by the output 2092 from the command. The output consists of one line for each article 2093 where the relevant header line exists. The line consists of the 2094 article number, a US-ASCII space, and then the contents of the header 2095 (without the header name). A valid response includes an empty list 2096 (indicating that there were no matches). Once the output is complete, 2097 a period is sent on a line by itself. If the optional argument is a 2098 message-id and no such article exists, a 430 error response shall be 2099 returned. A 502 response shall be returned if the client only has 2100 permission to transfer articles. A 500 response SHOULD be issued by 2101 all servers that do not recognize this command. 2103 9.5.3.1.1 Responses 2105 221 Header follows (multi-line response) 2106 412 No newsgroup selected 2108 Barber Page [32] 2109 Expires: May 15, 2002 Academ Consulting Services 2110 November 2001 2111 430 No such article 2112 500 Command not recognized 2113 502 Program error, function not performed 2115 9.5.3.1.2 Examples 2117 Example of a successful retrieval of subject lines from a range of 2118 articles 2119 [S] 200 NNTP Service Ready 2120 [C] GROUP misc.test 2121 [S] 211 1234 3000234 3002322 misc.test 2122 [C] HDR Subject 3000234-300238 2123 [S] 221 Header Follows 2124 [S] 3000234 I am just a test article 2125 [S] 3000237 Re: I am just a test article 2126 [S] 3000238 Ditto 2127 [S] . 2129 Example of a successful retrieval of header from an article by message-id 2130 [S] 200 NNTP Service Ready 2131 [C] GROUP misc.test 2132 [S] 211 1234 3000234 3002322 misc.test 2133 [C] HDR subject 2134 [S] 221 Header information follows 2135 [S] 3000345 I am just a test article 2136 [S] . 2138 Example of an unsuccessful retrieval of a header from an article by 2139 message-id 2140 [S] 200 NNTP Service Ready 2141 [C] HDR subject 2142 [S] 430 No Such Article Found 2144 Example of an unsuccessful retrieval of headers from articles by number 2145 because no newsgroup was selected first 2146 [S] 200 NNTP Service Ready 2147 [C] HDR subject 300256- 2148 [S] 412 No newsgroup selected 2150 Example of an unsuccessful retrieval of headers from articles by 2151 message-id because no newsgroup was selected first 2152 [S] 200 NNTP Service Ready 2153 [C] HDR subject 2154 [S] 412 No newsgroup selected 2156 Example of retrieving header information when the current group selected 2157 is empty 2158 [S] 200 NNTP Service Ready 2159 [C] GROUP example.empty.newsgroup 2160 [S] 211 0 0 0 example.empty.newsgroup 2161 [C] HDR subject 0- 2162 [S] 221 Headers follow 2163 . 2165 Barber Page [33] 2166 Expires: May 15, 2002 Academ Consulting Services 2167 November 2001 2168 Example of a failure due to restrictions configured into the server 2169 [S] 200 NNTP Service Ready 2170 [C] GROUP news.group 2171 [S] 211 1234 3000234 3002322 misc.test 2172 [C] HDR Subject 3000234-300238 2173 [S] 502 Service Unavailable 2175 10. The CONCLUSION Step 2177 10.1 QUIT 2179 QUIT 2181 The server process MUST acknowledge the QUIT command and then close 2182 the connection to the client. This is the preferred method for a 2183 client to indicate that it has finished all its transactions with the 2184 NNTP server. 2186 If a client simply disconnects (or the connection times out or some 2187 other fault occurs), the server MUST gracefully cease its attempts to 2188 service the client, disconnecting from its end if necessary. 2190 10.1.1 Responses 2192 250 Connection closing 2194 10.1.2 Example 2195 [S] 200 NNTP Service Ready 2196 [C] QUIT 2197 [S] 205 closing connection 2198 [Server closes connection.] 2200 11. Other Keywords 2202 There are other keywords that may be used at any time between the 2203 beginning of a session and its termination. Using these keywords does 2204 not alter any state information, but the response generated from the 2205 use of these keywords may provide useful information to clients that 2206 use them. 2208 11.1 DATE 2210 DATE 2211 This command exists to help clients find out the current Coordinated 2212 Universal Time[7] from the server's perspective. This command 2213 SHOULD NOT be used as a substitute for NTP[8], but to provide 2214 information that might be useful when using the NEWNEWS command (see 2215 section 11.4). A system providing NNTP service SHOULD implement NTP 2216 for the purposes of keeping the system clock as accurate as possible. 2217 This command returns a one-line response code of 111 followed by the 2218 date and time on the server in the form YYYYMMDDhhmmss. 2220 11.1.1 Response 2222 111 YYYYMMDDhhmmss Local date on server 2224 11.1.2 Example 2225 [S] 200 NNTP Service Ready 2226 [C] DATE 2228 Barber Page[34] 2229 Expires: May 15, 2002 Academ Consulting Services 2230 November 2001 2231 [S] 111 19990623135624 2233 11.2 The HELP Command 2235 HELP 2236 This command provides a short summary of commands that are understood 2237 by this implementation of the server. The help text will be presented 2238 as a textual response terminated by a single period on a line by 2239 itself. 2241 This text is not guaranteed to be in any particular format and SHALL 2242 NOT be used by clients as a replacement for the LIST EXTENSIONS 2243 command described in section 8.1. 2245 11.2.1 Responses 2247 100 Help text follows (multi-line response) 2249 11.2.2 Example 2250 [S] 200 NNTP Service Ready 2251 [C] HELP 2252 [S] 100 Help text follows 2253 [S] This is some help text. There is no specific 2254 [S] formatting requirement for this test, though 2255 [S] it is customary for it to list the valid commands 2256 [S] and give a brief definition of what they do 2257 [S] . 2259 11.3 NEWGROUPS 2261 NEWGROUPS date time [GMT] 2263 A list of newsgroups created since MUST be listed in 2264 the same format as the LIST command. 2265 The date is sent as 6 or 8 digits in the format [XX]YYMMDD, where XX 2266 is the first two digits of the year, YY is the last two digits of the 2267 year, MM is the two digits of the month (with leading zero, if 2268 appropriate), and DD is the day of the month (with leading zero, if 2269 appropriate). If the first two digits of the year are not specified, 2270 the year is to be taken from the current century if YY is smaller than 2271 or equal to the current year, otherwise the year is from the previous 2272 century. 2274 Time must also be specified. It must be as 6 digits HHMMSS with HH 2275 being hours in the 24-hour clock 00-23, MM minutes 00-59, and SS 2276 seconds 00-60, which allows for leap seconds. The token "GMT" 2277 specifies that the date and time are given in Coordinated Universal 2278 Time. If the token "GMT" is omitted then the date and time are 2279 specified in the server's local timezone. Note that there is no way 2280 within this specification of NNTP to establish the server's local 2281 timezone. 2283 Note that an empty list (i.e., the text body returned by this command 2284 consists only of the terminating period) is a possible valid response, 2285 and indicates that there are currently no new newsgroups. 2287 Clients SHOULD make all queries using Coordinated Universal Time when 2288 possible. 2290 11.3.1 Responses 2292 231 List of new newsgroups follows (multi-line 2293 response) 2295 Barber Page [35] 2296 Expires: May 15, 2002 Academ Consulting Services 2297 November 2001 2299 11.3.2 Examples 2301 Example where there are new groups 2302 [S] 200 NNTP Service Ready 2303 [C] NEWGROUPS 19990624 000000 GMT 2304 [S] 231 list of new newsgroups follows 2305 [S] alt.rfc-writers.recovery 2306 [S] tx.natives.recovery 2307 [S] . 2309 Example where there are no new groups 2310 [S] 200 NNTP Service Ready 2311 [C] NEWGROUPS 19990624 000000 GMT 2312 [S] 231 list of new newsgroups follows 2313 [S] . 2315 11.4 NEWNEWS 2317 NEWNEWS newsgroups date time [GMT] 2319 A list of message-ids of articles posted or received to the specified 2320 newsgroup or groups since "date" will be listed. The format of the 2321 listing will be one message-id per line, as though text were being 2322 sent. Each message-id SHALL appear only once in a response. The order 2323 of the response has no specific significance and may vary from 2324 response to response in the same session. A single line consisting 2325 solely of one period followed by CR-LF will terminate the list. 2327 Date and time are in the same format as the NEWGROUPS command. The 2328 newsgroups parameter MUST be in wildmat format and MAY consist of 2329 multiple wildmat constructs separated by an US-ASCII comma character. 2331 Note that an empty list (i.e., the text body returned by this command 2332 consists only of the terminating period) is a possible valid response, 2333 and indicates that there is currently no new news. 2335 Clients SHOULD make all queries in Coordinated Universal Time when 2336 possible. 2338 11.4.1 Responses 2340 230 List of new articles by message-id follows (may be a 2341 multi-line response) 2343 11.4.2 Examples 2345 Example where there are new articles 2346 [S] 200 NNTP Service Ready 2347 [C] NEWNEWS news.*,sci.* 19990624 000000 2348 [S] 230 list of new articles by message-id follows 2349 [S] 2350 [S] 2352 Example where there are no new articles 2353 [S] 200 NNTP Service Ready 2354 [C] NEWNEWS alt.* 19990624 000000 2355 [S] 230 list of new articles by message-id follows 2357 Barber Page [36] 2358 Expires: May 15, 2002 Academ Consulting Services 2359 November 2001 2360 [S] . 2362 12. Framework for NNTP Extensions 2364 Although NNTP is widely and robustly deployed, some parts of the 2365 Internet community might wish to extend the NNTP service. This memo 2366 defines a means whereby an extended NNTP client may query the server 2367 to determine the service extensions that it supports. 2369 It must be emphasized that any extension to the NNTP service should 2370 not be considered lightly. NNTP's strength comes primarily from its 2371 simplicity. Experience with many protocols has shown that: 2373 Protocols with few options tend towards ubiquity, whilst protocols 2374 with many options tend towards obscurity. 2376 This means that each and every extension, regardless of its benefits, 2377 must be carefully scrutinized with respect to its implementation, 2378 deployment, and interoperability costs. In many cases, the cost of 2379 extending the NNTP service will likely outweigh the benefit. 2381 Given this environment, the framework for the extensions described in 2382 this memo consists of: 2384 a)a mechanism for clients to determine a server's available extensions 2385 b)a registry of NNTP service extensions 2387 The LIST EXTENSIONS command is described in section 8.1 of this memo 2388 and is the mechanism for clients to use to determine what extensions 2389 are available for client use. 2391 The IANA shall maintain a registry of NNTP service extensions. 2393 An extension is identified by a unique extension-label, which is a 2394 string of 1 to 12 uppercase letters. The extension-label will often be 2395 the name of a new command that the extension adds. However this is not 2396 a requirement: an extension might not add any new commands or 2397 keywords. 2399 An extension is either a private extension or else it is included in 2400 the IANA registry and is defined in an RFC. Such RFCs either must be 2401 on the standards-track or must define an IESG-approved experimental 2402 protocol. 2404 The definition of an extension must include: 2406 o a descriptive name for the extension 2407 o the extension-label (which is returned by LIST EXTENSIONS 2408 to indicate to the client that the server supports this 2409 particular extension) 2410 o the syntax, values, and meanings of any parameters 2411 following the extension-label in the output of LIST EXTENSIONS 2412 o any new NNTP keywords associated with the extension 2413 o the syntax and possible values of parameters associated 2414 with the new NNTP keywords 2415 o any new parameters the extension associates with any other 2416 pre-existing NNTP keywords 2417 o how support for the extension affects the behavior of a 2418 server and NNTP client 2419 o any increase in the maximum length of commands over the 2420 value specified in this memo 2422 The extension-label of private extensions MUST begin with "X". The 2423 extension-label of registered extensions MUST NOT begin with "X". 2425 Any keyword values presented in the NNTP response that do not begin 2426 with "X" MUST correspond to a standard, standards-track, or 2427 IESG-approved experimental NNTP service extension registered with 2428 IANA. A conforming server MUST NOT offer non "X" prefixed keyword 2429 values that are not described in a registered extension. 2431 Except where stated otherwise, the commands in this document are 2432 understood (even if not supported) by all servers and are not 2433 described in the list of features returned by the LIST EXTENSIONS 2434 command. 2436 Barber Page [37] 2437 Expires: May 15, 2002 Academ Consulting Services 2438 November 2001 2439 A server MAY provide additional keywords - either new commands or new 2440 parameters to existing commands - as part of a private extension. 2442 These new keywords MUST begin with "X". 2444 A server MUST NOT send different response codes to basic NNTP commands 2445 documented here or commands documented in registered extensions in 2446 response to the availability or use of a private extension. 2448 12.1 Initial IANA Registry 2450 The IANA's initial registry of NNTP service extensions consists of 2451 these entries: 2453 Service Extension NNTP Extension Label Added Behavior 2455 Overview OVER Defined 2456 Support in this 2457 document 2459 Specific Article Numbers LISTGROUP Defined 2460 in this 2461 document 2463 Header Pattern Matching HDR Defined 2464 in this 2465 document 2467 13. Augmented BNF[9] Syntax for NNTP Commands 2469 This syntax defines the non-terminal "command". The non-terminal 2470 "parameter" is used for command parameters whose syntax is specified 2471 elsewhere. The syntax is in alphabetical order. Note that ABNF strings 2472 are case insensitive. 2473 article-command = "ARTICLE" [1*WSP (msg-id / article-number)] *WSP 2474 CRLF 2475 article-number = 1*16DIGIT 2476 argument = parameter ; excluding sequence ".." 2477 body-command = "BODY" [1*WSP (msg-id / article-number)] *WSP CRLF 2478 command = article-command / 2479 body-command / 2480 date-command / 2481 group-command / 2482 head-command / 2483 help-command / 2484 ihave-command / 2485 last-command / 2486 list-active-times-command / 2487 list-distrib-pats-command / 2488 list-distributions-command / 2489 list-extensions-command / 2490 list-newsgroups-command / 2491 list-overview-fmt-command / 2492 list-command / 2493 listgroup-command / 2494 mode-reader-command / 2495 newgroups-command / 2496 newnews-command / 2497 next-command / 2498 over-command / 2499 hdr-command / 2500 post-command / 2501 quit-command / 2502 stat-command 2503 CR = %x0D 2504 CRLF = CR LF 2505 date-command = "DATE" *WSP CRLF 2506 date = 6*8DIGIT 2507 DIGIT = %x30-39 2508 group-command = "GROUP" 1*WSP newsgroup *WSP CRLF 2509 hdr-command = "PAT" 1*WSP header 1*WSP (range / msg-id) *WSP CRLF 2510 head-command = "HEAD" [1*WSP (msg-id / article-number)] *WSP CRLF 2512 Barber Page[38] 2513 Expires: May 15, 2002 Academ Consulting Services 2514 November 2001 2515 header = parameter 2516 help-command = "HELP" *WSP CRLF 2517 HT = %x09 2518 ihave-command = "IHAVE" 1*WSP msg-id *WSP CRLF 2519 last-command = "LAST" *WSP CRLF 2520 LF = %x0A 2521 list-active-times-command = "LIST" 1*WSP "ACTIVE.TIMES" 2522 [1*WSP wildmat] *WSP CRLF 2523 list-command = "LIST" [1*WSP "ACTIVE" [1*WSP wildmat] *WSP CRLF 2524 list-distrib-pats-command = "LIST" 1*WSP "DISTRIB.PATS" *WSP CRLF 2525 list-distributions-command = "LIST" 1*WSP "DISTRIBUTIONS" *WSP CRLF 2526 list-extensions-command = "LIST" 1*WSP "EXTENSIONS" *WSP CRLF 2527 list-newsgroups-command = "LIST" 1*WSP "NEWSGROUPS" [1*WSP wildmat] 2528 *WSP CRLF 2529 list-overview-fmt-command = "LIST" 1*WSP "OVERVIEW.FMT" *WSP CRLF 2530 listgroup-command = "LISTGROUP" [1*WSP newsgroup] *WSP CRLF 2531 mode-reader-command = "MODE" 1*WSP "READER" *WSP CRLF 2532 msg-id = 2533 newgroups-command = "NEWGROUPS" 1*WSP date 1*WSP time [1*WSP 2534 "GMT"/"UTC"] *WSP CRLF 2535 newnews-command = "NEWNEWS" 1*WSP newsgroup *("," newsgroup) 2536 1*WSP date 1*WSP time [1*WSP "GMT"/"UTC"] 2537 *WSP CRLF 2538 newsgroup = parameter 2539 next-command = "NEXT" *WSP CRLF 2540 over-command = "OVER" [1*WSP range] *WSP CRLF 2541 parameter = 1*(%x21-FF) ; generic command parameter 2542 post-command = "POST" *WSP CRLF 2543 quit-command = "QUIT" *WSP CRLF 2544 range = article-number ["-" [article-number]] 2545 SP = %x20 2546 stat-command = "STAT" [1*WSP (msg-id / article-number)] *WSP CRLF 2547 time = 6DIGIT 2548 UTF-8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4 / UTF8-5 / UTF8-6 2549 UTF8-1 = %x80-BF 2550 UTF8-2 = %xC0-DF UTF8-1 2551 UTF8-3 = %xE0-EF 2UTF8-1 2552 UTF8-4 = %xF0-F7 3UTF8-1 2553 UTF8-5 = %xF8-FB 4UTF8-1 2554 UTF8-6 = %xFC-FD 5UTF8-1 2555 wildmat = ["!"]1*("*" / "?" / wildmat-exact / wildmat-set / 2556 "\" (%x22-7F / UTF-8-non-ascii)) 2557 wildmat-exact = %x22-29 / %x2B-3E / %x40-5A / %x5D-7F / 2558 UTF-8-non-ascii ; exclude space ! * ? [ \ 2559 wildmat-non-hyphen = %x21-2C / %x2E-7F / UTF-8-non-ascii ; exclude 2560 space - 2561 wildmat-set = "[" ["^"] ["]" / "-"] *(wildmat-non-hyphen"["-" 2562 wildmat-non-hyphen]) ["-"] 2563 WSP = SP / HT 2565 14. Security Considerations 2567 This section is meant to inform application developers, information 2568 providers, and users of the security limitations in NNTP as described 2569 by this document. The discussion does not include definitive solutions 2570 to the problems revealed, though it does make some suggestions for 2571 reducing security risks. 2573 14.1 Personal and Proprietary Information 2575 NNTP, because it was created to distribute network news articles, will 2576 forward whatever information is stored in those articles. 2577 Specification of that information is outside this scope of this 2578 document, but it is likely that some personal and/or proprietary 2579 information is available in some of those articles. It is very 2580 important that designers and implementers provide informative warnings 2581 to users so personal and/or proprietary information is not disclosed 2582 inadvertently. Additionally, effective and easily understood 2583 mechanisms to manage the distribution of news articles must be 2584 provided to NNTP Server administrators, so that they are able to 2585 report with confidence what information is and is not being forwarded 2586 in news articles passing though their servers. 2588 Barber Page [39] 2589 Expires: May 15, 2002 Academ Consulting Services 2590 November 2001 2592 14.2 Abuse of Server Log Information 2594 A server is in the position to save session data about a user's 2595 requests that might identify their reading patterns or subjects of 2596 interest. This information is clearly confidential in nature and its 2597 handling can be constrained by law in certain countries. People using 2598 the NNTP protocol to provide data are responsible for ensuring that 2599 such material is not distributed without the permission of any 2600 individuals that are identifiable by the published results. 2602 14.3 Weak Authentication and Access Control 2604 There is no user-based or token-based authentication in the basic NNTP 2605 specification. Access is normally controlled by server configuration 2606 files. Those files specify access by using domain names or IP 2607 addresses. However, this specification does permit the creation of 2608 extensions to the NNTP protocol itself for such purposes. While 2609 including such mechanisms is optional, doing so is strongly 2610 encouraged. 2612 Other mechanisms are also available. For example, a proxy server could 2613 be put in place that requires authentication before connecting via the 2614 proxy to the NNTP server. 2616 14.4 DNS Spoofing 2618 Many existing NNTP implementations authorize incoming connections by 2619 checking the IP address of that connection against the IP addresses 2620 obtained via DNS lookups of lists of domain names given in local 2621 configuration files. Servers that use this type of authentication, 2622 and clients that find a server by doing a DNS lookup of the server 2623 name, rely very heavily on the Domain Name Service, and are thus 2624 generally prone to security attacks based on the deliberate 2625 misassociation of IP addresses and DNS names. Clients and servers 2626 need to be cautious in assuming the continuing validity of an IP 2627 number/DNS name association. 2629 In particular, NNTP clients and servers SHOULD rely on their name 2630 resolver for confirmation of an IP number/DNS name association, rather 2631 than caching the result of previous host name lookups. Many platforms 2632 already can cache host name lookups locally when appropriate, and they 2633 SHOULD be configured to do so. It is proper for these lookups to be 2634 cached, however, only when the TTL (Time To Live) information reported 2635 by the name server makes it likely that the cached information will 2636 remain useful. 2638 If NNTP clients or servers cache the results of host name lookups in 2639 order to achieve a performance improvement, they MUST observe the TTL 2640 information reported by DNS. 2642 If NNTP clients or servers do not observe this rule, they could be 2643 spoofed when a previously accessed server's IP address changes. As 2644 network renumbering is expected to become increasingly common, the 2645 possibility of this form of attack will grow. Observing this 2646 requirement thus reduces this potential security vulnerability. 2648 This requirement also improves the load-balancing behavior of clients 2649 for replicated servers using the same DNS name and reduces the 2650 likelihood of a user's experiencing failure in accessing sites that 2651 use that strategy. 2653 15. References 2655 [1] Kantor, B and P. Lapsley, "Network News Transfer Protocol", 2656 RFC-977, U.C. San Diego and U.C. Berkeley. 2657 [2] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC 2658 2279, Alis Technologies. 2659 [3] Coded Character Set-7-bit American Standard Code for Information 2660 Interchange, ANSI x3.4-1986. 2661 [4] Bradner, Scott, "Keywords for use in RFCs to Indicate Requirement 2663 40] 2664 Expires: May 15, 2002 Academ Consulting Services 2665 November 2001 2666 Levels", RFC-2119, Harvard University. 2667 [5] Salz, Rich, Manual Page for wildmat(3) from the INN 1.4 2668 distribution, UUNET Technologies, Revision 1.10, April, 1992. 2669 [6] Robertson, Rob, "FAQ: Overview database / NOV General 2670 Information", ftp://ftp.uu.net/networking/news/nntp/inn/faq-nov.Z, 2671 January, 1995. 2672 [7] International Telecommunications Union-Radio, "Glossary", ITU-R 2673 Recommendation TF.686-1, October, 1997. 2674 [8] Mills, David L., "Network Time Protocol (Version 3), 2675 Specification, Implementation and Analysis", RFC-1305, University of 2676 Delaware, March 1992. 2677 [9] Crocker, D. and Overell, P., "Augmented BNF for Syntax 2678 Specifications: ABNF", RFC-2234, Internet Mail Consortium and Demon 2679 Internet, Ltd. 2681 16. Notes 2683 UNIX is a registered trademark of the X/Open Consortium. 2685 17. Acknowledgments 2687 The author acknowledges the original authors of NNTP as documented in 2688 RFC 977: Brian Kantor and Phil Lapsey. 2690 The author gratefully acknowledges the work of the NNTP committee 2691 chaired by Eliot Lear. The organization of this document was 2692 influenced by the last available draft from this working group. A 2693 special thanks to Eliot for generously providing the original 2694 machine-readable sources for that document. 2696 The author gratefully acknowledges the work of the Marshall Rose & 2697 John G. Meyers in RFC 1939 and the work of the DRUMS working group, 2698 specifically RFC 1869, which is the basis of the NNTP extensions 2699 mechanism detailed in this document. 2701 The author gratefully acknowledges the authors of RFC 2616 for 2702 providing specific and relevant examples of security issues that 2703 should be considered for HTTP. Since many of the same considerations 2704 exist for NNTP, those examples that are relevant have been included 2705 here with some minor rewrites. 2707 The author gratefully acknowledges the comments and additional 2708 information provided by the following individuals in preparing one of 2709 the progenitors of this document: 2710 o Russ Allbery 2711 o Wayne Davison 2712 o Clive D.W. Feather 2713 o Chris Lewis 2714 o Tom Limoncelli 2715 o Eric Schnoebelen 2716 o Rich Salz 2718 This work was motivated by the work of various news reader authors and 2719 news server authors, which includes those listed below: 2720 o Rick Adams-Original author of the NNTP extensions to the RN 2721 news reader and last maintainer of Bnews 2722 o Stan Barber-Original author of the NNTP extensions to the 2723 news readers that are part of Bnews. 2724 o Geoff Collyer-Original author of the OVERVIEW database 2725 proposal and one of the original authors of CNEWS 2726 o Dan Curry-Original author of the xvnews news reader 2727 o Wayne Davison-Author of the first threading extensions to 2728 the RN news reader (commonly called TRN). 2729 o Geoff Huston-Original author of ANU NEWS 2730 o Phil Lapsey-Original author of the UNIX reference 2731 implementation for NNTP 2732 o Iain Lea-Original maintainer of the TIN news reader 2733 o Chris Lewis-First known implementer of the AUTHINFO GENERIC 2735 Barber Page [41] 2736 Expires: May 15, 2002 Academ Consulting Services 2738 extension 2739 o Rich Salz-Original author of INN 2740 o Henry Spencer-One of the original authors of CNEWS 2741 o Kim Storm-Original author of the NN news reader 2743 18. Author's Address 2745 Stan Barber 2746 P.O. Box 300481 2747 Houston, Texas 77230 2748 Email: sob@academ.com 2750 This document expires May 15, 2002. 2752 Barber Page [42]