[
  {
    "section_number": "1.",
    "section_name": "Introduction",
    "tag": "Section 1. Introduction",
    "content": "This document specifies the Network News Transfer Protocol (NNTP),\n   which is used for the distribution, inquiry, retrieval, and posting\n   of Netnews articles using a reliable stream-based mechanism.  For\n   news-reading clients, NNTP enables retrieval of news articles that\n   are stored in a central database, giving subscribers the ability to\n   select only those articles they wish to read.\n   The Netnews model provides for indexing, cross-referencing, and\n   expiration of aged messages.  NNTP is designed for efficient\n   transmission of Netnews articles over a reliable full duplex\n   communication channel.\n   Although the protocol specification in this document is largely\n   compatible with the version specified in RFC 977 [RFC977], a number\n   of changes are summarised in Appendix D.  In particular:\n   o  the default character set is changed from US-ASCII [ANSI1986] to\n      UTF-8 [RFC3629] (note that US-ASCII is a subset of UTF-8);\n   o  a number of commands that were optional in RFC 977 or that have\n      been taken from RFC 2980 [RFC2980] are now mandatory; and\n   o  a CAPABILITIES command has been added to allow clients to\n      determine what functionality is available from a server.\n   The key words \"MUST\", \"MUST NOT\", \"REQUIRED\", \"SHALL\", \"SHALL NOT\",\n   \"SHOULD\", \"SHOULD NOT\", \"RECOMMENDED\", \"MAY\", and \"OPTIONAL\" in this\n   document are to be interpreted as described in RFC 2119 [RFC2119].\n   An implementation is not compliant if it fails to satisfy one or more\n   of the MUST requirements for this protocol.  An implementation that\n   satisfies all the MUST and all the SHOULD requirements for its\n   protocols is said to be \"unconditionally compliant\"; one that\n   satisfies all the MUST requirements but not all the SHOULD\n   requirements for NNTP is said to be \"conditionally compliant\".\n   For the remainder of this document, the terms \"client\" and \"client\n   host\" refer to a host making use of the NNTP service, while the terms\n   \"server\" and \"server host\" refer to a host that offers the NNTP\n   service.\n1.1.  Author's Note\n   This document is written in XML using an NNTP-specific DTD.  Custom\n   software is used to convert this to RFC 2629 [RFC2629] format, and\n   then the public \"xml2rfc\" package to further reduce this to text,\n   nroff source, and HTML.\n   No perl was used in producing this document."
  },
  {
    "section_number": "2.",
    "section_name": "Notation",
    "tag": "Section 2. Notation",
    "content": "The following notational conventions are used in this document.\n     UPPERCASE     indicates literal text to be included in the\n                   command.\n     lowercase     indicates a token described elsewhere.\n     [brackets]    indicate that the enclosed material is optional.\n     elliptical    indicates that the argument may be repeated any\n     ... marks     number of times (it must occur at least once).\n     vertical|bar  indicates a choice of two mutually exclusive\n                   arguments (exactly one must be provided).\n   The name \"message-id\" for a command or response argument indicates\n   that it is the message-id of an article as described in Section 3.6,\n   including the angle brackets.\n   The name \"wildmat\" for an argument indicates that it is a wildmat as\n   defined in Section 4.  If the argument does not meet the requirements\n   of that section (for example, if it does not fit the grammar of\n   Section 4.1), the NNTP server MAY place some interpretation on it\n   (not specified by this document) or otherwise MUST treat it as a\n   syntax error.\n   Responses for each command will be described in tables listing the\n   required format of a response followed by the meaning that should be\n   ascribed to that response.\n   The terms \"NUL\", \"TAB\", \"LF\", \"CR, and \"space\" refer to the octets\n   %x00, %x09, %x0A, %x0D, and %x20, respectively (that is, the octets\n   with those codes in US-ASCII [ANSI1986] and thus in UTF-8 [RFC3629]).\n   The term \"CRLF\" or \"CRLF pair\" means the sequence CR immediately\n   followed by LF (that is, %x0D.0A).  A \"printable US-ASCII character\"\n   is an octet in the range %x21-7E.  Quoted characters refer to the\n   octets with those codes in US-ASCII (so \".\" and \"<\" refer to %x2E and\n   %x3C) and will always be printable US-ASCII characters; similarly,\n   \"digit\" refers to the octets %x30-39.\n   A \"keyword\" MUST consist only of US-ASCII letters, digits, and the\n   characters dot (\".\") and dash (\"-\") and MUST begin with a letter.\n   Keywords MUST be at least three characters in length.\n   Examples in this document are not normative but serve to illustrate\n   usages, arguments, and responses.  In the examples, a \"[C]\" will be\n   used to represent the client host and an \"[S]\" will be used to\n   represent the server host.  Most of the examples do not rely on a\n   particular server state.  In some cases, however, they do assume that\n   the currently selected newsgroup (see the GROUP command,\n   Section 6.1.1) is invalid; when so, this is indicated at the start of\n   the example.  Examples may use commands or other keywords not defined\n   in this specification (such as an XENCRYPT command).  These will be\n   used to illustrate some point and do not imply that any such command\n   is defined elsewhere or needs to exist in any particular\n   implementation.\n   Terms that might be read as specifying details of a client or server\n   implementation, such as \"database\", are used simply to ease\n   description.  Provided that implementations conform to the protocol\n   and format specifications in this document, no specific technique is\n   mandated."
  },
  {
    "section_number": "3.",
    "section_name": "Basic Concepts",
    "tag": "Section 3. Basic Concepts",
    "content": "3.1.  Commands and Responses\n   NNTP operates over any reliable bi-directional 8-bit-wide data stream\n   channel.  When the connection is established, the NNTP server host\n   MUST send a greeting.  The client host and server host then exchange\n   commands and responses (respectively) until the connection is closed\n   or aborted.  If the connection used is TCP, then the server host\n   starts the NNTP service by listening on a TCP port.  When a client\n   host wishes to make use of the service, it MUST establish a TCP\n   connection with the server host by connecting to that host on the\n   same port on which the server is listening.\n   The character set for all NNTP commands is UTF-8 [RFC3629].  Commands\n   in NNTP MUST consist of a keyword, which MAY be followed by one or\n   more arguments.  A CRLF pair MUST terminate all commands.  Multiple\n   commands MUST NOT be on the same line.  Unless otherwise noted\n   elsewhere in this document, arguments SHOULD consist of printable US-\n   ASCII characters.  Keywords and arguments MUST each be separated by\n   one or more space or TAB characters.  Command lines MUST NOT exceed\n   512 octets, which includes the terminating CRLF pair.  The arguments\n   MUST NOT exceed 497 octets.  A server MAY relax these limits for\n   commands defined in an extension.\n   Where this specification permits UTF-8 characters outside the range\n   of U+0000 to U+007F, implementations MUST NOT use the Byte Order Mark\n   (U+FEFF, encoding %xEF.BB.BF) and MUST use the Word Joiner (U+2060,\n   encoding %xE2.91.A0) for the meaning Zero Width No-Break Space in\n   command lines and the initial lines of responses.  Implementations\n   SHOULD apply these same principles throughout.\n   The term \"character\" means a single Unicode code point.\n   Implementations are not required to carry out Unicode normalisation.\n   Thus, U+0084 (A-dieresis) is one character, while U+0041 U+0308 (A\n   composed with dieresis) is two; the two need not be treated as\n   equivalent.\n   Commands may have variants; if so, they use a second keyword\n   immediately after the first to indicate which variant is required.\n   The only such commands in this specification are LIST and MODE.  Note\n   that such variants are sometimes referred to as if they were commands\n   in their own right: \"the LIST ACTIVE\" command should be read as\n   shorthand for \"the ACTIVE variant of the LIST command\".\n   Keywords are case insensitive; the case of keywords for commands MUST\n   be ignored by the server.  Command and response arguments are case or\n   language specific only when stated, either in this document or in\n   other relevant specifications.\n   In some cases, a command involves more data than just a single line.\n   The further data may be sent either immediately after the command\n   line (there are no instances of this in this specification, but there\n   are in extensions such as [NNTP-STREAM]) or following a request from\n   the server (indicated by a 3xx response).\n   Each response MUST start with a three-digit response code that is\n   sufficient to distinguish all responses.  Certain valid responses are\n   defined to be multi-line; for all others, the response is contained\n   in a single line.  The initial line of the response MUST NOT exceed\n   512 octets, which includes the response code and the terminating CRLF\n   pair; an extension MAY specify a greater maximum for commands that it\n   defines, but not for any other command.  Single-line responses\n   consist of an initial line only.  Multi-line responses consist of an\n   initial line followed by a multi-line data block.\n   An NNTP server MAY have an inactivity autologout timer.  Such a timer\n   SHOULD be of at least three minutes' duration, with the exception\n   that there MAY be a shorter limit on how long the server is willing\n   to wait for the first command from the client.  The receipt of any\n   command from the client during the timer interval SHOULD suffice to\n   reset the autologout timer.  Similarly, the receipt of any\n   significant amount of data from a client that is sending a multi-line\n   data block (such as during a POST or IHAVE command) SHOULD suffice to\n   reset the autologout timer.  When the timer expires, the server\n   SHOULD close the connection without sending any response to the\n   client.\n3.1.1.  Multi-line Data Blocks\n   A multi-line data block is used in certain commands and responses.\n   It MUST adhere to the following rules:\n   1.  The block consists of a sequence of zero or more \"lines\", each\n       being a stream of octets ending with a CRLF pair.  Apart from\n       those line endings, the stream MUST NOT include the octets NUL,\n       LF, or CR.\n   2.  In a multi-line response, the block immediately follows the CRLF\n       at the end of the initial line of the response.  When used in any\n       other context, the specific command will define when the block is\n       sent.\n   3.  If any line of the data block begins with the \"termination octet\"\n       (\".\" or %x2E), that line MUST be \"dot-stuffed\" by prepending an\n       additional termination octet to that line of the block.\n   4.  The lines of the block MUST be followed by a terminating line\n       consisting of a single termination octet followed by a CRLF pair\n       in the normal way.  Thus, unless it is empty, a multi-line block\n       is always terminated with the five octets CRLF \".\" CRLF\n       (%x0D.0A.2E.0D.0A).\n   5.  When a multi-line block is interpreted, the \"dot-stuffing\" MUST\n       be undone; i.e., the recipient MUST ensure that, in any line\n       beginning with the termination octet followed by octets other\n       than a CRLF pair, that initial termination octet is disregarded.\n   6.  Likewise, the terminating line (\".\" CRLF or %x2E.0D.0A) MUST NOT\n       be considered part of the multi-line block; i.e., the recipient\n       MUST ensure that any line beginning with the termination octet\n       followed immediately by a CRLF pair is disregarded.  (The first\n       CRLF pair of the terminating CRLF \".\" CRLF of a non-empty block\n       is, of course, part of the last line of the block.)\n   Note that texts using an encoding (such as UTF-16 or UTF-32) that may\n   contain the octets NUL, LF, or CR other than a CRLF pair cannot be\n   reliably conveyed in the above format (that is, they violate the MUST\n   requirement above).  However, except when stated otherwise, this\n   specification does not require the content to be UTF-8, and therefore\n   (subject to that same requirement) it MAY include octets above and\n   below 128 mixed arbitrarily.\n   This document does not place any limit on the length of a line in a\n   multi-line block.  However, the standards that define the format of\n   articles may do so.\n3.2.  Response Codes\n   Each response MUST begin with a three-digit status indicator.  These\n   are status reports from the server and indicate the response to the\n   last command received from the client.\n   The first digit of the response broadly indicates the success,\n   failure, or progress of the previous command:\n      1xx - Informative message\n      2xx - Command completed OK\n      3xx - Command OK so far; send the rest of it\n      4xx - Command was syntactically correct but failed for some reason\n      5xx - Command unknown, unsupported, unavailable, or syntax error\n   The next digit in the code indicates the function response category:\n      x0x - Connection, setup, and miscellaneous messages\n      x1x - Newsgroup selection\n      x2x - Article selection\n      x3x - Distribution functions\n      x4x - Posting\n      x8x - Reserved for authentication and privacy extensions\n      x9x - Reserved for private use (non-standard extensions)\n   Certain responses contain arguments such as numbers and names in\n   addition to the status indicator.  In those cases, to simplify\n   interpretation by the client, the number and type of such arguments\n   is fixed for each response code, as is whether the code is\n   single-line or multi-line.  Any extension MUST follow this principle\n   as well.  Note that, for historical reasons, the 211 response code is\n   an exception to this in that the response may be single-line or\n   multi-line depending on the command (GROUP or LISTGROUP) that\n   generated it.  In all other cases, the client MUST only use the\n   status indicator itself to determine the nature of the response.  The\n   exact response codes that can be returned by any given command are\n   detailed in the description of that command.\n   Arguments MUST be separated from the numeric status indicator and\n   from each other by a single space.  All numeric arguments MUST be in\n   base 10 (decimal) format and MAY have leading zeros.  String\n   arguments MUST contain at least one character and MUST NOT contain\n   TAB, LF, CR, or space.  The server MAY add any text after the\n   response code or last argument, as appropriate, and the client MUST\n   NOT make decisions based on this text.  Such text MUST be separated\n   from the numeric status indicator or the last argument by at least\n   one space.\n   The server MUST respond to any command with the appropriate generic\n   response (given in Section 3.2.1) if it represents the situation.\n   Otherwise, each recognized command MUST return one of the response\n   codes specifically listed in its description or in an extension.  A\n   server MAY provide extensions to this specification, including new\n   commands, new variants or features of existing commands, and other\n   ways of changing the internal state of the server.  However, the\n   server MUST NOT produce any other responses to a client that does not\n   invoke any of the additional features.  (Therefore, a client that\n   restricts itself to this specification will only receive the\n   responses that are listed.)\n   If a client receives an unexpected response, it SHOULD use the first\n   digit of the response to determine the result.  For example, an\n   unexpected 2xx should be taken as success, and an unexpected 4xx or\n   5xx as failure.\n   Response codes not specified in this document MAY be used for any\n   installation-specific additional commands also not specified.  These\n   SHOULD be chosen to fit the pattern of x9x specified above.\n   Neither this document nor any registered extension (see\n   Section 3.3.3) will specify any response codes of the x9x pattern.\n   (Implementers of extensions are accordingly cautioned not to use such\n   responses for extensions that may subsequently be submitted for\n   registration.)\n3.2.1.  Generic Response Codes\n   The server MUST respond to any command with the appropriate one of\n   the following generic responses if it represents the situation.\n   If the command is not recognized, or if it is an optional command\n   that is not implemented by the server, the response code 500 MUST be\n   returned.\n   If there is a syntax error in the arguments of a recognized command,\n   including the case where more arguments are provided than the command\n   specifies or the command line is longer than the server accepts, the\n   response code 501 MUST be returned.  The line MUST NOT be truncated\n   or split and then interpreted.  Note that where a command has\n   variants depending on a second keyword (e.g., LIST ACTIVE and LIST\n   NEWSGROUPS), 501 MUST be used when the base command is implemented\n   but the requested variant is not, and 500 MUST be used only when the\n   base command itself is not implemented.\n   If an argument is required to be a base64-encoded string [RFC4648]\n   (there are no such arguments in this specification, but there may be\n   in extensions) and is not validly encoded, the response code 504 MUST\n   be returned.\n   If the server experiences an internal fault or problem that means it\n   is unable to carry out the command (for example, a necessary file is\n   missing or a necessary service could not be contacted), the response\n   code 403 MUST be returned.  If the server recognizes the command but\n   does not provide an optional feature (for example, because it does\n   not store the required information), or if it only handles a subset\n   of legitimate cases (see the HDR command, Section 8.5, for an\n   example), the response code 503 MUST be returned.\n   If the client is not authorized to use the specified facility when\n   the server is in its current state, then the appropriate one of the\n   following response codes MUST be used.\n   502: It is necessary to terminate the connection and to start a new\n      one with the appropriate authority before the command can be used.\n      Historically, some mode-switching servers (see Section 3.4.1) used\n      this response to indicate that this command will become available\n      after the MODE READER command (Section 5.3) is used, but this\n      usage does not conform to this specification and MUST NOT be used.\n      Note that the server MUST NOT close the connection immediately\n      after a 502 response except at the initial connection\n      (Section 5.1) and with the MODE READER command.\n   480: The client must authenticate itself to the server (that is, it\n      must provide information as to the identity of the client) before\n      the facility can be used on this connection.  This will involve\n      the use of an authentication extension such as [NNTP-AUTH].\n   483: The client must negotiate appropriate privacy protection on the\n      connection.  This will involve the use of a privacy extension such\n      as [NNTP-TLS].\n   401: The client must change the state of the connection in some other\n      manner.  The first argument of the response MUST be the capability\n      label (see Section 5.2) of the facility that provides the\n      necessary mechanism (usually an extension, which may be a private\n      extension).  The server MUST NOT use this response code except as\n      specified by the definition of the capability in question.\n   If the server has to terminate the connection for some reason, it\n   MUST give a 400 response code to the next command and then\n   immediately close the connection.  Following a 400 response, clients\n   SHOULD NOT simply reconnect immediately and retry the same actions.\n   Rather, a client SHOULD either use an exponentially increasing delay\n   between retries (e.g., double the waiting time after each 400\n   response) or present any associated text to the user for them to\n   decide whether and when to retry.\n   The client MUST be prepared to receive any of these responses for any\n   command (except, of course, that the server MUST NOT generate a 500\n   response code for mandatory commands).\n3.2.1.1.  Examples\n   Example of an unknown command:\n      [C] MAIL\n      [S] 500 Unknown command\n   Example of an unsupported command:\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] NEWNEWS\n      [S] LIST ACTIVE NEWSGROUPS\n      [S] .\n      [C] OVER\n      [S] 500 Unknown command\n   Example of an unsupported variant:\n      [C] MODE POSTER\n      [S] 501 Unknown MODE option\n   Example of a syntax error:\n      [C] ARTICLE a.message.id@no.angle.brackets\n      [S] 501 Syntax error\n   Example of an overlong command line:\n      [C] HEAD 53 54 55\n      [S] 501 Too many arguments\n   Example of a bad wildmat:\n      [C] LIST ACTIVE u[ks].*\n      [S] 501 Syntax error\n   Example of a base64-encoding error (the second argument is meant to\n   be base64 encoded):\n      [C] XENCRYPT RSA abcd=efg\n      [S] 504 Base64 encoding error\n   Example of an attempt to access a facility not available to this\n   connection:\n      [C] MODE READER\n      [S] 200 Reader mode, posting permitted\n      [C] IHAVE <i.am.an.article.you.will.want@example.com>\n      [S] 500 Permission denied\n   Example of an attempt to access a facility requiring authentication:\n      [C] GROUP secret.group\n      [S] 480 Permission denied\n   Example of a successful attempt following such authentication:\n      [C] XSECRET fred flintstone\n      [S] 290 Password for fred accepted\n      [C] GROUP secret.group\n      [S] 211 5 1 20 secret.group selected\n   Example of an attempt to access a facility requiring privacy:\n      [C] GROUP secret.group\n      [S] 483 Secure connection required\n      [C] XENCRYPT\n      [Client and server negotiate encryption on the link]\n      [S] 283 Encrypted link established\n      [C] GROUP secret.group\n      [S] 211 5 1 20 secret.group selected\n   Example of a need to change mode before a facility is used:\n      [C] GROUP binary.group\n      [S] 401 XHOST Not on this virtual host\n      [C] XHOST binary.news.example.org\n      [S] 290 binary.news.example.org virtual host selected\n      [C] GROUP binary.group\n      [S] 211 5 1 77 binary.group selected\n   Example of a temporary failure:\n      [C] GROUP archive.local\n      [S] 403 Archive server temporarily offline\n   Example of the server needing to close down immediately:\n      [C] ARTICLE 123\n      [S] 400 Power supply failed, running on UPS\n      [Server closes connection.]\n3.3.  Capabilities and Extensions\n   Not all NNTP servers provide exactly the same facilities, both\n   because this specification allows variation and because servers may\n   provide extensions.  A set of facilities that are related are called\n   a \"capability\".  This specification provides a way to determine what\n   capabilities are available, includes a list of standard capabilities,\n   and includes a mechanism (the extension mechanism) for defining new\n   capabilities.\n3.3.1.  Capability Descriptions\n   A client can determine the available capabilities of the server by\n   using the CAPABILITIES command (Section 5.2).  This returns a\n   capability list, which is a list of capability lines.  Each line\n   describes one available capability.\n   Each capability line consists of one or more tokens, which MUST be\n   separated by one or more space or TAB characters.  A token is a\n   string of 1 or more printable UTF-8 characters (that is, either\n   printable US-ASCII characters or any UTF-8 sequence outside the US-\n   ASCII range, but not space or TAB).  Unless stated otherwise, tokens\n   are case insensitive.  Each capability line consists of the\n   following:\n   o  The capability label, which is a keyword indicating the\n      capability.  A capability label may be defined by this\n      specification or a successor, or by an extension.\n   o  The label is then followed by zero or more tokens, which are\n      arguments of the capability.  The form and meaning of these tokens\n      is specific to each capability.\n   The server MUST ensure that the capability list accurately reflects\n   the capabilities (including extensions) currently available.  If a\n   capability is only available with the server in a certain state (for\n   example, only after authentication), the list MUST only include the\n   capability label when the server is in that state.  Similarly, if\n   only some of the commands in an extension will be available, or if\n   the behaviour of the extension will change in some other manner,\n   according to the state of the server, this MUST be indicated by\n   different arguments in the capability line.\n   Note that a capability line can only begin with a letter.  Lines\n   beginning with other characters are reserved for future versions of\n   this specification.  In order to interoperate with such versions,\n   clients MUST be prepared to receive lines beginning with other\n   characters and MUST ignore any they do not understand.\n3.3.2.  Standard Capabilities\n   The following capabilities are defined by this specification.\n   VERSION\n      This capability MUST be advertised by all servers and MUST be the\n      first capability in the capability list; it indicates the\n      version(s) of NNTP that the server supports.  There must be at\n      least one argument; each argument is a decimal number and MUST NOT\n      have a leading zero.  Version numbers are assigned only in RFCs\n      that update or replace this specification; servers MUST NOT create\n      their own version numbers.\n      The version number of this specification is 2.\n   READER\n      This capability indicates that the server implements the various\n      commands useful for reading clients.\n   IHAVE\n      This capability indicates that the server implements the IHAVE\n      command.\n   POST\n      This capability indicates that the server implements the POST\n      command.\n   NEWNEWS\n      This capability indicates that the server implements the NEWNEWS\n      command.\n   HDR\n      This capability indicates that the server implements the header\n      access commands (HDR and LIST HEADERS).\n   OVER\n      This capability indicates that the server implements the overview\n      access commands (OVER and LIST OVERVIEW.FMT).  If and only if the\n      server supports the message-id form of the OVER command, there\n      must be a single argument MSGID.\n   LIST\n      This capability indicates that the server implements at least one\n      variant of the LIST command.  There MUST be one argument for each\n      variant of the LIST command supported by the server, giving the\n      keyword for that variant.\n   IMPLEMENTATION\n      This capability MAY be provided by a server.  If so, the arguments\n      SHOULD be used to provide information such as the server software\n      name and version number.  The client MUST NOT use this line to\n      determine capabilities of the server.  (While servers often\n      provide this information in the initial greeting, clients need to\n      guess whether this is the case; this capability makes it clear\n      what the information is.)\n   MODE-READER\n      This capability indicates that the server is mode-switching\n      (Section 3.4.2) and that the MODE READER command needs to be used\n      to enable the READER capability.\n3.3.3.  Extensions\n   Although NNTP is widely and robustly deployed, some parts of the\n   Internet community might wish to extend the NNTP service.  It must be\n   emphasized that any extension to NNTP should not be considered\n   lightly.  NNTP's strength comes primarily from its simplicity.\n   Experience with many protocols has shown that:\n      Protocols with few options tend towards ubiquity, whilst protocols\n      with many options tend towards obscurity.\n   This means that each and every extension, regardless of its benefits,\n   must be carefully scrutinized with respect to its implementation,\n   deployment, and interoperability costs.  In many cases, the cost of\n   extending the NNTP service will likely outweigh the benefit.\n   An extension is a package of associated facilities, often but not\n   always including one or more new commands.  Each extension MUST\n   define at least one new capability label (this will often, but need\n   not, be the name of one of these new commands).  While any additional\n   capability information can normally be specified using arguments to\n   that label, an extension MAY define more than one capability label.\n   However, this SHOULD be limited to exceptional circumstances.\n   An extension is either a private extension, or its capabilities are\n   included in the IANA registry of capabilities (see Section 3.3.4) and\n   it is defined in an RFC (in which case it is a \"registered\n   extension\").  Such RFCs either must be on the standards track or must\n   define an IESG-approved experimental protocol.\n   The definition of an extension must include the following:\n   o  a descriptive name for the extension.\n   o  the capability label or labels defined by the extension (the\n      capability label of a registered extension MUST NOT begin with\n      \"X\").\n   o  The syntax, values, and meanings of any arguments for each\n      capability label defined by the extension.\n   o  Any new NNTP commands associated with the extension (the names of\n      commands associated with registered extensions MUST NOT begin with\n      \"X\").\n   o  The syntax and possible values of arguments associated with the\n      new NNTP commands.\n   o  The response codes and possible values of arguments for the\n      responses of the new NNTP commands.\n   o  Any new arguments the extension associates with any other\n      pre-existing NNTP commands.\n   o  Any increase in the maximum length of commands and initial\n      response lines over the value specified in this document.\n   o  A specific statement about the effect on pipelining that this\n      extension may have (if any).\n   o  A specific statement about the circumstances when use of this\n      extension can alter the contents of the capabilities list (other\n      than the new capability labels it defines).\n   o  A specific statement about the circumstances under which the\n      extension can cause any pre-existing command to produce a 401,\n      480, or 483 response.\n   o  A description of how the use of MODE READER on a mode-switching\n      server interacts with the extension.\n   o  A description of how support for the extension affects the\n      behaviour of a server and NNTP client in any other manner not\n      outlined above.\n   o  Formal syntax as described in Section 9.9.\n   A private extension MAY or MAY NOT be included in the capabilities\n   list.  If it is, the capability label MUST begin with \"X\".  A server\n   MAY provide additional keywords (for new commands and also for new\n   variants of existing commands) as part of a private extension.  To\n   avoid the risk of a clash with a future registered extension, these\n   keywords SHOULD begin with \"X\".\n   If the server advertises a capability defined by a registered\n   extension, it MUST implement the extension so as to fully conform\n   with the specification (for example, it MUST implement all the\n   commands that the extension describes as mandatory).  If it does not\n   implement the extension as specified, it MUST NOT list the extension\n   in the capabilities list under its registered name.  In that case, it\n   MAY, but SHOULD NOT, provide a private extension (not listed, or\n   listed with a different name) that implements part of the extension\n   or implements the commands of the extension with a different meaning.\n   A server MUST NOT send different response codes to basic NNTP\n   commands documented here or to commands documented in registered\n   extensions in response to the availability or use of a private\n   extension.\n3.3.4.  Initial IANA Register\n   IANA will maintain a registry of NNTP capability labels.  All\n   capability labels in the registry MUST be keywords and MUST NOT begin\n   with X.\n   The initial content of the registry consists of these entries:\n   +-------------------+--------------------------+--------------------+\n   | Label             | Meaning                  | Definition         |\n   +-------------------+--------------------------+--------------------+\n   | AUTHINFO          | Authentication           | [NNTP-AUTH]        |\n   |                   |                          |                    |\n   | HDR               | Batched header retrieval | Section 3.3.2,     |\n   |                   |                          | Section 8.5, and   |\n   |                   |                          | Section 8.6        |\n   |                   |                          |                    |\n   | IHAVE             | IHAVE command available  | Section 3.3.2 and  |\n   |                   |                          | Section 6.3.2      |\n   |                   |                          |                    |\n   | IMPLEMENTATION    | Server                   | Section 3.3.2      |\n   |                   | implementation-specific  |                    |\n   |                   | information              |                    |\n   |                   |                          |                    |\n   | LIST              | LIST command variants    | Section 3.3.2 and  |\n   |                   |                          | Section 7.6.1      |\n   |                   |                          |                    |\n   | MODE-READER       | Mode-switching server    | Section 3.4.2      |\n   |                   | and MODE READER command  |                    |\n   |                   | available                |                    |\n   |                   |                          |                    |\n   | NEWNEWS           | NEWNEWS command          | Section 3.3.2 and  |\n   |                   | available                | Section 7.4        |\n   |                   |                          |                    |\n   | OVER              | Overview support         | Section 3.3.2,     |\n   |                   |                          | Section 8.3, and   |\n   |                   |                          | Section 8.4        |\n   |                   |                          |                    |\n   | POST              | POST command available   | Section 3.3.2 and  |\n   |                   |                          | Section 6.3.1      |\n   |                   |                          |                    |\n   | READER            | Reader commands          | Section 3.3.2      |\n   |                   | available                |                    |\n   |                   |                          |                    |\n   | SASL              | Supported SASL           | [NNTP-AUTH]        |\n   |                   | mechanisms               |                    |\n   |                   |                          |                    |\n   | STARTTLS          | Transport layer security | [NNTP-TLS]         |\n   |                   |                          |                    |\n   | STREAMING         | Streaming feeds          | [NNTP-STREAM]      |\n   |                   |                          |                    |\n   | VERSION           | Supported NNTP versions  | Section 3.3.2      |\n   +-------------------+--------------------------+--------------------+\n3.4.  Mandatory and Optional Commands\n   For a number of reasons, not all the commands in this specification\n   are mandatory.  However, it is equally undesirable for every command\n   to be optional, since this means that a client will have no idea what\n   facilities are available.  Therefore, as a compromise, some of the\n   commands in this specification are mandatory (they must be supported\n   by all servers) while the remainder are not.  The latter are then\n   subdivided into bundles, each indicated by a single capability label.\n   o  If the label is included in the capability list returned by the\n      server, the server MUST support all commands in that bundle.\n   o  If the label is not included, the server MAY support none or some\n      of the commands but SHOULD NOT support all of them.  In general,\n      there will be no way for a client to determine which commands are\n      supported without trying them.\n   The bundles have been chosen to provide useful functionality, and\n   therefore server authors are discouraged from implementing only part\n   of a bundle.\n   The description of each command will either indicate that it is\n   mandatory, or will give, using the term \"indicating capability\", the\n   capability label indicating whether the bundle including this command\n   is available.\n   Where a server does not implement a command, it MUST always generate\n   a 500 generic response code (or a 501 generic response code in the\n   case of a variant of a command depending on a second keyword where\n   the base command is recognised).  Otherwise, the command MUST be\n   fully implemented as specified; a server MUST NOT only partially\n   implement any of the commands in this specification.  (Client authors\n   should note that some servers not conforming to this specification\n   will return a 502 generic response code to some commands that are not\n   implemented.)\n   Note: some commands have cases that require other commands to be used\n   first.  If the former command is implemented but the latter is not,\n   the former MUST still generate the relevant specific response code.\n   For example, if ARTICLE (Section 6.2.1) is implemented but GROUP\n   (Section 6.1.1) is not, the correct response to \"ARTICLE 1234\"\n   remains 412.\n3.4.1.  Reading and Transit Servers\n   NNTP is traditionally used in two different ways.  The first use is\n   \"reading\", where the client fetches articles from a large store\n   maintained by the server for immediate or later presentation to a\n   user and sends articles created by that user back to the server (an\n   action called \"posting\") to be stored and distributed to other stores\n   and users.  The second use is for the bulk transfer of articles from\n   one store to another.  Since the hosts making this transfer tend to\n   be peers in a network that transmit articles among one another, and\n   not end-user systems, this process is called \"peering\" or \"transit\".\n   (Even so, one host is still the client and the other is the server).\n   In practice, these two uses are so different that some server\n   implementations are optimised for reading or for transit and, as a\n   result, do not offer the other facility or only offer limited\n   features.  Other implementations are more general and offer both.\n   This specification allows for this by bundling the relevant commands\n   accordingly: the IHAVE command is designed for transit, while the\n   commands indicated by the READER capability are designed for reading\n   clients.\n   Except as an effect of the MODE READER command (Section 5.3) on a\n   mode-switching server, once a server advertises either or both of the\n   IHAVE or READER capabilities, it MUST continue to advertise them for\n   the entire session.\n   A server MAY provide different modes of behaviour (transit, reader,\n   or a combination) to different client connections and MAY use\n   external information, such as the IP address of the client, to\n   determine which mode to provide to any given connection.\n   The official TCP port for the NNTP service is 119.  However, if a\n   host wishes to offer separate servers for transit and reading\n   clients, port 433 SHOULD be used for the transit server and 119 for\n   the reading server.\n3.4.2.  Mode Switching\n   An implementation MAY, but SHOULD NOT, provide both transit and\n   reader facilities on the same server but require the client to select\n   which it wishes to use.  Such an arrangement is called a\n   \"mode-switching\" server.\n   A mode-switching server has two modes:\n   o  Transit mode, which applies after the initial connection.\n      *  It MUST advertise the MODE-READER capability.\n      *  It MUST NOT advertise the READER capability.\n      However, the server MAY cease to advertise the MODE-READER\n      capability after the client uses any command except CAPABILITIES.\n   o  Reading mode, after a successful MODE READER command (see Section\n      5.3).\n      *  It MUST NOT advertise the MODE-READER capability.\n      *  It MUST advertise the READER capability.\n      *  It MAY NOT advertise the IHAVE capability, even if it was\n         advertising it in transit mode.\n   A client SHOULD only issue a MODE READER command to a server if it is\n   advertising the MODE-READER capability.  If the server does not\n   support CAPABILITIES (and therefore does not conform to this\n   specification), the client MAY use the following heuristic:\n   o  If the client wishes to use any \"reader\" commands, it SHOULD use\n      the MODE READER command immediately after the initial connection.\n   o  Otherwise, it SHOULD NOT use the MODE READER command.\n   In each case, it should be prepared for some commands to be\n   unavailable that would have been available if it had made the other\n   choice.\n3.5.  Pipelining\n   NNTP is designed to operate over a reliable bi-directional\n   connection, such as TCP.  Therefore, if a command does not depend on\n   the response to the previous one, it should not matter if it is sent\n   before that response is received.  Doing this is called \"pipelining\".\n   However, certain server implementations throw away all text received\n   from the client following certain commands before sending their\n   response.  If this happens, pipelining will be affected because one\n   or more commands will have been ignored or misinterpreted, and the\n   client will be matching the wrong responses to each command.  Since\n   there are significant benefits to pipelining, but also circumstances\n   where it is reasonable or common for servers to behave in the above\n   manner, this document puts certain requirements on both clients and\n   servers.\n   Except where stated otherwise, a client MAY use pipelining.  That is,\n   it may send a command before receiving the response for the previous\n   command.  The server MUST allow pipelining and MUST NOT throw away\n   any text received after a command.  Irrespective of whether\n   pipelining is used, the server MUST process commands in the order\n   they are sent.\n   If the specific description of a command says it \"MUST NOT be\n   pipelined\", that command MUST end any pipeline of commands.  That is,\n   the client MUST NOT send any following command until it receives the\n   CRLF at the end of the response from the command.  The server MAY\n   ignore any data received after the command and before the CRLF at the\n   end of the response is sent to the client.\n   The initial connection must not be part of a pipeline; that is, the\n   client MUST NOT send any command until it receives the CRLF at the\n   end of the greeting.\n   If the client uses blocking system calls to send commands, it MUST\n   ensure that the amount of text sent in pipelining does not cause a\n   deadlock between transmission and reception.  The amount of text\n   involved will depend on window sizes in the transmission layer;\n   typically, it is 4k octets for TCP.  (Since the server only sends\n   data in response to commands from the client, the converse problem\n   does not occur.)\n3.5.1.  Examples\n   Example of correct use of pipelining:\n      [C] GROUP misc.test\n      [C] STAT\n      [C] NEXT\n      [S] 211 1234 3000234 3002322 misc.test\n      [S] 223 3000234 <45223423@example.com> retrieved\n      [S] 223 3000237 <668929@example.org> retrieved\n   Example of incorrect use of pipelining (the MODE READER command may\n   not be pipelined):\n      [C] MODE READER\n      [C] DATE\n      [C] NEXT\n      [S] 200 Server ready, posting allowed\n      [S] 223 3000237 <668929@example.org> retrieved\n   The DATE command has been thrown away by the server, so there is no\n   111 response to match it.\n3.6.  Articles\n   NNTP is intended to transfer articles between clients and servers.\n   For the purposes of this specification, articles are required to\n   conform to the rules in this section, and clients and servers MUST\n   correctly process any article received from the other that does so.\n   Note that this requirement applies only to the contents of\n   communications over NNTP; it does not prevent the client or server\n   from subsequently rejecting an article for reasons of local policy.\n   Also see Appendix A for further restrictions on the format of\n   articles in some uses of NNTP.\n   An article consists of two parts: the headers and the body.  They are\n   separated by a single empty line, or in other words by two\n   consecutive CRLF pairs (if there is more than one empty line, the\n   second and subsequent ones are part of the body).  In order to meet\n   the general requirements of NNTP, an article MUST NOT include the\n   octet NUL, MUST NOT contain the octets LF and CR other than as part\n   of a CRLF pair, and MUST end with a CRLF pair.  This specification\n   puts no further restrictions on the body; in particular, it MAY be\n   empty.\n   The headers of an article consist of one or more header lines.  Each\n   header line consists of a header name, a colon, a space, the header\n   content, and a CRLF, in that order.  The name consists of one or more\n   printable US-ASCII characters other than colon and, for the purposes\n   of this specification, is not case sensitive.  There MAY be more than\n   one header line with the same name.  The content MUST NOT contain\n   CRLF; it MAY be empty.  A header may be \"folded\"; that is, a CRLF\n   pair may be placed before any TAB or space in the line.  There MUST\n   still be some other octet between any two CRLF pairs in a header\n   line.  (Note that folding means that the header line occupies more\n   than one line when displayed or transmitted; nevertheless, it is\n   still referred to as \"a\" header line.)  The presence or absence of\n   folding does not affect the meaning of the header line; that is, the\n   CRLF pairs introduced by folding are not considered part of the\n   header content.  Header lines SHOULD NOT be folded before the space\n   after the colon that follows the header name and SHOULD include at\n   least one octet other than %x09 or %x20 between CRLF pairs.  However,\n   if an article that fails to satisfy this requirement has been\n   received from elsewhere, clients and servers MAY transfer it to each\n   other without re-folding it.\n   The content of a header SHOULD be in UTF-8.  However, if an\n   implementation receives an article from elsewhere that uses octets in\n   the range 128 to 255 in some other manner, it MAY pass it to a client\n   or server without modification.  Therefore, implementations MUST be\n   prepared to receive such headers, and data derived from them (e.g.,\n   in the responses from the OVER command, Section 8.3), and MUST NOT\n   assume that they are always UTF-8.  Any external processing of those\n   headers, including identifying the encoding used, is outside the\n   scope of this document.\n   Each article MUST have a unique message-id; two articles offered by\n   an NNTP server MUST NOT have the same message-id.  For the purposes\n   of this specification, message-ids are opaque strings that MUST meet\n   the following requirements:\n   o  A message-id MUST begin with \"<\", end with \">\", and MUST NOT\n      contain the latter except at the end.\n   o  A message-id MUST be between 3 and 250 octets in length.\n   o  A message-id MUST NOT contain octets other than printable US-ASCII\n      characters.\n   Two message-ids are the same if and only if they consist of the same\n   sequence of octets.\n   This specification does not describe how the message-id of an article\n   is determined.  If the server does not have any way to determine a\n   message-id from the article itself, it MUST synthesize one (this\n   specification does not require that the article be changed as a\n   result).  See also Appendix A.2."
  },
  {
    "section_number": "4.",
    "section_name": "The WILDMAT Format",
    "tag": "Section 4. The WILDMAT Format",
    "content": "The WILDMAT format described here is based on the version first\n   developed by Rich Salz [SALZ1992], which was in turn derived from the\n   format used in the UNIX \"find\" command to articulate file names.  It\n   was developed to provide a uniform mechanism for matching patterns in\n   the same manner that the UNIX shell matches filenames.\n4.1.  Wildmat Syntax\n   A wildmat is described by the following ABNF [RFC4234] syntax, which\n   is an extract of that in Section 9.8.\n     wildmat = wildmat-pattern *(\",\" [\"!\"] wildmat-pattern)\n     wildmat-pattern = 1*wildmat-item\n     wildmat-item = wildmat-exact / wildmat-wild\n     wildmat-exact = %x22-29 / %x2B / %x2D-3E / %x40-5A / %x5E-7E /\n          UTF8-non-ascii ; exclude ! * , ? [ \\ ]\n     wildmat-wild = \"*\" / \"?\"\n   Note: the characters \",\", \"\\\", \"[\", and \"]\" are not allowed in\n   wildmats, while * and ? are always wildcards.  This should not be a\n   problem, since these characters cannot occur in newsgroup names,\n   which is the only current use of wildmats.  Backslash is commonly\n   used to suppress the special meaning of characters, whereas brackets\n   are used to introduce sets.  However, these usages are not universal,\n   and interpretation of these characters in the context of UTF-8\n   strings is potentially complex and differs from existing practice, so\n   they were omitted from this specification.  A future extension to\n   this specification may provide semantics for these characters.\n4.2.  Wildmat Semantics\n   A wildmat is tested against a string and either matches or does not\n   match.  To do this, each constituent <wildmat-pattern> is matched\n   against the string, and the rightmost pattern that matches is\n   identified.  If that <wildmat-pattern> is not preceded with \"!\", the\n   whole wildmat matches.  If it is preceded by \"!\", or if no <wildmat-\n   pattern> matches, the whole wildmat does not match.\n   For example, consider the wildmat \"a*,!*b,*c*\":\n   o  The string \"aaa\" matches because the rightmost match is with \"a*\".\n   o  The string \"abb\" does not match because the rightmost match is\n      with \"*b\".\n   o  The string \"ccb\" matches because the rightmost match is with\n      \"*c*\".\n   o  The string \"xxx\" does not match because no <wildmat-pattern>\n      matches.\n   A <wildmat-pattern> matches a string if the string can be broken into\n   components, each of which matches the corresponding <wildmat-item> in\n   the pattern.  The matches must be in the same order, and the whole\n   string must be used in the match.  The pattern is \"anchored\"; that\n   is, the first and last characters in the string must match the first\n   and last item, respectively (unless that item is an asterisk matching\n   zero characters).\n   A <wildmat-exact> matches the same character (which may be more than\n   one octet in UTF-8).\n   \"?\" matches exactly one character (which may be more than one octet).\n   \"*\" matches zero or more characters.  It can match an empty string,\n   but it cannot match a subsequence of a UTF-8 sequence that is not\n   aligned to the character boundaries.\n4.3.  Extensions\n   An NNTP server or extension MAY extend the syntax or semantics of\n   wildmats provided that all wildmats that meet the requirements of\n   Section 4.1 have the meaning ascribed to them by Section 4.2.  Future\n   editions of this document may also extend wildmats.\n4.4.  Examples\n   In these examples, $ and @ are used to represent the two octets %xC2\n   and %xA3, respectively; $@ is thus the UTF-8 encoding for the pound\n   sterling symbol, shown as # in the descriptions.\n     Wildmat    Description of strings that match\n       abc      The one string \"abc\"\n       abc,def  The two strings \"abc\" and \"def\"\n       $@       The one character string \"#\"\n       a*       Any string that begins with \"a\"\n       a*b      Any string that begins with \"a\" and ends with \"b\"\n       a*,*b    Any string that begins with \"a\" or ends with \"b\"\n       a*,!*b   Any string that begins with \"a\" and does not end with\n                \"b\"\n     a*,!*b,c*  Any string that begins with \"a\" and does not end with\n                \"b\", and any string that begins with \"c\" no matter\n                what it ends with\n     a*,c*,!*b  Any string that begins with \"a\" or \"c\" and does not\n                end with \"b\"\n       ?a*      Any string with \"a\" as its second character\n       ??a*     Any string with \"a\" as its third character\n       *a?      Any string with \"a\" as its penultimate character\n       *a??     Any string with \"a\" as its antepenultimate character"
  },
  {
    "section_number": "5.",
    "section_name": "Session Administration Commands",
    "tag": "Section 5. Session Administration Commands",
    "content": "5.1.  Initial Connection\n5.1.1.  Usage\n   This command MUST NOT be pipelined.\n   Responses [1]\n     200    Service available, posting allowed\n     201    Service available, posting prohibited\n     400    Service temporarily unavailable [2]\n     502    Service permanently unavailable [2]\n   [1] These are the only valid response codes for the initial greeting;\n       the server MUST not return any other generic response code.\n   [2] Following a 400 or 502 response, the server MUST immediately\n       close the connection.\n5.1.2.  Description\n   There is no command presented by the client upon initial connection\n   to the server.  The server MUST present an appropriate response code\n   as a greeting to the client.  This response informs the client\n   whether service is available and whether the client is permitted to\n   post.\n   If the server will accept further commands from the client including\n   POST, the server MUST present a 200 greeting code.  If the server\n   will accept further commands from the client, but the client is not\n   authorized to post articles using the POST command, the server MUST\n   present a 201 greeting code.\n   Otherwise, the server MUST present a 400 or 502 greeting code and\n   then immediately close the connection. 400 SHOULD be used if the\n   issue is only temporary (for example, because of load) and the client\n   can expect to be able to connect successfully at some point in the\n   future without making any changes. 502 MUST be used if the client is\n   not permitted under any circumstances to interact with the server,\n   and MAY be used if the server has insufficient information to\n   determine whether the issue is temporary or permanent.\n   Note: the distinction between the 200 and 201 response codes has\n   turned out in practice to be insufficient; for example, some servers\n   do not allow posting until the client has authenticated, while other\n   clients assume that a 201 response means that posting will never be\n   possible even after authentication.  Therefore, clients SHOULD use\n   the CAPABILITIES command (Section 5.2) rather than rely on this\n   response.\n5.1.3.  Examples\n   Example of a normal connection from an authorized client that then\n   terminates the session (see Section 5.4):\n      [Initial connection set-up completed.]\n      [S] 200 NNTP Service Ready, posting permitted\n      [C] QUIT\n      [S] 205 NNTP Service exits normally\n      [Server closes connection.]\n   Example of a normal connection from an authorized client that is not\n   permitted to post, which also immediately terminates the session:\n      [Initial connection set-up completed.]\n      [S] 201 NNTP Service Ready, posting prohibited\n      [C] QUIT\n      [S] 205 NNTP Service exits normally\n      [Server closes connection.]\n   Example of a normal connection from an unauthorized client:\n      [Initial connection set-up completed.]\n      [S] 502 NNTP Service permanently unavailable\n      [Server closes connection.]\n   Example of a connection from a client if the server is unable to\n   provide service:\n      [Initial connection set-up completed.]\n      [S] 400 NNTP Service temporarily unavailable\n      [Server closes connection.]\n5.2.  CAPABILITIES\n5.2.1.  Usage\n   This command is mandatory.\n   Syntax\n     CAPABILITIES [keyword]\n   Responses\n     101    Capability list follows (multi-line)\n   Parameters\n     keyword    additional feature, see description\n5.2.2.  Description\n   The CAPABILITIES command allows a client to determine the\n   capabilities of the server at any given time.\n   This command MAY be issued at any time; the server MUST NOT require\n   it to be issued in order to make use of any capability.  The response\n   generated by this command MAY change during a session because of\n   other state information (which, in turn, may be changed by the\n   effects of other commands or by external events).  An NNTP client is\n   only able to get the current and correct information concerning\n   available capabilities at any point during a session by issuing a\n   CAPABILITIES command at that point of that session and processing the\n   response.\n   The capability list is returned as a multi-line data block following\n   the 101 response code.  Each capability is described by a separate\n   capability line.  The server MUST NOT list the same capability twice\n   in the response, even with different arguments.  Except that the\n   VERSION capability MUST be the first line, the order in which the\n   capability lines appears is not significant; the server need not even\n   consistently return the same order.\n   While some capabilities are likely to be always available or never\n   available, others (notably extensions) will appear and disappear\n   depending on server state changes within the session or on external\n   events between sessions.  An NNTP client MAY cache the results of\n   this command, but MUST NOT rely on the correctness of any cached\n   results, whether from earlier in this session or from a previous\n   session, MUST cope gracefully with the cached status being out of\n   date, and SHOULD (if caching results) provide a way to force the\n   cached information to be refreshed.  Furthermore, a client MUST NOT\n   use cached results in relation to security, privacy, and\n   authentication extensions.  See Section 12.6 for further discussion\n   of this topic.\n   The keyword argument is not used by this specification.  It is\n   provided so that extensions or revisions to this specification can\n   include extra features for this command without requiring the\n   CAPABILITIES command to be used twice (once to determine if the extra\n   features are available, and a second time to make use of them).  If\n   the server does not recognise the argument (and it is a keyword), it\n   MUST respond with the 101 response code as if the argument had been\n   omitted.  If an argument is provided that the server does recognise,\n   it MAY use the 101 response code or MAY use some other response code\n   (which will be defined in the specification of that feature).  If the\n   argument is not a keyword, the 501 generic response code MUST be\n   returned.  The server MUST NOT generate any other response code to\n   the CAPABILITIES command.\n5.2.3.  Examples\n   Example of a minimal response (a read-only server):\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] LIST ACTIVE NEWSGROUPS\n      [S] .\n   Example of a response from a server that has a range of facilities\n   and that also describes itself:\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] IHAVE\n      [S] POST\n      [S] NEWNEWS\n      [S] LIST ACTIVE NEWSGROUPS ACTIVE.TIMES OVERVIEW.FMT\n      [S] IMPLEMENTATION INN 4.2 2004-12-25\n      [S] OVER MSGID\n      [S] STREAMING\n      [S] XSECRET\n      [S] .\n   Example of a server that supports more than one version of NNTP:\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2 3\n      [S] READER\n      [S] LIST ACTIVE NEWSGROUPS\n      [S] .\n   Example of a client attempting to use a feature of the CAPABILITIES\n   command that the server does not support:\n      [C] CAPABILITIES AUTOUPDATE\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] IHAVE\n      [S] LIST ACTIVE NEWSGROUPS OVERVIEW.FMT HEADERS\n      [S] OVER MSGID\n      [S] HDR\n      [S] NEWNEWS\n      [S] .\n5.3.  MODE READER\n5.3.1.  Usage\n   Indicating capability: MODE-READER\n   This command MUST NOT be pipelined.\n   Syntax\n     MODE READER\n   Responses\n     200    Posting allowed\n     201    Posting prohibited\n     502    Reading service permanently unavailable [1]\n   [1] Following a 502 response the server MUST immediately close the\n       connection.\n5.3.2.  Description\n   The MODE READER command instructs a mode-switching server to switch\n   modes, as described in Section 3.4.2.\n   If the server is mode-switching, it switches from its transit mode to\n   its reader mode, indicating this by changing the capability list\n   accordingly.  It MUST then return a 200 or 201 response with the same\n   meaning as for the initial greeting (as described in Section 5.1.1).\n   Note that the response need not be the same as that presented during\n   the initial greeting.  The client MUST NOT issue MODE READER more\n   than once in a session or after any security or privacy commands are\n   issued.  When the MODE READER command is issued, the server MAY reset\n   its state to that immediately after the initial connection before\n   switching mode.\n   If the server is not mode-switching, then the following apply:\n   o  If it advertises the READER capability, it MUST return a 200 or\n      201 response with the same meaning as for the initial greeting; in\n      this case, the command MUST NOT affect the server state in any\n      way.\n   o  If it does not advertise the READER capability, it MUST return a\n      502 response and then immediately close the connection.\n5.3.3.  Examples\n   Example of use of the MODE READER command on a transit-only server\n   (which therefore does not providing reading facilities):\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] IHAVE\n      [S] .\n      [C] MODE READER\n      [S] 502 Transit service only\n      [Server closes connection.]\n   Example of use of the MODE READER command on a server that provides\n   reading facilities:\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] LIST ACTIVE NEWSGROUPS\n      [S] .\n      [C] MODE READER\n      [S] 200 Reader mode, posting permitted\n      [C] IHAVE <i.am.an.article.you.have@example.com>\n      [S] 500 Permission denied\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n   Note that in both of these situations, the client SHOULD NOT use MODE\n   READER.\n   Example of use of the MODE READER command on a mode-switching server:\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] IHAVE\n      [S] MODE-READER\n      [S] .\n      [C] MODE READER\n      [S] 200 Reader mode, posting permitted\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] NEWNEWS\n      [S] LIST ACTIVE NEWSGROUPS\n      [S] STARTTLS\n      [S] .\n   In this case, the server offers (but does not require) TLS privacy in\n   its reading mode but not in its transit mode.\n   Example of use of the MODE READER command where the client is not\n   permitted to post:\n      [C] MODE READER\n      [S] 201 NNTP Service Ready, posting prohibited\n5.4.  QUIT\n5.4.1.  Usage\n   This command is mandatory.\n   Syntax\n     QUIT\n   Responses\n     205    Connection closing\n5.4.2.  Description\n   The client uses the QUIT command to terminate the session.  The\n   server MUST acknowledge the QUIT command and then close the\n   connection to the client.  This is the preferred method for a client\n   to indicate that it has finished all of its transactions with the\n   NNTP server.\n   If a client simply disconnects (or if the connection times out or\n   some other fault occurs), the server MUST gracefully cease its\n   attempts to service the client, disconnecting from its end if\n   necessary.\n   The server MUST NOT generate any response code to the QUIT command\n   other than 205 or, if any arguments are provided, 501.\n5.4.3.  Examples\n      [C] QUIT\n      [S] 205 closing connection\n      [Server closes connection.]"
  },
  {
    "section_number": "6.",
    "section_name": "Article Posting and Retrieval",
    "tag": "Section 6. Article Posting and Retrieval",
    "content": "News-reading clients have available a variety of mechanisms to\n   retrieve articles via NNTP.  The news articles are stored and indexed\n   using three types of keys.  The first type of key is the message-id\n   of an article and is globally unique.  The second type of key is\n   composed of a newsgroup name and an article number within that\n   newsgroup.  On a particular server, there MUST only be one article\n   with a given number within any newsgroup, and an article MUST NOT\n   have two different numbers in the same newsgroup.  An article can be\n   cross-posted to multiple newsgroups, so there may be multiple keys\n   that point to the same article on the same server; these MAY have\n   different numbers in each newsgroup.  However, this type of key is\n   not required to be globally unique, so the same key MAY refer to\n   different articles on different servers.  (Note that the terms\n   \"group\" and \"newsgroup\" are equivalent.)\n   The final type of key is the arrival timestamp, giving the time that\n   the article arrived at the server.  The server MUST ensure that\n   article numbers are issued in order of arrival timestamp; that is,\n   articles arriving later MUST have higher numbers than those that\n   arrive earlier.  The server SHOULD allocate the next sequential\n   unused number to each new article.\n   Article numbers MUST lie between 1 and 2,147,483,647, inclusive.  The\n   client and server MAY use leading zeroes in specifying article\n   numbers but MUST NOT use more than 16 digits.  In some situations,\n   the value zero replaces an article number to show some special\n   situation.\n   Note that it is likely that the article number limit of 2,147,483,647\n   will be increased by a future revision or extension to this\n   specification.  While servers MUST NOT send article numbers greater\n   than this current limit, client and server developers are advised to\n   use internal structures and datatypes capable of handling larger\n   values in anticipation of such a change.\n6.1.  Group and Article Selection\n   The following commands are used to set the \"currently selected\n   newsgroup\" and the \"current article number\", which are used by\n   various commands.  At the start of an NNTP session, both of these\n   values are set to the special value \"invalid\".\n6.1.1.  GROUP\n6.1.1.1.  Usage\n   Indicating capability: READER\n   Syntax\n     GROUP group\n   Responses\n     211 number low high group     Group successfully selected\n     411                           No such newsgroup\n   Parameters\n     group     Name of newsgroup\n     number    Estimated number of articles in the group\n     low       Reported low water mark\n     high      Reported high water mark\n6.1.1.2.  Description\n   The GROUP command selects a newsgroup as the currently selected\n   newsgroup and returns summary information about it.\n   The required argument is the name of the newsgroup to be selected\n   (e.g., \"news.software.nntp\").  A list of valid newsgroups may be\n   obtained by using the LIST ACTIVE command (see Section 7.6.3).\n   The successful selection response will return the article numbers of\n   the first and last articles in the group at the moment of selection\n   (these numbers are referred to as the \"reported low water mark\" and\n   the \"reported high water mark\") and an estimate of the number of\n   articles in the group currently available.\n   If the group is not empty, the estimate MUST be at least the actual\n   number of articles available and MUST be no greater than one more\n   than the difference between the reported low and high water marks.\n   (Some implementations will actually count the number of articles\n   currently stored.  Others will just subtract the low water mark from\n   the high water mark and add one to get an estimate.)\n   If the group is empty, one of the following three situations will\n   occur.  Clients MUST accept all three cases; servers MUST NOT\n   represent an empty group in any other way.\n   o  The high water mark will be one less than the low water mark, and\n      the estimated article count will be zero.  Servers SHOULD use this\n      method to show an empty group.  This is the only time that the\n      high water mark can be less than the low water mark.\n   o  All three numbers will be zero.\n   o  The high water mark is greater than or equal to the low water\n      mark.  The estimated article count might be zero or non-zero; if\n      it is non-zero, the same requirements apply as for a non-empty\n      group.\n   The set of articles in a group may change after the GROUP command is\n   carried out:\n   o  Articles may be removed from the group.\n   o  Articles may be reinstated in the group with the same article\n      number, but those articles MUST have numbers no less than the\n      reported low water mark (note that this is a reinstatement of the\n      previous article, not a new article reusing the number).\n   o  New articles may be added with article numbers greater than the\n      reported high water mark.  (If an article that was the one with\n      the highest number has been removed and the high water mark has\n      been adjusted accordingly, the next new article will not have the\n      number one greater than the reported high water mark.)\n   Except when the group is empty and all three numbers are zero,\n   whenever a subsequent GROUP command for the same newsgroup is issued,\n   either by the same client or a different client, the reported low\n   water mark in the response MUST be no less than that in any previous\n   response for that newsgroup in this session, and it SHOULD be no less\n   than that in any previous response for that newsgroup ever sent to\n   any client.  Any failure to meet the latter condition SHOULD be\n   transient only.  The client may make use of the low water mark to\n   remove all remembered information about articles with lower numbers,\n   as these will never recur.  This includes the situation when the high\n   water mark is one less than the low water mark.  No similar\n   assumption can be made about the high water mark, as this can\n   decrease if an article is removed and then increase again if it is\n   reinstated or if new articles arrive.\n   When a valid group is selected by means of this command, the\n   currently selected newsgroup MUST be set to that group, and the\n   current article number MUST be set to the first article in the group\n   (this applies even if the group is already the currently selected\n   newsgroup).  If an empty newsgroup is selected, the current article\n   number is made invalid.  If an invalid group is specified, the\n   currently selected newsgroup and current article number MUST NOT be\n   changed.\n   The GROUP or LISTGROUP command (see Section 6.1.2) MUST be used by a\n   client, and a successful response received, before any other command\n   is used that depends on the value of the currently selected newsgroup\n   or current article number.\n   If the group specified is not available on the server, a 411 response\n   MUST be returned.\n6.1.1.3.  Examples\n   Example for a group known to the server:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n   Example for a group unknown to the server:\n      [C] GROUP example.is.sob.bradner.or.barber\n      [S] 411 example.is.sob.bradner.or.barber is unknown\n   Example of an empty group using the preferred response:\n      [C] GROUP example.currently.empty.newsgroup\n      [S] 211 0 4000 3999 example.currently.empty.newsgroup\n   Example of an empty group using an alternative response:\n      [C] GROUP example.currently.empty.newsgroup\n      [S] 211 0 0 0 example.currently.empty.newsgroup\n   Example of an empty group using a different alternative response:\n      [C] GROUP example.currently.empty.newsgroup\n      [S] 211 0 4000 4321 example.currently.empty.newsgroup\n   Example reselecting the currently selected newsgroup:\n      [C] GROUP misc.test\n      [S] 211 1234 234 567 misc.test\n      [C] STAT 444\n      [S] 223 444 <123456@example.net> retrieved\n      [C] GROUP misc.test\n      [S] 211 1234 234 567 misc.test\n      [C] STAT\n      [S] 223 234 <different@example.net> retrieved\n6.1.2.  LISTGROUP\n6.1.2.1.  Usage\n   Indicating capability: READER\n   Syntax\n     LISTGROUP [group [range]]\n   Responses\n     211 number low high group     Article numbers follow (multi-line)\n     411                           No such newsgroup\n     412                           No newsgroup selected [1]\n   Parameters\n     group     Name of newsgroup\n     range     Range of articles to report\n     number    Estimated number of articles in the group\n     low       Reported low water mark\n     high      Reported high water mark\n   [1] The 412 response can only occur if no group has been specified.\n6.1.2.2.  Description\n   The LISTGROUP command selects a newsgroup in the same manner as the\n   GROUP command (see Section 6.1.1) but also provides a list of article\n   numbers in the newsgroup.  If no group is specified, the currently\n   selected newsgroup is used.\n   On success, a list of article numbers is returned as a multi-line\n   data block following the 211 response code (the arguments on the\n   initial response line are the same as for the GROUP command).  The\n   list contains one number per line and is in numerical order.  It\n   lists precisely those articles that exist in the group at the moment\n   of selection (therefore, an empty group produces an empty list).  If\n   the optional range argument is specified, only articles within the\n   range are included in the list (therefore, the list MAY be empty even\n   if the group is not).\n   The range argument may be any of the following:\n   o  An article number.\n   o  An article number followed by a dash to indicate all following.\n   o  An article number followed by a dash followed by another article\n      number.\n   In the last case, if the second number is less than the first number,\n   then the range contains no articles.  Omitting the range is\n   equivalent to the range 1- being specified.\n   If the group specified is not available on the server, a 411 response\n   MUST be returned.  If no group is specified and the currently\n   selected newsgroup is invalid, a 412 response MUST be returned.\n   Except that the group argument is optional, that a range argument can\n   be specified, and that a multi-line data block follows the 211\n   response code, the LISTGROUP command is identical to the GROUP\n   command.  In particular, when successful, the command sets the\n   current article number to the first article in the group, if any,\n   even if this is not within the range specified by the second\n   argument.\n   Note that the range argument is a new feature in this specification\n   and servers that do not support CAPABILITIES (and therefore do not\n   conform to this specification) are unlikely to support it.\n6.1.2.3.  Examples\n   Example of LISTGROUP being used to select a group:\n      [C] LISTGROUP misc.test\n      [S] 211 2000 3000234 3002322 misc.test list follows\n      [S] 3000234\n      [S] 3000237\n      [S] 3000238\n      [S] 3000239\n      [S] 3002322\n      [S] .\n   Example of LISTGROUP on an empty group:\n      [C] LISTGROUP example.empty.newsgroup\n      [S] 211 0 0 0 example.empty.newsgroup list follows\n      [S] .\n   Example of LISTGROUP on a valid, currently selected newsgroup:\n      [C] GROUP misc.test\n      [S] 211 2000 3000234 3002322 misc.test\n      [C] LISTGROUP\n      [S] 211 2000 3000234 3002322 misc.test list follows\n      [S] 3000234\n      [S] 3000237\n      [S] 3000238\n      [S] 3000239\n      [S] 3002322\n      [S] .\n   Example of LISTGROUP with a range:\n      [C] LISTGROUP misc.test 3000238-3000248\n      [S] 211 2000 3000234 3002322 misc.test list follows\n      [S] 3000238\n      [S] 3000239\n      [S] .\n   Example of LISTGROUP with an empty range:\n      [C] LISTGROUP misc.test 12345678-\n      [S] 211 2000 3000234 3002322 misc.test list follows\n      [S] .\n   Example of LISTGROUP with an invalid range:\n      [C] LISTGROUP misc.test 9999-111\n      [S] 211 2000 3000234 3002322 misc.test list follows\n      [S] .\n6.1.3.  LAST\n6.1.3.1.  Usage\n   Indicating capability: READER\n   Syntax\n     LAST\n   Responses\n     223 n message-id    Article found\n     412                 No newsgroup selected\n     420                 Current article number is invalid\n     422                 No previous article in this group\n   Parameters\n     n             Article number\n     message-id    Article message-id\n6.1.3.2.  Description\n   If the currently selected newsgroup is valid, the current article\n   number MUST be set to the previous article in that newsgroup (that\n   is, the highest existing article number less than the current article\n   number).  If successful, a response indicating the new current\n   article number and the message-id of that article MUST be returned.\n   No article text is sent in response to this command.\n   There MAY be no previous article in the group, although the current\n   article number is not the reported low water mark.  There MUST NOT be\n   a previous article when the current article number is the reported\n   low water mark.\n   Because articles can be removed and added, the results of multiple\n   LAST and NEXT commands MAY not be consistent over the life of a\n   particular NNTP session.\n   If the current article number is already the first article of the\n   newsgroup, a 422 response MUST be returned.  If the current article\n   number is invalid, a 420 response MUST be returned.  If the currently\n   selected newsgroup is invalid, a 412 response MUST be returned.  In\n   all three cases, the currently selected newsgroup and current article\n   number MUST NOT be altered.\n6.1.3.3.  Examples\n   Example of a successful article retrieval using LAST:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] NEXT\n      [S] 223 3000237 <668929@example.org> retrieved\n      [C] LAST\n      [S] 223 3000234 <45223423@example.com> retrieved\n   Example of an attempt to retrieve an article without having selected\n   a group (via the GROUP command) first:\n      [Assumes currently selected newsgroup is invalid.]\n      [C] LAST\n      [S] 412 no newsgroup selected\n   Example of an attempt to retrieve an article using the LAST command\n   when the current article number is that of the first article in the\n   group:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] LAST\n      [S] 422 No previous article to retrieve\n   Example of an attempt to retrieve an article using the LAST command\n   when the currently selected newsgroup is empty:\n      [C] GROUP example.empty.newsgroup\n      [S] 211 0 0 0 example.empty.newsgroup\n      [C] LAST\n      [S] 420 No current article selected\n6.1.4.  NEXT\n6.1.4.1.  Usage\n   Indicating capability: READER\n   Syntax\n     NEXT\n   Responses\n     223 n message-id    Article found\n     412                 No newsgroup selected\n     420                 Current article number is invalid\n     421                 No next article in this group\n   Parameters\n     n             Article number\n     message-id    Article message-id\n6.1.4.2.  Description\n   If the currently selected newsgroup is valid, the current article\n   number MUST be set to the next article in that newsgroup (that is,\n   the lowest existing article number greater than the current article\n   number).  If successful, a response indicating the new current\n   article number and the message-id of that article MUST be returned.\n   No article text is sent in response to this command.\n   If the current article number is already the last article of the\n   newsgroup, a 421 response MUST be returned.  In all other aspects\n   (apart, of course, from the lack of 422 response), this command is\n   identical to the LAST command (Section 6.1.3).\n6.1.4.3.  Examples\n   Example of a successful article retrieval using NEXT:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] NEXT\n      [S] 223 3000237 <668929@example.org> retrieved\n   Example of an attempt to retrieve an article without having selected\n   a group (via the GROUP command) first:\n      [Assumes currently selected newsgroup is invalid.]\n      [C] NEXT\n      [S] 412 no newsgroup selected\n   Example of an attempt to retrieve an article using the NEXT command\n   when the current article number is that of the last article in the\n   group:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] STAT 3002322\n      [S] 223 3002322 <411@example.net> retrieved\n      [C] NEXT\n      [S] 421 No next article to retrieve\n   Example of an attempt to retrieve an article using the NEXT command\n   when the currently selected newsgroup is empty:\n      [C] GROUP example.empty.newsgroup\n      [S] 211 0 0 0 example.empty.newsgroup\n      [C] NEXT\n      [S] 420 No current article selected\n6.2.  Retrieval of Articles and Article Sections\n   The ARTICLE, BODY, HEAD, and STAT commands are very similar.  They\n   differ only in the parts of the article that are presented to the\n   client and in the successful response code.  The ARTICLE command is\n   described here in full, while the other three commands are described\n   in terms of the differences.  As specified in Section 3.6, an article\n   consists of two parts: the article headers and the article body.\n   When responding to one of these commands, the server MUST present the\n   entire article or appropriate part and MUST NOT attempt to alter or\n   translate it in any way.\n6.2.1.  ARTICLE\n6.2.1.1.  Usage\n   Indicating capability: READER\n   Syntax\n     ARTICLE message-id\n     ARTICLE number\n     ARTICLE\n   Responses\n   First form (message-id specified)\n     220 0|n message-id    Article follows (multi-line)\n     430                   No article with that message-id\n   Second form (article number specified)\n     220 n message-id      Article follows (multi-line)\n     412                   No newsgroup selected\n     423                   No article with that number\n   Third form (current article number used)\n     220 n message-id      Article follows (multi-line)\n     412                   No newsgroup selected\n     420                   Current article number is invalid\n   Parameters\n     number        Requested article number\n     n             Returned article number\n     message-id    Article message-id\n6.2.1.2.  Description\n   The ARTICLE command selects an article according to the arguments and\n   presents the entire article (that is, the headers, an empty line, and\n   the body, in that order) to the client.  The command has three forms.\n   In the first form, a message-id is specified, and the server presents\n   the article with that message-id.  In this case, the server MUST NOT\n   alter the currently selected newsgroup or current article number.\n   This is both to facilitate the presentation of articles that may be\n   referenced within another article being read, and because of the\n   semantic difficulties of determining the proper sequence and\n   membership of an article that may have been cross-posted to more than\n   one newsgroup.\n   In the response, the article number MUST be replaced with zero,\n   unless there is a currently selected newsgroup and the article is\n   present in that group, in which case the server MAY use the article's\n   number in that group.  (The server is not required to determine\n   whether the article is in the currently selected newsgroup or, if so,\n   what article number it has; the client MUST always be prepared for\n   zero to be specified.)  The server MUST NOT provide an article number\n   unless use of that number in a second ARTICLE command immediately\n   following this one would return the same article.  Even if the server\n   chooses to return article numbers in these circumstances, it need not\n   do so consistently; it MAY return zero to any such command (also see\n   the STAT examples, Section 6.2.4.3).\n   In the second form, an article number is specified.  If there is an\n   article with that number in the currently selected newsgroup, the\n   server MUST set the current article number to that number.\n   In the third form, the article indicated by the current article\n   number in the currently selected newsgroup is used.\n   Note that a previously valid article number MAY become invalid if the\n   article has been removed.  A previously invalid article number MAY\n   become valid if the article has been reinstated, but this article\n   number MUST be no less than the reported low water mark for that\n   group.\n   The server MUST NOT change the currently selected newsgroup as a\n   result of this command.  The server MUST NOT change the current\n   article number except when an article number argument was provided\n   and the article exists; in particular, it MUST NOT change it\n   following an unsuccessful response.\n   Since the message-id is unique for each article, it may be used by a\n   client to skip duplicate displays of articles that have been posted\n   more than once, or to more than one newsgroup.\n   The article is returned as a multi-line data block following the 220\n   response code.\n   If the argument is a message-id and no such article exists, a 430\n   response MUST be returned.  If the argument is a number or is omitted\n   and the currently selected newsgroup is invalid, a 412 response MUST\n   be returned.  If the argument is a number and that article does not\n   exist in the currently selected newsgroup, a 423 response MUST be\n   returned.  If the argument is omitted and the current article number\n   is invalid, a 420 response MUST be returned.\n6.2.1.3.  Examples\n   Example of a successful retrieval of an article (explicitly not using\n   an article number):\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] ARTICLE\n      [S] 220 3000234 <45223423@example.com>\n      [S] Path: pathost!demo!whitehouse!not-for-mail\n      [S] From: \"Demo User\" <nobody@example.net>\n      [S] Newsgroups: misc.test\n      [S] Subject: I am just a test article\n      [S] Date: 6 Oct 1998 04:38:40 -0500\n      [S] Organization: An Example Net, Uncertain, Texas\n      [S] Message-ID: <45223423@example.com>\n      [S]\n      [S] This is just a test article.\n      [S] .\n   Example of a successful retrieval of an article by message-id:\n      [C] ARTICLE <45223423@example.com>\n      [S] 220 0 <45223423@example.com>\n      [S] Path: pathost!demo!whitehouse!not-for-mail\n      [S] From: \"Demo User\" <nobody@example.net>\n      [S] Newsgroups: misc.test\n      [S] Subject: I am just a test article\n      [S] Date: 6 Oct 1998 04:38:40 -0500\n      [S] Organization: An Example Net, Uncertain, Texas\n      [S] Message-ID: <45223423@example.com>\n      [S]\n      [S] This is just a test article.\n      [S] .\n   Example of an unsuccessful retrieval of an article by message-id:\n      [C] ARTICLE <i.am.not.there@example.com>\n      [S] 430 No Such Article Found\n   Example of an unsuccessful retrieval of an article by number:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 news.groups\n      [C] ARTICLE 300256\n      [S] 423 No article with that number\n   Example of an unsuccessful retrieval of an article by number because\n   no newsgroup was selected first:\n      [Assumes currently selected newsgroup is invalid.]\n      [C] ARTICLE 300256\n      [S] 412 No newsgroup selected\n   Example of an attempt to retrieve an article when the currently\n   selected newsgroup is empty:\n      [C] GROUP example.empty.newsgroup\n      [S] 211 0 0 0 example.empty.newsgroup\n      [C] ARTICLE\n      [S] 420 No current article selected\n6.2.2.  HEAD\n6.2.2.1.  Usage\n   This command is mandatory.\n   Syntax\n     HEAD message-id\n     HEAD number\n     HEAD\n   Responses\n   First form (message-id specified)\n     221 0|n message-id    Headers follow (multi-line)\n     430                   No article with that message-id\n   Second form (article number specified)\n     221 n message-id      Headers follow (multi-line)\n     412                   No newsgroup selected\n     423                   No article with that number\n   Third form (current article number used)\n     221 n message-id      Headers follow (multi-line)\n     412                   No newsgroup selected\n     420                   Current article number is invalid\n   Parameters\n     number        Requested article number\n     n             Returned article number\n     message-id    Article message-id\n6.2.2.2.  Description\n   The HEAD command behaves identically to the ARTICLE command except\n   that, if the article exists, the response code is 221 instead of 220\n   and only the headers are presented (the empty line separating the\n   headers and body MUST NOT be included).\n6.2.2.3.  Examples\n   Example of a successful retrieval of the headers of an article\n   (explicitly not using an article number):\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] HEAD\n      [S] 221 3000234 <45223423@example.com>\n      [S] Path: pathost!demo!whitehouse!not-for-mail\n      [S] From: \"Demo User\" <nobody@example.net>\n      [S] Newsgroups: misc.test\n      [S] Subject: I am just a test article\n      [S] Date: 6 Oct 1998 04:38:40 -0500\n      [S] Organization: An Example Net, Uncertain, Texas\n      [S] Message-ID: <45223423@example.com>\n      [S] .\n   Example of a successful retrieval of the headers of an article by\n   message-id:\n      [C] HEAD <45223423@example.com>\n      [S] 221 0 <45223423@example.com>\n      [S] Path: pathost!demo!whitehouse!not-for-mail\n      [S] From: \"Demo User\" <nobody@example.net>\n      [S] Newsgroups: misc.test\n      [S] Subject: I am just a test article\n      [S] Date: 6 Oct 1998 04:38:40 -0500\n      [S] Organization: An Example Net, Uncertain, Texas\n      [S] Message-ID: <45223423@example.com>\n      [S] .\n   Example of an unsuccessful retrieval of the headers of an article by\n   message-id:\n      [C] HEAD <i.am.not.there@example.com>\n      [S] 430 No Such Article Found\n   Example of an unsuccessful retrieval of the headers of an article by\n   number:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] HEAD 300256\n      [S] 423 No article with that number\n   Example of an unsuccessful retrieval of the headers of an article by\n   number because no newsgroup was selected first:\n      [Assumes currently selected newsgroup is invalid.]\n      [C] HEAD 300256\n      [S] 412 No newsgroup selected\n   Example of an attempt to retrieve the headers of an article when the\n   currently selected newsgroup is empty:\n      [C] GROUP example.empty.newsgroup\n      [S] 211 0 0 0 example.empty.newsgroup\n      [C] HEAD\n      [S] 420 No current article selected\n6.2.3.  BODY\n6.2.3.1.  Usage\n   Indicating capability: READER\n   Syntax\n     BODY message-id\n     BODY number\n     BODY\n   Responses\n   First form (message-id specified)\n     222 0|n message-id    Body follows (multi-line)\n     430                   No article with that message-id\n   Second form (article number specified)\n     222 n message-id      Body follows (multi-line)\n     412                   No newsgroup selected\n     423                   No article with that number\n   Third form (current article number used)\n     222 n message-id      Body follows (multi-line)\n     412                   No newsgroup selected\n     420                   Current article number is invalid\n   Parameters\n     number        Requested article number\n     n             Returned article number\n     message-id    Article message-id\n6.2.3.2.  Description\n   The BODY command behaves identically to the ARTICLE command except\n   that, if the article exists, the response code is 222 instead of 220\n   and only the body is presented (the empty line separating the headers\n   and body MUST NOT be included).\n6.2.3.3.  Examples\n   Example of a successful retrieval of the body of an article\n   (explicitly not using an article number):\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] BODY\n      [S] 222 3000234 <45223423@example.com>\n      [S] This is just a test article.\n      [S] .\n   Example of a successful retrieval of the body of an article by\n   message-id:\n      [C] BODY <45223423@example.com>\n      [S] 222 0 <45223423@example.com>\n      [S] This is just a test article.\n      [S] .\n   Example of an unsuccessful retrieval of the body of an article by\n   message-id:\n      [C] BODY <i.am.not.there@example.com>\n      [S] 430 No Such Article Found\n   Example of an unsuccessful retrieval of the body of an article by\n   number:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] BODY 300256\n      [S] 423 No article with that number\n   Example of an unsuccessful retrieval of the body of an article by\n   number because no newsgroup was selected first:\n      [Assumes currently selected newsgroup is invalid.]\n      [C] BODY 300256\n      [S] 412 No newsgroup selected\n   Example of an attempt to retrieve the body of an article when the\n   currently selected newsgroup is empty:\n      [C] GROUP example.empty.newsgroup\n      [S] 211 0 0 0 example.empty.newsgroup\n      [C] BODY\n      [S] 420 No current article selected\n6.2.4.  STAT\n6.2.4.1.  Usage\n   This command is mandatory.\n   Syntax\n     STAT message-id\n     STAT number\n     STAT\n   Responses\n   First form (message-id specified)\n     223 0|n message-id    Article exists\n     430                   No article with that message-id\n   Second form (article number specified)\n     223 n message-id      Article exists\n     412                   No newsgroup selected\n     423                   No article with that number\n   Third form (current article number used)\n     223 n message-id      Article exists\n     412                   No newsgroup selected\n     420                   Current article number is invalid\n   Parameters\n     number        Requested article number\n     n             Returned article number\n     message-id    Article message-id\n6.2.4.2.  Description\n   The STAT command behaves identically to the ARTICLE command except\n   that, if the article exists, it is NOT presented to the client and\n   the response code is 223 instead of 220.  Note that the response is\n   NOT multi-line.\n   This command allows the client to determine whether an article exists\n   and, in the second and third forms, what its message-id is, without\n   having to process an arbitrary amount of text.\n6.2.4.3.  Examples\n   Example of STAT on an existing article (explicitly not using an\n   article number):\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] STAT\n      [S] 223 3000234 <45223423@example.com>\n   Example of STAT on an existing article by message-id:\n      [C] STAT <45223423@example.com>\n      [S] 223 0 <45223423@example.com>\n   Example of STAT on an article not on the server by message-id:\n      [C] STAT <i.am.not.there@example.com>\n      [S] 430 No Such Article Found\n   Example of STAT on an article not in the server by number:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] STAT 300256\n      [S] 423 No article with that number\n   Example of STAT on an article by number when no newsgroup was\n   selected first:\n      [Assumes currently selected newsgroup is invalid.]\n      [C] STAT 300256\n      [S] 412 No newsgroup selected\n   Example of STAT on an article when the currently selected newsgroup\n   is empty:\n      [C] GROUP example.empty.newsgroup\n      [S] 211 0 0 0 example.empty.newsgroup\n      [C] STAT\n      [S] 420 No current article selected\n   Example of STAT by message-id on a server that sometimes reports the\n   actual article number:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] STAT\n      [S] 223 3000234 <45223423@example.com>\n      [C] STAT <45223423@example.com>\n      [S] 223 0 <45223423@example.com>\n      [C] STAT <45223423@example.com>\n      [S] 223 3000234 <45223423@example.com>\n      [C] GROUP example.empty.newsgroup\n      [S] 211 0 0 0 example.empty.newsgroup\n      [C] STAT <45223423@example.com>\n      [S] 223 0 <45223423@example.com>\n      [C] GROUP alt.crossposts\n      [S] 211 9999 111111 222222 alt.crossposts\n      [C] STAT <45223423@example.com>\n      [S] 223 123456 <45223423@example.com>\n      [C] STAT\n      [S] 223 111111 <23894720@example.com>\n   The first STAT command establishes the identity of an article in the\n   group.  The second and third show that the server may, but need not,\n   give the article number when the message-id is specified.  The fourth\n   STAT command shows that zero must be specified if the article isn't\n   in the currently selected newsgroup.  The fifth shows that the\n   number, if provided, must be that relating to the currently selected\n   newsgroup.  The last one shows that the current article number is\n   still not changed by the use of STAT with a message-id even if it\n   returns an article number.\n6.3.  Article Posting\n   Article posting is done in one of two ways: individual article\n   posting from news-reading clients using POST, and article transfer\n   from other news servers using IHAVE.\n6.3.1.  POST\n6.3.1.1.  Usage\n   Indicating capability: POST\n   This command MUST NOT be pipelined.\n   Syntax\n     POST\n   Responses\n   Initial responses\n     340    Send article to be posted\n     440    Posting not permitted\n   Subsequent responses\n     240    Article received OK\n     441    Posting failed\n6.3.1.2.  Description\n   If posting is allowed, a 340 response MUST be returned to indicate\n   that the article to be posted should be sent.  If posting is\n   prohibited for some installation-dependent reason, a 440 response\n   MUST be returned.\n   If posting is permitted, the article MUST be in the format specified\n   in Section 3.6 and MUST be sent by the client to the server as a\n   multi-line data block (see Section 3.1.1).  Thus a single dot (\".\")\n   on a line indicates the end of the text, and lines starting with a\n   dot in the original text have that dot doubled during transmission.\n   Following the presentation of the termination sequence by the client,\n   the server MUST return a response indicating success or failure of\n   the article transfer.  Note that response codes 340 and 440 are used\n   in direct response to the POST command while 240 and 441 are returned\n   after the article is sent.\n   A response of 240 SHOULD indicate that, barring unforeseen server\n   errors, the posted article will be made available on the server\n   and/or transferred to other servers, as appropriate, possibly\n   following further processing.  In other words, articles not wanted by\n   the server SHOULD be rejected with a 441 response, rather than being\n   accepted and then discarded silently.  However, the client SHOULD NOT\n   assume that the article has been successfully transferred unless it\n   receives an affirmative response from the server and SHOULD NOT\n   assume that it is being made available to other clients without\n   explicitly checking (for example, using the STAT command).\n   If the session is interrupted before the response is received, it is\n   possible that an affirmative response was sent but has been lost.\n   Therefore, in any subsequent session, the client SHOULD either check\n   whether the article was successfully posted before resending or\n   ensure that the server will allocate the same message-id to the new\n   attempt (see Appendix A.2).  The latter approach is preferred since\n   the article might not have been made available for reading yet (for\n   example, it may have to go through a moderation process).\n6.3.1.3.  Examples\n   Example of a successful posting:\n      [C] POST\n      [S] 340 Input article; end with <CR-LF>.<CR-LF>\n      [C] From: \"Demo User\" <nobody@example.net>\n      [C] Newsgroups: misc.test\n      [C] Subject: I am just a test article\n      [C] Organization: An Example Net\n      [C]\n      [C] This is just a test article.\n      [C] .\n      [S] 240 Article received OK\n   Example of an unsuccessful posting:\n      [C] POST\n      [S] 340 Input article; end with <CR-LF>.<CR-LF>\n      [C] From: \"Demo User\" <nobody@example.net>\n      [C] Newsgroups: misc.test\n      [C] Subject: I am just a test article\n      [C] Organization: An Example Net\n      [C]\n      [C] This is just a test article.\n      [C] .\n      [S] 441 Posting failed\n   Example of an attempt to post when posting is not allowed:\n      [Initial connection set-up completed.]\n      [S] 201 NNTP Service Ready, posting prohibited\n      [C] POST\n      [S] 440 Posting not permitted\n6.3.2.  IHAVE\n6.3.2.1.  Usage\n   Indicating capability: IHAVE\n   This command MUST NOT be pipelined.\n   Syntax\n     IHAVE message-id\n   Responses\n   Initial responses\n     335    Send article to be transferred\n     435    Article not wanted\n     436    Transfer not possible; try again later\n   Subsequent responses\n     235    Article transferred OK\n     436    Transfer failed; try again later\n     437    Transfer rejected; do not retry\n   Parameters\n     message-id    Article message-id\n6.3.2.2.  Description\n   The IHAVE command informs the server that the client has an article\n   with the specified message-id.  If the server desires a copy of that\n   article, a 335 response MUST be returned, instructing the client to\n   send the entire article.  If the server does not want the article\n   (if, for example, the server already has a copy of it), a 435\n   response MUST be returned, indicating that the article is not wanted.\n   Finally, if the article isn't wanted immediately but the client\n   should retry later if possible (if, for example, another client is in\n   the process of sending the same article to the server), a 436\n   response MUST be returned.\n   If transmission of the article is requested, the client MUST send the\n   entire article, including headers and body, to the server as a\n   multi-line data block (see Section 3.1.1).  Thus, a single dot (\".\")\n   on a line indicates the end of the text, and lines starting with a\n   dot in the original text have that dot doubled during transmission.\n   The server MUST return a 235 response, indicating that the article\n   was successfully transferred; a 436 response, indicating that the\n   transfer failed but should be tried again later; or a 437 response,\n   indicating that the article was rejected.\n   This function differs from the POST command in that it is intended\n   for use in transferring already-posted articles between hosts.  It\n   SHOULD NOT be used when the client is a personal news-reading\n   program, since use of this command indicates that the article has\n   already been posted at another site and is simply being forwarded\n   from another host.  However, despite this, the server MAY elect not\n   to post or forward the article if, after further examination of the\n   article, it deems it inappropriate to do so.  Reasons for such\n   subsequent rejection of an article may include problems such as\n   inappropriate newsgroups or distributions, disc space limitations,\n   article lengths, garbled headers, and the like.  These are typically\n   restrictions enforced by the server host's news software and not\n   necessarily by the NNTP server itself.\n   The client SHOULD NOT assume that the article has been successfully\n   transferred unless it receives an affirmative response from the\n   server.  A lack of response (such as a dropped network connection or\n   a network timeout) SHOULD be treated the same as a 436 response.\n   Because some news server software may not immediately be able to\n   determine whether an article is suitable for posting or forwarding,\n   an NNTP server MAY acknowledge the successful transfer of the article\n   (with a 235 response) but later silently discard it.\n6.3.2.3.  Examples\n   Example of successfully sending an article to another site:\n      [C] IHAVE <i.am.an.article.you.will.want@example.com>\n      [S] 335 Send it; end with <CR-LF>.<CR-LF>\n      [C] Path: pathost!demo!somewhere!not-for-mail\n      [C] From: \"Demo User\" <nobody@example.com>\n      [C] Newsgroups: misc.test\n      [C] Subject: I am just a test article\n      [C] Date: 6 Oct 1998 04:38:40 -0500\n      [C] Organization: An Example Com, San Jose, CA\n      [C] Message-ID: <i.am.an.article.you.will.want@example.com>\n      [C]\n      [C] This is just a test article.\n      [C] .\n      [S] 235 Article transferred OK\n   Example of sending an article to another site that rejects it.  Note\n   that the message-id in the IHAVE command is not the same as the one\n   in the article headers; while this is bad practice and SHOULD NOT be\n   done, it is not forbidden.\n      [C] IHAVE <i.am.an.article.you.will.want@example.com>\n      [S] 335 Send it; end with <CR-LF>.<CR-LF>\n      [C] Path: pathost!demo!somewhere!not-for-mail\n      [C] From: \"Demo User\" <nobody@example.com>\n      [C] Newsgroups: misc.test\n      [C] Subject: I am just a test article\n      [C] Date: 6 Oct 1998 04:38:40 -0500\n      [C] Organization: An Example Com, San Jose, CA\n      [C] Message-ID: <i.am.an.article.you.have@example.com>\n      [C]\n      [C] This is just a test article.\n      [C] .\n      [S] 437 Article rejected; don't send again\n   Example of sending an article to another site where the transfer\n   fails:\n      [C] IHAVE <i.am.an.article.you.will.want@example.com>\n      [S] 335 Send it; end with <CR-LF>.<CR-LF>\n      [C] Path: pathost!demo!somewhere!not-for-mail\n      [C] From: \"Demo User\" <nobody@example.com>\n      [C] Newsgroups: misc.test\n      [C] Subject: I am just a test article\n      [C] Date: 6 Oct 1998 04:38:40 -0500\n      [C] Organization: An Example Com, San Jose, CA\n      [C] Message-ID: <i.am.an.article.you.will.want@example.com>\n      [C]\n      [C] This is just a test article.\n      [C] .\n      [S] 436 Transfer failed\n   Example of sending an article to a site that already has it:\n      [C] IHAVE <i.am.an.article.you.have@example.com>\n      [S] 435 Duplicate\n   Example of sending an article to a site that requests that the\n   article be tried again later:\n      [C] IHAVE <i.am.an.article.you.defer@example.com>\n      [S] 436 Retry later"
  },
  {
    "section_number": "7.",
    "section_name": "Information Commands",
    "tag": "Section 7. Information Commands",
    "content": "This section lists other commands that may be used at any time\n   between the beginning of a session and its termination.  Using these\n   commands does not alter any state information, but the response\n   generated from their use may provide useful information to clients.\n7.1.  DATE\n7.1.1.  Usage\n   Indicating capability: READER\n   Syntax\n     DATE\n   Responses\n     111 yyyymmddhhmmss    Server date and time\n   Parameters\n     yyyymmddhhmmss    Current UTC date and time on server\n7.1.2.  Description\n   This command exists to help clients find out the current Coordinated\n   Universal Time [TF.686-1] from the server's perspective.  This\n   command SHOULD NOT be used as a substitute for NTP [RFC1305] but to\n   provide information that might be useful when using the NEWNEWS\n   command (see Section 7.4).\n   The DATE command MUST return a timestamp from the same clock as is\n   used for determining article arrival and group creation times (see\n   Section 6).  This clock SHOULD be monotonic, and adjustments SHOULD\n   be made by running it fast or slow compared to \"real\" time rather\n   than by making sudden jumps.  A system providing NNTP service SHOULD\n   keep the system clock as accurate as possible, either with NTP or by\n   some other method.\n   The server MUST return a 111 response specifying the date and time on\n   the server in the form yyyymmddhhmmss.  This date and time is in\n   Coordinated Universal Time.\n7.1.3.  Examples\n      [C] DATE\n      [S] 111 19990623135624\n7.2.  HELP\n7.2.1.  Usage\n   This command is mandatory.\n   Syntax\n     HELP\n   Responses\n     100    Help text follows (multi-line)\n7.2.2.  Description\n   This command provides a short summary of the commands that are\n   understood by this implementation of the server.  The help text will\n   be presented as a multi-line data block following the 100 response\n   code.\n   This text is not guaranteed to be in any particular format (but must\n   be UTF-8) and MUST NOT be used by clients as a replacement for the\n   CAPABILITIES command described in Section 5.2.\n7.2.3.  Examples\n      [C] HELP\n      [S] 100 Help text follows\n      [S] This is some help text.  There is no specific\n      [S] formatting requirement for this test, though\n      [S] it is customary for it to list the valid commands\n      [S] and give a brief definition of what they do.\n      [S] .\n7.3.  NEWGROUPS\n7.3.1.  Usage\n   Indicating capability: READER\n   Syntax\n     NEWGROUPS date time [GMT]\n   Responses\n     231    List of new newsgroups follows (multi-line)\n   Parameters\n     date    Date in yymmdd or yyyymmdd format\n     time    Time in hhmmss format\n7.3.2.  Description\n   This command returns a list of newsgroups created on the server since\n   the specified date and time.  The results are in the same format as\n   the LIST ACTIVE command (see Section 7.6.3).  However, they MAY\n   include groups not available on the server (and so not returned by\n   LIST ACTIVE) and MAY omit groups for which the creation date is not\n   available.\n   The date is specified as 6 or 8 digits in the format [xx]yymmdd,\n   where xx is the first two digits of the year (19-99), yy is the last\n   two digits of the year (00-99), mm is the month (01-12), and dd is\n   the day of the month (01-31).  Clients SHOULD specify all four digits\n   of the year.  If the first two digits of the year are not specified\n   (this is supported only for backward compatibility), the year is to\n   be taken from the current century if yy is smaller than or equal to\n   the current year, and the previous century otherwise.\n   The time is specified as 6 digits in the format hhmmss, where hh is\n   the hours in the 24-hour clock (00-23), mm is the minutes (00-59),\n   and ss is the seconds (00-60, to allow for leap seconds).  The token\n   \"GMT\" specifies that the date and time are given in Coordinated\n   Universal Time [TF.686-1]; if it is omitted, then the date and time\n   are specified in the server's local timezone.  Note that there is no\n   way of using the protocol specified in this document to establish the\n   server's local timezone.\n   Note that an empty list is a possible valid response and indicates\n   that there are no new newsgroups since that date-time.\n   Clients SHOULD make all queries using Coordinated Universal Time\n   (i.e., by including the \"GMT\" argument) when possible.\n7.3.3.  Examples\n   Example where there are new groups:\n      [C] NEWGROUPS 19990624 000000 GMT\n      [S] 231 list of new newsgroups follows\n      [S] alt.rfc-writers.recovery 4 1 y\n      [S] tx.natives.recovery 89 56 y\n      [S] .\n   Example where there are no new groups:\n      [C] NEWGROUPS 19990624 000000 GMT\n      [S] 231 list of new newsgroups follows\n      [S] .\n7.4.  NEWNEWS\n7.4.1.  Usage\n   Indicating capability: NEWNEWS\n   Syntax\n     NEWNEWS wildmat date time [GMT]\n   Responses\n     230    List of new articles follows (multi-line)\n   Parameters\n     wildmat    Newsgroups of interest\n     date       Date in yymmdd or yyyymmdd format\n     time       Time in hhmmss format\n7.4.2.  Description\n   This command returns a list of message-ids of articles posted or\n   received on the server, in the newsgroups whose names match the\n   wildmat, since the specified date and time.  One message-id is sent\n   on each line; the order of the response has no specific significance\n   and may vary from response to response in the same session.  A\n   message-id MAY appear more than once; if it does, it has the same\n   meaning as if it appeared only once.\n   Date and time are in the same format as the NEWGROUPS command (see\n   Section 7.3).\n   Note that an empty list is a possible valid response and indicates\n   that there is currently no new news in the relevant groups.\n   Clients SHOULD make all queries in Coordinated Universal Time (i.e.,\n   by using the \"GMT\" argument) when possible.\n7.4.3.  Examples\n   Example where there are new articles:\n      [C] NEWNEWS news.*,sci.* 19990624 000000 GMT\n      [S] 230 list of new articles by message-id follows\n      [S] <i.am.a.new.article@example.com>\n      [S] <i.am.another.new.article@example.com>\n      [S] .\n   Example where there are no new articles:\n      [C] NEWNEWS alt.* 19990624 000000 GMT\n      [S] 230 list of new articles by message-id follows\n      [S] .\n7.5.  Time\n   As described in Section 6, each article has an arrival timestamp.\n   Each newsgroup also has a creation timestamp.  These timestamps are\n   used by the NEWNEWS and NEWGROUP commands to construct their\n   responses.\n   Clients can ensure that they do not have gaps in lists of articles or\n   groups by using the DATE command in the following manner:\n   First session:\n      Issue DATE command and record result.\n      Issue NEWNEWS command using a previously chosen timestamp.\n   Subsequent sessions:\n      Issue DATE command and hold result in temporary storage.\n      Issue NEWNEWS command using timestamp saved from previous session.\n      Overwrite saved timestamp with that currently in temporary\n      storage.\n   In order to allow for minor errors, clients MAY want to adjust the\n   timestamp back by two or three minutes before using it in NEWNEWS.\n7.5.1.  Examples\n   First session:\n      [C] DATE\n      [S] 111 20010203112233\n      [C] NEWNEWS local.chat 20001231 235959 GMT\n      [S] 230 list follows\n      [S] <article.1@local.service>\n      [S] <article.2@local.service>\n      [S] <article.3@local.service>\n      [S] .\n   Second session (the client has subtracted 3 minutes from the\n   timestamp returned previously):\n      [C] DATE\n      [S] 111 20010204003344\n      [C] NEWNEWS local.chat 20010203 111933 GMT\n      [S] 230 list follows\n      [S] <article.3@local.service>\n      [S] <article.4@local.service>\n      [S] <article.5@local.service>\n      [S] .\n   Note how <article.3@local.service> arrived in the 3 minute gap and so\n   is listed in both responses.\n7.6.  The LIST Commands\n   The LIST family of commands all return information that is multi-line\n   and that can, in general, be expected not to change during the\n   session.  Often the information is related to newsgroups, in which\n   case the response has one line per newsgroup and a wildmat MAY be\n   provided to restrict the groups for which information is returned.\n   The set of available keywords (including those provided by\n   extensions) is given in the capability list with capability label\n   LIST.\n7.6.1.  LIST\n7.6.1.1.  Usage\n   Indicating capability: LIST\n   Syntax\n     LIST [keyword [wildmat|argument]]\n   Responses\n     215    Information follows (multi-line)\n   Parameters\n     keyword     Information requested [1]\n     argument    Specific to keyword\n     wildmat     Groups of interest\n   [1] If no keyword is provided, it defaults to ACTIVE.\n7.6.1.2.  Description\n   The LIST command allows the server to provide blocks of information\n   to the client.  This information may be global or may be related to\n   newsgroups; in the latter case, the information may be returned\n   either for all groups or only for those matching a wildmat.  Each\n   block of information is represented by a different keyword.  The\n   command returns the specific information identified by the keyword.\n   If the information is available, it is returned as a multi-line data\n   block following the 215 response code.  The format of the information\n   depends on the keyword.  The information MAY be affected by the\n   additional argument, but the format MUST NOT be.\n   If the information is based on newsgroups and the optional wildmat\n   argument is specified, the response is limited to only the groups (if\n   any) whose names match the wildmat and for which the information is\n   available.\n   Note that an empty list is a possible valid response; for a\n   newsgroup-based keyword, it indicates that there are no groups\n   meeting the above criteria.\n   If the keyword is not recognised, or if an argument is specified and\n   the keyword does not expect one, a 501 response code MUST BE\n   returned.  If the keyword is recognised but the server does not\n   maintain the information, a 503 response code MUST BE returned.\n   The LIST command MUST NOT change the visible state of the server in\n   any way; that is, the behaviour of subsequent commands MUST NOT be\n   affected by whether the LIST command was issued.  For example, it\n   MUST NOT make groups available that otherwise would not have been.\n7.6.1.3.  Examples\n   Example of LIST with the ACTIVE keyword:\n      [C] LIST ACTIVE\n      [S] 215 list of newsgroups follows\n      [S] misc.test 3002322 3000234 y\n      [S] comp.risks 442001 441099 m\n      [S] alt.rfc-writers.recovery 4 1 y\n      [S] tx.natives.recovery 89 56 y\n      [S] tx.natives.recovery.d 11 9 n\n      [S] .\n   Example of LIST with no keyword:\n      [C] LIST\n      [S] 215 list of newsgroups follows\n      [S] misc.test 3002322 3000234 y\n      [S] comp.risks 442001 441099 m\n      [S] alt.rfc-writers.recovery 4 1 y\n      [S] tx.natives.recovery 89 56 y\n      [S] tx.natives.recovery.d 11 9 n\n      [S] .\n   The output is identical to that of the previous example.\n   Example of LIST on a newsgroup-based keyword with and without\n   wildmat:\n      [C] LIST ACTIVE.TIMES\n      [S] 215 information follows\n      [S] misc.test 930445408 <creatme@isc.org>\n      [S] alt.rfc-writers.recovery 930562309 <m@example.com>\n      [S] tx.natives.recovery 930678923 <sob@academ.com>\n      [S] .\n      [C] LIST ACTIVE.TIMES tx.*\n      [S] 215 information follows\n      [S] tx.natives.recovery 930678923 <sob@academ.com>\n      [S] .\n   Example of LIST returning an error where the keyword is recognized\n   but the software does not maintain this information:\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] LIST ACTIVE NEWSGROUPS ACTIVE.TIMES XTRA.DATA\n      [S] .\n      [C] LIST XTRA.DATA\n      [S] 503 Data item not stored\n   Example of LIST where the keyword is not recognised:\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] LIST ACTIVE NEWSGROUPS ACTIVE.TIMES XTRA.DATA\n      [S] .\n      [C] LIST DISTRIB.PATS\n      [S] 501 Syntax Error\n7.6.2.  Standard LIST Keywords\n   This specification defines the following LIST keywords:\n   +--------------+---------------+------------------------------------+\n   | Keyword      | Definition    | Status                             |\n   +--------------+---------------+------------------------------------+\n   | ACTIVE       | Section 7.6.3 | Mandatory if the READER capability |\n   |              |               | is advertised                      |\n   |              |               |                                    |\n   | ACTIVE.TIMES | Section 7.6.4 | Optional                           |\n   |              |               |                                    |\n   | DISTRIB.PATS | Section 7.6.5 | Optional                           |\n   |              |               |                                    |\n   | HEADERS      | Section 8.6   | Mandatory if the HDR capability is |\n   |              |               | advertised                         |\n   |              |               |                                    |\n   | NEWSGROUPS   | Section 7.6.6 | Mandatory if the READER capability |\n   |              |               | is advertised                      |\n   |              |               |                                    |\n   | OVERVIEW.FMT | Section 8.4   | Mandatory if the OVER capability   |\n   |              |               | is advertised                      |\n   +--------------+---------------+------------------------------------+\n   Where one of these LIST keywords is supported by a server, it MUST\n   have the meaning given in the relevant sub-section.\n7.6.3.  LIST ACTIVE\n   This keyword MUST be supported by servers advertising the READER\n   capability.\n   LIST ACTIVE returns a list of valid newsgroups and associated\n   information.  If no wildmat is specified, the server MUST include\n   every group that the client is permitted to select with the GROUP\n   command (Section 6.1.1).  Each line of this list consists of four\n   fields separated from each other by one or more spaces:\n   o  The name of the newsgroup.\n   o  The reported high water mark for the group.\n   o  The reported low water mark for the group.\n   o  The current status of the group on this server.\n   The reported high and low water marks are as described in the GROUP\n   command (see Section 6.1.1), but note that they are in the opposite\n   order to the 211 response to that command.\n   The status field is typically one of the following:\n   \"y\" Posting is permitted.\n   \"n\" Posting is not permitted.\n   \"m\" Postings will be forwarded to the newsgroup moderator.\n   The server SHOULD use these values when these meanings are required\n   and MUST NOT use them with any other meaning.  Other values for the\n   status may exist; the definition of these other values and the\n   circumstances under which they are returned may be specified in an\n   extension or may be private to the server.  A client SHOULD treat an\n   unrecognized status as giving no information.\n   The status of a newsgroup only indicates how posts to that newsgroup\n   are normally processed and is not necessarily customised to the\n   specific client.  For example, if the current client is forbidden\n   from posting, then this will apply equally to groups with status \"y\".\n   Conversely, a client with special privileges (not defined by this\n   specification) might be able to post to a group with status \"n\".\n   For example:\n      [C] LIST ACTIVE\n      [S] 215 list of newsgroups follows\n      [S] misc.test 3002322 3000234 y\n      [S] comp.risks 442001 441099 m\n      [S] alt.rfc-writers.recovery 4 1 y\n      [S] tx.natives.recovery 89 56 y\n      [S] tx.natives.recovery.d 11 9 n\n      [S] .\n   or, on an implementation that includes leading zeroes:\n      [C] LIST ACTIVE\n      [S] 215 list of newsgroups follows\n      [S] misc.test 0003002322 0003000234 y\n      [S] comp.risks 0000442001 0000441099 m\n      [S] alt.rfc-writers.recovery 0000000004 0000000001 y\n      [S] tx.natives.recovery 0000000089 0000000056 y\n      [S] tx.natives.recovery.d 0000000011 0000000009 n\n      [S] .\n   The information is newsgroup based, and a wildmat MAY be specified,\n   in which case the response is limited to only the groups (if any)\n   whose names match the wildmat.  For example:\n      [C] LIST ACTIVE *.recovery\n      [S] 215 list of newsgroups follows\n      [S] alt.rfc-writers.recovery 4 1 y\n      [S] tx.natives.recovery 89 56 y\n      [S] .\n7.6.4.  LIST ACTIVE.TIMES\n   This keyword is optional.\n   The active.times list is maintained by some NNTP servers to contain\n   information about who created a particular newsgroup and when.  Each\n   line of this list consists of three fields separated from each other\n   by one or more spaces.  The first field is the name of the newsgroup.\n   The second is the time when this group was created on this news\n   server, measured in seconds since the start of January 1, 1970.  The\n   third is plain text intended to describe the entity that created the\n   newsgroup; it is often a mailbox as defined in RFC 2822 [RFC2822].\n   For example:\n      [C] LIST ACTIVE.TIMES\n      [S] 215 information follows\n      [S] misc.test 930445408 <creatme@isc.org>\n      [S] alt.rfc-writers.recovery 930562309 <m@example.com>\n      [S] tx.natives.recovery 930678923 <sob@academ.com>\n      [S] .\n   The list MAY omit newsgroups for which the information is unavailable\n   and MAY include groups not available on the server; in particular, it\n   MAY omit all groups created before the date and time of the oldest\n   entry.  The client MUST NOT assume that the list is complete or that\n   it matches the list returned by the LIST ACTIVE command\n   (Section 7.6.3).  The NEWGROUPS command (Section 7.3) may provide a\n   better way to access this information, and the results of the two\n   commands SHOULD be consistent except that, if the latter is invoked\n   with a date and time earlier than the oldest entry in active.times\n   list, its result may include extra groups.\n   The information is newsgroup based, and a wildmat MAY be specified,\n   in which case the response is limited to only the groups (if any)\n   whose names match the wildmat.\n7.6.5.  LIST DISTRIB.PATS\n   This keyword is optional.\n   The distrib.pats list is maintained by some NNTP servers to assist\n   clients to choose a value for the content of the Distribution header\n   of a news article being posted.  Each line of this list consists of\n   three fields separated from each other by a colon (\":\").  The first\n   field is a weight, the second field is a wildmat (which may be a\n   simple newsgroup name), and the third field is a value for the\n   Distribution header content.  For example:\n      [C] LIST DISTRIB.PATS\n      [S] 215 information follows\n      [S] 10:local.*:local\n      [S] 5:*:world\n      [S] 20:local.here.*:thissite\n      [S] .\n   The client MAY use this information to construct an appropriate\n   Distribution header given the name of a newsgroup.  To do so, it\n   should determine the lines whose second field matches the newsgroup\n   name, select from among them the line with the highest weight (with 0\n   being the lowest), and use the value of the third field to construct\n   the Distribution header.\n   The information is not newsgroup based, and an argument MUST NOT be\n   specified.\n7.6.6.  LIST NEWSGROUPS\n   This keyword MUST be supported by servers advertising the READER\n   capability.\n   The newsgroups list is maintained by NNTP servers to contain the name\n   of each newsgroup that is available on the server and a short\n   description about the purpose of the group.  Each line of this list\n   consists of two fields separated from each other by one or more space\n   or TAB characters (the usual practice is a single TAB).  The first\n   field is the name of the newsgroup, and the second is a short\n   description of the group.  For example:\n      [C] LIST NEWSGROUPS\n      [S] 215 information follows\n      [S] misc.test General Usenet testing\n      [S] alt.rfc-writers.recovery RFC Writers Recovery\n      [S] tx.natives.recovery Texas Natives Recovery\n      [S] .\n   The list MAY omit newsgroups for which the information is unavailable\n   and MAY include groups not available on the server.  The client MUST\n   NOT assume that the list is complete or that it matches the list\n   returned by LIST ACTIVE.\n   The description SHOULD be in UTF-8.  However, servers often obtain\n   the information from external sources.  These sources may have used\n   different encodings (ones that use octets in the range 128 to 255 in\n   some other manner) and, in that case, the server MAY pass it on\n   unchanged.  Therefore, clients MUST be prepared to receive such\n   descriptions.\n   The information is newsgroup based, and a wildmat MAY be specified,\n   in which case the response is limited to only the groups (if any)\n   whose names match the wildmat."
  },
  {
    "section_number": "8.",
    "section_name": "Article Field Access Commands",
    "tag": "Section 8. Article Field Access Commands",
    "content": "This section lists commands that may be used to access specific\n   article fields; that is, headers of articles and metadata about\n   articles.  These commands typically fetch data from an \"overview\n   database\", which is a database of headers extracted from incoming\n   articles plus metadata determined as the article arrives.  Only\n   certain fields are included in the database.\n   This section is based on the Overview/NOV database [ROBE1995]\n   developed by Geoff Collyer.\n8.1.  Article Metadata\n   Article \"metadata\" is data about articles that does not occur within\n   the article itself.  Each metadata item has a name that MUST begin\n   with a colon (and that MUST NOT contain a colon elsewhere within it).\n   As with header names, metadata item names are not case sensitive.\n   When generating a metadata item, the server MUST compute it for\n   itself and MUST NOT trust any related value provided in the article.\n   (In particular, a Lines or Bytes header in the article MUST NOT be\n   assumed to specify the correct number of lines or bytes in the\n   article.)  If the server has access to several non-identical copies\n   of an article, the value returned MUST be correct for any copy of\n   that article retrieved during the same session.\n   This specification defines two metadata items: \":bytes\" and \":lines\".\n   Other metadata items may be defined by extensions.  The names of\n   metadata items defined by registered extensions MUST NOT begin with\n   \":x-\".  To avoid the risk of a clash with a future registered\n   extension, the names of metadata items defined by private extensions\n   SHOULD begin with \":x-\".\n8.1.1.  The :bytes Metadata Item\n   The :bytes metadata item for an article is a decimal integer.  It\n   SHOULD equal the number of octets in the entire article: headers,\n   body, and separating empty line (counting a CRLF pair as two octets,\n   and excluding both the \".\" CRLF terminating the response and any \".\"\n   added for \"dot-stuffing\" purposes).\n   Note to client implementers: some existing servers return a value\n   different from that above.  The commonest reasons for this are as\n   follows:\n   o  Counting a CRLF pair as one octet.\n   o  Including the \".\" character used for dot-stuffing in the number.\n   o  Including the terminating \".\" CRLF in the number.\n   o  Using one copy of an article for counting the octets but then\n      returning another one that differs in some (permitted) manner.\n   Implementations should be prepared for such variation and MUST NOT\n   rely on the value being accurate.\n8.1.2.  The :lines Metadata Item\n   The :lines metadata item for an article is a decimal integer.  It\n   MUST equal the number of lines in the article body (excluding the\n   empty line separating headers and body).  Equivalently, it is two\n   less than the number of CRLF pairs that the BODY command would return\n   for that article (the extra two are those following the response code\n   and the termination octet).\n8.2.  Database Consistency\n   The information stored in the overview database may change over time.\n   If the database records the content or absence of a given field (that\n   is, a header or metadata item) for all articles, it is said to be\n   \"consistent\" for that field.  If it records the content of a header\n   for some articles but not for others that nevertheless included that\n   header, or if it records a metadata item for some articles but not\n   for others to which that item applies, it is said to be\n   \"inconsistent\" for that field.\n   The LIST OVERVIEW.FMT command SHOULD list all the fields for which\n   the database is consistent at that moment.  It MAY omit such fields\n   (for example, if it is not known whether the database is consistent\n   or inconsistent).  It MUST NOT include fields for which the database\n   is inconsistent or that are not stored in the database.  Therefore,\n   if a header appears in the LIST OVERVIEW.FMT output but not in the\n   OVER output for a given article, that header does not appear in the\n   article (similarly for metadata items).\n   These rules assume that the fields being stored in the database\n   remain constant for long periods of time, and therefore the database\n   will be consistent.  When the set of fields to be stored is changed,\n   it will be inconsistent until either the database is rebuilt or the\n   only articles remaining are those received since the change.\n   Therefore, the output from LIST OVERVIEW.FMT needs to be altered\n   twice.  Firstly, before any fields stop being stored they MUST be\n   removed from the output; then, when the database is once more known\n   to be consistent, the new fields SHOULD be added to the output.\n   If the HDR command uses the overview database rather than taking\n   information directly from the articles, the same issues of\n   consistency and inconsistency apply, and the LIST HEADERS command\n   SHOULD take the same approach as the LIST OVERVIEW.FMT command in\n   resolving them.\n8.3.  OVER\n8.3.1.  Usage\n   Indicating capability: OVER\n   Syntax\n     OVER message-id\n     OVER range\n     OVER\n   Responses\n   First form (message-id specified)\n     224    Overview information follows (multi-line)\n     430    No article with that message-id\n   Second form (range specified)\n     224    Overview information follows (multi-line)\n     412    No newsgroup selected\n     423    No articles in that range\n   Third form (current article number used)\n     224    Overview information follows (multi-line)\n     412    No newsgroup selected\n     420    Current article number is invalid\n   Parameters\n     range         Number(s) of articles\n     message-id    Message-id of article\n8.3.2.  Description\n   The OVER command returns the contents of all the fields in the\n   database for an article specified by message-id, or from a specified\n   article or range of articles in the currently selected newsgroup.\n   The message-id argument indicates a specific article.  The range\n   argument may be any of the following:\n   o  An article number.\n   o  An article number followed by a dash to indicate all following.\n   o  An article number followed by a dash followed by another article\n      number.\n   If neither is specified, the current article number is used.\n   Support for the first (message-id) form is optional.  If it is\n   supported, the OVER capability line MUST include the argument\n   \"MSGID\".  Otherwise, the capability line MUST NOT include this\n   argument, and the OVER command MUST return the generic response code\n   503 when this form is used.\n   If the information is available, it is returned as a multi-line data\n   block following the 224 response code and contains one line per\n   article, sorted in numerical order of article number.  (Note that\n   unless the argument is a range including a dash, there will be\n   exactly one line in the data block.)  Each line consists of a number\n   of fields separated by a TAB.  A field may be empty (in which case\n   there will be two adjacent TABs), and a sequence of trailing TABs may\n   be omitted.\n   The first 8 fields MUST be the following, in order:\n      \"0\" or article number (see below)\n      Subject header content\n      From header content\n      Date header content\n      Message-ID header content\n      References header content\n      :bytes metadata item\n      :lines metadata item\n   If the article is specified by message-id (the first form of the\n   command), the article number MUST be replaced with zero, except that\n   if there is a currently selected newsgroup and the article is present\n   in that group, the server MAY use the article's number in that group.\n   (See the ARTICLE command (Section 6.2.1) and STAT examples\n   (Section 6.2.4.3) for more details.)  In the other two forms of the\n   command, the article number MUST be returned.\n   Any subsequent fields are the contents of the other headers and\n   metadata held in the database.\n   For the five mandatory headers, the content of each field MUST be\n   based on the content of the header (that is, with the header name and\n   following colon and space removed).  If the article does not contain\n   that header, or if the content is empty, the field MUST be empty.\n   For the two mandatory metadata items, the content of the field MUST\n   be just the value, with no other text.\n   For all subsequent fields that contain headers, the content MUST be\n   the entire header line other than the trailing CRLF.  For all\n   subsequent fields that contain metadata, the field consists of the\n   metadata name, a single space, and then the value.\n   For all fields, the value is processed by first removing all CRLF\n   pairs (that is, undoing any folding and removing the terminating\n   CRLF) and then replacing each TAB with a single space.  If there is\n   no such header in the article, no such metadata item, or no header or\n   item stored in the database for that article, the corresponding field\n   MUST be empty.\n   Note that, after unfolding, the characters NUL, LF, and CR cannot\n   occur in the header of an article offered by a conformant server.\n   Nevertheless, servers SHOULD check for these characters and replace\n   each one by a single space (so that, for example, CR LF LF TAB will\n   become two spaces, since the CR and first LF will be removed by the\n   unfolding process).  This will encourage robustness in the face of\n   non-conforming data; it is also possible that future versions of this\n   specification could permit these characters to appear in articles.\n   The server SHOULD NOT produce output for articles that no longer\n   exist.\n   If the argument is a message-id and no such article exists, a 430\n   response MUST be returned.  If the argument is a range or is omitted\n   and the currently selected newsgroup is invalid, a 412 response MUST\n   be returned.  If the argument is a range and no articles in that\n   number range exist in the currently selected newsgroup, including the\n   case where the second number is less than the first one, a 423\n   response MUST be returned.  If the argument is omitted and the\n   current article number is invalid, a 420 response MUST be returned.\n8.3.3.  Examples\n   In the first four examples, TAB has been replaced by vertical bar and\n   some lines have been folded for readability.\n   Example of a successful retrieval of overview information for an\n   article (explicitly not using an article number):\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] OVER\n      [S] 224 Overview information follows\n      [S] 3000234|I am just a test article|\"Demo User\"\n          <nobody@example.com>|6 Oct 1998 04:38:40 -0500|\n          <45223423@example.com>|<45454@example.net>|1234|\n          17|Xref: news.example.com misc.test:3000363\n      [S] .\n   Example of a successful retrieval of overview information for an\n   article by message-id:\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] OVER MSGID\n      [S] LIST ACTIVE NEWSGROUPS OVERVIEW.FMT\n      [S] .\n      [C] OVER <45223423@example.com>\n      [S] 224 Overview information follows\n      [S] 0|I am just a test article|\"Demo User\"\n          <nobody@example.com>|6 Oct 1998 04:38:40 -0500|\n          <45223423@example.com>|<45454@example.net>|1234|\n          17|Xref: news.example.com misc.test:3000363\n      [S] .\n   Note that the article number has been replaced by \"0\".\n   Example of the same commands on a system that does not implement\n   retrieval by message-id:\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] OVER\n      [S] LIST ACTIVE NEWSGROUPS OVERVIEW.FMT\n      [S] .\n      [C] OVER <45223423@example.com>\n      [S] 503 Overview by message-id unsupported\n   Example of a successful retrieval of overview information for a range\n   of articles:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] OVER 3000234-3000240\n      [S] 224 Overview information follows\n      [S] 3000234|I am just a test article|\"Demo User\"\n          <nobody@example.com>|6 Oct 1998 04:38:40 -0500|\n          <45223423@example.com>|<45454@example.net>|1234|\n          17|Xref: news.example.com misc.test:3000363\n      [S] 3000235|Another test article|nobody@nowhere.to\n          (Demo User)|6 Oct 1998 04:38:45 -0500|<45223425@to.to>||\n          4818|37||Distribution: fi\n      [S] 3000238|Re: I am just a test article|somebody@elsewhere.to|\n          7 Oct 1998 11:38:40 +1200|<kfwer3v@elsewhere.to>|\n          <45223423@to.to>|9234|51\n      [S] .\n   Note the missing \"References\" and Xref headers in the second line,\n   the missing trailing fields in the first and last lines, and that\n   there are only results for those articles that still exist.\n   Example of an unsuccessful retrieval of overview information on an\n   article by number:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] OVER 300256\n      [S] 423 No such article in this group\n   Example of an invalid range:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] OVER 3000444-3000222\n      [S] 423 Empty range\n   Example of an unsuccessful retrieval of overview information by\n   number because no newsgroup was selected first:\n      [Assumes currently selected newsgroup is invalid.]\n      [C] OVER\n      [S] 412 No newsgroup selected\n   Example of an attempt to retrieve information when the currently\n   selected newsgroup is empty:\n      [C] GROUP example.empty.newsgroup\n      [S] 211 0 0 0 example.empty.newsgroup\n      [C] OVER\n      [S] 420 No current article selected\n8.4.  LIST OVERVIEW.FMT\n8.4.1.  Usage\n   Indicating capability: OVER\n   Syntax\n     LIST OVERVIEW.FMT\n   Responses\n     215    Information follows (multi-line)\n8.4.2.  Description\n   See Section 7.6.1 for general requirements of the LIST command.\n   The LIST OVERVIEW.FMT command returns a description of the fields in\n   the database for which it is consistent (as described above).  The\n   information is returned as a multi-line data block following the 215\n   response code.  The information contains one line per field in the\n   order in which they are returned by the OVER command; the first 7\n   lines MUST (except for the case of letters) be exactly as follows:\n       Subject:\n       From:\n       Date:\n       Message-ID:\n       References:\n       :bytes\n       :lines\n   For compatibility with existing implementations, the last two lines\n   MAY instead be:\n       Bytes:\n       Lines:\n   even though they refer to metadata, not headers.\n   All subsequent lines MUST consist of either a header name followed by\n   \":full\", or the name of a piece of metadata.\n   There are no leading or trailing spaces in the output.\n   Note that the 7 fixed lines describe the 2nd to 8th fields of the\n   OVER output.  The \"full\" suffix (which may use either uppercase,\n   lowercase, or a mix) is a reminder that the corresponding fields\n   include the header name.\n   This command MAY generate different results if it is used more than\n   once in a session.\n   If the OVER command is not implemented, the meaning of the output\n   from this command is not specified, but it must still meet the above\n   syntactic requirements.\n8.4.3.  Examples\n   Example of LIST OVERVIEW.FMT output corresponding to the example OVER\n   output above, in the preferred format:\n      [C] LIST OVERVIEW.FMT\n      [S] 215 Order of fields in overview database.\n      [S] Subject:\n      [S] From:\n      [S] Date:\n      [S] Message-ID:\n      [S] References:\n      [S] :bytes\n      [S] :lines\n      [S] Xref:full\n      [S] Distribution:full\n      [S] .\n   Example of LIST OVERVIEW.FMT output corresponding to the example OVER\n   output above, in the alternative format:\n      [C] LIST OVERVIEW.FMT\n      [S] 215 Order of fields in overview database.\n      [S] Subject:\n      [S] From:\n      [S] Date:\n      [S] Message-ID:\n      [S] References:\n      [S] Bytes:\n      [S] Lines:\n      [S] Xref:FULL\n      [S] Distribution:FULL\n      [S] .\n8.5.  HDR\n8.5.1.  Usage\n   Indicating capability: HDR\n   Syntax\n     HDR field message-id\n     HDR field range\n     HDR field\n   Responses\n   First form (message-id specified)\n     225    Headers follow (multi-line)\n     430    No article with that message-id\n   Second form (range specified)\n     225    Headers follow (multi-line)\n     412    No newsgroup selected\n     423    No articles in that range\n   Third form (current article number used)\n     225    Headers follow (multi-line)\n     412    No newsgroup selected\n     420    Current article number is invalid\n   Parameters\n     field         Name of field\n     range         Number(s) of articles\n     message-id    Message-id of article\n8.5.2.  Description\n   The HDR command provides access to specific fields from an article\n   specified by message-id, or from a specified article or range of\n   articles in the currently selected newsgroup.  It MAY take the\n   information directly from the articles or from the overview database.\n   In the case of headers, an implementation MAY restrict the use of\n   this command to a specific list of headers or MAY allow it to be used\n   with any header; it may behave differently when it is used with a\n   message-id argument and when it is used with a range or no argument.\n   The required field argument is the name of a header with the colon\n   omitted (e.g., \"subject\") or the name of a metadata item including\n   the leading colon (e.g., \":bytes\"), and is case insensitive.\n   The message-id argument indicates a specific article.  The range\n   argument may be any of the following:\n   o  An article number.\n   o  An article number followed by a dash to indicate all following.\n   o  An article number followed by a dash followed by another article\n      number.\n   If neither is specified, the current article number is used.\n   If the information is available, it is returned as a multi-line data\n   block following the 225 response code and contains one line for each\n   article in the range that exists.  (Note that unless the argument is\n   a range including a dash, there will be exactly one line in the data\n   block.)  The line consists of the article number, a space, and then\n   the contents of the field.  In the case of a header, the header name,\n   the colon, and the first space after the colon are all omitted.\n   If the article is specified by message-id (the first form of the\n   command), the article number MUST be replaced with zero, except that\n   if there is a currently selected newsgroup and the article is present\n   in that group, the server MAY use the article's number in that group.\n   (See the ARTICLE command (Section 6.2.1) and STAT examples\n   (Section 6.2.4.3) for more details.)  In the other two forms of the\n   command, the article number MUST be returned.\n   Header contents are modified as follows: all CRLF pairs are removed,\n   and then each TAB is replaced with a single space.  (Note that this\n   is the same transformation as is performed by the OVER command\n   (Section 8.3.2), and the same comment concerning NUL, CR, and LF\n   applies.)\n   Note the distinction between headers and metadata appearing to have\n   the same meaning.  Headers are always taken unchanged from the\n   article; metadata are always calculated.  For example, a request for\n   \"Lines\" returns the contents of the \"Lines\" header of the specified\n   articles, if any, no matter whether they accurately state the number\n   of lines, while a request for \":lines\" returns the line count\n   metadata, which is always the actual number of lines irrespective of\n   what any header may state.\n   If the requested header is not present in the article, or if it is\n   present but empty, a line for that article is included in the output,\n   but the header content portion of the line is empty (the space after\n   the article number MAY be retained or omitted).  If the header occurs\n   in a given article more than once, only the content of the first\n   occurrence is returned by HDR.  If any article number in the provided\n   range does not exist in the group, no line for that article number is\n   included in the output.\n   If the second argument is a message-id and no such article exists, a\n   430 response MUST be returned.  If the second argument is a range or\n   is omitted and the currently selected newsgroup is invalid, a 412\n   response MUST be returned.  If the second argument is a range and no\n   articles in that number range exist in the currently selected\n   newsgroup, including the case where the second number is less than\n   the first one, a 423 response MUST be returned.  If the second\n   argument is omitted and the current article number is invalid, a 420\n   response MUST be returned.\n   A server MAY only allow HDR commands for a limited set of fields; it\n   may behave differently in this respect for the first (message-id)\n   form from how it would for the other forms.  If so, it MUST respond\n   with the generic 503 response to attempts to request other fields,\n   rather than return erroneous results, such as a successful empty\n   response.\n   If HDR uses the overview database and it is inconsistent for the\n   requested field, the server MAY return what results it can, or it MAY\n   respond with the generic 503 response.  In the latter case, the field\n   MUST NOT appear in the output from LIST HEADERS.\n8.5.3.  Examples\n   Example of a successful retrieval of subject lines from a range of\n   articles (3000235 has no Subject header, and 3000236 is missing):\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] HDR Subject 3000234-3000238\n      [S] 225 Headers follow\n      [S] 3000234 I am just a test article\n      [S] 3000235\n      [S] 3000237 Re: I am just a test article\n      [S] 3000238 Ditto\n      [S] .\n   Example of a successful retrieval of line counts from a range of\n   articles:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] HDR :lines 3000234-3000238\n      [S] 225 Headers follow\n      [S] 3000234 42\n      [S] 3000235 5\n      [S] 3000237 11\n      [S] 3000238 2378\n      [S] .\n   Example of a successful retrieval of the subject line from an article\n   by message-id:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] HDR subject <i.am.a.test.article@example.com>\n      [S] 225 Header information follows\n      [S] 0 I am just a test article\n      [S] .\n   Example of a successful retrieval of the subject line from the\n   current article:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] HDR subject\n      [S] 225 Header information follows\n      [S] 3000234 I am just a test article\n      [S] .\n   Example of an unsuccessful retrieval of a header from an article by\n   message-id:\n      [C] HDR subject <i.am.not.there@example.com>\n      [S] 430 No Such Article Found\n   Example of an unsuccessful retrieval of headers from articles by\n   number because no newsgroup was selected first:\n      [Assumes currently selected newsgroup is invalid.]\n      [C] HDR subject 300256-\n      [S] 412 No newsgroup selected\n   Example of an unsuccessful retrieval of headers because the currently\n   selected newsgroup is empty:\n      [C] GROUP example.empty.newsgroup\n      [S] 211 0 0 0 example.empty.newsgroup\n      [C] HDR subject 1-\n      [S] 423 No articles in that range\n   Example of an unsuccessful retrieval of headers because the server\n   does not allow HDR commands for that header:\n      [C] GROUP misc.test\n      [S] 211 1234 3000234 3002322 misc.test\n      [C] HDR Content-Type 3000234-3000238\n      [S] 503 HDR not permitted on Content-Type\n8.6.  LIST HEADERS\n8.6.1.  Usage\n   Indicating capability: HDR\n   Syntax\n     LIST HEADERS [MSGID|RANGE]\n   Responses\n     215    Field list follows (multi-line)\n   Parameters\n     MSGID    Requests list for access by message-id\n     RANGE    Requests list for access by range\n8.6.2.  Description\n   See Section 7.6.1 for general requirements of the LIST command.\n   The LIST HEADERS command returns a list of fields that may be\n   retrieved using the HDR command.\n   The information is returned as a multi-line data block following the\n   215 response code and contains one line for each field name\n   (excluding the trailing colon for headers and including the leading\n   colon for metadata items).  If the implementation allows any header\n   to be retrieved, it MUST NOT include any header names in the list but\n   MUST include the special entry \":\" (a single colon on its own).  It\n   MUST still explicitly list any metadata items that are available.\n   The order of items in the list is not significant; the server need\n   not even consistently return the same order.  The list MAY be empty\n   (though in this circumstance there is little point in providing the\n   HDR command).\n   An implementation that also supports the OVER command SHOULD at least\n   permit all the headers and metadata items listed in the output from\n   the LIST OVERVIEW.FMT command.\n   If the server treats the first form of the HDR command (message-id\n   specified) differently from the other two forms (range specified or\n   current article number used) in respect of which headers or metadata\n   items are available, then the following apply:\n   o  If the MSGID argument is specified, the results MUST be those\n      available for the first form of the HDR command.\n   o  If the RANGE argument is specified, the results MUST be those\n      available for the second and third forms of the HDR command.\n   o  If no argument is specified, the results MUST be those available\n      in all forms of the HDR command (that is, it MUST only list those\n      items listed in both the previous cases).\n   If the server does not treat the various forms differently, then it\n   MUST ignore any argument and always produce the same results (though\n   not necessarily always in the same order).\n   If the HDR command is not implemented, the meaning of the output from\n   this command is not specified, but it must still meet the above\n   syntactic requirements.\n8.6.3.  Examples\n   Example of an implementation providing access to only a few headers:\n      [C] LIST HEADERS\n      [S] 215 headers supported:\n      [S] Subject\n      [S] Message-ID\n      [S] Xref\n      [S] .\n   Example of an implementation providing access to the same fields as\n   the first example in Section 8.4.3:\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] OVER\n      [S] HDR\n      [S] LIST ACTIVE NEWSGROUPS HEADERS OVERVIEW.FMT\n      [S] .\n      [C] LIST HEADERS\n      [S] 215 headers and metadata items supported:\n      [S] Date\n      [S] Distribution\n      [S] From\n      [S] Message-ID\n      [S] References\n      [S] Subject\n      [S] Xref\n      [S] :bytes\n      [S] :lines\n      [S] .\n   Example of an implementation providing access to all headers:\n      [C] LIST HEADERS\n      [S] 215 metadata items supported:\n      [S] :\n      [S] :lines\n      [S] :bytes\n      [S] :x-article-number\n      [S] .\n   Example of an implementation distinguishing the first form of the HDR\n   command from the other two forms:\n      [C] LIST HEADERS RANGE\n      [S] 215 metadata items supported:\n      [S] :\n      [S] :lines\n      [S] :bytes\n      [S] .\n      [C] LIST HEADERS MSGID\n      [S] 215 headers and metadata items supported:\n      [S] Date\n      [S] Distribution\n      [S] From\n      [S] Message-ID\n      [S] References\n      [S] Subject\n      [S] :lines\n      [S] :bytes\n      [S] :x-article-number\n      [S] .\n      [C] LIST HEADERS\n      [S] 215 headers and metadata items supported:\n      [S] Date\n      [S] Distribution\n      [S] From\n      [S] Message-ID\n      [S] References\n      [S] Subject\n      [S] :lines\n      [S] :bytes\n      [S] .\n   Note that :x-article-number does not appear in the last set of\n   output."
  },
  {
    "section_number": "9.",
    "section_name": "Augmented BNF Syntax for NNTP",
    "tag": "Section 9. Augmented BNF Syntax for NNTP",
    "content": "9.1.  Introduction\n   Each of the following sections describes the syntax of a major\n   element of NNTP.  This syntax extends and refines the descriptions\n   elsewhere in this specification and should be given precedence when\n   resolving apparent conflicts.  Note that ABNF [RFC4234] strings are\n   case insensitive.  Non-terminals used in several places are defined\n   in a separate section at the end.\n   Between them, the non-terminals <command-line>, <command-datastream>,\n   <command-continuation>, and <response> specify the text that flows\n   between client and server.  A consistent naming scheme is used in\n   this document for the non-terminals relating to each command, and\n   SHOULD be used by the specification of registered extensions.\n   For each command, the sequence is as follows:\n   o  The client sends an instance of <command-line>; the syntax for the\n      EXAMPLE command is <example-command>.\n   o  If the client is one that immediately streams data, it sends an\n      instance of <command-datastream>; the syntax for the EXAMPLE\n      command is <example-datastream>.\n   o  The server sends an instance of <response>.\n      *  The initial response line is independent of the command that\n         generated it; if the 000 response has arguments, the syntax of\n         the initial line is <response-000-content>.\n      *  If the response is multi-line, the initial line is followed by\n         a <multi-line-data-block>.  The syntax for the contents of this\n         block after \"dot-stuffing\" has been removed is (for the 000\n         response to the EXAMPLE command) <example-000-ml-content> and\n         is an instance of <multi-line-response-content>.\n   o  While the latest response is one that indicates more data is\n      required (in general, a 3xx response):\n      *  the client sends an instance of <command-continuation>; the\n         syntax for the EXAMPLE continuation following a 333 response is\n         <example-333-continuation>;\n      *  the server sends another instance of <response>, as above.\n   (There are no commands in this specification that immediately stream\n   data, but this non-terminal is defined for the convenience of\n   extensions.)\n9.2.  Commands\n   This syntax defines the non-terminal <command-line>, which represents\n   what is sent from the client to the server (see section 3.1 for\n   limits on lengths).\n     command-line = command EOL\n     command = X-command\n     X-command = keyword *(WS token)\n     command =/ article-command /\n           body-command /\n           capabilities-command /\n           date-command /\n           group-command /\n           hdr-command /\n           head-command /\n           help-command /\n           ihave-command /\n           last-command /\n           list-command /\n           listgroup-command /\n           mode-reader-command /\n           newgroups-command /\n           newnews-command /\n           next-command /\n           over-command /\n           post-command /\n           quit-command /\n           stat-command\n     article-command = \"ARTICLE\" [WS article-ref]\n     body-command = \"BODY\" [WS article-ref]\n     capabilities-command = \"CAPABILITIES\" [WS keyword]\n     date-command = \"DATE\"\n     group-command = \"GROUP\" [WS newsgroup-name]\n     hdr-command = \"HDR\" WS header-meta-name [WS range-ref]\n     head-command = \"HEAD\" [WS article-ref]\n     help-command = \"HELP\"\n     ihave-command = \"IHAVE\" WS message-id\n     last-command = \"LAST\"\n     list-command = \"LIST\" [WS list-arguments]\n     listgroup-command = \"LISTGROUP\" [WS newsgroup-name [WS range]]\n     mode-reader-command = \"MODE\" WS \"READER\"\n     newgroups-command = \"NEWGROUPS\" WS date-time\n     newnews-command = \"NEWNEWS\" WS wildmat WS date-time\n     next-command = \"NEXT\"\n     over-command = \"OVER\" [WS range-ref]\n     post-command = \"POST\"\n     quit-command = \"QUIT\"\n     stat-command = \"STAT\" [WS article-ref]\n     article-ref = article-number / message-id\n     date = date2y / date4y\n     date4y = 4DIGIT 2DIGIT 2DIGIT\n     date2y = 2DIGIT 2DIGIT 2DIGIT\n     date-time = date WS time [WS \"GMT\"]\n     header-meta-name = header-name / metadata-name\n     list-arguments = keyword [WS token]\n     metadata-name = \":\" 1*A-NOTCOLON\n     range = article-number [\"-\" [article-number]]\n     range-ref = range / message-id\n     time = 2DIGIT 2DIGIT 2DIGIT\n9.3.  Command Continuation\n   This syntax defines the further material sent by the client in the\n   case of multi-stage commands and those that stream data.\n     command-datastream = UNDEFINED\n       ; not used, provided as a hook for extensions\n     command-continuation = ihave-335-continuation /\n           post-340-continuation\n     ihave-335-continuation = encoded-article\n     post-340-continuation = encoded-article\n     encoded-article = multi-line-data-block\n       ; after undoing the \"dot-stuffing\", this MUST match <article>\n9.4.  Responses\n9.4.1.  Generic Responses\n   This syntax defines the non-terminal <response>, which represents the\n   generic form of responses; that is, what is sent from the server to\n   the client in response to a <command> or a <command-continuation>.\n     response = simple-response / multi-line-response\n     simple-response = initial-response-line\n     multi-line-response = initial-response-line multi-line-data-block\n     initial-response-line =\n           initial-response-content [SP trailing-comment] CRLF\n     initial-response-content = X-initial-response-content\n     X-initial-response-content = 3DIGIT *(SP response-argument)\n     response-argument = 1*A-CHAR\n     trailing-comment = *U-CHAR\n9.4.2.  Initial Response Line Contents\n   This syntax defines the specific initial response lines for the\n   various commands in this specification (see section 3.1 for limits on\n   lengths).  Only those response codes with arguments are listed.\n     initial-response-content =/ response-111-content /\n           response-211-content /\n           response-220-content /\n           response-221-content /\n           response-222-content /\n           response-223-content /\n           response-401-content\n     response-111-content = \"111\" SP date4y time\n     response-211-content = \"211\" 3(SP article-number) SP newsgroup-name\n     response-220-content = \"220\" SP article-number SP message-id\n     response-221-content = \"221\" SP article-number SP message-id\n     response-222-content = \"222\" SP article-number SP message-id\n     response-223-content = \"223\" SP article-number SP message-id\n     response-401-content = \"401\" SP capability-label\n9.4.3.  Multi-line Response Contents\n   This syntax defines the content of the various multi-line responses;\n   more precisely, it defines the part of the response in the multi-line\n   data block after any \"dot-stuffing\" has been undone.  The numeric\n   portion of each non-terminal name indicates the response code that is\n   followed by this data.\n     multi-line-response-content = article-220-ml-content /\n           body-222-ml-content /\n           capabilities-101-ml-content /\n           hdr-225-ml-content /\n           head-221-ml-content /\n           help-100-ml-content /\n           list-215-ml-content /\n           listgroup-211-ml-content /\n           newgroups-231-ml-content /\n           newnews-230-ml-content /\n           over-224-ml-content\n     article-220-ml-content = article\n     body-222-ml-content = body\n     capabilities-101-ml-content = version-line CRLF\n           *(capability-line CRLF)\n     hdr-225-ml-content = *(article-number SP hdr-content CRLF)\n     head-221-ml-content = 1*header\n     help-100-ml-content = *(*U-CHAR CRLF)\n     list-215-ml-content = list-content\n     listgroup-211-ml-content = *(article-number CRLF)\n     newgroups-231-ml-content = active-groups-list\n     newnews-230-ml-content = *(message-id CRLF)\n     over-224-ml-content = *(article-number over-content CRLF)\n     active-groups-list = *(newsgroup-name SPA article-number\n           SPA article-number SPA newsgroup-status CRLF)\n     hdr-content = *S-NONTAB\n     hdr-n-content = [(header-name \":\" / metadata-name) SP hdr-content]\n     list-content = body\n     newsgroup-status = %x79 / %x6E / %x6D / private-status\n     over-content = 1*6(TAB hdr-content) /\n           7(TAB hdr-content) *(TAB hdr-n-content)\n     private-status = token ; except the values in newsgroup-status\n9.5.  Capability Lines\n   This syntax defines the generic form of a capability line in the\n   capabilities list (see Section 3.3.1).\n     capability-line = capability-entry\n     capability-entry = X-capability-entry\n     X-capability-entry = capability-label *(WS capability-argument)\n     capability-label = keyword\n     capability-argument = token\n   This syntax defines the specific capability entries for the\n   capabilities in this specification.\n     capability-entry =/\n           hdr-capability /\n           ihave-capability /\n           implementation-capability /\n           list-capability /\n           mode-reader-capability /\n           newnews-capability /\n           over-capability /\n           post-capability /\n           reader-capability\n     hdr-capability = \"HDR\"\n     ihave-capability = \"IHAVE\"\n     implementation-capability = \"IMPLEMENTATION\" *(WS token)\n     list-capability = \"LIST\" 1*(WS keyword)\n     mode-reader-capability = \"MODE-READER\"\n     newnews-capability = \"NEWNEWS\"\n     over-capability = \"OVER\" [WS \"MSGID\"]\n     post-capability = \"POST\"\n     reader-capability = \"READER\"\n     version-line = \"VERSION\" 1*(WS version-number)\n     version-number = nzDIGIT *5DIGIT\n9.6.  LIST Variants\n   This section defines more specifically the keywords for the LIST\n   command and the syntax of the corresponding response contents.\n     ; active\n     list-arguments =/ \"ACTIVE\" [WS wildmat]\n     list-content =/ list-active-content\n     list-active-content = active-groups-list\n     ; active.times\n     list-arguments =/ \"ACTIVE.TIMES\" [WS wildmat]\n     list-content =/ list-active-times-content\n     list-active-times-content =\n           *(newsgroup-name SPA 1*DIGIT SPA newsgroup-creator CRLF)\n     newsgroup-creator = U-TEXT\n     ; distrib.pats\n     list-arguments =/ \"DISTRIB.PATS\"\n     list-content =/ list-distrib-pats-content\n     list-distrib-pats-content =\n           *(1*DIGIT \":\" wildmat \":\" distribution CRLF)\n     distribution = token\n     ; headers\n     list-arguments =/ \"HEADERS\" [WS (\"MSGID\" / \"RANGE\")]\n     list-content =/ list-headers-content\n     list-headers-content = *(header-meta-name CRLF) /\n           *((metadata-name / \":\") CRLF)\n     ; newsgroups\n     list-arguments =/ \"NEWSGROUPS\" [WS wildmat]\n     list-content =/ list-newsgroups-content\n     list-newsgroups-content =\n           *(newsgroup-name WS newsgroup-description CRLF)\n     newsgroup-description = S-TEXT\n     ; overview.fmt\n     list-arguments =/ \"OVERVIEW.FMT\"\n     list-content =/ list-overview-fmt-content\n     list-overview-fmt-content = \"Subject:\" CRLF\n           \"From:\" CRLF\n           \"Date:\" CRLF\n           \"Message-ID:\" CRLF\n           \"References:\" CRLF\n           ( \":bytes\" CRLF \":lines\" / \"Bytes:\" CRLF \"Lines:\") CRLF\n           *((header-name \":full\" / metadata-name) CRLF)\n9.7.  Articles\n   This syntax defines the non-terminal <article>, which represents the\n   format of an article as described in Section 3.6.\n     article = 1*header CRLF body\n     header = header-name \":\" [CRLF] SP header-content CRLF\n     header-content = *(S-CHAR / [CRLF] WS)\n     body = *(*B-CHAR CRLF)\n9.8.  General Non-terminals\n   These non-terminals are used at various places in the syntax and are\n   collected here for convenience.  A few of these non-terminals are not\n   used in this specification but are provided for the consistency and\n   convenience of extension authors.\n     multi-line-data-block = content-lines termination\n     content-lines = *([content-text] CRLF)\n     content-text = (\"..\" / B-NONDOT) *B-CHAR\n     termination = \".\" CRLF\n     article-number = 1*16DIGIT\n     header-name = 1*A-NOTCOLON\n     keyword = ALPHA 2*(ALPHA / DIGIT / \".\" / \"-\")\n     message-id = \"<\" 1*248A-NOTGT \">\"\n     newsgroup-name = 1*wildmat-exact\n     token = 1*P-CHAR\n     wildmat = wildmat-pattern *(\",\" [\"!\"] wildmat-pattern)\n     wildmat-pattern = 1*wildmat-item\n     wildmat-item = wildmat-exact / wildmat-wild\n     wildmat-exact = %x22-29 / %x2B / %x2D-3E / %x40-5A / %x5E-7E /\n          UTF8-non-ascii  ; exclude ! * , ? [ \\ ]\n     wildmat-wild = \"*\" / \"?\"\n     base64 = *(4base64-char) [base64-terminal]\n     base64-char = UPPER / LOWER / DIGIT / \"+\" / \"/\"\n     base64-terminal = 2base64-char \"==\" / 3base64-char \"=\"\n     ; Assorted special character sets\n     ;   A- means based on US-ASCII, excluding controls and SP\n     ;   P- means based on UTF-8, excluding controls and SP\n     ;   U- means based on UTF-8, excluding NUL CR and LF\n     ;   B- means based on bytes, excluding NUL CR and LF\n     A-CHAR     = %x21-7E\n     A-NOTCOLON = %x21-39 / %x3B-7E  ; exclude \":\"\n     A-NOTGT    = %x21-3D / %x3F-7E  ; exclude \">\"\n     P-CHAR     = A-CHAR / UTF8-non-ascii\n     U-CHAR     = CTRL / TAB / SP / A-CHAR / UTF8-non-ascii\n     U-NONTAB   = CTRL /       SP / A-CHAR / UTF8-non-ascii\n     U-TEXT     = P-CHAR *U-CHAR\n     B-CHAR     = CTRL / TAB / SP / %x21-FF\n     B-NONDOT   = CTRL / TAB / SP / %x21-2D / %x2F-FF  ; exclude \".\"\n     ALPHA = UPPER / LOWER   ; use only when case-insensitive\n     CR = %x0D\n     CRLF = CR LF\n     CTRL = %x01-08 / %x0B-0C / %x0E-1F\n     DIGIT = %x30-39\n     nzDIGIT = %x31-39\n     EOL = *(SP / TAB) CRLF\n     LF = %x0A\n     LOWER = %x61-7A\n     SP = %x20\n     SPA = 1*SP\n     TAB = %x09\n     UPPER = %x41-5A\n     UTF8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4\n     UTF8-2    = %xC2-DF UTF8-tail\n     UTF8-3    = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2UTF8-tail /\n                 %xED %x80-9F UTF8-tail / %xEE-EF 2UTF8-tail\n     UTF8-4    = %xF0 %x90-BF 2UTF8-tail / %xF1-F3 3UTF8-tail /\n                 %xF4 %x80-8F 2UTF8-tail\n     UTF8-tail = %x80-BF\n     WS = 1*(SP / TAB)\n   The following non-terminals require special consideration.  They\n   represent situations where material SHOULD be restricted to UTF-8,\n   but implementations MUST be able to cope with other character\n   encodings.  Therefore, there are two sets of definitions for them.\n   Implementations MUST accept any content that meets this syntax:\n     S-CHAR   = %x21-FF\n     S-NONTAB = CTRL / SP / S-CHAR\n     S-TEXT   = (CTRL / S-CHAR) *B-CHAR\n   and MAY pass such content on unaltered.\n   When generating new content or re-encoding existing content,\n   implementations SHOULD conform to this syntax:\n     S-CHAR   = P-CHAR\n     S-NONTAB = U-NONTAB\n     S-TEXT   = U-TEXT\n9.9.  Extensions and Validation\n   The specification of a registered extension MUST include formal\n   syntax that defines additional forms for the following non-terminals:\n   command\n      for each new command other than a variant of the LIST command -\n      the syntax of each command MUST be compatible with the definition\n      of <X-command>;\n   command-datastream\n      for each new command that immediately streams data;\n   command-continuation\n      for each new command that sends further material after the initial\n      command line - the syntax of each continuation MUST be exactly\n      what is sent to the server, including any escape mechanisms such\n      as \"dot-stuffing\";\n   initial-response-content\n      for each new response code that has arguments - the syntax of each\n      response MUST be compatible with the definition of <X-initial-\n      response-content>;\n   multi-line-response-content\n      for each new response code that has a multi-line response - the\n      syntax MUST show the response after the lines containing the\n      response code and the terminating octet have been removed and any\n      \"dot-stuffing\" undone;\n   capability-entry\n      for each new capability label - the syntax of each entry MUST be\n      compatible with the definition of <X-capability-entry>;\n   list-arguments\n      for each new variant of the LIST command - the syntax of each\n      entry MUST be compatible with the definition of <X-command>;\n   list-content\n      for each new variant of the LIST command - the syntax MUST show\n      the response after the lines containing the 215 response code and\n      the terminating octet have been removed and any \"dot-stuffing\"\n      undone.\n   The =/ notation of ABNF [RFC4234] and the naming conventions\n   described in Section 9.1 SHOULD be used for this.\n   When the syntax in this specification, or syntax based on it, is\n   validated, it should be noted that:\n   o  the non-terminals <command-line>, <command-datastream>,\n      <command-continuation>, <response>, and\n      <multi-line-response-content> describe basic concepts of the\n      protocol and are not referred to by any other rule;\n   o  the non-terminal <base64> is provided for the convenience of\n      extension authors and is not referred to by any rule in this\n      specification;\n   o  for the reasons given above, the non-terminals <S-CHAR>,\n      <S-NONTAB>, and <S-TEXT> each have two definitions; and\n   o  the non-terminal <UNDEFINED> is deliberately not defined."
  },
  {
    "section_number": "10.",
    "section_name": "Internationalisation Considerations",
    "tag": "Section 10. Internationalisation Considerations",
    "content": "10.1.  Introduction and Historical Situation\n   RFC 977 [RFC977] was written at a time when internationalisation was\n   not seen as a significant issue.  As such, it was written on the\n   assumption that all communication would be in ASCII and use only a\n   7-bit transport layer, although in practice just about all known\n   implementations are 8-bit clean.\n   Since then, Usenet and NNTP have spread throughout the world.  In the\n   absence of standards for handling the issues of language and\n   character sets, countries, newsgroup hierarchies, and individuals\n   have found a variety of solutions that work for them but that are not\n   necessarily appropriate elsewhere.  For example, some have adopted a\n   default 8-bit character set appropriate to their needs (such as\n   ISO/IEC 8859-1 in Western Europe or KOI-8 in Russia), others have\n   used ASCII (either US-ASCII or national variants) in headers but\n   local 16-bit character sets in article bodies, and still others have\n   gone for a combination of MIME [RFC2045] and UTF-8.  With the\n   increased use of MIME in email, it is becoming more common to find\n   NNTP articles containing MIME headers that identify the character set\n   of the body, but this is far from universal.\n   The resulting confusion does not help interoperability.\n   One point that has been generally accepted is that articles can\n   contain octets with the top bit set, and NNTP is only expected to\n   operate on 8-bit clean transport paths.\n10.2.  This Specification\n   Part of the role of this present specification is to eliminate this\n   confusion and promote interoperability as far as possible.  At the\n   same time, it is necessary to accept the existence of the present\n   situation and not break existing implementations and arrangements\n   gratuitously, even if they are less than optimal.  Therefore, the\n   current practice described above has been taken into consideration in\n   producing this specification.\n   This specification extends NNTP from US-ASCII [ANSI1986] to UTF-8\n   [RFC3629].  Except in the two areas discussed below, UTF-8 (which is\n   a superset of US-ASCII) is mandatory, and implementations MUST NOT\n   use any other encoding.\n   Firstly, the use of MIME for article headers and bodies is strongly\n   recommended.  However, given widely divergent existing practices, an\n   attempt to require a particular encoding and tagging standard would\n   be premature at this time.  Accordingly, this specification allows\n   the use of arbitrary 8-bit data in articles subject to the following\n   requirements and recommendations.\n   o  The names of headers (e.g., \"From\" or \"Subject\") MUST be in\n      US-ASCII.\n   o  Header values SHOULD use US-ASCII or an encoding based on it, such\n      as RFC 2047 [RFC2047], until such time as another approach has\n      been standardised.  At present, 8-bit encodings (including UTF-8)\n      SHOULD NOT be used because they are likely to cause\n      interoperability problems.\n   o  The character set of article bodies SHOULD be indicated in the\n      article headers, and this SHOULD be done in accordance with MIME.\n   o  Where an article is obtained from an external source, an\n      implementation MAY pass it on and derive data from it (such as the\n      response to the HDR command), even though the article or the data\n      does not meet the above requirements.  Implementations MUST\n      transfer such articles and data correctly and unchanged; they MUST\n      NOT attempt to convert or re-encode the article or derived data.\n      (Nevertheless, a client or server MAY elect not to post or forward\n      the article if, after further examination of the article, it deems\n      it inappropriate to do so.)\n   This requirement affects the ARTICLE (Section 6.2.1), BODY\n   (Section 6.2.3), HDR (Section 8.5), HEAD (Section 6.2.2), IHAVE\n   (Section 6.3.2), OVER (Section 8.3), and POST (Section 6.3.1)\n   commands.\n   Secondly, the following requirements are placed on the newsgroups\n   list returned by the LIST NEWSGROUPS command (Section 7.6.6):\n   o  Although this specification allows UTF-8 for newsgroup names, they\n      SHOULD be restricted to US-ASCII until a successor to RFC 1036\n      [RFC1036] standardises another approach. 8-bit encodings SHOULD\n      NOT be used because they are likely to cause interoperability\n      problems.\n   o  The newsgroup description SHOULD be in US-ASCII or UTF-8 unless\n      and until a successor to RFC 1036 standardises other encoding\n      arrangements.  8-bit encodings other than UTF-8 SHOULD NOT be used\n      because they are likely to cause interoperability problems.\n   o  Implementations that obtain this data from an external source MUST\n      handle it correctly even if it does not meet the above\n      requirements.  Implementations (in particular, clients) MUST\n      handle such data correctly.\n10.3.  Outstanding Issues\n   While the primary use of NNTP is for transmitting articles that\n   conform to RFC 1036 (Netnews articles), it is also used for other\n   formats (see Appendix A).  It is therefore most appropriate that\n   internationalisation issues related to article formats be addressed\n   in the relevant specifications.  For Netnews articles, this is any\n   successor to RFC 1036.  For email messages, it is RFC 2822 [RFC2822].\n   Of course, any article transmitted via NNTP needs to conform to this\n   specification as well.\n   Restricting newsgroup names to UTF-8 is not a complete solution.  In\n   particular, when new newsgroup names are created or a user is asked\n   to enter a newsgroup name, some scheme of canonicalisation will need\n   to take place.  This specification does not attempt to define that\n   canonicalization; further work is needed in this area, in conjunction\n   with the article format specifications.  Until such specifications\n   are published, implementations SHOULD match newsgroup names octet by\n   octet.  It is anticipated that any approved scheme will be applied\n   \"at the edges\", and therefore octet-by-octet comparison will continue\n   to apply to most, if not all, uses of newsgroup names in NNTP.\n   In the meantime, any implementation experimenting with UTF-8\n   newsgroup names is strongly cautioned that a future specification may\n   require that those names be canonicalized when used with NNTP in a\n   way that is not compatible with their experiments.\n   Since the primary use of NNTP is with Netnews, and since newsgroup\n   descriptions are normally distributed through specially formatted\n   articles, it is recommended that the internationalisation issues\n   related to them be addressed in any successor to RFC 1036."
  },
  {
    "section_number": "11.",
    "section_name": "IANA Considerations",
    "tag": "Section 11. IANA Considerations",
    "content": "This specification requires IANA to keep a registry of capability\n   labels.  The initial contents of this registry are specified in\n   Section 3.3.4.  As described in Section 3.3.3, labels beginning with\n   X are reserved for private use, while all other names are expected to\n   be associated with a specification in an RFC on the standards track\n   or defining an IESG-approved experimental protocol.\n   Different entries in the registry MUST use different capability\n   labels.\n   Different entries in the registry MUST NOT use the same command name.\n   For this purpose, variants distinguished by a second or subsequent\n   keyword (e.g., \"LIST HEADERS\" and \"LIST OVERVIEW.FMT\") count as\n   different commands.  If there is a need for two extensions to use the\n   same command, a single harmonised specification MUST be registered."
  },
  {
    "section_number": "12.",
    "section_name": "Security Considerations",
    "tag": "Section 12. Security Considerations",
    "content": "This section is meant to inform application developers, information\n   providers, and users of the security limitations in NNTP as described\n   by this document.  The discussion does not include definitive\n   solutions to the problems revealed, though it does make some\n   suggestions for reducing security risks.\n12.1.  Personal and Proprietary Information\n   NNTP, because it was created to distribute network news articles,\n   will forward whatever information is stored in those articles.\n   Specification of that information is outside this scope of this\n   document, but it is likely that some personal and/or proprietary\n   information is available in some of those articles.  It is very\n   important that designers and implementers provide informative\n   warnings to users so that personal and/or proprietary information in\n   material that is added automatically to articles (e.g., in headers)\n   is not disclosed inadvertently.  Additionally, effective and easily\n   understood mechanisms to manage the distribution of news articles\n   SHOULD be provided to NNTP Server administrators, so that they are\n   able to report with confidence the likely spread of any particular\n   set of news articles.\n12.2.  Abuse of Server Log Information\n   A server is in the position to save session data about a user's\n   requests that might identify their reading patterns or subjects of\n   interest.  This information is clearly confidential in nature, and\n   its handling can be constrained by law in certain countries.  People\n   using this protocol to provide data are responsible for ensuring that\n   such material is not distributed without the permission of any\n   individuals that are identifiable by the published results.\n12.3.  Weak Authentication and Access Control\n   There is no user-based or token-based authentication in the basic\n   NNTP specification.  Access is normally controlled by server\n   configuration files.  Those files specify access by using domain\n   names or IP addresses.  However, this specification does permit the\n   creation of extensions to NNTP for such purposes; one such extension\n   is [NNTP-AUTH].  While including such mechanisms is optional, doing\n   so is strongly encouraged.\n   Other mechanisms are also available.  For example, a proxy server\n   could be put in place that requires authentication before connecting\n   via the proxy to the NNTP server.\n12.4.  DNS Spoofing\n   Many existing NNTP implementations authorize incoming connections by\n   checking the IP address of that connection against the IP addresses\n   obtained via DNS lookups of lists of domain names given in local\n   configuration files.  Servers that use this type of authentication\n   and clients that find a server by doing a DNS lookup of the server\n   name rely very heavily on the Domain Name Service, and are thus\n   generally prone to security attacks based on the deliberate\n   misassociation of IP addresses and DNS names.  Clients and servers\n   need to be cautious in assuming the continuing validity of an IP\n   number/DNS name association.\n   In particular, NNTP clients and servers SHOULD rely on their name\n   resolver for confirmation of an IP number/DNS name association,\n   rather than cache the result of previous host name lookups.  Many\n   platforms already can cache host name lookups locally when\n   appropriate, and they SHOULD be configured to do so.  It is proper\n   for these lookups to be cached, however, only when the TTL (Time To\n   Live) information reported by the name server makes it likely that\n   the cached information will remain useful.\n   If NNTP clients or servers cache the results of host name lookups in\n   order to achieve a performance improvement, they MUST observe the TTL\n   information reported by DNS.  If NNTP clients or servers do not\n   observe this rule, they could be spoofed when a previously accessed\n   server's IP address changes.  As network renumbering is expected to\n   become increasingly common, the possibility of this form of attack\n   will increase.  Observing this requirement thus reduces this\n   potential security vulnerability.\n   This requirement also improves the load-balancing behaviour of\n   clients for replicated servers using the same DNS name and reduces\n   the likelihood of a user's experiencing failure in accessing sites\n   that use that strategy.\n12.5.  UTF-8 Issues\n   UTF-8 [RFC3629] permits only certain sequences of octets and\n   designates others as either malformed or \"illegal\".  The Unicode\n   standard identifies a number of security issues related to illegal\n   sequences and forbids their generation by conforming implementations.\n   Implementations of this specification MUST NOT generate malformed or\n   illegal sequences and SHOULD detect them and take some appropriate\n   action.  This could include the following:\n   o  Generating a 501 response code.\n   o  Replacing such sequences by the sequence %xEF.BF.BD, which encodes\n      the \"replacement character\" U+FFFD.\n   o  Closing the connection.\n   o  Replacing such sequences by a \"guessed\" valid sequence (based on\n      properties of the UTF-8 encoding).\n   In the last case, the implementation MUST ensure that any replacement\n   cannot be used to bypass validity or security checks.  For example,\n   the illegal sequence %xC0.A0 is an over-long encoding for space\n   (%x20).  If it is replaced by the correct encoding in a command line,\n   this needs to happen before the command line is parsed into\n   individual arguments.  If the replacement came after parsing, it\n   would be possible to generate an argument with an embedded space,\n   which is forbidden.  Use of the \"replacement character\" does not have\n   this problem, since it is permitted wherever non-US-ASCII characters\n   are.  Implementations SHOULD use one of the first two solutions where\n   the general structure of the NNTP stream remains intact and SHOULD\n   close the connection if it is no longer possible to parse it\n   sensibly.\n12.6.  Caching of Capability Lists\n   The CAPABILITIES command provides a capability list, which is\n   information about the current capabilities of the server.  Whenever\n   there is a relevant change to the server state, the results of this\n   command are required to change accordingly.\n   In most situations, the capabilities list in a given server state\n   will not change from session to session; for example, a given\n   extension will be installed permanently on a server.  Some clients\n   may therefore wish to remember which extensions a server supports to\n   avoid the delay of an additional command and response, particularly\n   if they open multiple connections in the same session.\n   However, information about extensions related to security and privacy\n   MUST NOT be cached, since this could allow a variety of attacks.\n   For example, consider a server that permits the use of cleartext\n   passwords on links that are encrypted but not otherwise:\n      [Initial connection set-up completed.]\n      [S] 200 NNTP Service Ready, posting permitted\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] NEWNEWS\n      [S] POST\n      [S] XENCRYPT\n      [S] LIST ACTIVE NEWSGROUPS\n      [S] .\n      [C] XENCRYPT\n      [Client and server negotiate encryption on the link]\n      [S] 283 Encrypted link established\n      [C] CAPABILITIES\n      [S] 101 Capability list:\n      [S] VERSION 2\n      [S] READER\n      [S] NEWNEWS\n      [S] POST\n      [S] XSECRET\n      [S] LIST ACTIVE NEWSGROUPS\n      [S] .\n      [C] XSECRET fred flintstone\n      [S] 290 Password for fred accepted\n   If the client caches the last capabilities list, then on the next\n   session it will attempt to use XSECRET on an unencrypted link:\n      [Initial connection set-up completed.]\n      [S] 200 NNTP Service Ready, posting permitted\n      [C] XSECRET fred flintstone\n      [S] 483 Only permitted on secure links\n   This exposes the password to any eavesdropper.  While the primary\n   cause of this is passing a secret without first checking the security\n   of the link, caching of capability lists can increase the risk.\n   Any security extension should include requirements to check the\n   security state of the link in a manner appropriate to that extension.\n   Caching should normally only be considered for anonymous clients that\n   do not use any security or privacy extensions and for which the time\n   required for an additional command and response is a noticeable\n   issue."
  },
  {
    "section_number": "13.",
    "section_name": "Acknowledgements",
    "tag": "Section 13. Acknowledgements",
    "content": "This document is the result of much effort by the present and past\n   members of the NNTP Working Group, chaired by Russ Allbery and Ned\n   Freed.  It could not have been produced without them.\n   The author acknowledges the original authors of NNTP as documented in\n   RFC 977 [RFC977]: Brian Kantor and Phil Lapsey.\n   The author gratefully acknowledges the following:\n   o  The work of the NNTP committee chaired by Eliot Lear.  The\n      organization of this document was influenced by the last available\n      version from this working group.  A special thanks to Eliot for\n      generously providing the original machine-readable sources for\n      that document.\n   o  The work of the DRUMS working group, specifically RFC 1869\n      [RFC1869], that drove the original thinking that led to the\n      CAPABILITIES command and the extensions mechanism detailed in this\n      document.\n   o  The authors of RFC 2616 [RFC2616] for providing specific and\n      relevant examples of security issues that should be considered for\n      HTTP.  Since many of the same considerations exist for NNTP, those\n      examples that are relevant have been included here with some minor\n      rewrites.\n   o  The comments and additional information provided by the following\n      individuals in preparing one or more of the progenitors of this\n      document:\n         Russ Allbery <rra@stanford.edu>\n         Wayne Davison <davison@armory.com>\n         Chris Lewis <clewis@bnr.ca>\n         Tom Limoncelli <tal@mars.superlink.net>\n         Eric Schnoebelen <eric@egsner.cirr.com>\n         Rich Salz <rsalz@osf.org>\n   This work was motivated by the work of various news reader authors\n   and news server authors, including those listed below:\n   Rick Adams\n      Original author of the NNTP extensions to the RN news reader and\n      last maintainer of Bnews.\n   Stan Barber\n      Original author of the NNTP extensions to the news readers that\n      are part of Bnews.\n   Geoff Collyer\n      Original author of the OVERVIEW database proposal and one of the\n      original authors of CNEWS.\n   Dan Curry\n      Original author of the xvnews news reader.\n   Wayne Davison\n      Author of the first threading extensions to the RN news reader\n      (commonly called TRN).\n   Geoff Huston\n      Original author of ANU NEWS.\n   Phil Lapsey\n      Original author of the UNIX reference implementation for NNTP.\n   Iain Lea\n      Original maintainer of the TIN news reader.\n   Chris Lewis\n      First known implementer of the AUTHINFO GENERIC extension.\n   Rich Salz\n      Original author of INN.\n   Henry Spencer\n      One of the original authors of CNEWS.\n   Kim Storm\n      Original author of the NN news reader.\n   Other people who contributed to this document include:\n      Matthias Andree\n      Greg Andruk\n      Daniel Barclay\n      Maurizio Codogno\n      Mark Crispin\n      Andrew Gierth\n      Juergen Helbing\n      Scott Hollenbeck\n      Urs Janssen\n      Charles Lindsey\n      Ade Lovett\n      David Magda\n      Ken Murchison\n      Francois Petillon\n      Peter Robinson\n      Rob Siemborski\n      Howard Swinehart\n      Ruud van Tol\n      Jeffrey Vinocur\n      Erik Warmelink\n   The author thanks them all and apologises to anyone omitted.\n   Finally, the present author gratefully acknowledges the vast amount\n   of work put into previous versions by the previous author:\n      Stan Barber <sob@academ.com>"
  },
  {
    "section_number": "14.",
    "section_name": "References",
    "tag": "Section 14. References",
    "content": "14.1.  Normative References\n   [ANSI1986]    American National Standards Institute, \"Coded Character\n                 Set - 7-bit American Standard Code for Information\n                 Interchange\", ANSI X3.4, 1986.\n   [RFC977]      Kantor, B. and P. Lapsley, \"Network News Transfer\n   [RFC2045]     Freed, N. and N. Borenstein, \"Multipurpose Internet\n                 Mail Extensions (MIME) Part One: Format of Internet\n   [RFC2047]     Moore, K., \"MIME (Multipurpose Internet Mail\n                 Extensions) Part Three: Message Header Extensions for\n   [RFC2119]     Bradner, S., \"Key words for use in RFCs to Indicate\n   [RFC3629]     Yergeau, F., \"UTF-8, a transformation format of ISO\n   [RFC4234]     Crocker, D., Ed. and P. Overell, \"Augmented BNF for\n   [RFC4648]     Josefsson, S., \"The Base16, Base32, and Base64 Data\n   [TF.686-1]    International Telecommunications Union - Radio,\n                 \"Glossary, ITU-R Recommendation TF.686-1\",\n                 ITU-R Recommendation TF.686-1, October 1997.\n14.2.  Informative References\n   [NNTP-AUTH]   Vinocur, J., Murchison, K., and C. Newman, \"Network\n                 News Transfer Protocol (NNTP) Extension for\n                 Authentication\",\n   [NNTP-STREAM] Vinocur, J. and K. Murchison, \"Network News Transfer\n                 Protocol (NNTP) Extension for Streaming Feeds\",\n   [NNTP-TLS]    Murchison, K., Vinocur, J., and C. Newman, \"Using\n                 Transport Layer Security (TLS) with Network News\n   [RFC1036]     Horton, M. and R. Adams, \"Standard for interchange of\n   [RFC1305]     Mills, D., \"Network Time Protocol (Version 3)\n                 Specification, Implementation and Analysis\", RFC 1305,\n                 March 1992.\n   [RFC1869]     Klensin, J., Freed, N., Rose, M., Stefferud, E., and D.\n                 Crocker, \"SMTP Service Extensions\", STD 10, RFC 1869,\n                 November 1995.\n   [RFC2616]     Fielding,  R., Gettys, J., Mogul, J., Frystyk, H.,\n                 Masinter, L., Leach, P., and T. Berners-Lee, \"Hypertext\n   [RFC2629]     Rose, M., \"Writing I-Ds and RFCs using XML\", RFC 2629,\n                 June 1999.\n   [RFC2822]     Resnick, P., \"Internet Message Format\", RFC 2822, April\n                 2001.\n   [RFC2980]     Barber, S., \"Common NNTP Extensions\", RFC 2980, October\n                 2000.\n   [ROBE1995]    Robertson, R., \"FAQ: Overview database / NOV General\n                 Information\", January 1995.\n                 There is no definitive copy of this document known to\n                 the author.  It was previously posted as the Usenet\n                 article <news:nov-faq-1-930909720@agate.Berkeley.EDU>\n   [SALZ1992]    Salz, R., \"Manual Page for wildmat(3) from the INN 1.4\n                 distribution, Revision 1.10\", April 1992.\n                 There is no definitive copy of this document known to\n                 the author.\nAppendix A.  Interaction with Other Specifications\n   NNTP is most often used for transferring articles that conform to\n   RFC 1036 [RFC1036] (such articles are called \"Netnews articles\"\n   here).  It is also sometimes used for transferring email messages\n   that conform to RFC 2822 [RFC2822] (such articles are called \"email\n   articles\" here).  In this situation, articles must conform both to\n   this specification and to that other one; this appendix describes\n   some relevant issues.\nA.1.  Header Folding\n   NNTP allows a header line to be folded (by inserting a CRLF pair)\n   before any space or TAB character.\n   Both email and Netnews articles are required to have at least one\n   octet other than space or TAB on each header line.  Thus, folding can\n   only happen at one point in each sequence of consecutive spaces or\n   TABs.  Netnews articles are further required to have the header name,\n   colon, and following space all on the first line; folding may only\n   happen beyond that space.  Finally, some non-conforming software will\n   remove trailing spaces and TABs from a line.  Therefore, it might be\n   inadvisable to fold a header after a space or TAB.\n   For maximum safety, header lines SHOULD conform to the following\n   syntax rather than to that in Section 9.7.\n     header = header-name \":\" SP [header-content] CRLF\n     header-content = [WS] token *( [CRLF] WS token )\nA.2.  Message-IDs\n   Every article handled by an NNTP server MUST have a unique\n   message-id.  For the purposes of this specification, a message-id is\n   an arbitrary opaque string that merely needs to meet certain\n   syntactic requirements and is just a way to refer to the article.\n   Because there is a significant risk that old articles will be\n   reinjected into the global Usenet system, RFC 1036 [RFC1036] requires\n   that message-ids are globally unique for all time.\n   This specification states that message-ids are the same if and only\n   if they consist of the same sequence of octets.  Other specifications\n   may define two different sequences as being equal because they are\n   putting an interpretation on particular characters.  RFC 2822\n   [RFC2822] has a concept of \"quoted\" and \"escaped\" characters.  It\n   therefore considers the three message-ids:\n      <ab.cd@example.com>\n      <\"ab.cd\"@example.com>\n      <\"ab.\\cd\"@example.com>\n   as being identical.  Therefore, an NNTP implementation handing email\n   articles must ensure that only one of these three appears in the\n   protocol and that the other two are converted to it as and when\n   necessary, such as when a client checks the results of a NEWNEWS\n   command against an internal database of message-ids.  Note that\n   RFC 1036 [RFC1036] never treats two different strings as being\n   identical.  Its successor (as of the time of writing) restricts the\n   syntax of message-ids so that, whenever RFC 2822 would treat two\n   strings as equivalent, only one of them is valid (in the above\n   example, only the first string is valid).\n   This specification does not describe how the message-id of an article\n   is determined; it may be deduced from the contents of the article or\n   derived from some external source.  If the server is also conforming\n   to another specification that contains a definition of message-id\n   compatible with this one, the server SHOULD use those message-ids.  A\n   common approach, and one that SHOULD be used for email and Netnews\n   articles, is to extract the message-id from the contents of a header\n   with name \"Message-ID\".  This may not be as simple as copying the\n   entire header contents; it may be necessary to strip off comments and\n   undo quoting, or to reduce \"equivalent\" message-ids to a canonical\n   form.\n   If an article is obtained through the IHAVE command, there will be a\n   message-id provided with the command.  The server MAY either use it\n   or determine one from the article contents.  However, whichever it\n   does, it SHOULD ensure that, if the IHAVE command is repeated with\n   the same argument and article, it will be recognized as a duplicate.\n   If an article does not contain a message-id that the server can\n   identify, it MUST synthesize one.  This could, for example, be a\n   simple sequence number or be based on the date and time when the\n   article arrived.  When email or Netnews articles are handled, a\n   Message-ID header SHOULD be added to ensure global consistency and\n   uniqueness.\n   Note that, because the message-id might not have been derived from\n   the Message-ID header in the article, the following example is\n   legitimate (though unusual):\n      [C] HEAD <45223423@example.com>\n      [S] 221 0 <45223423@example.com>\n      [S] Path: pathost!demo!whitehouse!not-for-mail\n      [S] Message-ID: <1234@example.net>\n      [S] From: \"Demo User\" <nobody@example.net>\n      [S] Newsgroups: misc.test\n      [S] Subject: I am just a test article\n      [S] Date: 6 Oct 1998 04:38:40 -0500\n      [S] Organization: An Example Net, Uncertain, Texas\n      [S] .\nA.3.  Article Posting\n   As far as NNTP is concerned, the POST and IHAVE commands provide the\n   same basic facilities in a slightly different way.  However, they\n   have rather different intentions.\n   The IHAVE command is intended for transmitting conforming articles\n   between a system of NNTP servers, with all articles perhaps also\n   conforming to another specification (e.g., all articles are Netnews\n   articles).  It is expected that the client will already have done any\n   necessary validation (or that it has in turn obtained the article\n   from a third party that has done so); therefore, the contents SHOULD\n   be left unchanged.\n   In contrast, the POST command is intended for use when an end-user is\n   injecting a newly created article into a such a system.  The article\n   being transferred might not be a conforming email or Netnews article,\n   and the server is expected to validate it and, if necessary, to\n   convert it to the right form for onward distribution.  This is often\n   done by a separate piece of software on the server installation; if\n   so, the NNTP server SHOULD pass the incoming article to that software\n   unaltered, making no attempt to filter characters, to fold or limit\n   lines, or to process the incoming text otherwise.\n   The POST command can fail in various ways, and clients should be\n   prepared to re-send an article.  When doing so, however, it is often\n   important to ensure (as far as possible) that the same message-id is\n   allocated to both attempts so that the server, or other servers, can\n   recognize the two articles as duplicates.  In the case of email or\n   Netnews articles, therefore, the posted article SHOULD contain a\n   header with the name \"Message-ID\", and the contents of this header\n   SHOULD be identical on each attempt.  The server SHOULD ensure that\n   two POSTed articles with the same contents for this header are\n   recognized as identical and that the same message-id is allocated,\n   whether or not those contents are suitable for use as the message-id.\nAppendix B.  Summary of Commands\n   This section contains a list of every command defined in this\n   document, ordered by command name and by indicating capability.\n                         Ordered by command name:\n       +-------------------+-----------------------+---------------+\n       | Command           | Indicating capability | Definition    |\n       +-------------------+-----------------------+---------------+\n       | ARTICLE           | READER                | Section 6.2.1 |\n       | BODY              | READER                | Section 6.2.3 |\n       | CAPABILITIES      | mandatory             | Section 5.2   |\n       | DATE              | READER                | Section 7.1   |\n       | GROUP             | READER                | Section 6.1.1 |\n       | HDR               | HDR                   | Section 8.5   |\n       | HEAD              | mandatory             | Section 6.2.2 |\n       | HELP              | mandatory             | Section 7.2   |\n       | IHAVE             | IHAVE                 | Section 6.3.2 |\n       | LAST              | READER                | Section 6.1.3 |\n       | LIST              | LIST                  | Section 7.6.1 |\n       | LIST ACTIVE.TIMES | LIST                  | Section 7.6.4 |\n       | LIST ACTIVE       | LIST                  | Section 7.6.3 |\n       | LIST DISTRIB.PATS | LIST                  | Section 7.6.5 |\n       | LIST HEADERS      | HDR                   | Section 8.6   |\n       | LIST NEWSGROUPS   | LIST                  | Section 7.6.6 |\n       | LIST OVERVIEW.FMT | OVER                  | Section 8.4   |\n       | LISTGROUP         | READER                | Section 6.1.2 |\n       | MODE READER       | MODE-READER           | Section 5.3   |\n       | NEWGROUPS         | READER                | Section 7.3   |\n       | NEWNEWS           | NEWNEWS               | Section 7.4   |\n       | NEXT              | READER                | Section 6.1.4 |\n       | OVER              | OVER                  | Section 8.3   |\n       | POST              | POST                  | Section 6.3.1 |\n       | QUIT              | mandatory             | Section 5.4   |\n       | STAT              | mandatory             | Section 6.2.4 |\n       +-------------------+-----------------------+---------------+\n                     Ordered by indicating capability:\n       +-------------------+-----------------------+---------------+\n       | Command           | Indicating capability | Definition    |\n       +-------------------+-----------------------+---------------+\n       | CAPABILITIES      | mandatory             | Section 5.2   |\n       | HEAD              | mandatory             | Section 6.2.2 |\n       | HELP              | mandatory             | Section 7.2   |\n       | QUIT              | mandatory             | Section 5.4   |\n       | STAT              | mandatory             | Section 6.2.4 |\n       | HDR               | HDR                   | Section 8.5   |\n       | LIST HEADERS      | HDR                   | Section 8.6   |\n       | IHAVE             | IHAVE                 | Section 6.3.2 |\n       | LIST              | LIST                  | Section 7.6.1 |\n       | LIST ACTIVE       | LIST                  | Section 7.6.3 |\n       | LIST ACTIVE.TIMES | LIST                  | Section 7.6.4 |\n       | LIST DISTRIB.PATS | LIST                  | Section 7.6.5 |\n       | LIST NEWSGROUPS   | LIST                  | Section 7.6.6 |\n       | MODE READER       | MODE-READER           | Section 5.3   |\n       | NEWNEWS           | NEWNEWS               | Section 7.4   |\n       | OVER              | OVER                  | Section 8.3   |\n       | LIST OVERVIEW.FMT | OVER                  | Section 8.4   |\n       | POST              | POST                  | Section 6.3.1 |\n       | ARTICLE           | READER                | Section 6.2.1 |\n       | BODY              | READER                | Section 6.2.3 |\n       | DATE              | READER                | Section 7.1   |\n       | GROUP             | READER                | Section 6.1.1 |\n       | LAST              | READER                | Section 6.1.3 |\n       | LISTGROUP         | READER                | Section 6.1.2 |\n       | NEWGROUPS         | READER                | Section 7.3   |\n       | NEXT              | READER                | Section 6.1.4 |\n       +-------------------+-----------------------+---------------+\nAppendix C.  Summary of Response Codes\n   This section contains a list of every response code defined in this\n   document and indicates whether it is multi-line, which commands can\n   generate it, what arguments it has, and what its meaning is.\n   Response code 100 (multi-line)\n      Generated by: HELP\n      Meaning: help text follows.\n   Response code 101 (multi-line)\n      Generated by: CAPABILITIES\n      Meaning: capabilities list follows.\n   Response code 111\n      Generated by: DATE\n      1 argument: yyyymmddhhmmss\n      Meaning: server date and time.\n   Response code 200\n      Generated by: initial connection, MODE READER\n      Meaning: service available, posting allowed.\n   Response code 201\n      Generated by: initial connection, MODE READER\n      Meaning: service available, posting prohibited.\n   Response code 205\n      Generated by: QUIT\n      Meaning: connection closing (the server immediately closes the\n      connection).\n   Response code 211\n      The 211 response code has two completely different forms,\n      depending on which command generated it:\n         (not multi-line)\n         Generated by: GROUP\n         4 arguments: number low high group\n         Meaning: group selected.\n         (multi-line)\n         Generated by: LISTGROUP\n         4 arguments: number low high group\n         Meaning: article numbers follow.\n   Response code 215 (multi-line)\n      Generated by: LIST\n      Meaning: information follows.\n   Response code 220 (multi-line)\n      Generated by: ARTICLE\n      2 arguments: n message-id\n      Meaning: article follows.\n   Response code 221 (multi-line)\n      Generated by: HEAD\n      2 arguments: n message-id\n      Meaning: article headers follow.\n   Response code 222 (multi-line)\n      Generated by: BODY\n      2 arguments: n message-id\n      Meaning: article body follows.\n   Response code 223\n      Generated by: LAST, NEXT, STAT\n      2 arguments: n message-id\n      Meaning: article exists and selected.\n   Response code 224 (multi-line)\n      Generated by: OVER\n      Meaning: overview information follows.\n   Response code 225 (multi-line)\n      Generated by: HDR\n      Meaning: headers follow.\n   Response code 230 (multi-line)\n      Generated by: NEWNEWS\n      Meaning: list of new articles follows.\n   Response code 231 (multi-line)\n      Generated by: NEWGROUPS\n      Meaning: list of new newsgroups follows.\n   Response code 235\n      Generated by: IHAVE (second stage)\n      Meaning: article transferred OK.\n   Response code 240\n      Generated by: POST (second stage)\n      Meaning: article received OK.\n   Response code 335\n      Generated by: IHAVE (first stage)\n      Meaning: send article to be transferred.\n   Response code 340\n      Generated by: POST (first stage)\n      Meaning: send article to be posted.\n   Response code 400\n      Generic response and generated by initial connection\n      Meaning: service not available or no longer available (the server\n      immediately closes the connection).\n   Response code 401\n      Generic response\n      1 argument: capability-label\n      Meaning: the server is in the wrong mode; the indicated capability\n      should be used to change the mode.\n   Response code 403\n      Generic response\n      Meaning: internal fault or problem preventing action being taken.\n   Response code 411\n      Generated by: GROUP, LISTGROUP\n      Meaning: no such newsgroup.\n   Response code 412\n      Generated by: ARTICLE, BODY, GROUP, HDR, HEAD, LAST, LISTGROUP,\n      NEXT, OVER, STAT\n      Meaning: no newsgroup selected.\n   Response code 420\n      Generated by: ARTICLE, BODY, HDR, HEAD, LAST, NEXT, OVER, STAT\n      Meaning: current article number is invalid.\n   Response code 421\n      Generated by: NEXT\n      Meaning: no next article in this group.\n   Response code 422\n      Generated by: LAST\n      Meaning: no previous article in this group.\n   Response code 423\n      Generated by: ARTICLE, BODY, HDR, HEAD, OVER, STAT\n      Meaning: no article with that number or in that range.\n   Response code 430\n      Generated by: ARTICLE, BODY, HDR, HEAD, OVER, STAT\n      Meaning: no article with that message-id.\n   Response code 435\n      Generated by: IHAVE (first stage)\n      Meaning: article not wanted.\n   Response code 436\n      Generated by: IHAVE (either stage)\n      Meaning: transfer not possible (first stage) or failed (second\n      stage); try again later.\n   Response code 437\n      Generated by: IHAVE (second stage)\n      Meaning: transfer rejected; do not retry.\n   Response code 440\n      Generated by: POST (first stage)\n      Meaning: posting not permitted.\n   Response code 441\n      Generated by: POST (second stage)\n      Meaning: posting failed.\n   Response code 480\n      Generic response\n      Meaning: command unavailable until the client has authenticated\n      itself.\n   Response code 483\n      Generic response\n      Meaning: command unavailable until suitable privacy has been\n      arranged.\n   Response code 500\n      Generic response\n      Meaning: unknown command.\n   Response code 501\n      Generic response\n      Meaning: syntax error in command.\n   Response code 502\n      Generic response and generated by initial connection\n      Meaning for the initial connection and the MODE READER command:\n      service permanently unavailable (the server immediately closes the\n      connection).\n      Meaning for all other commands: command not permitted (and there\n      is no way for the client to change this).\n   Response code 503\n      Generic response\n      Meaning: feature not supported.\n   Response code 504\n      Generic response\n      Meaning: error in base64-encoding [RFC4648] of an argument.\nAppendix D.  Changes from RFC 977\n   In general every attempt has been made to ensure that the protocol\n   specification in this document is compatible with the version\n   specified in RFC 977 [RFC977] and the various facilities adopted from\n   RFC 2980 [RFC2980].  However, there have been a number of changes,\n   some compatible and some not.\n   This appendix lists these changes.  It is not guaranteed to be\n   exhaustive or correct and MUST NOT be relied on.\n   o  A formal syntax specification (Section 9) has been added.\n   o  The default character set is changed from US-ASCII [ANSI1986] to\n      UTF-8 [RFC3629] (note that US-ASCII is a subset of UTF-8).  This\n      matter is discussed further in Section 10.\n   o  All articles are required to have a message-id, eliminating the\n      \"<0>\" placeholder used in RFC 977 in some responses.\n   o  The newsgroup name matching capabilities already documented in\n      RFC 977 (\"wildmats\", Section 4) are clarified and extended.  The\n      new facilities (e.g., the use of commas and exclamation marks) are\n      allowed wherever wildmats appear in the protocol.\n   o  Support for pipelining of commands (Section 3.5) is made\n      mandatory.\n   o  The principles behind response codes (Section 3.2) have been\n      tidied up.  In particular:\n      *  the x8x response code family, formerly used for private\n         extensions, is now reserved for authentication and privacy\n         extensions;\n      *  the x9x response code family, formerly intended for debugging\n         facilities, are now reserved for private extensions;\n      *  the 502 and 503 generic response codes (Section 3.2.1) have\n         been redefined;\n      *  new 401, 403, 480, 483, and 504 generic response codes have\n         been added.\n   o  The rules for article numbering (Section 6) have been clarified\n      (also see Section 6.1.1.2).\n   o  The SLAVE command (which was ill-defined) is removed from the\n      protocol.\n   o  Four-digit years are permitted in the NEWNEWS (Section 7.4) and\n      NEWGROUPS (Section 7.3) commands (two-digit years are still\n      permitted).  The optional distribution parameter to these commands\n      has been removed.\n   o  The LIST command (Section 7.6.1) is greatly extended; the original\n      is available as LIST ACTIVE, while new variants include\n      ACTIVE.TIMES, DISTRIB.PATS, and NEWSGROUPS.  A new \"m\" status flag\n      is added to the LIST ACTIVE response.\n   o  A new CAPABILITIES command (Section 5.2) allows clients to\n      determine what facilities are supported by a server.\n   o  The DATE command (Section 7.1) is adopted from RFC 2980\n      effectively unchanged.\n   o  The LISTGROUP command (Section 6.1.2) is adopted from RFC 2980.\n      An optional range argument has been added, and the 211 initial\n      response line now has the same format as the 211 response from the\n      GROUP command.\n   o  The MODE READER command (Section 5.3) is adopted from RFC 2980 and\n      its meaning and effects clarified.\n   o  The XHDR command in RFC 2980 has been formalised as the new HDR\n      (Section 8.5) and LIST HEADERS (Section 8.6) commands.\n   o  The XOVER command in RFC 2980 has been formalised as the new OVER\n      (Section 8.3) and LIST OVERVIEW.FMT (Section 8.4) commands.  The\n      former can be applied to a message-id as well as to a range.\n   o  The concept of article metadata (Section 8.1) has been formalised,\n      allowing the Bytes and Lines pseudo-headers to be deprecated.\n   Client authors should note in particular that lack of support for the\n   CAPABILITIES command is a good indication that the server does not\n   support this specification.\nAuthor's Address\n   Clive D.W. Feather\n   THUS plc\n   322 Regents Park Road\n   London\n   N3  2QQ\n   United Kingdom\n   Phone: +44 20 8495 6138\n   Fax:   +44 870 051 9937\n   EMail: clive@demon.net\n   URI:   http://www.davros.org/\nFull Copyright Statement\nCopyright (C) The Internet Society (2006).\n   This document is subject to the rights, licenses and restrictions\n   contained in BCP 78, and except as set forth therein, the authors\n   retain all their rights.\n   This document and the information contained herein are provided on an\n   \"AS IS\" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS\n   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET\n   ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,\n   INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE\n   INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED\n   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.\nIntellectual Property\n   The IETF takes no position regarding the validity or scope of any\n   Intellectual Property Rights or other rights that might be claimed to\n   pertain to the implementation or use of the technology described in\n   this document or the extent to which any license under such rights\n   might or might not be available; nor does it represent that it has\n   made any independent effort to identify any such rights.  Information\n   on the procedures with respect to rights in RFC documents can be\n   found in BCP 78 and BCP 79.\n   Copies of IPR disclosures made to the IETF Secretariat and any\n   assurances of licenses to be made available, or the result of an\n   attempt made to obtain a general license or permission for the use of\n   such proprietary rights by implementers or users of this\n   specification can be obtained from the IETF on-line IPR repository at\n   http://www.ietf.org/ipr.\n   The IETF invites any interested party to bring to its attention any\n   copyrights, patents or patent applications, or other proprietary\n   rights that may cover technology that may be required to implement\n   this standard.  Please address the information to the IETF at ietf-\n   ipr@ietf.org.\nAcknowledgement\n   Funding for the RFC Editor function is provided by the IETF\n   Administrative Support Activity (IASA)."
  }
]