NNTP                                                          C. Feather
Internet-Draft                                                  Thus plc
Expires: March 4, August 14, 2005                               February 10, 2005                                 September 3, 2004

                     Network News Transfer Protocol
                       draft-ietf-nntpext-base-24
                       draft-ietf-nntpext-base-25

Status of this Memo

   This document is an Internet-Draft and is subject to all provisions
   of section Section 3 of RFC 3667.  By submitting this Internet-Draft, each
   author represents that any applicable patent or other IPR claims of
   which he or she is aware have been or will be disclosed, and any of
   which he or she become aware will be disclosed, in accordance with
   RFC 3668.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as
   Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on March 4, August 14, 2005.

Copyright Notice

   Copyright (C) The Internet Society (2004). (2005).

Abstract

   The Network News Transfer Protocol (NNTP) has been in use in the
   Internet for a decade and remains one of the most popular protocols
   (by volume) in use today.  This document is a replacement for RFC 977
   and officially updates the protocol specification.  It clarifies some
   vagueness in RFC 977, includes some new base functionality, and
   provides a specific mechanism to add standardized extensions to NNTP.

Administration

   This document is a product of the NNTP Working Group, chaired by Russ
   Allbery and Ned Freed.

   This is draft 25.

Author's Note

   This document is written in XML using an NNTP-specific DTD.  Custom
   software is used to convert this to RFC 2629 [RFC2629] format, and
   then the public "xml2rfc" package to further reduce this to text,
   nroff source, and HTML.

   No perl was used in producing this document.

Rights

   UNIX is a registered trademark of The Open Group.

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . .    5    6
   2.  Notation . . . . . . . . . . . . . . . . . . . . . . . . . .    6    7
   3.  Basic Concepts . . . . . . . . . . . . . . . . . . . . . . .    8    9
     3.1   Commands and Responses . . . . . . . . . . . . . . . . .    8    9
     3.2   Response Codes . . . . . . . . . . . . . . . . . . . . .   10   11
       3.2.1   Generic Response Codes . . . . . . . . . . . . . . .   11   12
         3.2.1.1   Examples . . . . . . . . . . . . . . . . . . . .   13   14
     3.3   Capabilities and Extensions  . . . . . . . . . . . . . .   15
       3.3.1   Capability descriptions  . . . . . . . . . . . . . .   16
       3.3.2   Standard capabilities  . . . . . . . . . . . . . . .   16
       3.3.3   Extensions . . . . . . . . . . . . . . . . . . . . .   18
       3.3.4   Initial IANA register  . . . . . . . . . . . . . . .   19
     3.4   Mandatory and Optional Commands  . . . . . . . . . . . .   20
       3.4.1   Reading and Transit Servers  . . . . . . . . . . . .   21
       3.4.2   Mode switching . . . . . . . . . . . . . . . . . . .   22
     3.5   Pipelining . . . . . . . . . . . . . . . . . . . . . . .   14
       3.3.1   23
       3.5.1   Examples . . . . . . . . . . . . . . . . . . . . . .   15
     3.4   24
     3.6   Articles . . . . . . . . . . . . . . . . . . . . . . . .   16   24
   4.  The WILDMAT format . . . . . . . . . . . . . . . . . . . . .   18   26
     4.1   Wildmat syntax . . . . . . . . . . . . . . . . . . . . .   18   26
     4.2   Wildmat semantics  . . . . . . . . . . . . . . . . . . .   18   26
     4.3   Extensions . . . . . . . . . . . . . . . . . . . . . . .   19   27
     4.4   Examples . . . . . . . . . . . . . . . . . . . . . . . .   20   27
   5.  Session administration commands  . . . . . . . . . . . . . .   21   28
     5.1   Initial Connection . . . . . . . . . . . . . . . . . . .   21   28
     5.2   MODE READER   CAPABILITIES . . . . . . . . . . . . . . . . . . . . . .   22   29
     5.3   LIST EXTENSIONS   MODE READER  . . . . . . . . . . . . . . . . . . . .   24 . .   31
     5.4   QUIT . . . . . . . . . . . . . . . . . . . . . . . . . .   26   33
   6.  Article posting and retrieval  . . . . . . . . . . . . . . .   28   35
     6.1   Group and article selection  . . . . . . . . . . . . . .   28   35
       6.1.1   GROUP  . . . . . . . . . . . . . . . . . . . . . . .   28   35
       6.1.2   LISTGROUP  . . . . . . . . . . . . . . . . . . . . .   38
       6.1.3   LAST . . . . . . . . . . . . . . . . . . . . . . . .   31
       6.1.3   39
       6.1.4   NEXT . . . . . . . . . . . . . . . . . . . . . . . .   32   40
     6.2   Retrieval of articles and article sections . . . . . . .   33   42
       6.2.1   ARTICLE  . . . . . . . . . . . . . . . . . . . . . .   34   42
       6.2.2   HEAD . . . . . . . . . . . . . . . . . . . . . . . .   37   45
       6.2.3   BODY . . . . . . . . . . . . . . . . . . . . . . . .   38   47
       6.2.4   STAT . . . . . . . . . . . . . . . . . . . . . . . .   40   48
     6.3   Article posting  . . . . . . . . . . . . . . . . . . . .   42   51
       6.3.1   POST . . . . . . . . . . . . . . . . . . . . . . . .   42   51
       6.3.2   IHAVE  . . . . . . . . . . . . . . . . . . . . . . .   44   53
   7.  Information commands . . . . . . . . . . . . . . . . . . . .   48   56
     7.1   DATE . . . . . . . . . . . . . . . . . . . . . . . . . .   48   56
     7.2   HELP . . . . . . . . . . . . . . . . . . . . . . . . . .   48   56
     7.3   NEWGROUPS  . . . . . . . . . . . . . . . . . . . . . . .   49   57
     7.4   NEWNEWS  . . . . . . . . . . . . . . . . . . . . . . . .   50   58
     7.5   Time . . . . . . . . . . . . . . . . . . . . . . . . . .   51   59
       7.5.1   Examples . . . . . . . . . . . . . . . . . . . . . .   52   60
     7.6   The LIST commands  . . . . . . . . . . . . . . . . . . .   52   60
       7.6.1   LIST ACTIVE . . . . . . . . . . . . . . . . . . . .   52
       7.6.2   LIST ACTIVE.TIMES  . . . . . . . . . . . . . . . . .   54
       7.6.3   61
       7.6.2   Standard LIST DISTRIBUTIONS . . keywords . . . . . . . . . . . . . . .   56
       7.6.4   63
       7.6.3   LIST DISTRIB.PATS  . ACTIVE  . . . . . . . . . . . . . . . .   56
       7.6.5   LIST NEWSGROUPS . . . .   63
       7.6.4   LIST ACTIVE.TIMES  . . . . . . . . . . . . . .   58
   8.  Framework for NNTP extensions . . .   65
       7.6.5   LIST DISTRIB.PATS  . . . . . . . . . . . .   60
     8.1   Initial IANA registry . . . . .   66
       7.6.6   LIST NEWSGROUPS  . . . . . . . . . . . .   62
     8.2   Standard extensions . . . . . .   66
   8.  Article field access commands  . . . . . . . . . . . .   62
     8.3   The LISTGROUP extension . . .   68
     8.1   Article metadata . . . . . . . . . . . . .   62
       8.3.1   LISTGROUP . . . . . . .   68
       8.1.1   The :bytes metadata item . . . . . . . . . . . . . .   62
     8.4   Article   68
       8.1.2   The :lines metadata item . . . . . . . . . . . . . .   69
     8.2   Database consistency . . . . . .   64
       8.4.1   The :bytes metadata item . . . . . . . . . . . . . .   65
       8.4.2   The :lines metadata item . . .   69
     8.3   OVER . . . . . . . . . . .   65
     8.5   The OVER extension . . . . . . . . . . . . . . .   70
     8.4   LIST OVERVIEW.FMT  . . . .   65
       8.5.1   OVER . . . . . . . . . . . . . . .   74
     8.5   HDR  . . . . . . . . .   66
       8.5.2   LIST OVERVIEW.FMT . . . . . . . . . . . . . . . . .   70   75
     8.6   The HDR extension   LIST HEADERS . . . . . . . . . . . . . . . . . . .   72
       8.6.1   HDR . . .   79
   9.  Augmented BNF Syntax for NNTP  . . . . . . . . . . . . . . .   83
     9.1   Commands . . . . . .   72
       8.6.2   LIST HEADERS . . . . . . . . . . . . . . . . . .   83
     9.2   Command continuation . .   76
   9.  Augmented BNF Syntax for NNTP . . . . . . . . . . . . . . .   79
     9.1   Commands .   85
     9.3   Responses  . . . . . . . . . . . . . . . . . . . . . . .   79
     9.2   Command continuation   85
       9.3.1   Generic responses  . . . . . . . . . . . . . . . . .   85
       9.3.2   Initial response line contents .   81
     9.3   Responses . . . . . . . . . .   86
       9.3.3   Multi-line response contents . . . . . . . . . . . .   87
     9.4   Capability lines .   81
       9.3.1   Generic responses . . . . . . . . . . . . . . . . .   81
       9.3.2   Initial response line contents . .   88
     9.5   LIST variants  . . . . . . . . .   82
       9.3.3   Multi-line response contents . . . . . . . . . . . .   82
     9.4   LIST EXTENSIONS responses   88
     9.6   Articles . . . . . . . . . . . . . . .   84
     9.5   Articles . . . . . . . . .   89
     9.7   General non-terminals  . . . . . . . . . . . . . . .   84
     9.6   General non-terminals . .   90
     9.8   Extensions and Validation  . . . . . . . . . . . . . . .   84   91
   10.   IANA Considerations  . . . . . . . . . . . . . . . . . . .   87   93
   11.   Security Considerations  . . . . . . . . . . . . . . . . .   88   94
     11.1  Personal and Proprietary Information . . . . . . . . . .   88   94
     11.2  Abuse of Server Log Information  . . . . . . . . . . . .   88   94
     11.3  Weak Authentication and Access Control . . . . . . . . .   88   94
     11.4  DNS Spoofing . . . . . . . . . . . . . . . . . . . . . .   89   95
     11.5  UTF-8 issues . . . . . . . . . . . . . . . . . . . . . .   89   95
     11.6  Caching of LIST EXTENSIONS results capability lists  . . . . . . . . . . .   90 . . .   96
   12.   Acknowledgements . . . . . . . . . . . . . . . . . . . . .   92   98
   13.   References . . . . . . . . . . . . . . . . . . . . . . . .   94  100
     13.1  Normative References . . . . . . . . . . . . . . . . . . .   94  100
     13.2  Informative References . . . . . . . . . . . . . . . . . .   94  100
       Author's Address . . . . . . . . . . . . . . . . . . . . . .   95  101
   A.  Future Directions  Interaction with other specifications  . . . . . . . . . . .  102
     A.1   Header folding . . . . . . . . . .   96
   B.  Interaction with other specifications . . . . . . . . . . .   97
     B.1   Header folding  102
     A.2   Message-IDs  . . . . . . . . . . . . . . . . . . . . .   97
     B.2   Message-IDs .  102
     A.3   Article posting  . . . . . . . . . . . . . . . . . . . .  103
   B.  Summary of Commands  .   97
     B.3   Article posting . . . . . . . . . . . . . . . . . . . .   98  105
   C.  Summary of Response Codes  . . . . . . . . . . . . . . . . .  100
   D.  Formal specification of the standard extensions  . . . . . .  104
     D.1   The LISTGROUP extension  . . . . . . . . . . . . . . . .  104
     D.2   The OVER extension . . . . . . . . . . . . . . . . . . .  104
     D.3   The HDR extension  . . . . . . . . . . . . . . . . . . .  105  108
       Intellectual Property and Copyright Statements . . . . . . .  106  112

1.  Introduction

   This document specifies the Network News Transfer Protocol (NNTP),
   which is used for the distribution, inquiry, retrieval, and posting
   of Netnews articles using a reliable stream-based mechanism.  For
   news reading clients, NNTP enables retrieval of news articles that
   are stored in a central database, giving subscribers the ability to
   select only those articles they wish to read.

   The Netnews model provides for indexing, cross-referencing, and
   expiration of aged messages.  For server-to-server interaction,  NNTP is designed for efficient
   transmission of Netnews articles over a reliable full duplex
   communication channel.

   Every attempt is made to ensure that the protocol specification in
   this document is compatible with the version specified in RFC 977
   [RFC977].  However, this version does not support the ill-defined
   SLAVE command and permits four digit years to be specified in the
   NEWNEWS and NEWGROUPS commands.  It changes the default character set
   to UTF-8 [RFC3629] instead of US-ASCII [ANSI1986] (note that US-ASCII
   is a subset of UTF-8).  It now requires all articles to have a
   message-id, eliminating the "<0>" placeholder used in RFC 977 in some
   responses.  It also extends the newsgroup name matching capabilities
   already documented in RFC 977.

   Generally, new functionality is made available using new commands.  A
   number of such commands (including some commands taken from RFC 2980
   [RFC2980]) are now mandatory.  Part of the new functionality involves
   a mechanism to discover what new functionality is available to
   clients from a server.  This mechanism can also be used to add more
   functionality as needs merit such additions.

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in RFC 2119 [RFC2119].

   An implementation is not compliant if it fails to satisfy one or more
   of the MUST requirements for this protocol.  An implementation that
   satisfies all the MUST and all the SHOULD requirements for its
   protocols is said to be "unconditionally compliant"; one that
   satisfies all the MUST requirements but not all the SHOULD
   requirements for NNTP is said to be "conditionally compliant".

   For the remainder of this document, the term "client" or "client
   host" refers to a host making use of the NNTP service, while the term
   "server" or "server host" refers to a host that offers the NNTP
   service.

2.  Notation

   The following notational conventions are used in this document.

     UPPERCASE     indicates literal text to be included in the
                   command;
     lowercase     indicates a token described elsewhere;
     [brackets]    indicate that the argument is optional;
     ellipsis...   indicates that the argument may be repeated any
                   number of times (it must occur at least once);
     vertical|bar  indicates a choice of two mutually exclusive
                   arguments (exactly one must be provided).

   The name "message-id" for a command or response argument indicates
   that it is the message-id of an article as described in Section 3.4, 3.6,
   including the angle brackets.

   The name "wildmat" for an argument indicates that it is a wildmat as
   defined in Section 4.  If the argument does not meet the requirements
   of that section (for example, if it does not fit the grammar of
   Section 4.1) the NNTP server MAY place some interpretation on it (not
   specified by this document) or otherwise MUST treat it as a syntax
   error.

   Responses for each command will be described in tables listing the
   required format of a response followed by the meaning that should be
   ascribed to that response.

   The terms "NUL", "TAB", "LF", "CR, and "space" refer to the octets
   %x00, %x09, %x0A, %x0D, and %x20 respectively (that is, the octets
   with those codes in US-ASCII [ANSI1986] and thus UTF-8 [RFC3629]).
   The term "CRLF" or "CRLF pair" means the sequence CR immediately
   followed by LF (that is, %x0D.0A).  A "printable US-ASCII character"
   is an octet in the range %x21-7E.  Quoted characters refer to the
   octets with those codes in US-ASCII (so "." and "<" refer to %x2E and
   %x3C) and will always be printable US-ASCII characters; similarly,
   "digit" refers to the octets %x30-39.

   A "keyword" MUST consist only of US-ASCII letters, digits, and the
   characters dot (".") and dash ("-"), and must begin with a letter.
   Keywords MUST be at least three characters and MUST NOT exceed 12
   characters.

   Examples in this document are not normative but serve to illustrate
   usages, arguments, and responses.  In the examples, a "[C]" will be
   used to represent the client host and a "[S]" will be used to
   represent the server host.  Most of the examples do not rely on a
   particular server state.  In some cases, however, they do assume that
   the current selected newsgroup (see the GROUP command
   (Section 6.1.1)) is invalid; when so, this is indicated at the start
   of the example.  Examples may use commands (or or other names) keywords not
   defined in this specification (such as an XENCRYPT command).  These
   will be used to illustrate some point and do not imply that any such
   command is defined elsewhere or needs to exist in any particular
   implementation.

   Terms which might be read as specifying details of a client or server
   implementation, such as "database", are used simply to ease
   description.  Providing that implementations conform to the protocol
   and format specifications in this document, no specific technique is
   mandated.

3.  Basic Concepts

3.1  Commands and Responses

   NNTP operates over any reliable data stream 8-bit-wide channel.
   Initially, the server host starts the NNTP service by listening on a
   TCP port; when running over TCP/IP, the official port for the NNTP
   service is 119. port.  When a client host wishes to make use of the service, it
   MUST establish a TCP connection with the server host by connecting to
   that host on the same port on which the server is listening.  When
   the connection is established, the NNTP server host MUST send a
   greeting.  The client host and server host then exchange commands and
   responses (respectively) until the connection is closed or aborted.

   The character set for all NNTP commands is UTF-8 [RFC3629].  Commands
   in NNTP MUST consist of a keyword, which MAY be followed by one or
   more arguments.  A CRLF pair MUST terminate all commands.  Multiple
   commands MUST NOT be on the same line.  Keywords MUST consist of
   printable US-ASCII characters.  Unless otherwise noted
   elsewhere in this document, arguments SHOULD consist of printable
   US-ASCII characters.  Keywords and arguments MUST be each separated
   by one or more space or TAB characters.  Keywords MUST be at least three
   characters and MUST NOT exceed 12 characters.  Command lines MUST NOT
   exceed 512 octets, which includes the terminating CRLF pair.  The
   arguments MUST NOT exceed 497 octets.  A server MAY relax these
   limits for commands defined in an extension.

   Where this specification permits UTF-8 characters outside the range
   U+0000 to U+007F, implementations MUST NOT use the Byte Order Mark
   (U+FEFF, encoding %xEF.BB.BF), and MUST use the Word Joiner (U+2060,
   encoding %xE2.91.A0) for the meaning Zero Width No-Break Space, in
   command lines and the initial lines of responses, and SHOULD apply
   these same principles throughout.

   The term "character" means a single Unicode code point and
   implementations are not required to carry out normalisation.  Thus
   U+0084 (A-dieresis) is one character while U+0041 U+0308 (A composed
   with dieresis) is two; the two need not be treated as equivalent.

   Commands may have variants, using a second keyword immediately after
   the first to indicate which variant is required.  The only such
   commands in this specification are LIST and MODE.  Note that such
   variants are sometimes referred to as if they were commands in their
   own right: "the LIST ACTIVE" command should be read as shorthand for
   "the ACTIVE variant of the LIST command".

   Keywords are case-insensitive; the case of keywords for commands MUST
   be ignored by the server.  Command and response arguments are case-
   or language-specific only when stated, either in this document or in
   other relevant specifications.

   An NNTP server MUST implement all the commands in this specification
   except for those marked as optional and those in extensions.

   Each response MUST start with a three-digit response code that is
   sufficient to distinguish all responses.  Certain valid responses are
   defined to be multi-line; for all others, the response is contained
   in a single line.  The first or only line of the response MUST NOT
   exceed 512 octets, which includes the response code and the
   terminating CRLF pair; an extension MAY specify a greater maximum for
   commands that it defines, but not for any other command.

   All multi-line responses MUST adhere to the following format:
   1.  The response consists of a sequence of one or more "lines", each
       being a stream of octets ending with a CRLF pair.  Apart from
       those line endings, the stream MUST NOT include the octets NUL,
       LF, or CR.
   2.  The first such line contains the response code as with a single
       line response.
   3.  If any subsequent line begins with the "termination octet" ("."
       or %x2E), that line MUST be "byte-stuffed" by pre-pending an
       additional termination octet to that line of the response.
   4.  The lines of the response MUST be followed by a terminating line
       consisting of a single termination octet followed by a CRLF pair
       in the normal way.  Thus a multi-line response is always
       terminated with the five octets CRLF "." CRLF (%x0D.0A.2E.0D.0A).
   5.  When interpreting a multi-line response, the "byte-stuffing" MUST
       be undone; i.e.  the client MUST ensure that, in any line
       beginning with the termination octet followed by octets other
       than a CRLF pair, that initial termination octet is disregarded.
   6.  Likewise, the terminating line ("." CRLF or %x2E.0D.0A) MUST NOT
       be considered part of the multi-line response; i.e.  the client
       MUST ensure that any line beginning with the termination octet
       followed immediately by a CRLF pair is disregarded; (the first
       CRLF pair of the terminating CRLF "." CRLF is, of course, part of
       the last line of the response).

   Note that texts using an encoding (such as UTF-16 or UTF-32) that may
   contain the octets NUL, LF, or CR other than a CRLF pair cannot be
   reliably conveyed in the above format (that is, they violate the MUST
   requirement above).  However, except when stated otherwise, this
   specification does not require the content to be UTF-8 and therefore
   it MAY include octets above and below 128 mixed arbitrarily.

   This document does not place any limit on the length of a subsequent
   line in a multi-line response.  However, the standards that define
   the format of articles may do so.

   An NNTP server MAY have an inactivity autologout timer.  Such a timer
   SHOULD be of at least three minutes duration, with the exception that
   there MAY be a shorter limit on how long the server is willing to
   wait for the first command from the client.  The receipt of any
   command from the client during the timer interval SHOULD suffice to
   reset the autologout timer.  Similarly, the receipt of any
   significant amount of data from the client while in the midst of
   sending a multi-line message to the server (such as during a POST or
   IHAVE command) SHOULD suffice to reset the autologout timer.  When
   the timer expires, the server SHOULD close the TCP connection without
   sending any response to the client.

3.2  Response Codes

   Each response MUST begin with a three-digit status indicator.  These
   are status reports from the server and indicate the response to the
   last command received from the client.

   The first digit of the response broadly indicates the success,
   failure, or progress of the previous command:
      1xx - Informative message.
      2xx - Command completed OK.
      3xx - Command OK so far; send the rest of it.
      4xx - Command was syntactically correct but failed for some
      reason.
      5xx - Command unknown, unsupported, unavailable, or syntax error.

   The next digit in the code indicates the function response category:
      x0x - Connection, set-up, and miscellaneous messages
      x1x - Newsgroup selection
      x2x - Article selection
      x3x - Distribution functions
      x4x - Posting
      x8x - Reserved for authentication and privacy extensions
      x9x - Reserved for private use (non-standard extensions)

   Certain responses contain arguments such as numbers and names in
   addition to the status indicator.  In those cases, to simplify
   interpretation by the client the number and type of such arguments is
   fixed for each response code, as is whether or not the code
   introduces a multi-line response.  Any extension MUST follow this
   principle as well, but note well.  Note that, for historical reasons, the 211
   response code is an exception to this in that the response may be
   multi-line or not depending on the command (GROUP or LISTGROUP) that
   generated it.  In all other cases, the client MUST only use the
   status indicator itself to determine the nature of the response.  The
   exact response codes that can be returned by any given command are
   detailed in the description of that command.

   Arguments MUST be separated from the numeric status indicator and
   from each other by a single space.  All numeric arguments MUST be in
   base 10 (decimal) format, and MAY have leading zeros.  String
   arguments MUST contain at least one character and MUST NOT contain
   TAB, LF, CR, or space.  The server MAY add any text after the
   response code or last argument as appropriate, and the client MUST
   NOT make decisions based on this text.  Such text MUST be separated
   from the numeric status indicator or the last argument by at least
   one space.

   The server MUST respond to any command with the appropriate generic
   response (given in Section 3.2.1) if it represents the situation.
   Otherwise, each recognized command MUST return one of the response
   codes specifically listed in its description or in an extension.  A
   server MAY provide extensions to this specification, including new
   commands, new variants or features of existing commands, and other
   ways of changing the internal state of the server.  However, the
   server MUST NOT produce any other responses to a client that does not
   invoke any of the additional features.  (Therefore a client that
   restricts itself to this specification will only receive the
   responses that are listed.)

   If a client receives an unexpected response, it SHOULD use the first
   digit of the response to determine the result.  For example, an
   unexpected 2xx should be taken as success and an unexpected 4xx or
   5xx as failure.

   Response codes not specified in this document MAY be used for any
   installation-specific additional commands also not specified.  These
   SHOULD be chosen to fit the pattern of x9x specified above.

   Neither this document nor any registered extension (see
   Section 8) 3.3.3) will specify any response codes of the x9x pattern.
   (Implementers of extensions are accordingly cautioned not to use such
   responses for extensions that may subsequently be submitted for
   registration.)

3.2.1  Generic Response Codes

   The server MUST respond to any command with the appropriate one of
   the following generic responses if it represents the situation.

   If the command is not recognized, or it is an optional command or
   extension that
   is not implemented by the server, the response code 500 MUST be
   returned.

   If there is a syntax error in the arguments of a recognized command,
   including the case where more arguments are provided than the command
   specifies or the command line is longer than the server accepts, the
   response code 501 MUST be returned.  The line MUST NOT be truncated
   or split and then interpreted.  Note that where a command has
   variants depending on a second keyword (e.g.  LIST ACTIVE and LIST
   NEWSGROUPS), then 501 MUST be used when the base command is
   implemented but the requested variant is not, and 500 MUST be used
   only when the base command itself is not implemented.

   As a special case, if an argument is required to be a base64-encoded
   string [RFC3548] (there are no such arguments in this specification,
   but there may be in extensions) and is not validly encoded, the
   response code 504 MUST be returned.

   If the server experiences an internal fault or problem that means it
   is unable to carry out the command (for example, a necessary file is
   missing or a necessary service could not be contacted), the response
   code 403 MUST be returned.  If the server recognizes the command but
   does not provide an optional feature (for example because it does not
   store the required information), or only handles a subset of
   legitimate cases (see the HDR command (Section 8.6.1) 8.5) for an example),
   the response code 503 MUST be returned.  Note that where a
   command is optional (e.g.  LIST ACTIVE.TIMES) and is not provided by
   a server, this MAY be treated as an unimplemented command (response
   code 500 or 501 as appropriate) or as a working command where the
   information is not available (response code 503).

   If the client is not authorized to use the specified facility when
   the server is in its current state, then the appropriate one of the
   following response codes MUST be used.
   502: it is necessary to terminate the connection and start a new one
      with the appropriate authority before the command can be used.
      Historically, some mode-switching servers (see Section 3.4.1) have
      used this response to indicate that this command will become
      available after the MODE READER (Section 5.3) command is used, but
      this usage is not conforming to this specification and MUST NOT be
      used.  Note that the server MUST NOT close the TCP connection
      immediately after a 502 response except at the initial connection
      (Section 5.1) and with the MODE READER (Section 5.2) command.  See also the
      latter command for historical usage of this response.
   480: the client must authenticate itself to the server (that is,
      provide information as to the identity of the client) before the
      facility can be used on this connection.  This will involve the
      use of an authentication extension such as [NNTP-AUTH].
   483: the client must negotiate appropriate privacy protection on the
      connection.  This will involve the use of a privacy extension such
      as [NNTP-TLS].
   401: the client must change the state of the connection in some other
      manner.  The first argument of the response MUST be the
      extension-label capability
      label (see Section 8) 5.2) of the extension (which facility (usually an extension,
      which may be a private extension) that provides the necessary mechanism, or
      "MODE-READER" if it is necessary to
      mechanism.  The server MUST NOT use this response code except as
      specified by the MODE READER (Section
      5.2) command. definition of the capability in question.

   If the server has to terminate the connection for some reason, it
   MUST give a 400 response code to the next command and then
   immediately close the TCP connection.  Following a 400 response,
   clients SHOULD NOT simply reconnect immediately and retry the same
   actions.  Rather, a client SHOULD either use an exponentially
   increasing delay between retries (e.g.  double the waiting time after
   each 400 response) or present any associated text to the user for
   them to decide whether and when to retry.

   The client MUST be prepared to receive any of these responses for any
   command (except, of course, that the server MUST NOT generate a 500
   response code for mandatory commands).

3.2.1.1  Examples

   Example of an unknown command:
      [C] MAIL
      [S] 500 Unknown command

   Example of an unsupported extension: command:
      [C] LIST EXTENSIONS CAPABILITIES
      [S] 202 Extensions supported: 101 Capability list:
      [S] VERSION 2
      [S] READER LISTGROUP
      [S] LIST ACTIVE NEWSGROUPS
      [S] .
      [C] OVER
      [S] 500 Unknown command

   Example of an unsupported variant:
      [C] MODE POSTER
      [S] 501 Unknown MODE option

   Example of a syntax error:
      [C] ARTICLE   a.message.id@no.angle.brackets
      [S] 501 Syntax error

   Example of an overlong command line:
      [C] HEAD   53 54 55
      [S] 501 Too many arguments

   Example of a bad wildmat:
      [C] LIST ACTIVE   u[ks].*
      [S] 501 Syntax error

   Example of a base64-encoding error (the second argument is meant to
   be base64-encoded):
      [C] XENCRYPT   RSA abcd=efg
      [S] 504 Base64 encoding error

   Example of an attempt to access a facility not available to this
   connection:
      [C] MODE READER
      [S] 200 Reader mode, posting permitted
      [C] IHAVE   <i.am.an.article.you.will.want@example.com>
      [S] 502 500 Permission denied

   Example of an attempt to access a facility requiring authentication:
      [C] GROUP   secret.group
      [S] 480 Permission denied
   followed by a successful attempt following such authentication:
      [C] XSECRET   fred flintstone
      [S] 290 Password for fred accepted
      [C] GROUP   secret.group
      [S] 211 5 1 20 secret.group selected

   Example of an attempt to access a facility requiring privacy:
      [C] GROUP   secret.group
      [S] 483 Secure connection required
      [C] XENCRYPT
      [Client and server negotiate encryption on the link]
      [S] 283 Encrypted link established
      [C] GROUP   secret.group
      [S] 211 5 1 20 secret.group selected

   Example of a need to change mode before using a facility:
      [C] GROUP   binary.group
      [S] 401 XHOST Not on this virtual host
      [C] XHOST   binary.news.example.org
      [S] 290 binary.news.example.org virtual host selected
      [C] GROUP   binary.group
      [S] 211 5 1 77 binary.group selected

   Example of a temporary failure:
      [C] GROUP   archive.local
      [S] 403 Archive server temporarily offline

   Example of the server needing to close down immediately:
      [C] ARTICLE   123
      [S] 400 Power supply failed, running on UPS
      [Server closes connection.]

3.3  Pipelining  Capabilities and Extensions

   Not all NNTP is designed servers provide exactly the same facilities, both
   because this specification allows variation and because servers may
   provide extensions.  A set of facilities that are related are called
   a "capability".  This specification provides a way to operate over determine what
   capabilities are available, includes a reliable bi-directional connection
   such as TCP.  Therefore, if list of standard capabilities,
   and includes a command does not depend on mechanism (the extension mechanism) for defining new
   capabilities.

3.3.1  Capability descriptions

   A client can determine the response
   to available capabilities of the previous one, it should not matter if it is sent before that
   response is received.  Doing this is called "pipelining".  However,
   certain server implementations throw away all text received from by
   using the
   client following certain commands before sending their response.  If
   this happens, pipelining will be affected because CAPABILITIES command (Section 5.2).  This returns a
   capability list, which is a list of capability lines.  Each line
   describes one available capability.

   Each capability line consists of one or more
   commands will have been ignored or misinterpreted, and the client
   will tokens, which MUST be matching the wrong responses to each command.  Since there
   are significant benefits to pipelining, but also circumstances where
   it
   separated by one or more space or TAB characters.  A token is reasonable a
   string of 1 or common for servers to behave in more printable UTF-8 characters (that is, either
   printable US-ASCII characters or any UTF-8 sequence outside the above manner,
   this document puts certain requirements on both clients and servers.

   Except where
   US-ASCII range, but not space or TAB).  Unless stated otherwise,
   tokens are case-insensitive.  Each capability line consists of:
   o  The capability label, which is a client MAY use pipelining.  That is,
   it keyword indicating the
      capability.  A capability label may send be defined by this
      specification or a command before receiving the response for successor, or may be defined by an extension.
   o  The label is then followed by zero or more tokens, which are
      arguments of the previous
   command. capability.  The server MUST allow pipelining form and MUST NOT throw away
   any text received after a command.  Irrespective meaning of whether or not
   pipelining these tokens
      is used, the specific to each capability.

   The server MUST process commands in ensure that the order
   they are sent. capability list accurately reflects
   the capabilities (including extensions) currently available.  If a
   capability is only available with the specific description of server in a command says it "MUST NOT be
   pipelined", that command MUST end any pipeline of commands.  That is, certain state (for
   example, only after authentication), the client list MUST NOT send any following command until receiving the
   CRLF at only include the end
   capability label when in that state.  Similarly, if only some of the response from the command.  The server MAY
   ignore any data received after the command and before the CRLF at
   commands in an extension will be available, or if the
   end behaviour of
   the response is sent extension will change in some other manner, according to the client.

   The initial connection must not be part
   state of a pipeline; that is, the
   client server, this MUST NOT send any command until receiving the CRLF at be indicated by different arguments in
   the end capability line.

   Note that a capability line can only begin with a letter.  Lines
   beginning with other characters are reserved for future versions of
   this specification.  In order to inter-work with such versions,
   clients MUST be prepared to receive lines beginning with other
   characters and MUST ignore any they do not understand.

3.3.2  Standard capabilities

   The following capabilities are defined by this specification.

   VERSION
      This capability MUST be advertised by all servers and MUST be the greeting.

   If
      first capability in the client uses blocking system calls to send commands, capability list; it MUST
   ensure that indicates the amount
      version(s) of text sent in pipelining does not cause NNTP that the server supports.  There must be at
      least one argument; each argument is a
   deadlock between transmission decimal number and reception. MUST NOT
      have a leading zero.  Version numbers are assigned only in RFCs
      which update or replace this specification; servers MUST NOT
      create their own version numbers.

      The amount version number of text
   involved will depend on window sizes in the transmission layer, and this specification is typically 4k octets for TCP.  (Since 2.

   IHAVE
      This capability indicates that the server only sends data in
   response to commands from implements the client, IHAVE
      command.

   READER
      This capability indicates that the converse problem does not
   occur.)

3.3.1  Examples

   Example of correct use of pipelining:
      [C] GROUP   misc.test
      [C] STAT
      [C] NEXT
      [S] 211 1234 3000234 3002322 misc.test
      [S] 223 3000234 <45223423@example.com> retrieved
      [S] 223 3000237 <668929@example.org> retrieved

   Example of incorrect use of pipelining (the MODE READER server implements the various
      commands useful for reading clients.  If and only if the LISTGROUP
      command may
   not is implemented, there MUST be pipelined):
      [C] GROUP   misc.test
      [C] MODE READER
      [C] DATE
      [C] NEXT
      [S] 211 1234 3000234 3002322 misc.test
      [S] 200 Server ready, a single argument LISTGROUP.
      If and only if posting allowed
      [S] 223 3000237 <668929@example.org> retrieved
   The DATE command has been thrown away by is permitted using the server and so POST command, there is
   no 111 response to match it.

3.4  Articles

   NNTP is intended to transfer articles between clients and servers.
   For
      MUST be a single argument POST.  (These arguments may appear in
      either order.)

   LIST
      This capability indicates that the purposes server implements at least one
      variant of this specification, articles are required to
   conform to the rules in this section and clients and servers LIST command.  There MUST
   correctly process any article received from be one argument for each
      variant of the other LIST command supported by the server, giving the
      keyword for that does so.
   Note variant.

   HDR
      This capability indicates that this requirement applies only to the contents of
   communications over NNTP; it does not prevent the client or server
   from subsequently rejecting an article for reasons of local policy.
   Also see Appendix B for further restrictions on implements the format of
   articles in some uses of NNTP.

   An article consists of two parts: header
      access commands (HDR and LIST HEADERS).

   OVER
      This capability indicates that the headers server implements the overview
      access commands (OVER and LIST OVERVIEW.FMT).  If and only if the body.  They are
   separated by
      server supports the message-id form of the OVER command, there
      must be a single empty line, or in other words argument MSGID.

   IMPLEMENTATION
      This capability MAY be provided by two
   consecutive CRLF pairs (if there is more than one empty line, a server.  If so, the
   second arguments
      SHOULD be used to provide information such as the server software
      name and subsequent ones are part version number.  The client MUST NOT use this line to
      determine capabilities of the body).  In order server.  (While servers often
      provide this information in the initial greeting, clients need to meet
      guess whether this is the general requirements of NNTP, an article MUST NOT include case; this capability makes it clear
      what the
   octet NUL, MUST NOT contain information is.)

   MODE-READER
      This capability indicates that the octets LF and CR other than as part
   of a CRLF pair, server is mode-switching
      (Section 3.4.2) and MUST end with a CRLF pair.  This specification
   puts no further restrictions on the body; in particular, it MAY MODE READER command needs to be
   empty.

   The headers of an article consist of one or more header lines.  Each
   header line consists of a header name, a colon, a space, used to
      enable the header
   content, READER capability.

3.3.3  Extensions

   Although NNTP is widely and a CRLF in that order.  The name consists robustly deployed, some parts of one or more
   printable US-ASCII characters other than colon and, for the purposes
   of this specification, is not case-sensitive.  There MAY be more than
   one header line with
   Internet community might wish to extend the same name.  The content MUST NOT contain
   CRLF; it MAY be empty.  A header may NNTP service.  It must be "folded";
   emphasized that is, a CRLF
   pair may be placed before any TAB or space in the line; there MUST
   still extension to NNTP should not be some other octet between any two CRLF pairs in a header
   line.  (Note that folding considered
   lightly.  NNTP's strength comes primarily from its simplicity.
   Experience with many protocols has shown that:
      Protocols with few options tend towards ubiquity, whilst protocols
      with many options tend towards obscurity.
   This means that the header line occupies more
   than one line when displayed or transmitted; nevertheless it is still
   referred to as "a" header line.) The presence or absence each and every extension, regardless of folding
   does not affect its benefits,
   must be carefully scrutinized with respect to its implementation,
   deployment, and interoperability costs.  In many cases, the meaning cost of
   extending the header line; that is, NNTP service will likely outweigh the CRLF
   pairs introduced by folding are not considered part benefit.

   An extension is a package of the header
   content.  Header lines SHOULD NOT be folded before the space after
   the colon that follows the header name, and SHOULD include associated facilities, often but not
   always including one or more new commands.  Each extension MUST
   define at least one octet other than %x09 or %x20 between CRLF pairs.  However, if an
   article has been received from elsewhere with new capability label (this will often, but need
   not, be the name of one of these, clients
   and servers MAY transfer it these new commands).  While any additional
   capability information can normally be specified using arguments to the other without re-folding it.

   The content of a header
   that label, an extension MAY define more than one capability label.
   However, this SHOULD be in UTF-8.  However, if limited to exceptional circumstances.

   An extension is either a server
   receives an article from elsewhere that uses octets private extension or else its capabilities
   are included in the range 128
   to 255 in some other manner, IANA registry of capabilities (see Section 3.3.4)
   and it MAY pass is defined in an RFC (in which case it to is a client without
   modification.  Therefore clients MUST "registered
   extension").  Such RFCs either must be prepared to receive such
   headers and also data derived from them (e.g.  in the responses from on the OVER standards track or must
   define an IESG-approved experimental protocol.

   The definition of an extension (Section 8.5)) and MUST NOT assume that they are
   always UTF-8.  How must include:
   o  a descriptive name for the client will then process those headers,
   including identifying extension;
   o  the encoding used, is outside capability label or labels defined by the scope extension; the
      capability label of this
   document.

   Each article MUST have a unique message-id; two articles offered by
   an NNTP server registered extension MUST NOT have the same message-id.  For begin with
      "X";
   o  the purposes syntax, values, and meanings of this specification, message-ids are opaque strings that MUST meet any arguments for each
      capability label defined by the following requirements: extension;
   o  A message-id MUST begin  any new NNTP commands associated with "<" and end the extension - the names of
      commands associated with ">", and registered extensions MUST NOT
      contain begin with
      "X";
   o  the latter except at syntax and possible values of arguments associated with the end.
      new NNTP commands;
   o  A message-id MUST be between 3  the response codes and 250 octets in length. possible values of arguments for the
      responses of the new NNTP commands;
   o  A message-id MUST NOT contain octets  any new arguments the extension associates with any other than printable US-ASCII
      characters.
   Two message-ids are
      pre-existing NNTP commands;
   o  any increase in the same if and only if they consist maximum length of commands and initial
      response lines over the same
   sequence value specified in this document;
   o  a specific statement about the effect on pipelining this extension
      may have (if any);
   o  a specific statement about the circumstances when use of octets.

   This specification does not describe how this
      extension can alter the message-id contents of an article
   is determined.  If the server does not have any way to determine a
   message-id from capabilities list (other
      than the article itself, new capability labels it MUST synthesize one (this
   specification does not require defines);
   o  the article circumstances under which the extension can cause any
      pre-existing command to be changed as produce a
   result).  See also Appendix B.2.

4.  The WILDMAT format

   The WILDMAT format described here is based 401, 480, or 483 response;
   o  how the use of MODE READER on a mode-switching server interacts
      with the version first
   developed by Rich Salz [SALZ1992], which in turn was derived from extension;
   o  how support for the
   format used in extension affects the UNIX "find" command to articulate file names.  It
   was developed to provide behaviour of a uniform mechanism for matching patterns server
      and NNTP client in
   the same any other manner that the UNIX shell matches filenames.

4.1  Wildmat syntax

   A wildmat is described by the following ABNF [RFC2234] syntax (note
   that this not outlined above;
   o  formal syntax contains ambiguities and special cases as described at in Section 9.8.

   A private extension MAY or MAY NOT be included in the end):

      wildmat = wildmat-pattern *("," ["!"] wildmat-pattern)
      wildmat-pattern = 1*wildmat-item
      wildmat-item = wildmat-exact / wildmat-wild
      wildmat-exact = %x21-29 / %x2B / %x2D-3E / %x40-5A / %x5E-7E /
         UTF8-non-ascii ; exclude * , ? [ \ ]
      wildmat-wild = "*" / "?"

   UTF8-non-ascii is defined in Section 9.

   This syntax must be interpreted subject to the following rule:

   Where a wildmat-pattern is not immediately preceded by "!", capabilities
   list.  If it shall
   not is, the capability label MUST begin with "X".  A server
   MAY provide additional keywords - for new commands and also for new
   variants of existing commands - as part of a "!".

   Note: private extension.  To
   avoid the characters \ , [ and ] are not allowed in wildmats, while *
   and ? are always wildcards.  This should not be risk of a problem since clash with a future registered extension, these
   characters cannot occur in newsgroup names, which is
   keywords SHOULD begin with "X".

   If the only current
   use of wildmats.  Backslash is commonly used server advertises a capability defined by a registered
   extension, it MUST implement the extension so as to suppress fully conform
   with the special
   meaning specification (for example, it MUST implement all of characters while brackets are used to introduce sets.
   However, these usages are the
   commands that the extension describes as mandatory).  If it does not universal and interpretation of these
   characters
   implement the extension as specified, it MUST NOT list the extension
   in the context of UTF-8 strings is both potentially
   complex and differs from existing practice, so they were omitted from capabilities list under its registered name; in this specification.  A future case it
   MAY, but SHOULD NOT, provide a private extension to this specification may
   provide semantics for these characters.

4.2  Wildmat semantics

   A wildmat is tested against a string, and either matches (not listed, or does not
   match.  To do this, each constituent wildmat-pattern is matched
   against the string and the rightmost pattern that matches is
   identified.  If that wildmat-pattern is not preceded
   listed with "!", a different name) that implements part of the
   whole wildmat matches.  If it is preceded by "!", extension
   or if no
   wildmat-pattern matches, the whole wildmat does not match.

   For example, consider the wildmat "a*,!*b,*c*":
      the string "aaa" matches because the rightmost match is with "a*" implements the string "abb" does not match because commands of the rightmost match is extension with "*b"
      the string "ccb" matches because a different meaning.

   A server MUST NOT send different response codes to basic NNTP
   commands documented here or commands documented in registered
   extensions in response to the rightmost match availability or use of a private
   extension.

3.3.4  Initial IANA register

   IANA is with "*c*"
      the string "xxx" does not match because no wildmat-pattern matches

   A wildmat-pattern matches requested to maintain a string if the string can be broken into
   components, each registry of which matches the corresponding wildmat-item NNTP capability labels.
   All capability labels in the pattern; the matches must registry MUST be in the same order, keywords and the whole
   string must be used in the match. MUST NOT
   begin with X.

   The pattern is "anchored"; that
   is, the first and last characters in the string must match the first
   and last item respectively (unless that item is an asterisk matching
   zero characters).

   A wildmat-exact matches initial contents of the same character (which may be more than
   one octet in UTF-8).

   "?" matches exactly one character (which may be more than one octet).

   "*" matches zero or more characters.  It can match an empty string,
   but it cannot match a subsequence of a UTF-8 sequence that is not
   aligned to the character boundaries.

4.3  Extensions

   An NNTP server or extension MAY extend the syntax or semantics of
   wildmats provided that all wildmats that meet the requirements registry consists of these entries:

   +--------------------+-------------------------+--------------------+
   | Label              | Meaning                 | Definition         |
   +--------------------+-------------------------+--------------------+
   | AUTHINFO           | Authentication          | [NNTP-AUTH]        |
   |                    |                         |                    |
   | HDR                | Batched header          | Section 4.1 have the meaning ascribed to them by 3.3.2,     |
   |                    | retrieval               | Section 4.2.  Future
   editions of this document may also extend wildmats.

4.4  Examples

   In these examples, $ and @ are used to represent the two octets %xC2 8.5, and %xA3 respectively; $@ is thus the UTF-8 encoding for the pound
   sterling symbol, shown as # in the descriptions.

     Wildmat    Description of strings that match
       abc      the one string "abc"
       abc,def  the two strings "abc"   |
   |                    |                         | Section 8.6        |
   |                    |                         |                    |
   | IHAVE              | IHAVE command available | Section 3.3.2 and "def"
       $@       the one character string "#"
       a*       any string that begins with "a"
       a*b      any string that begins with "a"  |
   |                    |                         | Section 6.3.2      |
   |                    |                         |                    |
   | IMPLEMENTATION     | Server                  | Section 3.3.2      |
   |                    | implementation-specific |                    |
   |                    | information             |                    |
   |                    |                         |                    |
   | LIST               | LIST command variants   | Section 3.3.2 and ends with "b"
       a*,*b    any string that begins with "a" or ends with "b"
       a*,!*b   any string that begins with "a"  |
   |                    |                         | Section 7.6.1      |
   |                    |                         |                    |
   | MODE-READER        | Mode-switching server   | Section 3.4.2      |
   |                    | and does not end with
                "b"
     a*,!*b,c*  any string that begins with "a" MODE READER command |                    |
   |                    | available               |                    |
   |                    |                         |                    |
   | OVER               | Overview support        | Section 3.3.2,     |
   |                    |                         | Section 8.3, and does not end with
                "b",   |
   |                    |                         | Section 8.4        |
   |                    |                         |                    |
   | READER             | Reader commands         | Section 3.3.2      |
   |                    | available               |                    |
   |                    |                         |                    |
   | SASL               | Supported SASL          | [NNTP-AUTH]        |
   |                    | mechanisms              |                    |
   |                    |                         |                    |
   | STARTTLS           | Transport layer         | [NNTP-TLS]         |
   |                    | security                |                    |
   |                    |                         |                    |
   | STREAMING          | Streaming feeds         | [NNTP-STREAM]      |
   |                    |                         |                    |
   | VERSION            | Supported NNTP versions | Section 3.3.2      |
   +--------------------+-------------------------+--------------------+

 3.4   Mandatory and any string Optional Commands

   For a number of reasons, not all the commands in this specification
   are mandatory.  However, it is equally undesirable for every command
   to be optional, since this means that begins with "c" a client will have no matter idea what it ends with
     a*,c*,!*b  any string that begins with "a" or "c" and does not
                end with "b"
       ?a*      any string with "a" as its second character
       ??a*     any string with "a" as its third character
       *a?      any string with "a" as its penultimate character
       *a??     any string with "a"
   facilities are available.  Therefore, as its antepenultimate character

5.  Session administration a compromise, some of the
   commands

5.1  Initial Connection

5.1.1  Usage

   Responses
      200   Service available, posting allowed [1]
      201   Service available, posting prohibited [1]
      400   Service temporarily unavailable [1][2]
      502   Service permanently unavailable [1][2]
   [1] These in this specification are mandatory - they must be supported
   by all servers - while the only valid response codes for remainder are not.  The latter are then
   subdivided into groups, each indicated by a single capability label.
   o  If the initial greeting; label is included in the capability list returned by the
      server, the server MUST support all commands in that group.
   o  If the label is not return any other generic response code.
   [2] Following a 400 or 502 response included, the server MUST immediately close MAY support none or some
      of the connection.

5.1.2  Description

   There is commands, but SHOULD NOT support all of them.  In general,
      there will be no command presented by the way for a client upon initial connection to the server. determine which commands are
      supported without trying them.
   The server MUST present an appropriate response code
   as a greeting groups have been chosen to the client.  This response informs the client
   whether service is available provide useful functionality, and whether the client is permitted to
   post.

   If the
   therefore server will accept further commands authors are discouraged from the client including
   POST, the server MUST present implementing only part
   of a 200 greeting code.  If the server group.

   The description of each command will accept further commands from the client, but either indicate that it is not
   authorized to post articles
   mandatory, or will give, using the POST command, term "indicating capability", the server MUST
   present a 201 greeting code.

   Otherwise
   capability label indicating whether or not the group including this
   command is available.

   Where a server MUST present does not implement a 400 or 502 greeting command, it MUST always generate
   a 500 generic response code and then
   immediately close (or a 501 generic response code in the connection.  400 SHOULD be used if
   case of a variant of a command depending on a second keyword where
   the issue base command is recognised).  Otherwise the command MUST be fully
   implemented as specified; a server MUST NOT only temporary (for example, because partially implement
   any of load) and the client can
   expect commands in this specification.  (Client authors should
   note that some servers, not conforming to be able this specification, will
   return a 502 generic response code to connect successfully at some point in the future
   without making any changes.  502 MUST commands that are not
   implemented.)

   Note: some commands have cases that require other commands to be used if
   first.  If the client former command is not
   permitted under any circumstances to interact with implemented but the server, latter is not,
   the former MUST still generate the relevant specific response code.
   For example, if ARTICLE (Section 6.2.1) is implemented but GROUP
   (Section 6.1.1) is not, the correct response to "ARTICLE 1234"
   remains 412.

3.4.1  Reading and
   MAY be Transit Servers

   NNTP is traditionally used if in two different ways.  The first use is
   "reading", where the client fetches articles from a large store
   maintained by the server has insufficient information for immediate or later presentation to a
   user, and sends articles created by that user back to determine
   whether the issue server (an
   action called "posting") to be stored and distributed to other stores
   and users.  The second use is temporary or permanent.

5.1.3  Examples

   Example for the bulk transfer of a normal connection articles from an authorized client which then
   terminates
   one store to another.  Since the session (see Section 5.4):
      [Initial TCP connection set-up completed.]
      [S] 200 NNTP Service Ready, posting permitted
      [C] QUIT
      [S] 205 NNTP Service exits normally
      [Server closes connection.]
   Example of hosts doing this transfer tend to be
   peers in a normal connection from an authorized client network that transmit articles among one another, rather
   than end-user systems, this process is not
   permitted to post; it also immediately terminates called "peering" or "transit"
   (even so, one host is still the session:
      [Initial TCP connection set-up completed.]
      [S] 201 NNTP Service Ready, posting prohibited
      [C] QUIT
      [S] 205 NNTP Service exits normally
      [Server closes connection.]

   Example of a normal connection from an unauthorized client:
      [Initial TCP connection set-up completed.]
      [S] 502 NNTP Service permanently unavailable
      [Server closes connection.]

   Example of a connection from a client where and the server other is unable to
   provide service:
      [Initial TCP connection set-up completed.]
      [S] 400 NNTP Service temporarily unavailable
      [Server closes connection.]

5.2  MODE READER

5.2.1  Usage the server).

   In practice these two uses are so different that some server
   implementations are optimised for reading or for transit and, as a
   result, do not offer the other facility or only offer limited
   features.  Other implementations are more general and offer both.
   This specification allows for this by grouping the relevant commands
   accordingly: the IHAVE command MUST NOT be pipelined.
   Syntax is designed for transit, while the
   commands indicated by the READER capability are designed for reading
   clients.

   Except as an effect of the MODE READER
   Responses
      200   Posting allowed
      201   Posting prohibited
      400   Service temporarily unavailable [1]
      502   Service permanently unavailable [1]
   [1] Following (Section 5.3) command on a 400
   mode-switching server, once a server advertises either or 502 response both of the server
   IHAVE or READER capabilities, it MUST immediately close NOT cease to advertise them
   later in the connection.

5.2.2  Description

   MODE READER SHOULD be sent by any client that intends to use any
   command in this specification (including Section 8) other than IHAVE,
   HEAD, STAT, LIST ACTIVE, or LIST EXTENSIONS; other extensions session.

   A server MAY
   also require MODE READER provide different modes of behaviour (transit, reader,
   or a combination) to be used.  Servers MAY require that this
   command be issued before any commands other than the above are sent different client connections and MAY reject such commands until after a MODE READER command has
   been sent.  Such rejections SHOULD use response code 401 with
   argument "MODE-READER", but for historical reasons response code 502
   MAY be used, even though this situation does not meet the conditions
   for that response.

   Once MODE READER is sent, IHAVE (and any related extensions) MAY no
   longer be permitted, even if it were permitted before the MODE READER
   command.  The results of LIST EXTENSIONS MAY be different following a
   MODE READER command than prior to
   external information, such as the issuing IP address of that command.

   The server MUST return a response using the same codes as the initial
   greeting (as described in Section 5.1.1) client, to indicate its ability
   determine which mode to provide reading to any given connection.

   The official TCP port for the NNTP service is 119.  However, if a
   host wishes to offer separate servers for transit and reading
   clients, port 433 SHOULD be used for the client.  Note that transit server and 119 for
   the response need
   not be reading server.

3.4.2  Mode switching

   An implementation MAY, but SHOULD NOT, provide both transit and
   reader facilities on the same as the one presented during server but require the initial greeting.

   Servers are encouraged client to not require this command even though
   clients SHOULD send select
   which it when appropriate.  It is present wishes to support
   some news architectures that switch between modes based on whether a
   given connection use.  Such an arrangement is called a peer-to-peer connection with another
   "mode-switching" server.

   A mode-switching server or
   a news reading client.

5.2.3  Examples

   Example of use of has two modes:
   o  Transit mode, which applies after the initial connection:
      *  it MUST advertise the MODE-READER capability;
      *  it MUST NOT advertise the MODE READER command by an authorized client
   which then terminates capability.
      However, the session (see Section 5.4):
      [C] server MAY cease to advertise the MODE-READER
      capability after the client uses any command except CAPABILITIES.
   o  Reading mode, after a successful MODE READER
      [S] 200 NNTP Service Ready, posting permitted
      [C] QUIT
      [S] 205 NNTP Service exits normally
      [Server closes connection.]

   Example of use of (Section 5.3)
      command:
      *  it MUST not advertise the MODE-READER capability;
      *  it MUST advertise the READER capability;
      *  it MAY NOT advertise the IHAVE capability even if it was
         advertising it in transit mode.

   A client SHOULD only issue a MODE READER command by an authorized client
   that to a server if it is
   advertising the MODE-READER capability.  If the server does not permitted
   support CAPABILITIES (and therefore does not conform to post; this
   specification), the client MAY use the following heuristic:
   o  if the client wishes to use any "reader" commands, it also immediately terminates SHOULD use
      the
   session:
      [C] MODE READER
      [S] 201 NNTP Service Ready, posting prohibited
      [C] QUIT
      [S] 205 NNTP Service exits normally
      [Server closes connection.]

   Example of command immediately after the initial connection;
   o  otherwise it SHOULD NOT use of the MODE READER by a client not authorized command.
   In each case it should be prepared for some commands to receive
   service from be
   unavailable that would have been available if it had made the server as a news reader:
      [C] MODE READER
      [S] 502 NNTP Service permanently unavailable
      [Server closes connection.]

   Example of other
   choice.

3.5  Pipelining

   NNTP is designed to operate over a reliable bi-directional connection
   such as TCP.  Therefore, if a command does not depend on the response
   to the previous one, it should not matter if it is sent before that
   response is received.  Doing this is called "pipelining".  However,
   certain server implementations throw away all text received from any the
   client where following certain commands before sending their response.  If
   this happens, pipelining will be affected because one or more
   commands will have been ignored or misinterpreted, and the server client
   will be matching the wrong responses to each command.  Since there
   are significant benefits to pipelining, but also circumstances where
   it is
   temporarily unable reasonable or common for servers to provide news reader service:
      [C] MODE READER
      [S] 400 NNTP Service temporarily unavailable
      [Server closes connection.]

   Example of behave in the above manner,
   this document puts certain requirements on both clients and servers.

   Except where stated otherwise, a facility that requires MODE READER client MAY use pipelining.  That is,
   it may send a command before use, using receiving the
   preferred response:

      [C] GROUP   misc.test
      [S] 401 MODE-READER currently response for the previous
   command.  The server MUST allow pipelining and MUST NOT throw away
   any text received after a command.  Irrespective of whether or not
   pipelining is used, the server MUST process commands in peering mode
      [C] MODE READER
      [S] 200 NNTP Service Ready, posting permitted
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test

   Example the order
   they are sent.

   If the specific description of a facility that requires MODE READER before use, using command says it "MUST NOT be
   pipelined", that command MUST end any pipeline of commands.  That is,
   the
   historical but deprecated response: client MUST NOT send any following command until receiving the
   CRLF at the end of the response from the command.  The server MAY
   ignore any data received after the command and before the CRLF at the
   end of the response is sent to the client.

   The initial connection must not be part of a pipeline; that is, the
   client MUST NOT send any command until receiving the CRLF at the end
   of the greeting.

   If the client uses blocking system calls to send commands, it MUST
   ensure that the amount of text sent in pipelining does not cause a
   deadlock between transmission and reception.  The amount of text
   involved will depend on window sizes in the transmission layer, and
   is typically 4k octets for TCP.  (Since the server only sends data in
   response to commands from the client, the converse problem does not
   occur.)

3.5.1  Examples

   Example of correct use of pipelining:
      [C] GROUP   misc.test
      [S] 502 Not available in peering mode
      [C] MODE READER
      [S] 200 NNTP Service Ready, posting permitted STAT
      [C] GROUP   misc.test NEXT
      [S] 211 1234 3000234 3002322 misc.test
      [S] 223 3000234 <45223423@example.com> retrieved
      [S] 223 3000237 <668929@example.org> retrieved

   Example of a facility that cannot be used after incorrect use of pipelining (the MODE READER:
      [C] IHAVE   <i.am.an.article.you.have@example.com>
      [S] 435 Duplicate READER command may
   not be pipelined):
      [C] MODE READER
      [C] DATE
      [C] NEXT
      [S] 200 Reader mode, Server ready, posting permitted
      [C] IHAVE   <i.am.an.article.you.have@example.com> allowed
      [S] 502 Permission denied

5.3  LIST EXTENSIONS

5.3.1  Usage

   This 223 3000237 <668929@example.org> retrieved
   The DATE command is optional.
   Syntax
      LIST EXTENSIONS
   Responses
      202   Extension list follows (multiline)
      402   Server has no extensions

5.3.2  Description

   The LIST EXTENSIONS command allows a client to determine which
   extensions are supported been thrown away by the server at any given time.  See
   Section 8 for further discussion of extensions.

   This command MUST be implemented by any server that implements any
   registered extension, and so there is optional otherwise.  A server MUST NOT
   generate the generic
   no 111 response 401, 480, 483, or 502 (all of which
   indicate "not permitted") to this command.

   This command MAY be issued at anytime during a session.  It match it.

3.6  Articles

   NNTP is not
   required that the client issues this command before attempting intended to
   make use of any extension.  The response generated by this command
   MAY change during a session because of other state information (which
   in turn may be changed by transfer articles between clients and servers.
   For the effects purposes of other commands).  An NNTP
   client is only able this specification, articles are required to
   conform to get the current rules in this section and correct information
   concerning available extensions at clients and servers MUST
   correctly process any point during a session by
   issuing a LIST EXTENSIONS command at article received from the other that point of does so.
   Note that session and
   processing this requirement applies only to the response, and contents of
   communications over NNTP; it does not prevent the client or server MUST ensure that those
   extensions currently listed
   from subsequently rejecting an article for reasons of local policy.
   Also see Appendix A for further restrictions on the format of
   articles in some uses of NNTP.

   An article consists of two parts: the returned information headers and the body.  They are
   available.  Therefore, if an extension (including those in Section 8)
   is only available before or after
   separated by a MODE READER command, the LIST
   EXTENSIONS command MUST only include the extension in that situation.
   Similarly, if only some of the commands in an extension will be
   available, single empty line, or if the behaviour of the extension will change in some other manner, before or after a MODE READER command, this MUST be
   indicated words by different arguments to the extension-label in two
   consecutive CRLF pairs (if there is more than one empty line, the
   results of LIST EXTENSIONS in each situation.

   While some extensions are likely to be always available or never
   available, others will "appear"
   second and "disappear" depending on server
   state changes within subsequent ones are part of the session or external events between sessions.
   An NNTP client MAY cache body).  In order to meet
   the results general requirements of this command, but NNTP, an article MUST NOT
   rely on include the correctness of any cached results, whether from earlier
   in this session or from a previous session,
   octet NUL, MUST cope gracefully with NOT contain the cached status being out octets LF and CR other than as part
   of date, a CRLF pair, and SHOULD (if caching results)
   provide MUST end with a way to force CRLF pair.  This specification
   puts no further restrictions on the cached information to be refreshed.
   Furthermore, a client MUST NOT use cached results body; in relation to
   security, privacy, and authentication extensions.  See Section 11.6
   for further discussion of this topic. particular, it MAY be
   empty.

   The list headers of an article consist of one or more header lines.  Each
   header line consists of extensions is returned as a multi-line response following
   the 202 response code.  Each extension is listed on header name, a separate line; colon, a space, the line MUST begin with an extension-label and optionally one or
   more arguments (separated by one or more spaces).  The
   extension-label header
   content, and the meaning of the arguments are specified as
   part of the definition of the extension.  The extension-label is a
   string of 1 to 12 US-ASCII letters and MUST be CRLF in uppercase (that is,
   %x41-5A).  Arguments are strings that order.  The name consists of 1 one or more
   printable UTF-8
   characters (that is, either printable US-ASCII characters or any
   UTF-8 sequence outside other than colon and, for the US-ASCII range, but purposes
   of this specification, is not space or TAB). case-sensitive.  There MAY be more than
   one header line with the same name.  The server content MUST NOT list the same extension twice contain
   CRLF; it MAY be empty.  A header may be "folded"; that is, a CRLF
   pair may be placed before any TAB or space in the response, line; there MUST list all supported registered extensions, and SHOULD list all
   supported private extensions.  The order
   still be some other octet between any two CRLF pairs in which a header
   line.  (Note that folding means that the extensions are
   listed header line occupies more
   than one line when displayed or transmitted; nevertheless it is not significant. still
   referred to as "a" header line.) The server need presence or absence of folding
   does not even consistently
   return affect the same order.  If meaning of the server does header line; that is, the CRLF
   pairs introduced by folding are not support any
   extensions, it MUST return an empty list.  The 402 response code is
   documented for historic reasons only; clients SHOULD handle it
   gracefully, but servers MUST NOT generate it.

   Following a generic failure response, such as 403, an extension might
   still considered part of the header
   content.  Header lines SHOULD NOT be available, and folded before the client space after
   the colon that follows the header name, and SHOULD include at least
   one octet other than %x09 or %x20 between CRLF pairs.  However, if an
   article has been received from elsewhere with one of these, clients
   and servers MAY attempt transfer it to use the other without re-folding it.

5.3.3  Examples

   Example of a successful response:
      [C] LIST EXTENSIONS
      [S] 202 Extensions supported:
      [S] OVER MSGID
      [S] HDR
      [S] LISTGROUP
      [S] .

   The particular extensions shown here are simply examples content of what
   might a header SHOULD be defined in other places, and no particular meaning should be
   attributed to them.

   Example where no extensions are available:
      [C] LIST EXTENSIONS
      [S] 202 Extensions supported:
      [S] .

   Example from UTF-8.  However, if a non-conforming server which indicates "no extensions
   available" using the 402 response code:
      [C] LIST EXTENSIONS
      [S] 402 Server has no extensions

5.4  QUIT

5.4.1  Usage

   Syntax
      QUIT
   Responses
      205   Connection closing

5.4.2  Description

   The client
   receives an article from elsewhere that uses octets in the QUIT command range 128
   to terminate the session.  The
   server MUST acknowledge the QUIT command and then close the
   connection 255 in some other manner, it MAY pass it to the client.  This is the preferred method for a client without
   modification.  Therefore clients MUST be prepared to indicate receive such
   headers and also data derived from them (e.g.  in the responses from
   the OVER (Section 8.3) command) and MUST NOT assume that it has finished all its transactions with they are
   always UTF-8.  How the NNTP
   server.

   If a client simply disconnects (or will then process those headers,
   including identifying the connection times out or some
   other fault occurs), encoding used, is outside the scope of this
   document.

   Each article MUST have a unique message-id; two articles offered by
   an NNTP server MUST gracefully cease its attempts to
   service NOT have the client, disconnecting from its same message-id.  For the purposes
   of this specification, message-ids are opaque strings that MUST meet
   the following requirements:
   o  A message-id MUST begin with "<" and end if necessary.

   The server with ">", and MUST NOT generate any response code to
      contain the QUIT command latter except at the end.
   o  A message-id MUST be between 3 and 250 octets in length.
   o  A message-id MUST NOT contain octets other than 205 or, if any arguments printable US-ASCII
      characters.
   Two message-ids are provided, 501.

5.4.3  Examples

      [C] QUIT
      [S] 205 closing connection
      [Server closes connection.]

6.  Article posting the same if and retrieval

   News reading clients have available a variety only if they consist of mechanisms to
   retrieve articles via NNTP.  The news articles are stored and indexed
   using three types the same
   sequence of keys.  One key is octets.

   This specification does not describe how the message-id of an article.
   Another key article
   is composed of determined.  If the newsgroup name and server does not have any way to determine a
   message-id from the article number
   within that newsgroup.  That key itself, it MUST be unique to a particular
   server (there will be only synthesize one article with that number within a
   particular newsgroup), but is (this
   specification does not required to be globally unique.
   Additionally, because require the same article can be cross-posted to
   multiple newsgroups, there may be multiple keys that point to the
   same article on the same server. changed as a
   result).  See also Appendix A.2.

4.  The final key WILDMAT format

   The WILDMAT format described here is based on the arrival
   timestamp, giving the time that the article arrived at the server.

   The server MUST ensure that article numbers are issued version first
   developed by Rich Salz [SALZ1992], which in order of
   arrival timestamp; that is, articles arriving later MUST have higher
   numbers than those that arrive earlier.  The server SHOULD allocate turn was derived from the next sequential unused number to each new article.

   Article numbers MUST lie between 1 and 4,294,967,295 inclusive.  The
   client and server MAY use leading zeroes
   format used in specifying article
   numbers, but MUST NOT use more than 16 digits.  In some situations, the value zero replaces an article number UNIX "find" command to show some special
   situation.

6.1  Group and article selection

   The following commands are used articulate file names.  It
   was developed to set provide a uniform mechanism for matching patterns in
   the "current selected
   newsgroup" and same manner that the "current article number", which are used UNIX shell matches filenames.

4.1  Wildmat syntax

   A wildmat is described by
   various commands.  At the start of following ABNF [RFC2234] syntax, which
   is an NNTP session, both of these
   values are set to the special value "invalid".

6.1.1  GROUP

6.1.1.1  Usage

   Syntax
      GROUP group
   Responses
      211 number low high group   Group successfully selected
      411                         No such newsgroup
   Parameters
      group  = name of newsgroup
      number = estimated number extract of articles that in the group
      low    = reported low water mark
      high Section 9.7.

     wildmat = reported high water mark

6.1.1.2  Description

   The required argument wildmat-pattern *("," ["!"] wildmat-pattern)
     wildmat-pattern = 1*wildmat-item
       ; must not begin with "!" if not immediately preceded by "!"
     wildmat-item = wildmat-exact / wildmat-wild
     wildmat-exact = %x21-29 / %x2B / %x2D-3E / %x40-5A / %x5E-7E /
          UTF8-non-ascii ; exclude * , ? [ \ ]
     wildmat-wild = "*" / "?"

   Note: the characters \ , [ and ] are not allowed in wildmats, while *
   and ? are always wildcards.  This should not be a problem since these
   characters cannot occur in newsgroup names, which is the name only current
   use of the newsgroup wildmats.  Backslash is commonly used to be selected
   (e.g.  "news.software.b").  A list of valid newsgroups may be
   obtained by using the LIST ACTIVE command (see Section 7.6.1).

   The successful selection response will return suppress the article numbers special
   meaning of
   the first characters while brackets are used to introduce sets.
   However, these usages are not universal and last articles interpretation of these
   characters in the group at the moment context of selection
   (these numbers are referred UTF-8 strings is both potentially
   complex and differs from existing practice, so they were omitted from
   this specification.  A future extension to as the "reported low water mark" this specification may
   provide semantics for these characters.

4.2  Wildmat semantics

   A wildmat is tested against a string, and either matches or does not
   match.  To do this, each constituent <wildmat-pattern> is matched
   against the "reported high water mark"), string and an estimate of the number of
   articles in the group currently available. rightmost pattern that matches is
   identified.  If the group that <wildmat-pattern> is not empty, preceded with "!", the estimate MUST be at least the actual
   number of articles available, and MUST be
   whole wildmat matches.  If it is preceded by "!", or if no greater than one more
   than
   <wildmat-pattern> matches, the difference between whole wildmat does not match.

   For example, consider the reported low and high water marks.
   (Some implementations will actually count wildmat "a*,!*b,*c*":
      the number of articles
   currently stored.  Others will just subtract string "aaa" matches because the low water mark from rightmost match is with "a*"
      the high water mark and add one to get an estimate.)

   If string "abb" does not match because the group rightmost match is empty, one of the following three situations will
   occur.  Clients MUST accept all three cases; servers MUST NOT
   represent an empty group in any other way.
   o  The high water mark will be one less than
      with "*b"
      the low water mark, and string "ccb" matches because the estimated article count will be zero.  Servers SHOULD use this
      method to show an empty group.  This rightmost match is with "*c*"
      the only time that string "xxx" does not match because no <wildmat-pattern>
      matches
   A <wildmat-pattern> matches a string if the
      high water mark string can be less than broken into
   components, each of which matches the low water mark.
   o  All three numbers will be zero.
   o  The high water mark is greater than or equal to corresponding <wildmat-item> in
   the low water
      mark.  The estimated article count might pattern; the matches must be zero or non-zero; if
      non-zero, in the same requirements apply as for a non-empty group.

   The set of articles order, and the whole
   string must be used in a group may change after the GROUP command match.  The pattern is
   carried out.  That is:
   o  articles may be removed from "anchored"; that
   is, the group
   o  articles may be reinstated first and last characters in the group with the same article
      number, but those articles MUST have numbers no less than string must match the
      reported low water mark (note first
   and last item respectively (unless that this item is a reinstatement of the
      previous article, not a new article reusing an asterisk matching
   zero characters).

   A <wildmat-exact> matches the number)
   o  new articles same character (which may be added with article numbers greater more than the
      reported high water mark (if an article that was the
   one with the
      highest number has been removed and the high water mark adjusted
      accordingly, the next new article will not have the number octet in UTF-8).

   "?" matches exactly one
      greater character (which may be more than the reported high water mark)

   Except when the group is one octet).

   "*" matches zero or more characters.  It can match an empty and all three numbers are zero,
   whenever string,
   but it cannot match a subsequent GROUP command for the same newsgroup subsequence of a UTF-8 sequence that is issued,
   either by not
   aligned to the same client character boundaries.

4.3  Extensions

   An NNTP server or a different client, the reported low
   water mark in extension MAY extend the response MUST be no less than that in any previous
   response for that newsgroup in any session, and SHOULD be no less
   than syntax or semantics of
   wildmats provided that in any previous response for all wildmats that newsgroup ever sent to
   any client.  Any failure to meet the latter condition SHOULD be
   transient only.  The client may make use requirements of
   Section 4.1 have the low water mark meaning ascribed to
   remove all remembered information about articles with lower numbers,
   as these will never recur.  This includes the situation when the high
   water mark is one less than the low water mark.  No similar
   assumption can be made about the high water mark, as this can
   decrease if an article is removed, and then increase again if it is
   reinstated or if new articles arrive.

   When a valid group is selected them by means Section 4.2.  Future
   editions of this command, the current
   selected newsgroup MUST be set document may also extend wildmats.

4.4  Examples

   In these examples, $ and @ are used to that group represent the two octets %xC2
   and %xA3 respectively; $@ is thus the current article
   number MUST be set to UTF-8 encoding for the first article pound
   sterling symbol, shown as # in the group.  If an empty
   newsgroup is selected, descriptions.

     Wildmat    Description of strings that match
       abc      the current article pointer is made invalid.
   If an invalid group is specified, one string "abc"
       abc,def  the current selected newsgroup two strings "abc" and
   current article number MUST NOT be changed.

   The GROUP command (or "def"
       $@       the LISTGROUP command, if implemented) MUST be
   used by a client one character string "#"
       a*       any string that begins with "a"
       a*b      any string that begins with "a" and a successful response received before ends with "b"
       a*,*b    any other
   command is used string that depends on the value of the current selected
   newsgroup begins with "a" or current article number.

   If the group specified is ends with "b"
       a*,!*b   any string that begins with "a" and does not available on the server, a 411 response end with
                "b"
     a*,!*b,c*  any string that begins with "a" and does not end with
                "b", and any string that begins with "c" no matter
                what it ends with
     a*,c*,!*b  any string that begins with "a" or "c" and does not
                end with "b"
       ?a*      any string with "a" as its second character
       ??a*     any string with "a" as its third character
       *a?      any string with "a" as its penultimate character
       *a??     any string with "a" as its antepenultimate character

5.  Session administration commands

5.1  Initial Connection

5.1.1  Usage

   This command MUST NOT be returned.

6.1.1.3  Examples

   Example pipelined.
   Responses
      200   Service available, posting allowed [1]
      201   Service available, posting prohibited [1]
      400   Service temporarily unavailable [1][2]
      502   Service permanently unavailable [1][2]
   [1] These are the only valid response codes for the initial greeting;
      the server MUST not return any other generic response code.
   [2] Following a group known 400 or 502 response the server MUST immediately close
      the connection.

5.1.2  Description

   There is no command presented by the client upon initial connection
   to the server:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test

   Example for server.  The server MUST present an appropriate response code
   as a group unknown greeting to the server:
      [C] GROUP   example.is.sob.bradner.or.barber
      [S] 411 example.is.sob.bradner.or.barber client.  This response informs the client
   whether service is unknown

   Example of an empty group using available and whether the preferred response:
      [C] GROUP   example.currently.empty.newsgroup
      [S] 211 0 4000 3999 example.currently.empty.newsgroup

   Example of an empty group using an alternative response:
      [C] GROUP   example.currently.empty.newsgroup
      [S] 211 0 0 0 example.currently.empty.newsgroup

   Example of an empty group using a different alternative response:
      [C] GROUP   example.currently.empty.newsgroup
      [S] 211 0 4000 4321 example.currently.empty.newsgroup

6.1.2  LAST

6.1.2.1  Usage

   Syntax
      LAST
   Responses
      223 n message-id   Article found
      412                No newsgroup selected
      420                Current article number client is invalid
      422                No previous article in this group
   Parameters
      n          = article number
      message-id = article message-id

6.1.2.2  Description permitted to
   post.

   If the current selected newsgroup is valid, server will accept further commands from the current article
   number client including
   POST, the server MUST be set to present a 200 greeting code.  If the previous article in that newsgroup (that
   is, server
   will accept further commands from the highest existing article number less than client, but it is not
   authorized to post articles using the current article
   number).  If successful, POST command, the server MUST
   present a response indicating 201 greeting code.

   Otherwise the new current
   article number server MUST present a 400 or 502 greeting code and then
   immediately close the message-id of that article MUST connection.  400 SHOULD be returned.
   No article text used if the issue is sent in response
   only temporary (for example, because of load) and the client can
   expect to this command.

   There MAY be no previous article able to connect successfully at some point in the group, although future
   without making any changes.  502 MUST be used if the current
   article number client is not
   permitted under any circumstances to interact with the reported low water mark.  There MUST NOT server, and
   MAY be
   a previous article when the current article number is used if the reported
   low water mark.

   Because articles can be removed and added, the results of multiple
   LAST and NEXT commands MAY not be consistent over the life of a
   particular NNTP session.

   If server has insufficient information to determine
   whether the current article number issue is already the first article of temporary or permanent.

   Note: the
   newsgroup, a 422 response MUST be returned.  If distinction between the current article
   number is invalid, a 420 200 and 201 response MUST codes has
   turned out in practice to be returned.  If insufficient; for example, some servers
   do not allow posting until the current
   selected newsgroup is invalid, client has authenticated, while other
   clients assume that a 412 201 response MUST means that posting will never be returned.  In
   all three cases
   possible even after authentication.  Therefore clients SHOULD use the current selected newsgroup and current article
   number MUST NOT be altered.

6.1.2.3
   CAPABILITIES command (Section 5.2) rather than rely on this response.

5.1.3  Examples

   Example of a successful article retrieval using LAST:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] NEXT normal connection from an authorized client which then
   terminates the session (see Section 5.4):
      [Initial TCP connection set-up completed.]
      [S] 223 3000237 <668929@example.org> retrieved 200 NNTP Service Ready, posting permitted
      [C] LAST QUIT
      [S] 223 3000234 <45223423@example.com> retrieved 205 NNTP Service exits normally
      [Server closes connection.]

   Example of a normal connection from an attempt authorized client that is not
   permitted to retrieve an article without having selected
   a group (via post; it also immediately terminates the GROUP command) first:
      [Assumes current selected newsgroup is invalid.] session:
      [Initial TCP connection set-up completed.]
      [S] 201 NNTP Service Ready, posting prohibited
      [C] LAST QUIT
      [S] 412 no newsgroup selected

   Example of an attempt to retrieve an article using the LAST command
   when the current article number is that 205 NNTP Service exits normally
      [Server closes connection.]

   Example of the first article in the
   group:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] LAST a normal connection from an unauthorized client:
      [Initial TCP connection set-up completed.]
      [S] 422 No previous article to retrieve 502 NNTP Service permanently unavailable
      [Server closes connection.]

   Example of an attempt to retrieve an article using the LAST command
   when a connection from a client where the current selected newsgroup server is empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] LAST unable to
   provide service:
      [Initial TCP connection set-up completed.]
      [S] 420 No current article selected

6.1.3  NEXT

6.1.3.1 400 NNTP Service temporarily unavailable
      [Server closes connection.]

5.2  CAPABILITIES

5.2.1  Usage

   This command is mandatory.
   Syntax
      NEXT
      CAPABILITIES [keyword]
   Responses
      223 n message-id   Article found
      412                No newsgroup selected
      420                Current article number is invalid
      421                No next article in this group
      101   Capability list follows (multiline)
   Parameters
      n          = article number
      message-id
      keyword = article message-id

6.1.3.2 additional feature, see description

5.2.2  Description

   If the current selected newsgroup is valid, the current article
   number MUST be set

   The CAPABILITIES command allows a client to determine the next article in that newsgroup (that is,
   the lowest existing article number greater than the current article
   number).  If successful, a response indicating
   capabilities of the new current
   article number and server at any given time.

   This command MAY be issued at any time; the message-id of that article server MUST NOT require
   it to be returned.
   No article text is sent issued in response order to this command.

   If the current article number is already the last article make use of the
   newsgroup, a 421 any capability.  The response MUST be returned.  In all other aspects
   (apart,
   generated by this command MAY change during a session because of course, from
   other state information (which in turn may be changed by the lack effects
   of 422 response) this command other commands or by external events).  An NNTP client is
   identical only
   able to get the LAST command (Section 6.1.2).

6.1.3.3  Examples

   Example of current and correct information concerning available
   capabilities at any point during a successful article retrieval using NEXT:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] NEXT
      [S] 223 3000237 <668929@example.org> retrieved

   Example session by issuing a CAPABILITIES
   command at that point of an attempt to retrieve an article without having selected that session and processing the response.

   The capability list is returned as a group (via multi-line response following
   the GROUP command) first:
      [Assumes current selected newsgroup 101 response code.  Each capability is invalid.]
      [C] NEXT
      [S] 412 no newsgroup selected

   Example of an attempt to retrieve an article using described by a separate
   capability line.  The server MUST NOT list the NEXT command
   when same capability twice
   in the current article number is response, even with different arguments.  Except that of the last article in
   VERSION capability MUST be the
   group:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] STAT   3002322
      [S] 223 3002322 <411@example.net> retrieved
      [C] NEXT
      [S] 421 No next article to retrieve

   Example of an attempt to retrieve an article using first line, the NEXT command
   when order in which the current selected newsgroup
   capability lines appears is empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] NEXT
      [S] 420 No current article selected

6.2  Retrieval of articles and article sections

   The ARTICLE, BODY, HEAD, and STAT commands are very similar.  They
   differ only in not significant; the parts of server need not even
   consistently return the article that same order.

   While some capabilities are presented likely to be always available or never
   available, others - notably extensions - will appear and disappear
   depending on server state changes within the session or external
   events between sessions.  An NNTP client and in MAY cache the successful response code.  The ARTICLE command is
   described here in full, while results of
   this command, but MUST NOT rely on the other commands are described correctness of any cached
   results, whether from earlier in
   terms this session or from a previous
   session, MUST cope gracefully with the cached status being out of
   date, and SHOULD (if caching results) provide a way to force the differences.  As specified
   cached information to be refreshed.  Furthermore, a client MUST NOT
   use cached results in relation to security, privacy, and
   authentication extensions.  See Section 3.4, an article
   consists 11.6 for further discussion
   of two parts: this topic.

   The keyword argument is not used by this specification.  It is
   provided so that extensions or revisions to this specification can
   include extra features for this command without requiring the article headers and
   CAPABILITIES command to be used twice (once to determine if the article body.
   When responding extra
   features are available and a second time to one make use of these commands, them).  If
   the server MUST present does not recognise the
   entire article or appropriate part and MUST NOT attempt to alter or
   translate argument (and it in any way.

6.2.1  ARTICLE

6.2.1.1  Usage

   Syntax
      ARTICLE message-id
      ARTICLE number
      ARTICLE
   Responses
      First form (message-id specified)
         220 0|n message-id   Article follows (multiline)
         430                  No article with that message-id
      Second form (article number specified)
         220 n message-id     Article follows (multiline)
         412                  No newsgroup selected
         423                  No article with that number
      Third form (current article number used)
         220 n message-id     Article follows (multiline)
         412                  No newsgroup selected
         420                  Current article number is invalid
   Parameters
      number     = Requested article number
      n          = Returned article number
      message-id = Article message-id

6.2.1.2  Description

   The ARTICLE command selects an article based on the arguments and
   presents a keyword), it
   MUST respond with the entire article (that is, 101 response code as if the headers, argument had been
   omitted.  If an empty line, and
   the body in that order).  The command has three forms.

   In the first form, a message-id argument is specified and the server presents
   the article with provided that message-id.  In this case, the server MUST NOT
   alter does recognise,
   it MAY use the current selected newsgroup 101 response code or current article number.  This
   is both to facilitate the presentation of articles that may MAY use some other response code
   (which will be
   referenced within another article being read, and because of the
   semantic difficulties of determining defined in the proper sequence and
   membership specification of an article that may have been cross-posted to more than
   one newsgroup.

   In the response, feature).  If the article number MUST be replaced with zero,
   except that if there
   argument is not a current selected group and the article is
   present in that group, keyword, the 501 generic response code MUST be
   returned.  The server MAY use that article number.  (The
   server is not required MUST NOT generate any other response code to determine whether the article is in the
   current selected newsgroup or, if so, what article number it has;
   the CAPABILITIES command.

5.2.3  Examples

   Example of a minimal response (a read-only server):
      [C] CAPABILITIES
      [S] 101 Capability list:
      [S] VERSION 2
      [S] READER
      [S] LIST ACTIVE NEWSGROUPS
      [S] .

   Example of a response from a server that has a range of facilities
   and also describes itself:
      [C] CAPABILITIES
      [S] 101 Capability list:
      [S] VERSION 2
      [S] READER
      [S] IHAVE
      [S] LIST ACTIVE NEWSGROUPS ACTIVE.TIMES OVERVIEW.FMT
      [S] IMPLEMENTATION INN 4.2 2004-12-25
      [S] OVER MSGID
      [S] STREAMING
      [S] XSECRET
      [S] .

   Example of a server that supports more than one version of NNTP:
      [C] CAPABILITIES
      [S] 101 Capability list:
      [S] VERSION 2 3
      [S] READER
      [S] LIST ACTIVE NEWSGROUPS
      [S] .

   Example of a client MUST always be prepared for zero attempting to be specified.) The server
   MUST NOT provide an article number unless use a feature of the CAPABILITIES
   command that number in a
   second ARTICLE the server does not support:
      [C] CAPABILITIES AUTOUPDATE
      [S] 101 Capability list:
      [S] VERSION 2
      [S] READER LISTGROUP
      [S] IHAVE
      [S] LIST ACTIVE NEWSGROUPS OVERVIEW.FMT HEADERS
      [S] OVER MSGID
      [S] HDR
      [S] .

5.3  MODE READER

5.3.1  Usage

   Indicating capability: MODE-READER
   This command immediately following this one would return MUST NOT be pipelined.
   Syntax
      MODE READER
   Responses
      200   Posting allowed
      201   Posting prohibited
      502   Reading service permanently unavailable [1]
   [1] Following a 502 response the same article.  Even if server MUST immediately close the
      connection.

5.3.2  Description

   The MODE READER command instructs a mode-switching server chooses to return article
   numbers switch
   modes, as described in these circumstances, it need not do so consistently; Section 3.4.2.

   If the server is mode-switching, it
   MAY return zero switches from its transit mode to any such command (also see
   its reader mode, indicating the STAT examples
   (Section 6.2.4.3)).

   In fact by changing the second form, an article number is specified.  If there is an
   article capability list
   accordingly, and then MUST return a 200 or 201 response with that number in the current selected newsgroup, the
   server MUST set same
   meaning as for the current article number to initial greeting (as described in Section 5.1.1);
   note that number.

   In the third form, response need not be the article indicated by same as the current article
   number one presented
   during the initial greeting.  The client MUST NOT issue MODE READER
   more than once in a session or after any security or privacy commands
   are issued.  When the current selected newsgroup MODE READER command is used.

   Note that a previously valid article number MAY become invalid if issued, the
   article has been removed.  A previously invalid article number server MAY
   become valid if
   reset its state to that immediately after the article has been reinstated, but such an article
   number MUST be no less than initial connection
   before switching mode.

   If the reported low water mark for that
   group.

   The server is not mode-switching, then:
   o  If it advertises the READER capability, it MUST NOT change return a 200 or
      201 response with the current selected newsgroup same meaning as a result
   of for the initial greeting; in
      this command.  The server case the command MUST NOT change the current article
   number except when an article number argument was provided and affect the
   article exists; server state in particular, it MUST NOT change any way.
   o  If it following an
   unsuccessful response.

   Since does not advertise the message-id is unique for each article, READER capability, it may be used by MUST return a
   client to skip duplicate displays of articles that have been posted
   more than once, or to more than one newsgroup.

   The article is returned as a multi-line response following the 220
   response code.

   If the argument is a message-id and no such article exists, a 430
      502 response MUST be returned.  If the argument is a number or is omitted and then immediately close the current selected newsgroup is invalid, a 412 response MUST be
   returned.  If connection.

5.3.3  Examples

   Example of use of the argument is MODE READER command on a number and that article transit-only server
   (which therefore does not
   exist in the current selected newsgroup, a 423 response MUST be
   returned.  If the argument is omitted and the current article number
   is invalid, a 420 response MUST be returned.

6.2.1.3  Examples providing reading facilities):
      [C] CAPABILITIES
      [S] 101 Capability list:
      [S] VERSION 2
      [S] IHAVE
      [S] .
      [C] MODE READER
      [S] 502 Transit service only
      [Server closes connection.]

   Example of a successful retrieval use of an article (using no article
   number): the MODE READER command on a server that provides
   reading facilities:
      [C] CAPABILITIES
      [S] 101 Capability list:
      [S] VERSION 2
      [S] READER LISTGROUP
      [S] LIST ACTIVE NEWSGROUPS
      [S] .
      [C] MODE READER
      [S] 200 Reader mode, posting permitted
      [C] IHAVE   <i.am.an.article.you.have@example.com>
      [S] 500 Permission denied
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
   Note that in both these situations the client SHOULD NOT use MODE
   READER.

   Example of use of the MODE READER command on a mode-switching server:
      [C] ARTICLE CAPABILITIES
      [S] 220 3000234 <45223423@example.com> 101 Capability list:
      [S] Path: pathost!demo!whitehouse!not-for-mail VERSION 2
      [S] From: "Demo User" <nobody@example.net> IHAVE
      [S] Newsgroups: misc.test MODE-READER
      [S] Subject: I am just a test article .
      [C] MODE READER
      [S] Date: 6 Oct 1998 04:38:40 -0500 200 Reader mode, posting permitted
      [C] CAPABILITIES
      [S] Organization: An Example Net, Uncertain, Texas 101 Capability list:
      [S] Message-ID: <411@example.net> VERSION 2
      [S] READER
      [S] This is just a test article. LIST ACTIVE NEWSGROUPS
      [S] STARTTLS
      [S] .
   In this case the server offers (but does not require) TLS privacy in
   its reading mode but not its transit mode.

   Example of a successful retrieval use of an article by message-id: the MODE READER command where the client is not
   permitted to post:
      [C] ARTICLE   <45223423@example.com>
      [S] 220 0 <45223423@example.com>
      [S] Path: pathost!demo!whitehouse!not-for-mail
      [S] From: "Demo User" <nobody@example.net>
      [S] Newsgroups: misc.test
      [S] Subject: I am just a test article
      [S] Date: 6 Oct 1998 04:38:40 -0500
      [S] Organization: An Example Net, Uncertain, Texas
      [S] Message-ID: <411@example.net>
      [S] MODE READER
      [S] 201 NNTP Service Ready, posting prohibited

5.4  QUIT

5.4.1  Usage

   This command is just mandatory.
   Syntax
      QUIT
   Responses
      205   Connection closing

5.4.2  Description

   The client uses the QUIT command to terminate the session.  The
   server MUST acknowledge the QUIT command and then close the
   connection to the client.  This is the preferred method for a test article.
      [S] .

   Example of an unsuccessful retrieval of an article by message-id: client
   to indicate that it has finished all its transactions with the NNTP
   server.

   If a client simply disconnects (or the connection times out or some
   other fault occurs), the server MUST gracefully cease its attempts to
   service the client, disconnecting from its end if necessary.

   The server MUST NOT generate any response code to the QUIT command
   other than 205 or, if any arguments are provided, 501.

5.4.3  Examples

      [C] ARTICLE   <i.am.not.there@example.com> QUIT
      [S] 430 No Such 205 closing connection
      [Server closes connection.]

6.  Article Found

   Example of an unsuccessful posting and retrieval

   News reading clients have available a variety of an article by number:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 news.groups
      [C] ARTICLE   300256
      [S] 423 No article with that number

   Example of an unsuccessful retrieval mechanisms to
   retrieve articles via NNTP.  The news articles are stored and indexed
   using three types of an article by number because
   no newsgroup was selected first:
      [Assumes current selected newsgroup keys.  One key is invalid.]
      [C] ARTICLE   300256
      [S] 412 No newsgroup selected

   Example the message-id of an attempt to retrieve an article when article.
   Another key is composed of the current
   selected newsgroup is empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] ARTICLE
      [S] 420 No current name and the article selected

6.2.2  HEAD

6.2.2.1  Usage

   Syntax
      HEAD message-id
      HEAD number
      HEAD
   Responses
      First form (message-id specified)
         221 0|n message-id   Headers follow (multiline)
         430                  No article with
   within that message-id
      Second form (article number specified)
         221 n message-id     Headers follow (multiline)
         412                  No newsgroup selected
         423                  No newsgroup.  That key MUST be unique to a particular
   server (there will be only one article with that number
      Third form (current article number used)
         221 n message-id     Headers follow (multiline)
         412                  No newsgroup selected
         420                  Current article number within a
   particular newsgroup), but is invalid
   Parameters
      number     = Requested article number
      n          = Returned article number
      message-id = Article message-id

6.2.2.2  Description

   The HEAD command behaves identically not required to be globally unique.
   Additionally, because the ARTICLE command except
   that, if same article can be cross-posted to
   multiple newsgroups, there may be multiple keys that point to the
   same article exists, on the response code same server.  The final key is 221 instead of 220
   and only the headers arrival
   timestamp, giving the time that the article arrived at the server.

   The server MUST ensure that article numbers are presented (the empty line separating issued in order of
   arrival timestamp; that is, articles arriving later MUST have higher
   numbers than those that arrive earlier.  The server SHOULD allocate
   the
   headers next sequential unused number to each new article.

   Article numbers MUST lie between 1 and body 4,294,967,295 inclusive.  The
   client and server MAY use leading zeroes in specifying article
   numbers, but MUST NOT be included).

6.2.2.3  Examples

   Example of a successful retrieval of use more than 16 digits.  In some situations,
   the headers of value zero replaces an article (using
   no article number):
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HEAD
      [S] 221 3000234 <45223423@example.com>
      [S] Path: pathost!demo!whitehouse!not-for-mail
      [S] From: "Demo User" <nobody@example.net>
      [S] Newsgroups: misc.test
      [S] Subject: I am just a test number to show some special
   situation.

6.1  Group and article
      [S] Date: 6 Oct 1998 04:38:40 -0500
      [S] Organization: An Example Net, Uncertain, Texas
      [S] Message-ID: <411@example.net>
      [S] .

   Example of a successful retrieval of selection

   The following commands are used to set the headers of an "current selected
   newsgroup" and the "current article number", which are used by
   message-id:
      [C] HEAD   <45223423@example.com>
      [S] 221 0 <45223423@example.com>
      [S] Path: pathost!demo!whitehouse!not-for-mail
      [S] From: "Demo User" <nobody@example.net>
      [S] Newsgroups: misc.test
      [S] Subject: I am just a test article
      [S] Date: 6 Oct 1998 04:38:40 -0500
      [S] Organization: An Example Net, Uncertain, Texas
      [S] Message-ID: <411@example.net>
      [S] .

   Example of an unsuccessful retrieval of
   various commands.  At the headers start of an article by
   message-id:
      [C] HEAD   <i.am.not.there@example.com>
      [S] 430 No Such Article Found

   Example of an unsuccessful retrieval of the headers of an article by
   number:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HEAD   300256
      [S] 423 No article with that number

   Example of an unsuccessful retrieval of the headers of an article by
   number because no newsgroup was selected first:
      [Assumes current selected newsgroup is invalid.]
      [C] HEAD   300256
      [S] 412 No newsgroup selected

   Example NNTP session, both of an attempt these
   values are set to retrieve the headers of an article when the
   current selected newsgroup is empty:
      [C] special value "invalid".

6.1.1  GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] HEAD
      [S] 420 No current article selected

6.2.3  BODY

6.2.3.1

6.1.1.1  Usage

   Indicating capability: READER
   Syntax
      BODY message-id
      BODY number
      BODY
      GROUP group
   Responses
      First form (message-id specified)
         222 0|n message-id   Body follows (multiline)
         430                  No article with that message-id
      Second form (article
      211 number specified)
         222 n message-id     Body follows (multiline)
         412                  No newsgroup low high group   Group successfully selected
         423                  No article with that number
      Third form (current article number used)
         222 n message-id     Body follows (multiline)
         412
      411                         No such newsgroup selected
         420                  Current article number is invalid
   Parameters
      number
      group  = Requested article name of newsgroup
      number
      n = Returned article estimated number
      message-id of articles in the group
      low    = Article message-id

6.2.3.2 reported low water mark
      high   = reported high water mark

6.1.1.2  Description

   The BODY command behaves identically to the ARTICLE command except
   that, if the article exists, the response code required argument is 222 instead the name of 220
   and only the body is presented (the empty line separating the headers
   and body MUST NOT newsgroup to be included).

6.2.3.3  Examples

   Example of a successful retrieval selected
   (e.g.  "news.software.b").  A list of valid newsgroups may be
   obtained by using the body of an article (using no
   article number):
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] BODY
      [S] 222 3000234 <45223423@example.com>
      [S] This is just a test article.
      [S] .

   Example of a LIST ACTIVE command (see Section 7.6.3).

   The successful retrieval of selection response will return the body of an article by
   message-id:
      [C] BODY   <45223423@example.com>
      [S] 222 0 <45223423@example.com>
      [S] This is just a test article.
      [S] .

   Example of an unsuccessful retrieval numbers of
   the body of an article by
   message-id:
      [C] BODY   <i.am.not.there@example.com>
      [S] 430 No Such Article Found

   Example first and last articles in the group at the moment of selection
   (these numbers are referred to as the "reported low water mark" and
   the "reported high water mark"), and an unsuccessful retrieval estimate of the body of an article by
   number:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] BODY   300256
      [S] 423 No article with that number

   Example of an unsuccessful retrieval of
   articles in the body of an article by
   number because no newsgroup was selected first:
      [Assumes current selected newsgroup group currently available.

   If the group is invalid.]
      [C] BODY   300256
      [S] 412 No newsgroup selected

   Example of an attempt to retrieve not empty, the body estimate MUST be at least the actual
   number of an article when articles available, and MUST be no greater than one more
   than the
   current selected newsgroup is empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] BODY
      [S] 420 No current article selected

6.2.4  STAT

6.2.4.1  Usage

   Syntax
      STAT message-id
      STAT number
      STAT
   Responses
      First form (message-id specified)
         223 0|n message-id   Article exists
         430                  No article with that message-id
      Second form (article number specified)
         223 n message-id     Article exists
         412                  No newsgroup selected
         423                  No article with that number
      Third form (current article number used)
         223 n message-id     Article exists
         412                  No newsgroup selected
         420                  Current article number is invalid
   Parameters
      number     = Requested article number
      n          = Returned article number
      message-id = Article message-id

6.2.4.2  Description

   The STAT command behaves identically to difference between the ARTICLE command except
   that, if reported low and high water marks.
   (Some implementations will actually count the article exists, it is NOT presented to number of articles
   currently stored.  Others will just subtract the client low water mark from
   the high water mark and add one to get an estimate.)

   If the response code group is 223 instead empty, one of 220.  Note that the response is following three situations will
   occur.  Clients MUST accept all three cases; servers MUST NOT multi-line.

   This command allows the client to determine whether
   represent an article
   exists, and empty group in any other way.
   o  The high water mark will be one less than the second low water mark, and third forms what its message-id is,
   without having
      the estimated article count will be zero.  Servers SHOULD use this
      method to process an arbitrary amount of text.

6.2.4.3  Examples

   Example of STAT on an existing article (using no article number):
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] STAT
      [S] 223 3000234 <45223423@example.com>

   Example of STAT on an existing article by message-id:
      [C] STAT   <45223423@example.com>
      [S] 223 0 <45223423@example.com>

   Example of STAT on show an empty group.  This is the only time that the
      high water mark can be less than the low water mark.
   o  All three numbers will be zero.
   o  The high water mark is greater than or equal to the low water
      mark.  The estimated article not on count might be zero or non-zero; if
      non-zero, the server by message-id:
      [C] STAT   <i.am.not.there@example.com>
      [S] 430 No Such Article Found

   Example same requirements apply as for a non-empty group.

   The set of STAT on an article not articles in a group may change after the server by number:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] STAT   300256
      [S] 423 No article command is
   carried out.  That is:
   o  articles may be removed from the group
   o  articles may be reinstated in the group with that number

   Example of STAT on an the same article by number when
      number, but those articles MUST have numbers no newsgroup was
   selected first:
      [Assumes current selected newsgroup is invalid.]
      [C] STAT   300256
      [S] 412 No newsgroup selected

   Example of STAT on an article when less than the current selected newsgroup
      reported low water mark (note that this is
   empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] STAT
      [S] 420 No current article selected

   Example of STAT by message-id on a server which sometimes reports reinstatement of the
   actual
      previous article, not a new article number:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] STAT
      [S] 223 3000234 <45223423@example.com>
      [C] STAT   <45223423@example.com>
      [S] 223 0 <45223423@example.com>
      [C] STAT   <45223423@example.com>
      [S] 223 3000234 <45223423@example.com>
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] STAT   <45223423@example.com>
      [S] 223 0 <45223423@example.com>
      [C] GROUP   alt.crossposts
      [S] 211 9999 111111 222222 alt.crossposts
      [C] STAT   <45223423@example.com>
      [S] 223 123456 <45223423@example.com>
      [C] STAT
      [S] 223 111111 <23894720@example.com>
   The first STAT command establishes reusing the identity of number)
   o  new articles may be added with article numbers greater than the
      reported high water mark (if an article in that was the
   group.  The second one with the
      highest number has been removed and third show that the server may, but need not,
   give high water mark adjusted
      accordingly, the next new article will not have the number one
      greater than the reported high water mark)

   Except when the message-id group is specified.  The fourth
   STAT empty and all three numbers are zero,
   whenever a subsequent GROUP command shows that zero must be specified if for the article isn't
   in same newsgroup is issued,
   either by the current selected group, same client or a different client, the fifth shows that reported low
   water mark in the number, if
   provided, must response MUST be no less than that relating to the current selected group, in any previous
   response for that newsgroup in any session, and
   the last one shows SHOULD be no less
   than that in any previous response for that newsgroup ever sent to
   any client.  Any failure to meet the current selected article is still not
   changed by the latter condition SHOULD be
   transient only.  The client may make use of STAT with a message-id even if it returns an
   article number.

6.3  Article posting

   Article posting the low water mark to
   remove all remembered information about articles with lower numbers,
   as these will never recur.  This includes the situation when the high
   water mark is done in one of two modes: individual article
   posting from news reading clients using POST, and article transfer
   from other news servers using IHAVE.

6.3.1  POST

6.3.1.1  Usage

   This command MUST NOT less than the low water mark.  No similar
   assumption can be pipelined.
   Syntax
      POST
   Responses
      Initial responses
         340   Send made about the high water mark, as this can
   decrease if an article to be posted
         440   Posting not permitted
      Subsequent responses
         240   Article received OK
         441   Posting failed

6.3.1.2  Description

   If posting is allowed, removed, and then increase again if it is
   reinstated or if new articles arrive.

   When a 340 response valid group is selected by means of this command, the current
   selected newsgroup MUST be returned set to indicate that group and the current article to be posted should
   number MUST be sent. set to the first article in the group.  If posting an empty
   newsgroup is
   prohibited for some installation-dependent reason, a 440 response
   MUST be returned. selected, the current article pointer is made invalid.
   If posting an invalid group is permitted, specified, the current selected newsgroup and
   current article number MUST NOT be in the format specified
   in changed.

   The GROUP or LISTGROUP command (see Section 3.4 and 6.1.2) MUST be sent used by the a
   client to and a successful response received before any other command is
   used that depends on the server in value of the
   manner current selected newsgroup or
   current article number.

   If the group specified (in Section 3.1) for multi-line responses (except
   that there is no initial line containing not available on the server, a 411 response code).  Thus a
   single dot (".") on
   MUST be returned.

6.1.1.3  Examples

   Example for a line indicates the end of group known to the text, and lines
   starting with server:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test

   Example for a dot in the original text have that dot doubled during
   transmission.

   Following group unknown to the presentation server:
      [C] GROUP   example.is.sob.bradner.or.barber
      [S] 411 example.is.sob.bradner.or.barber is unknown

   Example of an empty group using the termination sequence by the client,
   the server MUST return preferred response:
      [C] GROUP   example.currently.empty.newsgroup
      [S] 211 0 4000 3999 example.currently.empty.newsgroup

   Example of an empty group using an alternative response:
      [C] GROUP   example.currently.empty.newsgroup
      [S] 211 0 0 0 example.currently.empty.newsgroup

   Example of an empty group using a response indicating success or failure different alternative response:
      [C] GROUP   example.currently.empty.newsgroup
      [S] 211 0 4000 4321 example.currently.empty.newsgroup

6.1.2  LISTGROUP

6.1.2.1  Usage

   Indicating capability: READER with argument LISTGROUP
   Syntax
      LISTGROUP [group]
   Responses
      211 number low high group   Article numbers follow (multiline)
      411                         No such newsgroup
      412                         No newsgroup selected [1]
   Parameters
      group  = name of newsgroup
      number = estimated number of articles in the article transfer.  Note that group
      low    = reported low water mark
      high   = reported high water mark
   [1] The 412 response codes 340 and 440 are can only occur if no group has been specified.

6.1.2.2  Description

   The LISTGROUP command is used
   in direct response to the POST command.  Others are returned
   following the sending get a listing of all the article.

   A response of 240 SHOULD indicate that, barring unforeseen server
   errors, the posted article will be made available on
   numbers in a particular newsgroup.  As a side effect, it also selects
   the server and/
   or transferred to other servers group in the same way as appropriate, possibly following
   further processing.  In other words, articles not wanted by the
   server SHOULD GROUP command (see Section 6.1.1).

   The optional argument is the name of the newsgroup to be rejected with selected
   (e.g.  "news.software.misc").  If no group is specified, the current
   selected newsgroup is used.

   On success, the list of article numbers is returned as a 441 multi-line
   response and not accepted and
   silently discarded.  However, following the client SHOULD NOT assume that 211 response code (the arguments on the
   article has been successfully transferred unless it receives an
   affirmative
   initial response from line are the server, same as for the GROUP command).  The
   list contains one number per line, is in numerical order, and SHOULD NOT assume lists
   precisely those articles that it
   is being made available to other clients without explicitly checking
   (for example using exist in the STAT command). group at the moment of
   selection.

   If the session group specified is interrupted before not available on the server, a 411 response
   MUST be returned.  If no group is received, it specified and the current selected
   newsgroup is
   possible that an affirmative invalid, a 412 response was sent but has been lost.
   Therefore, in any subsequent session, the client SHOULD either check
   whether the article was successfully posted before resending or
   ensure that the server will allocate MUST be returned.

   In all other aspects the same message-id LISTGROUP command behaves identically to the new
   attempt (see Appendix B.2) - the latter approach is preferred since
   the article might not have been made available for reading yet (for
   example, it may have to go through a moderation process).

6.3.1.3
   GROUP command.

6.1.2.3  Examples

   Example of a successful posting: LISTGROUP on an empty group:
      [C] POST LISTGROUP   example.empty.newsgroup
      [S] 340 Input article; end with <CR-LF>.<CR-LF>
      [C] From: "Demo User" <nobody@example.net>
      [C] Newsgroups: misc.test
      [C] Subject: I am just a test article
      [C] Organization: An Example Net
      [C]
      [C] This is just a test article.
      [C] . 211 0 0 0 example.empty.newsgroup list follows
      [S] 240 Article received OK .

   Example of an unsuccessful posting: LISTGROUP on a valid current selected newsgroup:
      [C] POST GROUP   misc.test
      [S] 340 Input article; end with <CR-LF>.<CR-LF>
      [C] From: "Demo User" <nobody@example.net>
      [C] Newsgroups: 211 2000 3000234 3002322 misc.test
      [C] Subject: I am just a test article
      [C] Organization: An Example Net
      [C]
      [C] This is just a test article.
      [C] . LISTGROUP
      [S] 441 Posting failed 211 2000 3000234 3002322 misc.test list follows
      [S] 3000234
      [S] 3000237
      [S] 3000238
      [S] 3000239
      [S] 3002322
      [S] .

   Example of an attempt to post when posting LISTGROUP failing because no group has been selected:
      [Assumes current selected newsgroup is not allowed: invalid.]
      [C] MODE READER LISTGROUP
      [S] 201 NNTP Service Ready, posting prohibited 412 no current group
      [C] POST GROUP   example.is.sob.bradner.or.barber
      [S] 440 Posting not permitted

6.3.2  IHAVE

6.3.2.1 411 no such group
      [C] LISTGROUP
      [S] 412 no current group

6.1.3  LAST

6.1.3.1  Usage

   This command MUST NOT be pipelined.

   Indicating capability: READER
   Syntax
      IHAVE message-id
      LAST
   Responses
      Initial responses
         335   Send article to be transferred
         435   Article not wanted
         436   Transfer not possible; try again later
      Subsequent responses
         235
      223 n message-id   Article transferred OK
         436   Transfer failed; try again later
         437   Transfer rejected; do not retry found
      412                No newsgroup selected
      420                Current article number is invalid
      422                No previous article in this group
   Parameters
      n          = article number
      message-id = Article article message-id

6.3.2.2

6.1.3.2  Description

   The IHAVE command informs

   If the server current selected newsgroup is valid, the current article
   number MUST be set to the previous article in that newsgroup (that
   is, the client has an highest existing article
   with number less than the specified message-id. current article
   number).  If the server desires successful, a copy response indicating the new current
   article number and the message-id of that article a 335 response MUST be returned, instructing the client returned.
   No article text is sent in response to
   send the entire article.  If this command.

   There MAY be no previous article in the server does not want group, although the current
   article
   (if, for example, number is not the server already has a copy of it), a 435
   response reported low water mark.  There MUST NOT be returned, indicating that
   a previous article when the current article number is not wanted.
   Finally, if the article isn't wanted immediately but reported
   low water mark.

   Because articles can be removed and added, the client
   should retry later if possible (if, for example, another client is in results of multiple
   LAST and NEXT commands MAY not be consistent over the process life of sending a
   particular NNTP session.

   If the same current article to number is already the server), first article of the
   newsgroup, a 436 422 response MUST be returned.  If transmission of the current article
   number is requested, invalid, a 420 response MUST be returned.  If the client current
   selected newsgroup is invalid, a 412 response MUST send be returned.  In
   all three cases the
   entire article, including headers and body, in the format defined
   above (Section 3.1) for multi-line responses (except that there is no
   initial line containing a response code).  Thus a single dot (".") on
   a line indicates the end of the text, current selected newsgroup and lines starting with a dot
   in the original text have that dot doubled during transmission.  The
   server current article
   number MUST return either NOT be altered.

6.1.3.3  Examples

   Example of a 235 response, indicating that the successful article
   was successfully transferred, a 436 response, indicating that the
   transfer failed but should be tried again later, or retrieval using LAST:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] NEXT
      [S] 223 3000237 <668929@example.org> retrieved
      [C] LAST
      [S] 223 3000234 <45223423@example.com> retrieved

   Example of an attempt to retrieve an article without having selected
   a 437 response,
   indicating that group (via the GROUP command) first:
      [Assumes current selected newsgroup is invalid.]
      [C] LAST
      [S] 412 no newsgroup selected

   Example of an attempt to retrieve an article was rejected.

   This function differs from using the POST LAST command in that it is intended
   for use in transferring already-posted articles between hosts.  It
   SHOULD NOT be used
   when the client current article number is a personal news reading
   program, since use of this command indicates that of the first article has
   already been posted at another site and is simply being forwarded
   from another host.  However, despite this, the server MAY elect not
   to post or forward in the
   group:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] LAST
      [S] 422 No previous article if, after further examination of the
   article, it deems it inappropriate to do so.  Reasons for such
   subsequent rejection retrieve

   Example of an attempt to retrieve an article may include such problems as
   inappropriate newsgroups or distributions, disc space limitations, using the LAST command
   when the current selected newsgroup is empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] LAST
      [S] 420 No current article lengths, garbled headers, and selected

6.1.4  NEXT

6.1.4.1  Usage

   Indicating capability: READER
   Syntax
      NEXT
   Responses
      223 n message-id   Article found
      412                No newsgroup selected
      420                Current article number is invalid
      421                No next article in this group
   Parameters
      n          = article number
      message-id = article message-id

6.1.4.2  Description

   If the like.  These are typically
   restrictions enforced by current selected newsgroup is valid, the server host's news software and not
   necessarily current article
   number MUST be set to the NNTP server itself.

   The client SHOULD NOT assume next article in that newsgroup (that is,
   the lowest existing article has been successfully
   transferred unless it receives an affirmative response from number greater than the
   server.  A lack of response (such as a dropped network connection or current article
   number).  If successful, a network timeout) SHOULD be treated response indicating the same as a 436 response.

   Because some news server software may not new current
   article number and the message-id of that article MUST be able immediately returned.
   No article text is sent in response to
   determine whether or not an this command.

   If the current article number is suitable for posting or
   forwarding, an NNTP server MAY acknowledge already the successful transfer last article of the article (with
   newsgroup, a 235 response) but later silently discard it.

6.3.2.3  Examples

   Example of successfully sending an article 421 response MUST be returned.  In all other aspects
   (apart, of course, from the lack of 422 response) this command is
   identical to another site:
      [C] IHAVE   <i.am.an.article.you.will.want@example.com>
      [S] 335 Send it; end with <CR-LF>.<CR-LF>
      [C] Path: pathost!demo!somewhere!not-for-mail
      [C] From: "Demo User" <nobody@example.com>
      [C] Newsgroups: misc.test
      [C] Subject: I am just the LAST command (Section 6.1.3).

6.1.4.3  Examples

   Example of a test successful article retrieval using NEXT:
      [C] Date: 6 Oct 1998 04:38:40 -0500 GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] Organization: An NEXT
      [S] 223 3000237 <668929@example.org> retrieved

   Example Com, San Jose, CA
      [C] Message-ID: <i.am.an.article.you.will.want@example.com>
      [C]
      [C] This is just of an attempt to retrieve an article without having selected
   a test article. group (via the GROUP command) first:
      [Assumes current selected newsgroup is invalid.]
      [C] . NEXT
      [S] 235 Article transferred OK 412 no newsgroup selected

   Example of sending an article attempt to another site that rejects it.  Note
   that the message-id in retrieve an article using the IHAVE NEXT command is not
   when the same as current article number is that of the one last article in the article headers; while this is bad practice and SHOULD NOT be
   done, it is not forbidden.
   group:
      [C] IHAVE   <i.am.an.article.you.will.want@example.com> GROUP   misc.test
      [S] 335 Send it; end with <CR-LF>.<CR-LF>
      [C] Path: pathost!demo!somewhere!not-for-mail
      [C] From: "Demo User" <nobody@example.com>
      [C] Newsgroups: 211 1234 3000234 3002322 misc.test
      [C] Subject: I am just a test article
      [C] Date: 6 Oct 1998 04:38:40 -0500
      [C] Organization: An Example Com, San Jose, CA
      [C] Message-ID: <i.am.an.article.you.have@example.com>
      [C]
      [C] This is just a test article. STAT   3002322
      [S] 223 3002322 <411@example.net> retrieved
      [C] . NEXT
      [S] 437 Article rejected; don't send again

   Example of sending an 421 No next article to another site where retrieve

   Example of an attempt to retrieve an article using the transfer
   fails: NEXT command
   when the current selected newsgroup is empty:
      [C] IHAVE   <i.am.an.article.you.will.want@example.com> GROUP   example.empty.newsgroup
      [S] 335 Send it; end with <CR-LF>.<CR-LF>
      [C] Path: pathost!demo!somewhere!not-for-mail
      [C] From: "Demo User" <nobody@example.com>
      [C] Newsgroups: misc.test
      [C] Subject: I am just a test article
      [C] Date: 6 Oct 1998 04:38:40 -0500
      [C] Organization: An Example Com, San Jose, CA
      [C] Message-ID: <i.am.an.article.you.will.want@example.com>
      [C]
      [C] This is just a test article. 211 0 0 0 example.empty.newsgroup
      [C] . NEXT
      [S] 436 Transfer failed

   Example 420 No current article selected

6.2  Retrieval of sending an articles and article to a site that already has it:
      [C] IHAVE   <i.am.an.article.you.have@example.com>
      [S] 435 Duplicate
   Example sections

   The ARTICLE, BODY, HEAD, and STAT commands are very similar.  They
   differ only in the parts of sending an the article to a site that requests are presented to the
   client and in the successful response code.  The ARTICLE command is
   described here in full, while the article be
   tried again later:
      [C] IHAVE   <i.am.an.article.you.defer@example.com>
      [S] 436 Retry later

7.  Information commands

   This section lists other commands that may be used at any time
   between are described in
   terms of the beginning differences.  As specified in Section 3.6, an article
   consists of a session two parts: the article headers and its termination.  Using these
   commands does not alter any state information, but the response
   generated from their use may provide useful information article body.
   When responding to clients.

7.1  DATE

7.1.1  Usage

   Syntax
      DATE
   Responses
      111 yyyymmddhhmmss one of these commands, the server date and time
   Parameters
      yyyymmddHHmmss = Current UTC date MUST present the
   entire article or appropriate part and time on server

7.1.2 MUST NOT attempt to alter or
   translate it in any way.

6.2.1  ARTICLE

6.2.1.1  Usage

   Indicating capability: READER
   Syntax
      ARTICLE message-id
      ARTICLE number
      ARTICLE
   Responses
      First form (message-id specified)
         220 0|n message-id   Article follows (multiline)
         430                  No article with that message-id
      Second form (article number specified)
         220 n message-id     Article follows (multiline)
         412                  No newsgroup selected
         423                  No article with that number
      Third form (current article number used)
         220 n message-id     Article follows (multiline)
         412                  No newsgroup selected
         420                  Current article number is invalid
   Parameters
      number     = Requested article number
      n          = Returned article number
      message-id = Article message-id

6.2.1.2  Description

   This

   The ARTICLE command exists to help clients find out selects an article based on the current Coordinated
   Universal Time [TF.686-1] from arguments and
   presents the server's perspective.  This
   command SHOULD NOT be used as a substitute for NTP [RFC1305] but to
   provide information that might be useful when using entire article (that is, the NEWNEWS
   command (see Section 7.4).  A system providing NNTP service SHOULD
   keep headers, an empty line, and
   the system clock as accurate as possible, either with NTP or by
   some other method. body in that order).  The server MUST return a 111 response specifying command has three forms.

   In the date first form, a message-id is specified and time on the server in presents
   the form yyyymmddhhmmss. article with that message-id.  In this case, the server MUST NOT
   alter the current selected newsgroup or current article number.  This date and time
   is in
   Coordinated Universal Time.

7.1.3  Examples

      [C] DATE
      [S] 111 19990623135624

7.2  HELP

7.2.1  Usage

   Syntax
      HELP
   Responses
      100   Help text follows (multiline)

7.2.2  Description

   This command provides a short summary both to facilitate the presentation of commands articles that are understood
   by this implementation may be
   referenced within another article being read, and because of the server.  The help text will
   semantic difficulties of determining the proper sequence and
   membership of an article that may have been cross-posted to more than
   one newsgroup.

   In the response, the article number MUST be
   presented as replaced with zero,
   except that if there is a multiline response following current selected group and the 100 response code.

   This text article is
   present in that group, the server MAY use that article number.  (The
   server is not guaranteed required to be determine whether the article is in any particular format and the
   current selected newsgroup or, if so, what article number it has; the
   client MUST
   NOT always be used by clients as a replacement prepared for the LIST EXTENSIONS
   command described zero to be specified.) The server
   MUST NOT provide an article number unless use of that number in Section 5.3

7.2.3  Examples

      [C] HELP
      [S] 100 Help text follows
      [S] This is some help text.  There is no specific
      [S] formatting requirement for a
   second ARTICLE command immediately following this test, though
      [S] one would return
   the same article.  Even if the server chooses to return article
   numbers in these circumstances, it is customary for need not do so consistently; it
   MAY return zero to list any such command (also see the valid commands
      [S] and give a brief definition of what they do
      [S] .

7.3  NEWGROUPS

7.3.1  Usage

   Syntax
      NEWGROUPS date time [GMT]
   Responses
      231   List of new newsgroups follows (multiline)
   Parameters
      date = Date in yymmdd or yyyymmdd format
      time = Time STAT examples
   (Section 6.2.4.3)).

   In the second form, an article number is specified.  If there is an
   article with that number in hhmmss format

7.3.2  Description

   This command returns a list of newsgroups created on the server since current selected newsgroup, the specified date and time.  The results are in
   server MUST set the same format as current article number to that number.

   In the LIST ACTIVE command (see Section 7.6.1).  However, they MAY
   include groups not available on third form, the server (and so not returned article indicated by
   LIST ACTIVE) and MAY omit groups for which the creation date is not
   available.  The results SHOULD be consistent with those of current article
   number in the LIST
   ACTIVE.TIMES command (Section 7.6.2), except current selected newsgroup is used.

   Note that a previously valid article number MAY become invalid if the specified
   date and time is earlier than
   article has been removed.  A previously invalid article number MAY
   become valid if the oldest entry in article has been reinstated, but such an article
   number MUST be no less than the latter then reported low water mark for that
   group.

   The server MUST NOT change the
   results current selected newsgroup as a result
   of this command may include extra groups. command.  The date is specified as 6 or 8 digits in the format [xx]yymmdd,
   where xx is server MUST NOT change the first two digits of current article
   number except when an article number argument was provided and the year (19-99), yy is the last
   two digits of the year (00-99), mm is the month (01-12), and dd is
   the day of the month (01-31).  Clients SHOULD specify all four digits
   of the year.  If the first two digits of
   article exists; in particular, it MUST NOT change it following an
   unsuccessful response.

   Since the year are not specified
   (this message-id is supported only unique for backwards compatibility), the year is to each article, it may be taken from the current century if yy is smaller used by a
   client to skip duplicate displays of articles that have been posted
   more than once, or equal to
   the current year, otherwise the year is from the previous century. more than one newsgroup.

   The time article is specified returned as 6 digits in the format hhmmss, where hh is a multi-line response following the hours in 220
   response code.

   If the 24-hour clock (00-23), mm argument is the minutes (00-59), a message-id and ss is the seconds (00-60, to allow for leap seconds).  The token
   "GMT" specifies that no such article exists, a 430
   response MUST be returned.  If the date and time are given in Coordinated
   Universal Time [TF.686-1]; if it argument is a number or is omitted then the date
   and time
   are specified in the server's local timezone.  Note that there current selected newsgroup is no
   way using invalid, a 412 response MUST be
   returned.  If the protocol specified argument is a number and that article does not
   exist in this document to establish the
   server's local timezone.

   Note that an empty list is current selected newsgroup, a possible valid 423 response MUST be
   returned.  If the argument is omitted and indicates
   that there are no new newsgroups since that date-time.

   Clients SHOULD make all queries using Coordinated Universal Time
   (i.e.  by including the "GMT" argument) when possible.

7.3.3 current article number
   is invalid, a 420 response MUST be returned.

6.2.1.3  Examples

   Example where there are new groups: of a successful retrieval of an article (using no article
   number):
      [C] NEWGROUPS   19990624 000000 GMT GROUP   misc.test
      [S] 231 list of new newsgroups follows 211 1234 3000234 3002322 misc.test
      [C] ARTICLE
      [S] alt.rfc-writers.recovery 4 1 y 220 3000234 <45223423@example.com>
      [S] tx.natives.recovery 89 56 y Path: pathost!demo!whitehouse!not-for-mail
      [S] . From: "Demo User" <nobody@example.net>
      [S] Newsgroups: misc.test
      [S] Subject: I am just a test article
      [S] Date: 6 Oct 1998 04:38:40 -0500
      [S] Organization: An Example where there are no new groups:
      [C] NEWGROUPS   19990624 000000 GMT Net, Uncertain, Texas
      [S] 231 list of new newsgroups follows Message-ID: <411@example.net>
      [S]
      [S] This is just a test article.
      [S] .

7.4  NEWNEWS

7.4.1  Usage

   Syntax
      NEWNEWS wildmat date time [GMT]
   Responses
      230   List

   Example of new articles follows (multiline)
   Parameters
      wildmat = Newsgroups a successful retrieval of interest
      date    = Date in yymmdd or yyyymmdd format
      time    = Time in hhmmss format

7.4.2  Description an article by message-id:
      [C] ARTICLE   <45223423@example.com>
      [S] 220 0 <45223423@example.com>
      [S] Path: pathost!demo!whitehouse!not-for-mail
      [S] From: "Demo User" <nobody@example.net>
      [S] Newsgroups: misc.test
      [S] Subject: I am just a test article
      [S] Date: 6 Oct 1998 04:38:40 -0500
      [S] Organization: An Example Net, Uncertain, Texas
      [S] Message-ID: <411@example.net>
      [S]
      [S] This command returns is just a list test article.
      [S] .

   Example of message-ids an unsuccessful retrieval of articles posted or
   received on the server, in the newsgroups whose names match the
   wildmat, since the specified date and time.  One message-id is sent
   on each line; the order of the response has no specific significance
   and may vary from response to response in the same session.  A
   message-id MAY appear more than once; if it does so, it has the same
   meaning as if it appeared only once.

   Date and time are in the same format as the NEWGROUPS command (see
   Section 7.3).

   Note that an empty list is a possible valid response and indicates
   that there is currently no new news in the relevant groups.

   Clients SHOULD make all queries in Coordinated Universal Time (i.e. article by using the "GMT" argument) when possible.

7.4.3  Examples

   Example where there are new articles: message-id:

      [C] NEWNEWS   news.*,sci.* 19990624 000000 GMT ARTICLE   <i.am.not.there@example.com>
      [S] 230 list 430 No Such Article Found

   Example of new articles an unsuccessful retrieval of an article by message-id follows
      [S] <i.am.a.new.article@example.com> number:
      [C] GROUP   misc.test
      [S] <i.am.another.new.article@example.com> 211 1234 3000234 3002322 news.groups
      [C] ARTICLE   300256
      [S] . 423 No article with that number

   Example where there are of an unsuccessful retrieval of an article by number because
   no new articles: newsgroup was selected first:
      [Assumes current selected newsgroup is invalid.]
      [C] NEWNEWS   alt.* 19990624 000000 GMT ARTICLE   300256
      [S] 230 list 412 No newsgroup selected

   Example of new articles by message-id follows
      [S] .

7.5  Time

   As described in Section 6, each article has an arrival timestamp.
   Each newsgroup also has a creation timestamp.  These timestamps are
   used by the NEWNEWS and NEWGROUP commands attempt to construct their
   responses.

   The DATE command MUST return a timestamp from retrieve an article when the same clock as current
   selected newsgroup is
   used for determining empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] ARTICLE
      [S] 420 No current article arrival and group creation times. selected

6.2.2  HEAD

6.2.2.1  Usage

   This
   clock SHOULD be monotonic, and adjustments SHOULD be made by running
   it fast or slow compared to "real" time rather than by making sudden
   jumps.

   Clients can ensure that they do not have gaps in lists of articles or
   groups by using the DATE command in the following manner: is mandatory.
   Syntax
      HEAD message-id
      HEAD number
      HEAD
   Responses
      First session:
      Issue DATE command and record result
      Issue NEWNEWS command using a previously chosen timestamp
   Subsequent sessions:
      Issue DATE command and hold result in temporary storage
      Issue NEWNEWS command using timestamp saved from previous session
      Overwrite saved timestamp form (message-id specified)
         221 0|n message-id   Headers follow (multiline)
         430                  No article with that currently in temporary storage
   In order to allow for minor errors, clients MAY want message-id
      Second form (article number specified)
         221 n message-id     Headers follow (multiline)
         412                  No newsgroup selected
         423                  No article with that number
      Third form (current article number used)
         221 n message-id     Headers follow (multiline)
         412                  No newsgroup selected
         420                  Current article number is invalid
   Parameters
      number     = Requested article number
      n          = Returned article number
      message-id = Article message-id

6.2.2.2  Description

   The HEAD command behaves identically to adjust the
   timestamp back by two or three minutes before using it in NEWNEWS.

7.5.1  Examples

   First session:
      [C] DATE
      [S] 111 20010203112233
      [C] NEWNEWS   local.chat 20001231 235959 GMT
      [S] 230 list follows ARTICLE command except
   that, if the article exists, the response code is 221 instead of 220
   and only the headers are presented (the empty line separating the
   headers and body MUST NOT be included).

6.2.2.3  Examples

   Example of a successful retrieval of the headers of an article (using
   no article number):
      [C] GROUP   misc.test
      [S] <article.1@local.service> 211 1234 3000234 3002322 misc.test
      [C] HEAD
      [S] <article.2@local.service> 221 3000234 <45223423@example.com>
      [S] <article.3@local.service> Path: pathost!demo!whitehouse!not-for-mail
      [S] From: "Demo User" <nobody@example.net>
      [S] Newsgroups: misc.test
      [S] Subject: I am just a test article
      [S] Date: 6 Oct 1998 04:38:40 -0500
      [S] Organization: An Example Net, Uncertain, Texas
      [S] Message-ID: <411@example.net>
      [S] .
   Second session (the client has subtracted 3 minutes from

   Example of a successful retrieval of the
   timestamp returned previously): headers of an article by
   message-id:
      [C] DATE HEAD   <45223423@example.com>
      [S] 111 20010204003344
      [C] NEWNEWS   local.chat 20010203 111933 GMT 221 0 <45223423@example.com>
      [S] 230 list follows Path: pathost!demo!whitehouse!not-for-mail
      [S] <article.3@local.service> From: "Demo User" <nobody@example.net>
      [S] <article.4@local.service> Newsgroups: misc.test
      [S] <article.5@local.service> Subject: I am just a test article
      [S] Date: 6 Oct 1998 04:38:40 -0500
      [S] Organization: An Example Net, Uncertain, Texas
      [S] Message-ID: <411@example.net>
      [S] .
   Note how <article.3@local.service> arrived in the 3 minute gap and so
   is listed in both responses.

7.6  The LIST commands

7.6.1  LIST ACTIVE

7.6.1.1  Usage

   Syntax
      LIST ACTIVE [wildmat]
   Responses
      215   Information follows (multiline)
   Parameters
      wildmat = groups

   Example of interest

7.6.1.2  Description

   The LIST ACTIVE command with no arguments returns a list an unsuccessful retrieval of valid
   newsgroups and associated information.  The server MUST include every
   group that the client is permitted to select with the GROUP (Section
   6.1.1) command.  Each newsgroup is sent as a line headers of text in the
   following format:
   group high low status
   where:
   "group" is the name an article by
   message-id:
      [C] HEAD   <i.am.not.there@example.com>
      [S] 430 No Such Article Found

   Example of the newsgroup;
   "high" is the reported high water mark for the group;
   "low" is the reported low water mark for the group;
   "status" is the current status an unsuccessful retrieval of the group on this server.
   Each field in the line is separated from its neighbouring fields by
   one or more spaces.

   Note that headers of an empty list is a possible valid response, and indicates
   that there are currently no valid newsgroups.

   The reported high and low water marks are as described in the article by
   number:
      [C] GROUP
   command (see Section 6.1.1).

   The status field is typically one of:
   "y" posting is permitted
   "n" posting is not permitted
   "m" postings will be forwarded to the newsgroup moderator
   The server SHOULD use these values when these meanings are required
   and MUST NOT use them   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HEAD   300256
      [S] 423 No article with any other meaning.  Other values for the
   status may exist; the definition that number
   Example of these other values and the
   circumstances under which they are returned may be specified in an
   extension or may be private to unsuccessful retrieval of the server.  A client SHOULD treat headers of an
   unrecognized status as giving article by
   number because no information.

   The status of a newsgroup only indicates how posts to that was selected first:
      [Assumes current selected newsgroup
   are normally processed and is not necessarily customised to the
   specific client.  For example, if invalid.]
      [C] HEAD   300256
      [S] 412 No newsgroup selected

   Example of an attempt to retrieve the headers of an article when the
   current client selected newsgroup is forbidden
   from posting, then this will apply equally to groups empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] HEAD
      [S] 420 No current article selected

6.2.3  BODY

6.2.3.1  Usage

   Indicating capability: READER
   Syntax
      BODY message-id
      BODY number
      BODY
   Responses
      First form (message-id specified)
         222 0|n message-id   Body follows (multiline)
         430                  No article with status "y".
   Conversely, a client that message-id
      Second form (article number specified)
         222 n message-id     Body follows (multiline)
         412                  No newsgroup selected
         423                  No article with special privileges (not defined by this
   specification) might be able to post that number
      Third form (current article number used)
         222 n message-id     Body follows (multiline)
         412                  No newsgroup selected
         420                  Current article number is invalid
   Parameters
      number     = Requested article number
      n          = Returned article number
      message-id = Article message-id

6.2.3.2  Description

   The BODY command behaves identically to a group with status "n".

   If the optional wildmat argument is specified, ARTICLE command except
   that, if the article exists, the response code is
   limited to 222 instead of 220
   and only the groups (if any) whose names match the wildmat.
   If no wildmat body is specified, presented (the empty line separating the keyword ACTIVE MAY headers
   and body MUST NOT be omitted without
   altering the effect of the command.

7.6.1.3 included).

6.2.3.3  Examples

   Example of LIST ACTIVE returning a list successful retrieval of newsgroups:

      [C] LIST ACTIVE
      [S] 215 list the body of newsgroups follows
      [S] an article (using no
   article number):
      [C] GROUP   misc.test 3002322 3000234 y
      [S] comp.risks 442001 441099 m
      [S] alt.rfc-writers.recovery 4 1 y 211 1234 3000234 3002322 misc.test
      [C] BODY
      [S] tx.natives.recovery 89 56 y 222 3000234 <45223423@example.com>
      [S] tx.natives.recovery.d 11 9 n This is just a test article.
      [S] .

   The same output on

   Example of a successful retrieval of the body of an implementation that includes leading zeroes: article by
   message-id:
      [C] LIST ACTIVE
      [S] 215 list of newsgroups follows
      [S] misc.test 0003002322 0003000234 y
      [S] comp.risks 0000442001 0000441099 m
      [S] alt.rfc-writers.recovery 0000000004 0000000001 y BODY   <45223423@example.com>
      [S] tx.natives.recovery 0000000089 0000000056 y 222 0 <45223423@example.com>
      [S] tx.natives.recovery.d 0000000011 0000000009 n This is just a test article.
      [S] .

   Example of LIST ACTIVE omitting an unsuccessful retrieval of the second keyword and returning no
   newsgroups: body of an article by
   message-id:
      [C] LIST BODY   <i.am.not.there@example.com>
      [S] 215 list 430 No Such Article Found

   Example of newsgroups follows an unsuccessful retrieval of the body of an article by
   number:
      [C] GROUP   misc.test
      [S] . 211 1234 3000234 3002322 misc.test
      [C] BODY   300256
      [S] 423 No article with that number

   Example of LIST ACTIVE with a wildmat: an unsuccessful retrieval of the body of an article by
   number because no newsgroup was selected first:
      [Assumes current selected newsgroup is invalid.]
      [C] LIST ACTIVE   *.recovery BODY   300256
      [S] 215 list 412 No newsgroup selected

   Example of newsgroups follows
      [S] alt.rfc-writers.recovery 4 1 y an attempt to retrieve the body of an article when the
   current selected newsgroup is empty:
      [C] GROUP   example.empty.newsgroup
      [S] tx.natives.recovery 89 56 y 211 0 0 0 example.empty.newsgroup
      [C] BODY
      [S] .

7.6.2  LIST ACTIVE.TIMES

7.6.2.1 420 No current article selected

6.2.4  STAT

6.2.4.1  Usage
   This command is optional. mandatory.
   Syntax
      LIST ACTIVE.TIMES [wildmat]
      STAT message-id
      STAT number
      STAT
   Responses
      215   Information follows (multiline)
      First form (message-id specified)
         223 0|n message-id   Article exists
         430                  No article with that message-id
      Second form (article number specified)
         223 n message-id     Article exists
         412                  No newsgroup selected
         423                  No article with that number
      Third form (current article number used)
         223 n message-id     Article exists
         412                  No newsgroup selected
         420                  Current article number is invalid
   Parameters
      wildmat
      number     = groups of interest

7.6.2.2 Requested article number
      n          = Returned article number
      message-id = Article message-id

6.2.4.2  Description

   The active.times list is maintained by some news transfer systems STAT command behaves identically to
   contain information about who created a particular newsgroup and
   when.  Each line of this list consists of three fields separated from
   each other by one or more spaces.  The first field is the name of ARTICLE command except
   that, if the
   newsgroup.  The second article exists, it is NOT presented to the time when this group was created on
   this news server, measured in seconds since client and
   the start of January 1,
   1970.  The third response code is plain text intended to describe the entity 223 instead of 220.  Note that
   created the newsgroup; it response is often a mailbox as defined in RFC 2822
   [RFC2822].

   The list MAY omit newsgroups for which
   NOT multi-line.

   This command allows the information is unavailable client to determine whether an article
   exists, and MAY include groups not available on the server; in particular, it
   MAY omit all groups created before the date second and time third forms what its message-id is,
   without having to process an arbitrary amount of the oldest
   entry.  The client MUST NOT assume that the list is complete or that
   it matches the list returned by LIST ACTIVE.  The NEWGROUPS command
   (Section 7.3) may provide a better way to access this information and
   the results of the two commands SHOULD be consistent (subject to the
   caveats in the description of that command).

   If the information is available, it is returned as a multi-line
   response following the 215 response code.  If the optional wildmat
   argument is specified, the response is limited to only the groups (if
   any) whose names match the wildmat and for which the information is
   available.

   Note that an empty list is a possible valid response (whether or not
   a wildmat is specified) and indicates that there are no groups
   meeting the above criteria.

7.6.2.3 text.

6.2.4.3  Examples

   Example of LIST ACTIVE.TIMES returning a list of newsgroups: STAT on an existing article (using no article number):
      [C] LIST ACTIVE.TIMES
      [S] 215 information follows
      [S] GROUP   misc.test 930445408 <creatme@isc.org>
      [S] alt.rfc-writers.recovery 930562309 <m@example.com> 211 1234 3000234 3002322 misc.test
      [C] STAT
      [S] tx.natives.recovery 930678923 <sob@academ.com> 223 3000234 <45223423@example.com>

   Example of STAT on an existing article by message-id:
      [C] STAT   <45223423@example.com>
      [S] . 223 0 <45223423@example.com>

   Example of LIST ACTIVE.TIMES returning STAT on an error where the command is
   recognized but the software does article not maintain this information: on the server by message-id:
      [C] LIST ACTIVE.TIMES STAT   <i.am.not.there@example.com>
      [S] 503 program error, function not performed 430 No Such Article Found
   Example of LIST ACTIVE.TIMES sent to a server that does STAT on an article not recognize
   this command: in the server by number:
      [C] LIST ACTIVE.TIMES GROUP   misc.test
      [S] 501 Syntax Error

7.6.3  LIST DISTRIBUTIONS

7.6.3.1  Usage

   This command is optional.
   Syntax
      LIST DISTRIBUTIONS
   Responses
      215   Information follows (multiline)

7.6.3.2  Description

   The distributions list is maintained by some news transfer systems to
   contain information about valid values for the content of the
   Distribution header in a news 211 1234 3000234 3002322 misc.test
      [C] STAT   300256
      [S] 423 No article and about what the various
   values mean.  Each line of this list consists with that number

   Example of two fields separated
   from each other STAT on an article by one or more spaces.  The first field is a value
   and the second number when no newsgroup was
   selected first:
      [Assumes current selected newsgroup is a short explanation of the meaning invalid.]
      [C] STAT   300256
      [S] 412 No newsgroup selected

   Example of that value.

   If STAT on an article when the information is available, it current selected newsgroup is returned as a multi-line
   response following the 215 response code.

7.6.3.3  Examples
   empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] STAT
      [S] 420 No current article selected

   Example of LIST DISTRIBUTIONS returning STAT by message-id on a list of distributions: server which sometimes reports the
   actual article number:
      [C] LIST DISTRIBUTIONS GROUP   misc.test
      [S] 215 information follows 211 1234 3000234 3002322 misc.test
      [C] STAT
      [S] usa United States of America 223 3000234 <45223423@example.com>
      [C] STAT   <45223423@example.com>
      [S] na North America 223 0 <45223423@example.com>
      [C] STAT   <45223423@example.com>
      [S] world All over the World 223 3000234 <45223423@example.com>
      [C] GROUP   example.empty.newsgroup
      [S] .

   Example 211 0 0 0 example.empty.newsgroup
      [C] STAT   <45223423@example.com>
      [S] 223 0 <45223423@example.com>
      [C] GROUP   alt.crossposts
      [S] 211 9999 111111 222222 alt.crossposts
      [C] STAT   <45223423@example.com>
      [S] 223 123456 <45223423@example.com>
      [C] STAT
      [S] 223 111111 <23894720@example.com>
   The first STAT command establishes the identity of LIST DISTRIBUTIONS returning an error where article in the command is
   recognized
   group.  The second and third show that the server may, but need not,
   give the software does not maintain this information:
      [C] LIST DISTRIBUTIONS
      [S] 503 program error, function not performed

   Example of LIST DISTRIBUTIONS sent to a server that does not
   recognize this command:
      [C] LIST DISTRIBUTIONS
      [S] 501 Syntax Error

7.6.4  LIST DISTRIB.PATS

7.6.4.1  Usage
   This command article number when the message-id is optional.
   Syntax
      LIST DISTRIB.PATS
   Responses
      215   Information follows (multiline)

7.6.4.2  Description specified.  The distrib.pats list is maintained by some news transfer systems fourth
   STAT command shows that zero must be specified if the article isn't
   in the current selected group, the fifth shows that the number, if
   provided, must be that relating to
   choose a value for the content of current selected group, and
   the Distribution header last one shows that the current selected article is still not
   changed by the use of STAT with a news message-id even if it returns an
   article being posted.  Each line of this list consists number.

6.3  Article posting

   Article posting is done in one of three
   fields separated two ways: individual article
   posting from news reading clients using POST, and article transfer
   from each other by a colon (":").  The first field news servers using IHAVE.

6.3.1  POST

6.3.1.1  Usage

   Indicating capability: READER with argument POST
   This command MUST NOT be pipelined.
   Syntax
      POST
   Responses
      Initial responses
         340   Send article to be posted
         440   Posting not permitted
      Subsequent responses
         240   Article received OK
         441   Posting failed

6.3.1.2  Description

   If posting is allowed, a weight, 340 response MUST be returned to indicate
   that the second field article to be posted should be sent.  If posting is
   prohibited for some installation-dependent reason, a wildmat (which may 440 response
   MUST be a simple
   group name), and the third field returned.

   If posting is a value for permitted, the article MUST be in the format specified
   in Section 3.6 and MUST be sent by the Distribution
   header content.

   The client MAY use this information to construct an appropriate
   Distribution header given the name of server in the
   manner specified (in Section 3.1) for multi-line responses (except
   that there is no initial line containing a newsgroup.  To do so, it
   should determine response code).  Thus a
   single dot (".") on a line indicates the end of the text, and lines whose second field matches
   starting with a dot in the newsgroup
   name, select from among them original text have that dot doubled during
   transmission.

   Following the line with presentation of the highest weight (with 0
   being termination sequence by the lowest), and use client,
   the value server MUST return a response indicating success or failure of
   the third field article transfer.  Note that response codes 340 and 440 are used
   in direct response to construct the Distribution header.

   If the information is available, it is POST command.  Others are returned as a multi-line
   response
   following the 215 response code.

7.6.4.3  Examples

   Example of LIST DISTRIB.PATS returning a list sending of newsgroups:
      [C] LIST DISTRIB.PATS
      [S] 215 information follows
      [S] 10:local.*:local
      [S] 5:*:world
      [S] 20:local.here.*:thissite
      [S] .

   Example the article.

   A response of LIST DISTRIB.PATS returning an error where 240 SHOULD indicate that, barring unforeseen server
   errors, the command is
   recognized but posted article will be made available on the software does not maintain this information:
      [C] LIST DISTRIB.PATS
      [S] 503 program error, function not performed

   Example of LIST DISTRIB.PATS sent to a server that does
   and/or transferred to other servers as appropriate, possibly
   following further processing.  In other words, articles not recognize
   this command:
      [C] LIST DISTRIB.PATS
      [S] 501 Syntax Error

7.6.5  LIST NEWSGROUPS

7.6.5.1  Usage

   This command is optional.
   Syntax
      LIST NEWSGROUPS [wildmat]
   Responses
      215   Information follows (multiline)
   Parameters
      wildmat = groups of interest

7.6.5.2  Description

   The newsgroups list is maintained wanted by some news transfer systems to
   contain the name of each newsgroup that is available on
   the server
   and a short description about the purpose of the group.  Each line of
   this list consists of two fields separated from each other by one or
   more space or TAB characters (usual practice is a single TAB).  The
   first field is the name of the newsgroup and the second is SHOULD be rejected with a short
   description of the group.

   The list MAY omit newsgroups for which the information is unavailable 441 response and MAY include groups not available on accepted
   and silently discarded.  However, the server.  The client MUST SHOULD NOT assume that
   the list is complete or that article has been successfully transferred unless it matches the list
   returned by LIST ACTIVE.

   If receives an
   affirmative response from the information is available, server, and SHOULD NOT assume that it
   is returned as a multi-line
   response following being made available to other clients without explicitly checking
   (for example using the 215 response code. STAT command).

   If the optional wildmat
   argument session is specified, interrupted before the response is limited to only the groups (if
   any) whose names match the wildmat and for which the information received, it is
   available.

   Note
   possible that an empty list is a possible valid affirmative response (whether or not
   a wildmat is specified) and indicates that there are no groups
   meeting was sent but has been lost.
   Therefore, in any subsequent session, the above criteria.

7.6.5.3 client SHOULD either check
   whether the article was successfully posted before resending or
   ensure that the server will allocate the same message-id to the new
   attempt (see Appendix A.2) - the latter approach is preferred since
   the article might not have been made available for reading yet (for
   example, it may have to go through a moderation process).

6.3.1.3  Examples

   Example of LIST NEWSGROUPS returning a list of newsgroups: successful posting:
      [C] LIST NEWSGROUPS
      [S] 215 information follows POST
      [S] 340 Input article; end with <CR-LF>.<CR-LF>
      [C] From: "Demo User" <nobody@example.net>
      [C] Newsgroups: misc.test General Usenet testing
      [S] alt.rfc-writers.recovery RFC Writers Recovery
      [S] tx.natives.recovery Texas Natives Recovery
      [S]
      [C] Subject: I am just a test article
      [C] Organization: An Example Net
      [C]
      [C] This is just a test article.
      [C] .
      [S] 240 Article received OK

   Example of LIST NEWSGROUPS returning an error where the command unsuccessful posting:
      [C] POST
      [S] 340 Input article; end with <CR-LF>.<CR-LF>
      [C] From: "Demo User" <nobody@example.net>
      [C] Newsgroups: misc.test
      [C] Subject: I am just a test article
      [C] Organization: An Example Net
      [C]
      [C] This is
   recognized but the software does not maintain this information: just a test article.
      [C] LIST NEWSGROUPS .
      [S] 503 program error, function not performed 441 Posting failed

   Example of LIST NEWSGROUPS sent an attempt to a server that does post when posting is not recognize
   this command: allowed:
      [Initial TCP connection set-up completed.]
      [S] 201 NNTP Service Ready, posting prohibited
      [C] LIST NEWSGROUPS POST
      [S] 501 440 Posting not permitted

6.3.2  IHAVE

6.3.2.1  Usage

   Indicating capability: IHAVE
   This command MUST NOT be pipelined.
   Syntax error

8.  Framework for NNTP extensions

   Although NNTP is widely and robustly deployed, some parts of the
   Internet community might wish
      IHAVE message-id
   Responses
      Initial responses
         335   Send article to extend be transferred
         435   Article not wanted
         436   Transfer not possible; try again later
      Subsequent responses
         235   Article transferred OK
         436   Transfer failed; try again later
         437   Transfer rejected; do not retry
   Parameters
      message-id = Article message-id

6.3.2.2  Description

   The IHAVE command informs the server that the NNTP service.  This
   document defines a means whereby an extended NNTP client can query has an article
   with the server to determine specified message-id.  If the service extensions server desires a copy of that it supports.

   It must
   article a 335 response MUST be emphasized that any extension returned, instructing the client to
   send the NNTP service should entire article.  If the server does not be considered lightly.  NNTP's strength comes primarily from its
   simplicity.  Experience with many protocols want the article
   (if, for example, the server already has shown that:
      Protocols with few options tend towards ubiquity, whilst protocols
      with many options tend towards obscurity.
   This means that each and every extension, regardless a copy of its benefits,
   must it), a 435
   response MUST be carefully scrutinized with respect to its implementation,
   deployment, and interoperability costs.  In many cases, the cost of
   extending returned, indicating that the NNTP service will likely outweigh article is not wanted.
   Finally, if the benefit.

   Given this environment, article isn't wanted immediately but the framework client
   should retry later if possible (if, for extensions described example, another client is in
   this document consists of:
   o  a mechanism for clients
   the process of sending the same article to determine a server's available
      extensions
   o the server), a registry 436
   response MUST be returned.

   If transmission of NNTP service extensions

   The LIST EXTENSIONS command is described in this document (see
   Section 5.3) and the article is requested, the mechanism for clients to use to determine
   what extensions are available.  Except where stated otherwise, client MUST send the
   commands in this document are understood (even if not supported) by
   all servers
   entire article, including headers and are not described body, in the list of features returned by
   the LIST EXTENSIONS command.

   The IANA shall maintain a registry of NNTP service extensions.

   An extension format defined
   above (Section 3.1) for multi-line responses (except that there is identified by no
   initial line containing a unique extension-label, which is response code).  Thus a
   string of 1 to 12 uppercase US-ASCII letters.  The extension-label
   will often be single dot (".") on
   a line indicates the name end of the text, and lines starting with a new command dot
   in the original text have that dot doubled during transmission.  The
   server MUST return either a 235 response, indicating that the extension adds.
   However this is not article
   was successfully transferred, a requirement: an extension might not add any new
   commands 436 response, indicating that the
   transfer failed but should be tried again later, or keywords.

   An extension is either a private extension or else it is included in 437 response,
   indicating that the IANA registry and is defined article was rejected.

   This function differs from the POST command in an RFC (in which case that it is a
   "standard extension" or "registered extension").  Such RFCs either
   must intended
   for use in transferring already-posted articles between hosts.  It
   SHOULD NOT be on used when the standards track or must define an IESG-approved
   experimental protocol.

   The definition of an extension must include:
   o client is a descriptive name for the extension;
   o personal news reading
   program, since use of this command indicates that the extension-label (which article has
   already been posted at another site and is returned by LIST EXTENSIONS to
      indicate to the client that simply being forwarded
   from another host.  However, despite this, the server supports this particular
      extension) - the extension-label of a registered extension MUST
      NOT begin with "X";
   o MAY elect not
   to post or forward the syntax, values, and meanings article if, after further examination of any arguments following the
      extension-label in the output
   article, it deems it inappropriate to do so.  Reasons for such
   subsequent rejection of LIST EXTENSIONS;
   o  any new NNTP commands associated with the extension - an article may include such problems as
   inappropriate newsgroups or distributions, disc space limitations,
   article lengths, garbled headers, and the names of
      commands associated with registered extensions MUST NOT begin with
      "X";
   o like.  These are typically
   restrictions enforced by the syntax server host's news software and possible values of arguments associated with not
   necessarily the
      new NNTP commands;
   o server itself.

   The client SHOULD NOT assume that the article has been successfully
   transferred unless it receives an affirmative response codes and possible values of arguments for from the
      responses
   server.  A lack of response (such as a dropped network connection or
   a network timeout) SHOULD be treated the new NNTP commands;
   o  any new arguments the extension associates with any other
      pre-existing NNTP commands;
   o  how support for the extension affects the behaviour of same as a 436 response.

   Because some news server
      and software may not be able immediately to
   determine whether or not an article is suitable for posting or
   forwarding, an NNTP client;
   o  any increase in server MAY acknowledge the maximum length successful transfer of commands and initial
      response lines over the value specified in this document;
   o  a specific statement about
   the effect on pipelining this extension
      may have (if any);
   o article (with a specific statement about the circumstances when use 235 response) but later silently discard it.

6.3.2.3  Examples

   Example of this
      extension can alter the output from LIST EXTENSIONS;
   o  the circumstances under which the extension can cause any
      pre-existing command successfully sending an article to produce another site:
      [C] IHAVE   <i.am.an.article.you.will.want@example.com>
      [S] 335 Send it; end with <CR-LF>.<CR-LF>
      [C] Path: pathost!demo!somewhere!not-for-mail
      [C] From: "Demo User" <nobody@example.com>
      [C] Newsgroups: misc.test
      [C] Subject: I am just a 401, 480, or 483 response;
   o  whether the extension can be used before or after the MODE READER
      command, and what changes (if any) test article
      [C] Date: 6 Oct 1998 04:38:40 -0500
      [C] Organization: An Example Com, San Jose, CA
      [C] Message-ID: <i.am.an.article.you.will.want@example.com>
      [C]
      [C] This is just a test article.
      [C] .
      [S] 235 Article transferred OK

   Example of sending an article to another site that rejects it.  Note
   that the latter has on message-id in the
      extension.

   A private extension need IHAVE command is not be included in the output of LIST
   EXTENSIONS.  A server MAY provide additional keywords - for new
   commands and also for new variants of existing commands - same as part of
   a private extension.  To avoid the risk of a clash with a future
   registered extension, one
   in the names of private extensions article headers; while this is bad practice and commands
   defined by them SHOULD begin with "X" and MUST NOT be the same as the
   name of
   done, it is not forbidden.
      [C] IHAVE   <i.am.an.article.you.will.want@example.com>
      [S] 335 Send it; end with <CR-LF>.<CR-LF>
      [C] Path: pathost!demo!somewhere!not-for-mail
      [C] From: "Demo User" <nobody@example.com>
      [C] Newsgroups: misc.test
      [C] Subject: I am just a registered extension.

   If the server provides test article
      [C] Date: 6 Oct 1998 04:38:40 -0500
      [C] Organization: An Example Com, San Jose, CA
      [C] Message-ID: <i.am.an.article.you.have@example.com>
      [C]
      [C] This is just a registered extension (indicated by listing
   it in test article.
      [C] .
      [S] 437 Article rejected; don't send again

   Example of sending an article to another site where the output transfer
   fails:
      [C] IHAVE   <i.am.an.article.you.will.want@example.com>
      [S] 335 Send it; end with <CR-LF>.<CR-LF>
      [C] Path: pathost!demo!somewhere!not-for-mail
      [C] From: "Demo User" <nobody@example.com>
      [C] Newsgroups: misc.test
      [C] Subject: I am just a test article
      [C] Date: 6 Oct 1998 04:38:40 -0500
      [C] Organization: An Example Com, San Jose, CA
      [C] Message-ID: <i.am.an.article.you.will.want@example.com>
      [C]
      [C] This is just a test article.
      [C] .
      [S] 436 Transfer failed

   Example of LIST EXTENSIONS), it MUST implement all sending an article to a site that already has it:
      [C] IHAVE   <i.am.an.article.you.have@example.com>
      [S] 435 Duplicate

   Example of sending an article to a site that requests the article be
   tried again later:
      [C] IHAVE   <i.am.an.article.you.defer@example.com>
      [S] 436 Retry later

7.  Information commands in

   This section lists other commands that may be used at any time
   between the specification beginning of the extension except for those
   marked as optional.  If it a session and its termination.  Using these
   commands does not implement the extension as
   specified, it MUST NOT list the extension in alter any state information, but the output of LIST
   EXTENSIONS under its registered name; in this case it MAY, but SHOULD
   NOT, response
   generated from their use may provide useful information to clients.

7.1  DATE

7.1.1  Usage

   Indicating capability: READER
   Syntax
      DATE
   Responses
      111 yyyymmddhhmmss   server date and time
   Parameters
      yyyymmddHHmmss = Current UTC date and time on server

7.1.2  Description

   This command exists to help clients find out the current Coordinated
   Universal Time [TF.686-1] from the server's perspective.  This
   command SHOULD NOT be used as a private extension (not listed, or listed with a
   different name) substitute for NTP [RFC1305] but to
   provide information that implements part of might be useful when using the extension or implements NEWNEWS
   command (see Section 7.4).

   The DATE command MUST return a timestamp from the commands of same clock as is
   used for determining article arrival and group creation times (see
   Section 6).  This clock SHOULD be monotonic, and adjustments SHOULD
   be made by running it fast or slow compared to "real" time rather
   than by making sudden jumps.  A system providing NNTP service SHOULD
   keep the extension system clock as accurate as possible, either with a different meaning.

   A NTP or by
   some other method.

   The server MUST NOT send different return a 111 response codes to basic NNTP
   commands documented here or commands documented in registered
   extensions specifying the date and time on
   the server in response to the availability or use of a private
   extension.

8.1  Initial IANA registry

   The IANA's initial registry of NNTP service extensions consists of
   these entries:

   +-------------------------+--------------+--------------------------+
   | Extension               | Label        | Added behaviour          |
   +-------------------------+--------------+--------------------------+
   | Specific article        | LISTGROUP    | Defined form yyyymmddhhmmss.  This date and time is in this document |
   | numbers                 |              |                          |
   |                         |              |                          |
   | Overview support        | OVER         | Defined in this document |
   |                         |              |                          |
   | Batched header          | HDR          | Defined in this document |
   | retrieval               |              |                          |
   +-------------------------+--------------+--------------------------+

8.2  Standard extensions

   N.B.  while these extensions are standard extensions, the term
   includes all extensions in the IANA registry, not just these three.

   Each
   Coordinated Universal Time.

7.1.3  Examples

      [C] DATE
      [S] 111 19990623135624

7.2  HELP

7.2.1  Usage

   This command is mandatory.
   Syntax
      HELP
   Responses
      100   Help text follows (multiline)

7.2.2  Description

   This command provides a short summary of the following sections describes an extension commands that a server
   MAY provide.  If the server provides the extension, it MUST include are
   understood by this implementation of the appropriate extension label in server.  The help text will
   be presented as a multiline response following the 100 response to LIST EXTENSIONS.
   If it does code.

   This text is not provide it, it guaranteed to be in any particular format and MUST
   NOT include the appropriate
   extension label.  The descriptions of facilities in each section are
   written be used by clients as if a replacement for the extension CAPABILITIES command
   described in Section 5.2

7.2.3  Examples

      [C] HELP
      [S] 100 Help text follows
      [S] This is provided.  If some help text.  There is no specific
      [S] formatting requirement for this test, though
      [S] it is not provided, customary for it to list the
   entire section should be ignored.

   The formal definitions of these extensions are provided in Appendix
   D.

8.3  The LISTGROUP extension

   This extension provides one command valid commands
      [S] and has the extension label
   LISTGROUP.

8.3.1  LISTGROUP

8.3.1.1  Usage
   Syntax
      LISTGROUP [group]
   Responses
      211 number low high group   Article numbers follow give a brief definition of what they do
      [S] .

7.3  NEWGROUPS

7.3.1  Usage

   Indicating capability: READER
   Syntax
      NEWGROUPS date time [GMT]
   Responses
      231   List of new newsgroups follows (multiline)
      411                         No such newsgroup
      412                         No newsgroup selected [1]
   Parameters
      group  = name of newsgroup
      number
      date = estimated number of articles Date in the group
      low    = reported low water mark
      high yymmdd or yyyymmdd format
      time = reported high water mark
   [1] The 412 response can only occur if no group has been specified.

8.3.1.2 Time in hhmmss format

7.3.2  Description

   The LISTGROUP

   This command is used to get returns a listing list of all newsgroups created on the article
   numbers in a particular newsgroup.  As a side effect, it also selects server since
   the group specified date and time.  The results are in the same way format as
   the GROUP LIST ACTIVE command (see Section 6.1.1). 7.6.3).  However, they MAY
   include groups not available on the server (and so not returned by
   LIST ACTIVE) and MAY omit groups for which the creation date is not
   available.

   The optional argument date is specified as 6 or 8 digits in the name format [xx]yymmdd,
   where xx is the first two digits of the newsgroup to be selected
   (e.g.  "news.software.misc").  A list year (19-99), yy is the last
   two digits of valid newsgroups may be
   obtained from the LIST ACTIVE command.  If no group year (00-99), mm is specified, the
   current selected newsgroup month (01-12), and dd is used.

   On success,
   the list day of article numbers is returned as a multi-line
   response following the 211 response code (the arguments on month (01-31).  Clients SHOULD specify all four digits
   of the
   initial response line are year.  If the same as for first two digits of the GROUP command.  The
   list contains one number per line, year are not specified
   (this is in numerical order, and lists
   precisely those articles that exist in supported only for backwards compatibility), the group.

   When a valid group year is selected by means of this command, to
   be taken from the current
   selected newsgroup MUST be set century if yy is smaller than or equal to that group and
   the current article
   number MUST be set to year, otherwise the first article in year is from the group.  If an empty
   newsgroup previous century.

   The time is selected, specified as 6 digits in the current article pointer format hhmmss, where hh is made invalid.
   If an invalid group
   the hours in the 24-hour clock (00-23), mm is specified, the current selected newsgroup minutes (00-59),
   and
   current article number MUST NOT be changed.

   The LISTGROUP command MAY be used by a client as a replacement ss is the seconds (00-60, to allow for leap seconds).  The token
   "GMT" specifies that the GROUP command in establishing a valid current selected newsgroup date and current article number.

   If time are given in Coordinated
   Universal Time [TF.686-1]; if it is omitted then the group date and time
   are specified is not available on in the server, a 411 response
   MUST be returned.  If no group server's local timezone.  Note that there is no
   way using the protocol specified and in this document to establish the current selected
   newsgroup is invalid, a 412 response MUST be returned.

8.3.1.3  Examples

   Example of LISTGROUP on
   server's local timezone.

   Note that an empty group:

      [C] LISTGROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup list follows
      [S] .

   Example of LISTGROUP on is a possible valid current selected newsgroup:
      [C] GROUP   misc.test
      [S] 211 2000 3000234 3002322 misc.test response and indicates
   that there are no new newsgroups since that date-time.

   Clients SHOULD make all queries using Coordinated Universal Time
   (i.e.  by including the "GMT" argument) when possible.

7.3.3  Examples

   Example where there are new groups:
      [C] LISTGROUP NEWGROUPS   19990624 000000 GMT
      [S] 211 2000 3000234 3002322 misc.test 231 list of new newsgroups follows
      [S] 3000234
      [S] 3000237
      [S] 3000238
      [S] 3000239 alt.rfc-writers.recovery 4 1 y
      [S] 3002322 tx.natives.recovery 89 56 y
      [S] .

   Example of LISTGROUP failing because no group has been selected:
      [Assumes current selected newsgroup is invalid.]
      [C] LISTGROUP
      [S] 412 where there are no current group new groups:
      [C] GROUP   example.is.sob.bradner.or.barber NEWGROUPS   19990624 000000 GMT
      [S] 411 no such group
      [C] LISTGROUP 231 list of new newsgroups follows
      [S] 412 no current group

8.4  Article metadata

   The OVER and HDR extensions refer to the concept .

7.4  NEWNEWS

7.4.1  Usage

   Indicating capability: READER
   Syntax
      NEWNEWS wildmat date time [GMT]
   Responses
      230   List of new articles follows (multiline)
   Parameters
      wildmat = Newsgroups of "article
   metadata". interest
      date    = Date in yymmdd or yyyymmdd format
      time    = Time in hhmmss format

7.4.2  Description

   This is data about command returns a list of message-ids of articles that does not occur within posted or
   received on the article itself.  Each metadata item has a name which MUST begin
   with a colon (and which MUST NOT contain a colon elsewhere within
   it).  As with header names, metadata item server, in the newsgroups whose names are not
   case-sensitive.

   When generating a metadata item, match the server MUST compute it for
   itself and MUST NOT trust any related value provided in the article.
   (In particular, a Lines or Bytes header in
   wildmat, since the article MUST NOT be
   assumed to specify specified date and time.  One message-id is sent
   on each line; the correct number order of lines or bytes in the
   article.) If the server response has access no specific significance
   and may vary from response to several non-identical copies of
   an article, the value returned MUST be correct for any copy of that
   article retrieved during response in the same session.

   This specification defines two metadata items: ":bytes"  A
   message-id MAY appear more than once; if it does so, it has the same
   meaning as if it appeared only once.

   Date and ":lines".
   Other metadata items may be defined by extensions.  The names of
   metadata items defined by registered extensions MUST NOT begin with
   ":x-".  To avoid time are in the risk of a clash with a future registered
   extension, same format as the names of metadata items defined by private extensions
   SHOULD begin with ":x-".

8.4.1  The :bytes metadata item

   The :bytes metadata item for NEWGROUPS command (see
   Section 7.3).

   Note that an article is a decimal integer.  It
   SHOULD equal the number of octets in the entire article - headers,
   body, and separating empty line (counting list is a CRLF pair as two octets,
   and excluding both the "." CRLF terminating the possible valid response and any "."
   added for "byte-stuffing" purposes).

   Note to client implementers: some existing servers return a value
   different to indicates
   that above.  The commonest reasons for this are:
   o  counting a CRLF pair as one octet;
   o  including the "." character used for byte-stuffing there is currently no new news in the number;
   o  including the terminating "." CRLF relevant groups.

   Clients SHOULD make all queries in the number;
   o Coordinated Universal Time (i.e.
   by using one copy of an article for counting the octets but then
      returning another one that differs in some (permitted) manner.
   Implementations should be prepared for such variation and MUST NOT
   rely on the value being accurate.

8.4.2  The :lines metadata item

   The :lines metadata item for an article is a decimal integer.  It
   MUST equal the number "GMT" argument) when possible.

7.4.3  Examples

   Example where there are new articles:
      [C] NEWNEWS   news.*,sci.* 19990624 000000 GMT
      [S] 230 list of lines new articles by message-id follows
      [S] <i.am.a.new.article@example.com>
      [S] <i.am.another.new.article@example.com>
      [S] .

   Example where there are no new articles:
      [C] NEWNEWS   alt.* 19990624 000000 GMT
      [S] 230 list of new articles by message-id follows
      [S] .

7.5  Time

   As described in the Section 6, each article body (excluding has an arrival timestamp.
   Each newsgroup also has a creation timestamp.  These timestamps are
   used by the
   empty line separating headers NEWNEWS and body); equivalently, it is two less
   than the number of CRLF pairs NEWGROUP commands to construct their
   responses.

   Clients can ensure that they do not have gaps in lists of articles or
   groups by using the BODY DATE command would return for
   that article (the extra two are those following the response code and in the termination octet).

8.5  The OVER extension

   This extension provides two commands, OVER following manner:
   First session:
      Issue DATE command and LIST OVERVIEW.FMT.
   The label for this extension is OVER.

   The OVER extension provides access record result
      Issue NEWNEWS command using a previously chosen timestamp
   Subsequent sessions:
      Issue DATE command and hold result in temporary storage
      Issue NEWNEWS command using timestamp saved from previous session
      Overwrite saved timestamp with that currently in temporary storage
   In order to allow for minor errors, clients MAY want to adjust the "overview database", which
   is a database of headers extracted
   timestamp back by two or three minutes before using it in NEWNEWS.

7.5.1  Examples

   First session:
      [C] DATE
      [S] 111 20010203112233
      [C] NEWNEWS   local.chat 20001231 235959 GMT
      [S] 230 list follows
      [S] <article.1@local.service>
      [S] <article.2@local.service>
      [S] <article.3@local.service>
      [S] .
   Second session (the client has subtracted 3 minutes from incoming articles.  Only
   certain headers are included the
   timestamp returned previously):
      [C] DATE
      [S] 111 20010204003344
      [C] NEWNEWS   local.chat 20010203 111933 GMT
      [S] 230 list follows
      [S] <article.3@local.service>
      [S] <article.4@local.service>
      [S] <article.5@local.service>
      [S] .
   Note how <article.3@local.service> arrived in the database. 3 minute gap and so
   is listed in both responses.

7.6  The database also
   includes some article metadata. LIST commands

   The LIST family of commands all return information stored that is multi-line
   and, in the database may general, can be expected not to change over time.  If during the
   database records session.
   Often the content or absence of a given field (that is, a
   header or metadata item) for all articles, it information is said related to be
   "consistent" for that field.  If it records newsgroups, in which case the content of
   response has one line per newsgroup and a header
   for some articles but not wildmat MAY be provided to
   restrict the groups for others that nevertheless included that
   header, or records a metadata item for some articles but not others
   to which that item applies, it information is said returned.

   The set of available keywords (including those provided by
   extensions) is given in the capability list with capability label
   LIST.

7.6.1  LIST

7.6.1.1  Usage

   Indicating capability: LIST
   Syntax
      LIST [keyword [wildmat|argument]]
   Responses
      215   Information follows (multiline)
   Parameters
      keyword  = information requested [1]
      argument = specific to be "inconsistent" for that
   field. keyword
      wildmat  = groups of interest
   [1] If no keyword is provided, it defaults to ACTIVE.

7.6.1.2  Description

   The LIST OVERVIEW.FMT command SHOULD list all allows the fields server to provide blocks of information
   to the client.  This information may be global or may be related to
   newsgroups; in the latter case, the information may be returned
   either for which all groups or only for those matching a wildmat.  Each
   block of information is represented by a different keyword.  The
   command returns the database specific information identified by the keyword.

   If the information is consistent at that moment.  It MAY omit such fields
   (for example if available, it is not known whether returned as a multi-line
   response following the database is consistent or
   inconsistent).  It 215 response code.  The format of the
   information depends on the keyword.  The information MAY be affected
   by the additional argument, but the format MUST NOT include fields for which be.

   If the database information is
   inconsistent or which are not stored in based on newsgroups and the database.  Therefore if a
   header appears in optional wildmat
   argument is specified, the LIST OVERVIEW.FMT output but not response is limited to only the OVER
   output for a given article, that header does not appear in groups (if
   any) whose names match the
   article, wildmat and similarly for metadata items.

   These rules assume the fields being stored in the database remain
   constant for long periods of time, with the database therefore being
   consistent.  When which the set of fields to be stored information is changed,
   available.

   Note that an empty list is a possible valid response; for a
   newsgroup-based keyword, it will
   be inconsistent until either indicates that there are no groups
   meeting the database above criteria.

   If the keyword is rebuilt not recognised, or if an argument is specified and
   the only
   articles remaining are those received since the change.  Therefore
   the output from LIST OVERVIEW.FMT needs to be altered twice: before
   any fields stop being stored, they keyword does not expect one, a 501 response code MUST be removed from the output,
   then when BE
   returned.  If the database keyword is once more known to be consistent, the new
   fields SHOULD be added to the output.

   Support for recognised but the message-id form of server does not
   maintain the OVER information, a 503 response code MUST BE returned.

   The LIST command is optional.  If
   an implementation supports this form, it MUST use NOT change the argument
   "MSGID" following visible state of the extension label server in
   any way; that is, the output behaviour of subsequent commands MUST NOT be
   affected by whether the LIST
   EXTENSIONS; if not, command was issued or not.  For example,
   it MUST NOT use any argument.

   This extension is based on make groups available that otherwise would not have been.

7.6.1.3  Examples

   Example of LIST with the Overview/NOV database [ROBE1995]
   developed by Geoff Collyer.

8.5.1  OVER

8.5.1.1  Usage

   Syntax
      OVER message-id
      OVER range
      OVER
   Responses
      First form (message-id specified)
         224   Overview information ACTIVE keyword:
      [C] LIST ACTIVE
      [S] 215 list of newsgroups follows (multiline)
         430   No article with that message-id
      Second form (range specified)
         224   Overview information follows (multiline)
         412   No newsgroup selected
         423   No articles in that range
      Third form (current article number used)
         224   Overview information follows (multiline)
         412   No newsgroup selected
         420   Current article number is invalid
   Parameters
      range      = number(s)
      [S] misc.test 3002322 3000234 y
      [S] comp.risks 442001 441099 m
      [S] alt.rfc-writers.recovery 4 1 y
      [S] tx.natives.recovery 89 56 y
      [S] tx.natives.recovery.d 11 9 n
      [S] .

   Example of articles
      message-id = message-id LIST with no keyword:
      [C] LIST
      [S] 215 list of article

8.5.1.2  Description newsgroups follows
      [S] misc.test 3002322 3000234 y
      [S] comp.risks 442001 441099 m
      [S] alt.rfc-writers.recovery 4 1 y
      [S] tx.natives.recovery 89 56 y
      [S] tx.natives.recovery.d 11 9 n
      [S] .
   The OVER command returns the contents output is identical to that of the headers and metadata in
   the database for an article specified by message-id, or from a
   specified article or range previous example.

   Example of articles in the current selected
   newsgroup.

   The message-id argument indicates LIST on a specific article.  The range
   argument may be any newsgroup-based keyword with and without
   wildmat:
      [C] LIST ACTIVE.TIMES
      [S] 215 information follows
      [S] misc.test 930445408 <creatme@isc.org>
      [S] alt.rfc-writers.recovery 930562309 <m@example.com>
      [S] tx.natives.recovery 930678923 <sob@academ.com>
      [S] .
      [C] LIST ACTIVE.TIMES   tx.*
      [S] 215 information follows
      [S] tx.natives.recovery 930678923 <sob@academ.com>
      [S] .

   Example of the following:
   o  an article number
   o  an article number followed by a dash to indicate all following
   o LIST returning an article number followed by a dash followed by another article
      number
   If neither is specified, error where the current article number keyword is used.  Support
   for the first (message-id) form is optional.  If it recognized
   but the software does not maintain this information:
      [C] CAPABILITIES
      [S] 101 Capability list:
      [S] VERSION 2
      [S] READER
      [S] LIST ACTIVE NEWSGROUPS ACTIVE.TIMES XTRA.DATA
      [S] .
      [C] LIST XTRA.DATA
      [S] 503 Data item not stored

   Example of LIST where the keyword is not supported, recognised:

      [C] CAPABILITIES
      [S] 101 Capability list:
      [S] VERSION 2
      [S] READER
      [S] LIST ACTIVE NEWSGROUPS ACTIVE.TIMES XTRA.DATA
      [S] .
      [C] LIST DISTRIB.PATS
      [S] 501 Syntax Error

7.6.2  Standard LIST keywords

   This specification defines the generic response code 503 MUST be returned.

   If following LIST keywords:

   +----------------------+----------------------+---------------------+
   | Keyword              | Definition           | Status              |
   +----------------------+----------------------+---------------------+
   | ACTIVE               | Section 7.6.3        | Mandatory if the information    |
   |                      |                      | READER capability   |
   |                      |                      | is available, it advertised       |
   |                      |                      |                     |
   | ACTIVE.TIMES         | Section 7.6.4        | Optional            |
   |                      |                      |                     |
   | DISTRIB.PATS         | Section 7.6.5        | Optional            |
   |                      |                      |                     |
   | HEADERS              | Section 8.6          | Mandatory if the    |
   |                      |                      | HDR capability is returned as a multi-line
   response following   |
   |                      |                      | advertised          |
   |                      |                      |                     |
   | NEWSGROUPS           | Section 7.6.6        | Mandatory if the 224 response code and contains one line per
   article, sorted in numerical order of article number (note that
   unless    |
   |                      |                      | READER capability   |
   |                      |                      | is advertised       |
   |                      |                      |                     |
   | OVERVIEW.FMT         | Section 8.4          | Mandatory if the argument    |
   |                      |                      | OVER capability is a range including a dash, there will only be  |
   |                      |                      | advertised          |
   +----------------------+----------------------+---------------------+

   Where one line but it will still be in multi-line format).  Each line
   consists of a number of fields separated these LIST keywords is supported by a TAB.  A field may be
   empty (in which case there will be two adjacent TABs), and a sequence
   of trailing TABs may be omitted.

   The first 8 fields server, it MUST be
   have the following, meaning given in order:
      "0" or article number (see below)
      Subject header content
      From header content
      Date header content
      Message-ID header content
      References header content
      :bytes metadata item
      :lines metadata item
   If the article is specified by message-id (the first form of the
   command), the article number following sub-sections.

7.6.3  LIST ACTIVE

   This keyword MUST be replaced with zero, except that
   if there is supported by servers advertising the READER
   capability.

   LIST ACTIVE returns a current selected group list of valid newsgroups and the article associated
   information.  If no wildmat is present in
   that group, specified, the server MAY use MUST include
   every group that article number (see the ARTICLE
   command (Section 6.2.1) and STAT examples client is permitted to select with the GROUP
   (Section 6.2.4.3) for 6.1.1) command.  Each line of this list consists of four
   fields separated from each other by one or more
   details).  In spaces:
   o  the other two forms name of the command, newsgroup;
   o  the article number
   MUST be returned.

   Any subsequent fields are reported high water mark for the contents group;
   o  the reported low water mark for the group;
   o  the current status of the other headers group on this server.

   The reported high and
   metadata held low water marks are as described in the database.

   For the five mandatory headers, the content of each GROUP
   command (see Section 6.1.1).

   The status field MUST is typically one of:
   "y" posting is permitted
   "n" posting is not permitted
   "m" postings will be
   based on the content of forwarded to the header (that is, with the header name and
   following colon newsgroup moderator
   The server SHOULD use these values when these meanings are required
   and space removed).  If the article does not contain
   that header, or if the content is empty, the field MUST be empty.
   For the two mandatory metadata items, the content of the field MUST
   be just the value, NOT use them with no any other text.

   For all subsequent fields that contain headers, meaning.  Other values for the content MUST be
   status may exist; the entire header line definition of these other than values and the trailing CRLF.  For all
   subsequent fields that contain metadata,
   circumstances under which they are returned may be specified in an
   extension or may be private to the field consists server.  A client SHOULD treat an
   unrecognized status as giving no information.

   The status of the
   metadata name, a single space, newsgroup only indicates how posts to that newsgroup
   are normally processed and then is not necessarily customised to the value.
   specific client.  For all fields, example, if the value current client is processed by first removing all CRLF
   pairs (that is, undoing any folding and removing the terminating
   CRLF) and forbidden
   from posting, then replacing each TAB this will apply equally to groups with status "y".
   Conversely, a single space.  If there is
   no such header in the article, or no such metadata item, or no header
   or item stored in the database for that article, the corresponding
   field MUST be empty.

   Note that, after unfolding, the characters NUL, LF, and CR cannot
   occur in the header of an article offered client with special privileges (not defined by a conformant server.
   Nevertheless, servers SHOULD check for these characters and replace
   each one by a single space (so that, for example, CR LF LF TAB will
   become two spaces, since the CR and first LF will this
   specification) might be removed by the
   unfolding process).  This will encourage robustness in the face able to post to a group with status "n".

   For example:

      [C] LIST ACTIVE
      [S] 215 list of
   non-conforming data; it is also possible newsgroups follows
      [S] misc.test 3002322 3000234 y
      [S] comp.risks 442001 441099 m
      [S] alt.rfc-writers.recovery 4 1 y
      [S] tx.natives.recovery 89 56 y
      [S] tx.natives.recovery.d 11 9 n
      [S] .

   or, on an implementation that future versions includes leading zeroes:

      [C] LIST ACTIVE
      [S] 215 list of this
   specification could permit these characters to appear in articles. newsgroups follows
      [S] misc.test 0003002322 0003000234 y
      [S] comp.risks 0000442001 0000441099 m
      [S] alt.rfc-writers.recovery 0000000004 0000000001 y
      [S] tx.natives.recovery 0000000089 0000000056 y
      [S] tx.natives.recovery.d 0000000011 0000000009 n
      [S] .

   The server SHOULD NOT produce output for articles that no longer
   exist.

   If the argument is a message-id and no such article exists, a 430
   response MUST be returned.  If the argument is a range or information is omitted newsgroup-based and the current selected newsgroup is invalid, a 412 response MUST wildmat MAY be
   returned.  If the argument is a range and no articles in that number
   range exist specified, in
   which case the current selected newsgroup, a 423 response MUST be
   returned.  If the argument is omitted and the current article number is invalid, a 420 response MUST be returned.

8.5.1.3  Examples

   In limited to only the first three examples, TAB has been replaced by vertical bar
   and some lines have been folded for readability.

   Example of a successful retrieval of overview information for an
   article (using no article number):

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test groups (if any) whose
   names match the wildmat.  For example:

      [C] OVER
      [S] 224 Overview information follows
      [S] 300234|I am just a test article|"Demo User"
      <nobody@example.com>|6 Oct 1998 04:38:40 -0500|
      <45223423@example.com>|<45454@example.net>|1234|
      17|Xref: news.example.com misc.test:3000363 LIST ACTIVE   *.recovery
      [S] .

   Example of a successful retrieval 215 list of overview information for an
   article by message-id:
      [C] LIST EXTENSIONS newsgroups follows
      [S] 202 extensions supported: alt.rfc-writers.recovery 4 1 y
      [S] OVER MSGID tx.natives.recovery 89 56 y
      [S] .
      [C] OVER   <45223423@example.com>
      [S] 224 Overview

7.6.4  LIST ACTIVE.TIMES

   This keyword is optional.

   The active.times list is maintained by some NNTP servers to contain
   information follows
      [S] 0|I am just about who created a test article|"Demo User"
      <nobody@example.com>|6 Oct 1998 04:38:40 -0500|
      <45223423@example.com>|<45454@example.net>|1234|
      17|Xref: news.example.com misc.test:3000363
      [S] .
   Note that the article number has been replaced particular newsgroup and when.  Each
   line of this list consists of three fields separated from each other
   by "0".

   Example one or more spaces.  The first field is the name of the same commands newsgroup.
   The second is the time when this group was created on a system this news
   server, measured in seconds since the start of January 1, 1970.  The
   third is plain text intended to describe the entity that does not implement
   retrieval by message-id: created the
   newsgroup; it is often a mailbox as defined in RFC 2822 [RFC2822].
   For example:

      [C] LIST EXTENSIONS ACTIVE.TIMES
      [S] 202 extensions supported: 215 information follows
      [S] OVER misc.test 930445408 <creatme@isc.org>
      [S] .
      [C] OVER   <45223423@example.com>
      [S] 503 Overview by message-id unsupported

   Example of a successful retrieval of overview information for a range
   of articles:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] OVER   3000234-3000240
      [S] 224 Overview information follows
      [S] 300234|I am just a test article|"Demo User"
      <nobody@example.com>|6 Oct 1998 04:38:40 -0500|
      <45223423@example.com>|<45454@example.net>|1234|
      17|Xref: news.example.com misc.test:3000363
      [S] 3000235|Another test article|nobody@nowhere.to
      (Demo User)|6 Oct 1998 04:38:45 -0500|<45223425@to.to>||
      4818|37||Distribution: fi alt.rfc-writers.recovery 930562309 <m@example.com>
      [S] 3000238|Re: I am just a test article|somebody@elsewhere.to|
      7 Oct 1998 11:38:40 +1200|<kfwer3v@elsewhere.to>|
      <45223423@to.to>|9234|51 tx.natives.recovery 930678923 <sob@academ.com>
      [S] .
   Note

   The list MAY omit newsgroups for which the missing "References" information is unavailable
   and Xref headers in the second line, MAY include groups not available on the missing trailing field(s) server; in particular, it
   MAY omit all groups created before the first and last lines, date and time of the oldest
   entry.  The client MUST NOT assume that
   there are only results for those articles the list is complete or that still exist.

   Example of an unsuccessful retrieval of overview information on an
   article
   it matches the list returned by number:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] OVER   300256
      [S] 423 No such article in the LIST ACTIVE (Section 7.6.3)
   command.  The NEWGROUPS command (Section 7.3) may provide a better
   way to access this group

   Example of an unsuccessful retrieval of overview information by
   number because no newsgroup was selected first:
      [Assumes current selected newsgroup is invalid.]
      [C] OVER
      [S] 412 No newsgroup selected

   Example information, and the results of an attempt to retrieve information when the current
   selected newsgroup is empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] OVER
      [S] 420 No current article selected

8.5.2 two commands
   SHOULD be consistent except that, if the latter is invoked with a
   date and time earlier than the oldest entry in active.times list, its
   result may include extra groups.

   The information is newsgroup-based and a wildmat MAY be specified, in
   which case the response is limited to only the groups (if any) whose
   names match the wildmat.

7.6.5  LIST OVERVIEW.FMT

8.5.2.1  Usage DISTRIB.PATS

   This command keyword is optional.
   Syntax
      LIST OVERVIEW.FMT
   Responses
      215   Information follows (multiline)

8.5.2.2  Description

   The LIST OVERVIEW.FMT command returns distrib.pats list is maintained by some NNTP servers to assist
   clients to choose a description value for the content of the Distribution header
   of a news article being posted.  Each line of this list consists of
   three fields in
   the database for which it separated from each other by a colon (":").  The first
   field is consistent (as described above).

   If a weight, the information second field is available, it a wildmat (which may be a
   simple group name), and the third field is returned as a multi-line
   response following value for the
   Distribution header content.  For example:

      [C] LIST DISTRIB.PATS
      [S] 215 response code. information follows
      [S] 10:local.*:local
      [S] 5:*:world
      [S] 20:local.here.*:thissite
      [S] .

   The client MAY use this information contains
   one line per to construct an appropriate
   Distribution header given the name of a newsgroup.  To do so, it
   should determine the lines whose second field in matches the order they are returned by newsgroup
   name, select from among them the OVER
   command; line with the first 7 lines MUST (except for highest weight (with 0
   being the case lowest), and use the value of letters) be
   exactly:

       Subject:
       From:
       Date:
       Message-ID:
       References:
       :bytes
       :lines

    except that, for compatibility with existing implementations, the
   last two lines MAY instead be:

       Bytes:
       Lines:

    even though they refer third field to metadata, construct
   the Distribution header.

   The information is not headers.

   All subsequent lines newsgroup-based and an argument MUST consist of either a header name followed NOT be
   specified.

7.6.6  LIST NEWSGROUPS

   This keyword MUST be supported by
   ":full", or servers advertising the READER
   capability.

   The newsgroups list is maintained by NNTP servers to contain the name
   of a piece of metadata.

   There are no leading or trailing spaces in the output.

   Note each newsgroup that is available on the 7 fixed lines describe server and a short
   description about the 2nd to 8th fields purpose of the
   OVER output.  The "full" suffix (which may use either uppercase,
   lowercase, group.  Each line of this list
   consists of two fields separated from each other by one or a mix) more space
   or TAB characters (the usual practice is a reminder that single TAB).  The first
   field is the corresponding fields
   include name of the header name.

   This command MAY generate different results if used more than once in newsgroup and the second is a session.

8.5.2.3  Examples

   Example short
   description of LIST OVERVIEW.FMT output corresponding to the example OVER
   output above, using the preferred format: group.  For example:

      [C] LIST OVERVIEW.FMT NEWSGROUPS
      [S] 215 Order of fields in overview database.
      [S] Subject:
      [S] From:
      [S] Date:
      [S] Message-ID:
      [S] References:
      [S] :bytes information follows
      [S] :lines misc.test General Usenet testing
      [S] Xref:full alt.rfc-writers.recovery RFC Writers Recovery
      [S] Distribution:full tx.natives.recovery Texas Natives Recovery
      [S] .

   Example of LIST OVERVIEW.FMT output corresponding to

   The list MAY omit newsgroups for which the example OVER
   output above, using information is unavailable
   and MAY include groups not available on the alternative format:

      [C] LIST OVERVIEW.FMT
      [S] 215 Order of fields in overview database.
      [S] Subject:
      [S] From:
      [S] Date:
      [S] Message-ID:
      [S] References:
      [S] Bytes:
      [S] Lines:
      [S] Xref:FULL
      [S] Distribution:FULL
      [S] .

   Example of LIST OVERVIEW.FMT returning an error where server.  The client MUST
   NOT assume that the command list is
   recognized but complete or that it matches the software does not maintain this information:
      [C] list
   returned by LIST OVERVIEW.FMT
      [S] 503 overview.fmt not available

8.6 ACTIVE.

   The HDR extension

   This extension provides two new commands: HDR information is newsgroup-based and LIST HEADERS.  The
   label for this extension a wildmat MAY be specified, in
   which case the response is HDR.

   The HDR extension provides limited to only the groups (if any) whose
   names match the wildmat.

8.  Article field access commands

   This section lists commands that may be used to access specific
   article fields; that is, headers and metadata
   items (collectively "fields") of articles or groups of and metadata about
   articles.  In
   the case of headers,  These commands typically fetch data from an implementation MAY restrict the use of this
   extension to "overview
   database", which is a specific list database of headers or MAY allow it to be used
   with any header; it may behave differently when extracted from incoming
   articles plus metadata determined as the HDR command article arrives.  Only
   certain fields are included in the database.

   This section is
   used with a message-id argument and when it based on the Overview/NOV database [ROBE1995]
   developed by Geoff Collyer.

8.1  Article metadata

   Article "metadata" is used with data about articles that does not occur within
   the article itself.  Each metadata item has a range or
   no argument.

   The HDR command may take information from name which MUST begin
   with a database rather than
   directly from the articles.  If so, the same issues of consistency
   and inconsistency apply as colon (and which MUST NOT contain a colon elsewhere within
   it).  As with header names, metadata item names are not
   case-sensitive.

   When generating a metadata item, the OVER extension (Section 8.5) server MUST compute it for
   itself and
   the LIST HEADERS command SHOULD take the same approach as the LIST
   OVERVIEW.FMT command MUST NOT trust any related value provided in resolving them.

8.6.1  HDR

8.6.1.1  Usage

   Syntax
      HDR header message-id
      HDR header range
      HDR the article.
   (In particular, a Lines or Bytes header
   Responses
      First form (message-id specified)
         225   Headers follow (multiline)
         430   No article with that message-id
      Second form (range specified)
         225   Headers follow (multiline)
         412   No newsgroup selected
         423   No articles in that range
      Third form (current article number used)
         225   Headers follow (multiline)
         412   No newsgroup selected
         420   Current the article number is invalid
   Parameters
      header     = name of header, without MUST NOT be
   assumed to specify the colon
      range      = number(s) of articles
      message-id = message-id correct number of article

8.6.1.2  Description

   The HDR command retrieves specific headers from an article specified
   by message-id, or from a specified article lines or range of articles bytes in the current selected newsgroup.  It can also return certain metadata
   about the article or articles.

   The required header argument is
   article.) If the name server has access to several non-identical copies of a header (e.g.
   "subject") in
   an article, or the name value returned MUST be correct for any copy of a metadata item, and is
   case-insensitive.  Names that
   article retrieved during the same session.

   This specification defines two metadata items: ":bytes" and ":lines".
   Other metadata items may be defined by extensions.  The names of
   metadata items always defined by registered extensions MUST NOT begin with
   ":x-".  To avoid the risk of a clash with a colon.
   Except where stated otherwise, future registered
   extension, the names of metadata items are treated as if they
   were header contents, and references to headers in this description
   apply equally to metadata items. defined by private extensions
   SHOULD begin with ":x-".

8.1.1  The message-id argument indicates a specific article. :bytes metadata item

   The range
   argument may be any of the following:
   o  an article number
   o  an article number followed by a dash to indicate all following
   o :bytes metadata item for an article number followed by a dash followed by another article
      number
   If neither is specified, a decimal integer.  It
   SHOULD equal the current article number is used.

   If of octets in the information is available, it is returned as entire article - headers,
   body, and separating empty line (counting a multi-line
   response following CRLF pair as two octets,
   and excluding both the "." CRLF terminating the 225 response code and contains one line any "."
   added for
   each article in the range that exists (note that unless the argument
   is "byte-stuffing" purposes).

   Note to client implementers: some existing servers return a range including value
   different to that above.  The commonest reasons for this are:
   o  counting a dash, there will be at most CRLF pair as one line but it
   will still be octet;
   o  including the "." character used for byte-stuffing in multi-line format).  The line consists of the
   article number, a space, and then the contents of number;
   o  including the header or
   metadata item.  In terminating "." CRLF in the case number;
   o  using one copy of a header, the header name, colon, and
   the first space after the colon are all omitted.

   If the an article is specified by message-id (the first form of the
   command), for counting the article number MUST be replaced with zero, except octets but then
      returning another one that
   if there is a current selected group differs in some (permitted) manner.
   Implementations should be prepared for such variation and MUST NOT
   rely on the value being accurate.

8.1.2  The :lines metadata item

   The :lines metadata item for an article is present a decimal integer.  It
   MUST equal the number of lines in
   that group, the server MAY use that article number (see body (excluding the ARTICLE
   command (Section 6.2.1)
   empty line separating headers and STAT examples (Section 6.2.4.3) for more
   details).  In the other body); equivalently, it is two forms of the command, less
   than the article number
   MUST be returned.

   Header contents are modified as follows: all of CRLF pairs are removed,
   and then each TAB is replaced with a single space (note that this is the same transformation as is performed by BODY command would return for
   that article (the extra two are those following the OVER extension
   (Section 8.5.1.2), response code and
   the same comment concerning NUL, CR, and LF
   applies). termination octet).

8.2  Database consistency

   The header content is information stored in all cases taken from the article.  This
   means that, for example, a request for the header "Lines" returns overview database may change over time.
   If the
   contents of database records the "Lines" header content or absence of the specified articles, if any, not
   the line count metadata a given field (that
   is, a header or any other server-generated value. metadata item) for all articles, it is said to be
   "consistent" for that field.  If it records the content of a header occurs in
   for some articles but not for others that nevertheless included that
   header, or records a given article multiple times, only metadata item for some articles but not others
   to which that item applies, it is said to be "inconsistent" for that
   field.

   The LIST OVERVIEW.FMT command SHOULD list all the content of fields for which
   the first occurrence database is returned by HDR.

   If consistent at that moment.  It MAY omit such fields
   (for example if it is not known whether the requested header database is consistent or
   inconsistent).  It MUST NOT include fields for which the database is
   inconsistent or which are not present stored in the article or database.  Therefore if it is
   present but empty, a line for that article is included
   header appears in the LIST OVERVIEW.FMT output but not the OVER
   output for a given article, that header content portion of the line is empty (the space after
   the article number MAY be retained or omitted).  If any article
   number in the provided range does not exist appear in the group, no line
   article, and similarly for
   that article number is included metadata items.

   These rules assume the fields being stored in the output.

   If database remain
   constant for long periods of time, with the second argument database therefore being
   consistent.  When the set of fields to be stored is a message-id and no such article exists, a
   430 response MUST changed, it will
   be returned.  If inconsistent until either the second argument database is a range rebuilt or
   is omitted and the current selected newsgroup is invalid, a 412
   response MUST be returned.  If the second argument is a range and no only
   articles in that number range exist in remaining are those received since the current selected
   newsgroup, a 423 response change.  Therefore
   the output from LIST OVERVIEW.FMT needs to be altered twice: before
   any fields stop being stored, they MUST be returned.  If removed from the second argument
   is omitted and output,
   then when the current article number database is invalid, a 420 response
   MUST once more known to be returned.

   A server MAY only allow HDR commands for a limited set of headers and
   metadata items; it may behave differently in this respect for consistent, the
   first (message-id) form than for new
   fields SHOULD be added to the other forms. output.

   If so, it MUST
   respond with the generic 503 response to attempts to request other
   headers, rather than returning erroneous results such as a successful
   empty response.

   If HDR command uses a separate the overview database and it is inconsistent for rather than taking
   information directly from the
   requested header or metadata item, articles, the server MAY return what results
   it can or it MAY respond with same issues of
   consistency and inconsistency apply and the generic 503 response; in and the latter
   case, LIST HEADERS
   command SHOULD take the field MUST NOT appear in same approach as the output from LIST HEADERS.

8.6.1.3  Examples

   Example of a successful retrieval of subject lines from a OVERVIEW.FMT
   command in resolving them.

8.3  OVER

8.3.1  Usage

   Indicating capability: OVER
   Syntax
      OVER message-id
      OVER range of
   articles (3000235 has no Subject header, and 3000236 is missing):
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HDR   Subject 3000234-300238
      [S] 225 Headers follow
      [S] 3000234 I am just a test
      OVER
   Responses
      First form (message-id specified)
         224   Overview information follows (multiline)
         430   No article
      [S] 3000235
      [S] 3000237 Re: I am just a test with that message-id
      Second form (range specified)
         224   Overview information follows (multiline)
         412   No newsgroup selected
         423   No articles in that range
      Third form (current article
      [S] 3000238 Ditto
      [S] .

   Example number used)
         224   Overview information follows (multiline)
         412   No newsgroup selected
         420   Current article number is invalid
   Parameters
      range      = number(s) of a successful retrieval articles
      message-id = message-id of line counts article

8.3.2  Description

   The OVER command returns the contents of all the fields in the
   database for an article specified by message-id, or from a specified
   article or range of
   articles:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HDR   :lines 3000234-300238
      [S] 225 Headers follow
      [S] 3000234 42
      [S] 3000235 5
      [S] 3000237 11
      [S] 3000238 2378
      [S] .

   Example of articles in the current selected newsgroup.

   The message-id argument indicates a successful retrieval specific article.  The range
   argument may be any of the subject line from following:
   o  an article number
   o  an article number followed by message-id:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HDR   subject <i.am.a.test.article@example.com>
      [S] 225 Header information follows
      [S] 0 I am just a test dash to indicate all following
   o  an article
      [S] .

   Example of number followed by a successful retrieval of the subject line from dash followed by another article
      number
   If neither is specified, the current article:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HDR   subject
      [S] 225 Header information follows
      [S] 3000234 I am just a test article
      [S] .

   Example of an unsuccessful retrieval of a header from an article by
   message-id:
      [C] HDR   subject <i.am.not.there@example.com>
      [S] 430 No Such Article Found
   Example of an unsuccessful retrieval of headers from articles by number because no newsgroup was selected first:
      [Assumes current selected newsgroup is invalid.]
      [C] HDR   subject 300256-
      [S] 412 No newsgroup selected

   Example of an unsuccessful retrieval of headers because used.

   Support for the current
   selected newsgroup first (message-id) form is empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] HDR   subject 1-
      [S] 423 No articles in that range

   Example of an unsuccessful retrieval of headers because optional.  If is is
   supported, the server
   does not allow HDR commands for that header:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HDR   Content-Type 3000234-300238
      [S] 503 HDR not permitted on Content-Type

8.6.2  LIST HEADERS

8.6.2.1  Usage

   Syntax
      LIST HEADERS [MSGID|RANGE]
   Responses
      215   Header OVER capability line MUST include the argument
   "MSGID".  Otherwise, the capability line MUST NOT include this
   argument, and metadata list follows (multiline)
   Parameters
      MSGID = requests list for access by message-id
      RANGE = requests list for access by range

8.6.2.2  Description

   The LIST HEADERS the OVER command returns a list of headers and metadata items
   that may be retrieved using MUST return the the generic response
   code 503 when this form is used.

   If the HDR command.

   The information is available, it is returned as a multi-line
   response following the
   215 224 response code and contains one line for each header or metadata
   item name (excluding the colon per
   article, sorted in numerical order of article number (note that
   unless the former case).  If the
   implementation allows any header to argument is a range including a dash, there will only be retrieved, it MUST NOT include
   any header names in the list
   one line but MUST include the special entry ":"
   (a single colon on its own); it MUST will still list any metadata items
   that are available.  The order be in multi-line format).  Each line
   consists of items a number of fields separated by a TAB.  A field may be
   empty (in which case there will be two adjacent TABs), and a sequence
   of trailing TABs may be omitted.

   The first 8 fields MUST be the following, in order:
      "0" or article number (see below)
      Subject header content
      From header content
      Date header content
      Message-ID header content
      References header content
      :bytes metadata item
      :lines metadata item
   If the list article is not
   significant; specified by message-id (the first form of the server need not even consistently return
   command), the same
   order.  The list MAY article number MUST be empty (though in this circumstance replaced with zero, except that
   if there is
   little point in providing the extension).

   An implementation that also supports the OVER extension SHOULD at
   least permit all the headers a current selected group and metadata items listed in the output
   from the LIST OVERVIEW.FMT command.

   If article is present in
   that group, the server treats the first form of MAY use that article number (see the HDR ARTICLE
   command (message-id
   specified) differently to (Section 6.2.1) and STAT examples (Section 6.2.4.3) for more
   details).  In the other two forms (range specified or
   current of the command, the article number used) in respect of which
   MUST be returned.

   Any subsequent fields are the contents of the other headers or and
   metadata
   items are available, then:
   o  if held in the MSGID argument is specified, database.

   For the results five mandatory headers, the content of each field MUST be those
      available for
   based on the first form content of the HDR command;
   o header (that is, with the header name and
   following colon and space removed).  If the article does not contain
   that header, or if the RANGE argument content is specified, empty, the results field MUST be those
      available for empty.
   For the second and third forms two mandatory metadata items, the content of the HDR command;
   o  if field MUST
   be just the value, with no argument is specified, other text.

   For all subsequent fields that contain headers, the results content MUST be those available
      in
   the entire header line other than the trailing CRLF.  For all forms
   subsequent fields that contain metadata, the field consists of the HDR command
   metadata name, a single space, and then the value.

   For all fields, the value is processed by first removing all CRLF
   pairs (that is, it MUST only list those
      items listed in both undoing any folding and removing the previous cases). terminating
   CRLF) and then replacing each TAB with a single space.  If there is
   no such header in the server does not treat article, or no such metadata item, or no header
   or item stored in the various forms differently, then it database for that article, the corresponding
   field MUST always produce be empty.

   Note that, after unfolding, the same results characters NUL, LF, and ignore any argument.

8.6.2.3  Examples

   Example CR cannot
   occur in the header of an implementation providing access to only a few headers:
      [C] LIST HEADERS
      [S] 215 headers supported:
      [S] Subject
      [S] Message-ID
      [S] Xref
      [S] .

   Example article offered by a conformant server.
   Nevertheless, servers SHOULD check for these characters and replace
   each one by a single space (so that, for example, CR LF LF TAB will
   become two spaces, since the CR and first LF will be removed by the
   unfolding process).  This will encourage robustness in the face of an implementation providing access
   non-conforming data; it is also possible that future versions of this
   specification could permit these characters to appear in articles.

   The server SHOULD NOT produce output for articles that no longer
   exist.

   If the same fields as argument is a message-id and no such article exists, a 430
   response MUST be returned.  If the first example argument is a range or is omitted
   and the current selected newsgroup is invalid, a 412 response MUST be
   returned.  If the argument is a range and no articles in Section 8.5.2.3: that number
   range exist in the current selected newsgroup, a 423 response MUST be
   returned.  If the argument is omitted and the current article number
   is invalid, a 420 response MUST be returned.

8.3.3  Examples

   In the first three examples, TAB has been replaced by vertical bar
   and some lines have been folded for readability.

   Example of a successful retrieval of overview information for an
   article (using no article number):
      [C] LIST EXTENSIONS
      [S] 202 extensions supported:
      [S] OVER
      [S] HDR GROUP   misc.test
      [S] . 211 1234 3000234 3002322 misc.test
      [C] LIST HEADERS OVER
      [S] 215 headers and metadata items supported: 224 Overview information follows
      [S] Date
      [S] Distribution
      [S] From
      [S] Message-ID
      [S] References
      [S] Subject
      [S] Xref
      [S] :bytes
      [S] :lines 300234|I am just a test article|"Demo User"
      <nobody@example.com>|6 Oct 1998 04:38:40 -0500|
      <45223423@example.com>|<45454@example.net>|1234|
      17|Xref: news.example.com misc.test:3000363
      [S] .

   Example of a successful retrieval of overview information for an implementation providing access to all headers:
   article by message-id:
      [C] LIST HEADERS CAPABILITIES
      [S] 215 metadata items supported: 101 Capability list:
      [S] : VERSION 2
      [S] :lines READER
      [S] :bytes OVER MSGID
      [S] :x-article-number LIST ACTIVE NEWSGROUPS OVERVIEW.FMT
      [S] .

   Example of an implementation distinguishing the first form of the HDR
   command from the other two forms:
      [C] LIST HEADERS RANGE
      [S] 215 metadata items supported:
      [S] : OVER   <45223423@example.com>
      [S] :lines 224 Overview information follows
      [S] :bytes 0|I am just a test article|"Demo User"
      <nobody@example.com>|6 Oct 1998 04:38:40 -0500|
      <45223423@example.com>|<45454@example.net>|1234|
      17|Xref: news.example.com misc.test:3000363
      [S] .
   Note that the article number has been replaced by "0".

   Example of the same commands on a system that does not implement
   retrieval by message-id:
      [C] LIST HEADERS MSGID
      [S] 215 headers and metadata items supported:
      [S] Date
      [S] Distribution
      [S] From
      [S] Message-ID CAPABILITIES
      [S] References 101 Capability list:
      [S] Subject VERSION 2
      [S] :lines READER
      [S] :bytes OVER
      [S] :x-article-number LIST ACTIVE NEWSGROUPS OVERVIEW.FMT
      [S] .
      [C] LIST HEADERS
      [S] 215 headers and metadata items supported:
      [S] Date
      [S] Distribution
      [S] From OVER   <45223423@example.com>
      [S] Message-ID 503 Overview by message-id unsupported

   Example of a successful retrieval of overview information for a range
   of articles:
      [C] GROUP   misc.test
      [S] References 211 1234 3000234 3002322 misc.test
      [C] OVER   3000234-3000240
      [S] Subject 224 Overview information follows
      [S] :lines 300234|I am just a test article|"Demo User"
      <nobody@example.com>|6 Oct 1998 04:38:40 -0500|
      <45223423@example.com>|<45454@example.net>|1234|
      17|Xref: news.example.com misc.test:3000363
      [S] :bytes 3000235|Another test article|nobody@nowhere.to
      (Demo User)|6 Oct 1998 04:38:45 -0500|<45223425@to.to>||
      4818|37||Distribution: fi
      [S] . 3000238|Re: I am just a test article|somebody@elsewhere.to|
      7 Oct 1998 11:38:40 +1200|<kfwer3v@elsewhere.to>|
      <45223423@to.to>|9234|51
      [S] .
   Note how :x-article-number does not appear the missing "References" and Xref headers in the last set of output.

9.  Augmented BNF Syntax for NNTP

   Each of second line,
   the following sections describes missing trailing field(s) in the syntax of a major
   element of NNTP.  This syntax extends first and refines the descriptions
   elsewhere in this specification, last lines, and should be given precedence when
   resolving apparent conflicts.  Note that ABNF [RFC2234] strings are
   case-insensitive.  Non-terminals used in several places
   there are defined
   in a separate section at the end.

   The non-terminals "command-line", "command-continuation", and
   "response" between them specify the text only results for those articles that flows between client
   and server.  For each command, the sequence is:
   o  the client sends an instance still exist.

   Example of "command-line";
   o  the server sends an instance unsuccessful retrieval of "response";
   o  while the latest response is one that indicates more data is
      required (in general, a 3xx response):
      *  the client sends overview information on an instance
   article by number:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] OVER   300256
      [S] 423 No such article in this group

   Example of "command-continuation";
      *  the server sends an instance unsuccessful retrieval of "response".

9.1  Commands

   This syntax defines the non-terminal "command-line", which represents
   what overview information by
   number because no newsgroup was selected first:
      [Assumes current selected newsgroup is sent from the client invalid.]
      [C] OVER
      [S] 412 No newsgroup selected

   Example of an attempt to retrieve information when the server.

     command-line = command EOL
     command = article-command /
           body-command /
           date-command /
           group-command /
           hdr-command /
           head-command /
           help-command /
           ihave-command /
           last-command /
           list-active-command /
           list-active-times-command /
           list-distrib-pats-command /
           list-distributions-command /
           list-extensions-command /
           list-headers-command /
           list-newsgroups-command /
           list-overview-fmt-command /
           listgroup-command /
           mode-reader-command /
           newgroups-command /
           newnews-command /
           next-command /
           over-command /
           post-command /
           quit-command /
           stat-command /
           x-command

     article-command = "ARTICLE" [article-ref]
     body-command = "BODY" [article-ref]
     date-command = "DATE"
     group-command = "GROUP" WS newsgroup-name
     hdr-command = "HDR" WS header-meta-name [range-ref]
     head-command = "HEAD" [article-ref]
     help-command = "HELP"
     ihave-command = "IHAVE" WS message-id
     last-command = "LAST"
     list-active-command = "LIST" [WS "ACTIVE" [WS wildmat]]
     list-active-times-command = "LIST" WS "ACTIVE.TIMES" [WS wildmat]
     list-distrib-pats-command = "LIST" WS "DISTRIB.PATS"
     list-distributions-command = "LIST" WS "DISTRIBUTIONS"
     list-extensions-command = "LIST" WS "EXTENSIONS"
     list-headers-command = "LIST" WS "HEADERS" WS ["MSGID" / "RANGE"]
     list-newsgroups-command = "LIST" WS "NEWSGROUPS" [WS wildmat]
     list-overview-fmt-command = "LIST" WS "OVERVIEW.FMT"
     listgroup-command = "LISTGROUP" [WS newsgroup-name]
     mode-reader-command = "MODE" WS "READER"
     newgroups-command = "NEWGROUPS" WS date-time
     newnews-command = "NEWNEWS" WS wildmat WS date-time
     next-command = "NEXT"
     over-command = "OVER" [WS range-ref]
     post-command = "POST"
     quit-command = "QUIT"
     stat-command = "STAT" [article-ref]
     x-command = x-command-name *(WS x-argument)
         ; This current
   selected newsgroup is the generic syntax empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] OVER
      [S] 420 No current article selected

8.4  LIST OVERVIEW.FMT

8.4.1  Usage

   Indicating capability: OVER
   Syntax
      LIST OVERVIEW.FMT
   Responses
      215   Information follows (multiline)

8.4.2  Description

   See Section 7.6.1 for an extension general requirements of the LIST command.
         ; Each extension

   The LIST OVERVIEW.FMT command returns a description of the fields in
   the database for which it is specified fully elsewhere

     article-ref = WS (article-number / message-id)
     date = date2y / date4y
     date4y = 4DIGIT 2DIGIT 2DIGIT
     date2y = 2DIGIT 2DIGIT 2DIGIT
     date-time = date WS time [WS "GMT"]
     header-meta-name = header-name / metadata-name
     metadata-name = ":" 1*A-NOTCOLON
     range = article-number ["-" [article-number]]
     range-ref = WS (range / message-id)
     time = 2DIGIT 2DIGIT 2DIGIT
     x-command-name = 3*12A-CHAR
     x-argument = 1*P-CHAR

9.2  Command continuation

   This syntax defines consistent (as described above).  The
   information is returned as a multi-line response following the further material sent 215
   response code.  The information contains one line per field in the
   order they are returned by the client in OVER command; the first 7 lines MUST
   (except for the case of multi-stage commands.

     command-continuation = ihave-continuation /
           post-continuation

     ihave-continuation = encoded-article
     post-continuation = encoded-article

     encoded-article = content-lines termination
       ; after undoing letters) be exactly:

       Subject:
       From:
       Date:
       Message-ID:
       References:
       :bytes
       :lines

    except that, for compatibility with existing implementations, the "byte-stuffing", this
   last two lines MAY instead be:

       Bytes:
       Lines:

    even though they refer to metadata, not headers.

   All subsequent lines MUST match "article"

9.3  Responses

9.3.1  Generic responses

   This syntax defines the non-terminal "response", which represents consist of either a header name followed by
   ":full", or the
   generic form name of responses - a piece of metadata.

   There are no leading or trailing spaces in the output.

   Note that is, what is sent from the server to 7 fixed lines describe the client in response 2nd to a command 8th fields of the
   OVER output.  The "full" suffix (which may use either uppercase,
   lowercase, or a command-continuation.

     response = simple-response / multiline-response
     multiline-response = simple-response content-lines termination

     simple-response =
           simple-response-content [SP trailing-comment] CRLF
     simple-response-content = 3DIGIT arguments
     trailing-comment = *U-CHAR
     arguments = *(SP argument) ; How many depends on the response
     argument = 1*A-CHAR

9.3.2  Initial response line contents

   This syntax defines mix) is a reminder that the specific initial response lines for corresponding fields
   include the
   various commands and extensions in this specification.  Only those
   response codes with arguments are listed.

     simple-response-content =/ response-111-content
           response-211-content
           response-22x-content
           response-401-content

     response-111-content = "111" SP date4y time
     response-211-content = "211" 3(SP article-number) SP newsgroup-name
     response-22x-content = ("220" / "221" / "222" / "223")
           SP article-number SP message-id
     response-401-content = "401" SP extension-label

9.3.3  Multi-line response contents header name.

   This syntax defines the content command MAY generate different results if used more than once in
   a session.

8.4.3  Examples

   Example of LIST OVERVIEW.FMT output corresponding to the various multi-line responses
   (more precisely, example OVER
   output above, using the part preferred format:
      [C] LIST OVERVIEW.FMT
      [S] 215 Order of fields in overview database.
      [S] Subject:
      [S] From:
      [S] Date:
      [S] Message-ID:
      [S] References:
      [S] :bytes
      [S] :lines
      [S] Xref:full
      [S] Distribution:full
      [S] .

   Example of LIST OVERVIEW.FMT output corresponding to the response example OVER
   output above, using the alternative format:
      [C] LIST OVERVIEW.FMT
      [S] 215 Order of fields in "content-lines"), overview database.
      [S] Subject:
      [S] From:
      [S] Date:
      [S] Message-ID:
      [S] References:
      [S] Bytes:
      [S] Lines:
      [S] Xref:FULL
      [S] Distribution:FULL
      [S] .

8.5  HDR

8.5.1  Usage

   Indicating capability: HDR
   Syntax
      HDR field message-id
      HDR field range
      HDR field
   Responses
      First form (message-id specified)
         225   Headers follow (multiline)
         430   No article with that message-id
      Second form (range specified)
         225   Headers follow (multiline)
         412   No newsgroup selected
         423   No articles in
   each case after any "byte-stuffing" has been undone.

     multiline-response-content that range
      Third form (current article number used)
         225   Headers follow (multiline)
         412   No newsgroup selected
         420   Current article number is invalid
   Parameters
      field      = article-response /
           body-response /
           hdr-response /
           head-response /
           help-response /
           list-active-response /
           list-active-times-response /
           list-distrib-pats-response /
           list-distributions-response /
           list-extensions-response /
           list-headers-response /
           list-newsgroups-response /
           list-overview-fmt-response /
           listgroup-response /
           newgroups-response /
           newnews-response /
           over-response

     article-response = article
     body-response = body
     hdr-response = *(article-number SP hdr-content CRLF)
     head-response = 1*header
     help-response = *(*B-CHAR CRLF)
     list-active-response = *(newsgroup-name SPA article-number
           SPA article-number SPA newsgroup-status CRLF)
     list-active-times-response =
           *(newsgroup-name SPA 1*DIGIT SPA newsgroup-creator CRLF)
     list-distrib-pats-response =
           *(1*DIGIT ":" wildmat ":" distribution CRLF)
     list-distributions-response =
           *(distribution SPA distribution-description CRLF)
     list-extensions-response =
           *(extension-descriptor CRLF)
     list-headers-response = *(header-meta-name CRLF) /
           *((metadata-name / ":") CRLF)
     list-newsgroups-response =
           *(newsgroup-name WS newsgroup-description CRLF)
     list-overview-fmt-response = list-overview-fmt-text
     listgroup-response = *(article-number CRLF)
     newgroups-response = list-active-response
     newnews-response = *(message-id CRLF)
     over-response = *(article-number over-content CRLF)

     list-overview-fmt-text =
           "Subject:" CRLF
           "From:" CRLF
           "Date:" CRLF
           "Message-ID:" CRLF
           "References:" CRLF
           ( ":bytes" CRLF ":lines" / "Bytes:" CRLF "Lines:") CRLF
           *((header-name ":full" / metadata-name) CRLF)

     distribution = 1*P-CHAR
     distribution-description = U-TEXT
     hdr-content = *S-NONTAB
     hdr-n-content = [(header-name ":" / metadata-name) SP hdr-content]
     newsgroup-creator = U-TEXT
     newsgroup-description = S-TEXT
     newsgroup-status = %x79 / %x6E / %x6D / private-status
     over-content = 1*6(TAB hdr-content) /
           7(TAB hdr-content) *(TAB hdr-n-content)
     private-status = 1*P-CHAR ; except the values in newsgroup-status

9.4  LIST EXTENSIONS responses

   This syntax defines the generic form name of a LIST EXTENSIONS response
   line.

     extension-argument = 1*P-CHAR
     extension-descriptor = extension-generic-descriptor
     extension-generic-descriptor =
           extension-label *(SPA extension-argument)
     extension-label = 1*12UPPER

   This syntax defines the specific LIST EXTENSIONS response lines for
   the various extensions in this specification.

     extension-descriptor =/ hdr-extension /
           listgroup-extension /
           over-extension

     hdr-extension = %x48.44.52                         ; "HDR"
     listgroup-extension field
      range      = %x4C.49.53.54.47.52.4F.55.50 ; "LISTGROUP"
     over-extension number(s) of articles
      message-id = %x4F.56.45.52 [SPA "MSGID"]       ; "OVER"

9.5  Articles

   This syntax defines the non-terminal "article", which represents the
   format message-id of an article as described in Section 3.4.

8.5.2  Description

   The HDR command provides access to specific fields from an article = 1*header CRLF body
     header = header-name ":" [CRLF] SP header-content CRLF
     header-content = *(S-CHAR / [CRLF] WS)
     body = *(*B-CHAR CRLF)

9.6  General non-terminals

   These non-terminals are used at various places
   specified by message-id, or from a specified article or range of
   articles in the syntax and are
   collected here for convenience.  A few current selected newsgroup.  It MAY take the
   information directly from the articles or from the overview database.
   In the case of these non-terminals are not
   used in this specification but are provided for headers, an implementation MAY restrict the consistency and
   convenience use of extension authors.

     article-number = 1*16DIGIT
     content-lines = *([content-text] CRLF)
     content-text = (".." / B-NONDOT) *B-CHAR
     header-name = 1*A-NOTCOLON
   this command to a specific list of headers or MAY allow it to be used
   with any header; it may behave differently when it is used with a
   message-id = "<" 1*248A-NOTGT ">"
     newsgroup-name = 1*wildmat-exact
     termination = "." CRLF
     wildmat = wildmat-pattern *("," ["!"] wildmat-pattern)
     wildmat-pattern = 1*wildmat-item
     wildmat-item = wildmat-exact / wildmat-wild
     wildmat-exact = %x21-29 / %x2B / %x2D-3E / %x40-5A / %x5E-7E /
          UTF8-non-ascii  ; exclude * , ? [ \ ]
     wildmat-wild = "*" / "?"

     base64 = *(4base64-char) [base64-terminal]
     base64-char = UPPER / LOWER / DIGIT / "+" / "/"
     base64-terminal = 2base64-char "==" / 3base64-char "="

     ; Assorted special character sets
     ;   A- means based on US-ASCII, excluding controls and SP
     ;   P- means based on UTF-8, excluding controls and SP
     ;   U- means based on UTF-8, excluding NUL CR argument and LF
     ;   B- means based on bytes, excluding NUL CR and LF
     A-CHAR     = %x21-7E
     A-NOTCOLON = %x21-39 / %x3B-7E  ; exclude ":"
     A-NOTGT    = %x21-3D / %x3F-7E  ; exclude ">"
     P-CHAR     = A-CHAR / UTF8-non-ascii
     U-CHAR     = CTRL / TAB / SP / A-CHAR / UTF8-non-ascii
     U-NONTAB   = CTRL /       SP / A-CHAR / UTF8-non-ascii
     U-TEXT     = P-CHAR *U-CHAR
     B-CHAR     = CTRL / TAB / SP / %x21-FF
     B-NONDOT   = CTRL / TAB / SP / %x21-2D / %x2F-FF  ; exclude "."

     ALPHA = UPPER / LOWER   ; use only when case-insensitive
     CR = %x0D
     CRLF = CR LF
     CTRL = %x01-08 / %x0B-0C / %x0E-1F
     DIGIT = %x30-39
     EOL = *(SP / TAB) CRLF
     LF = %x0A
     LOWER = %x61-7A
     SP = %x20
     SPA = 1*SP
     TAB = %x09
     UPPER = %x41-5A
     UTF8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4
     UTF8-2    = %xC2-DF UTF8-tail
     UTF8-3    = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2UTF8-tail /
                 %xED %x80-9F UTF8-tail / %xEE-EF 2UTF8-tail
     UTF8-4    = %xF0 %x90-BF 2UTF8-tail / %xF1-F3 3UTF8-tail /
                 %xF4 %x80-8F 2UTF8-tail
     UTF8-tail = %x80-BF
     WS = 1*(SP / TAB) it is used with a range or no argument.

   The following non-terminals require special consideration.  They
   represent situations where material SHOULD be restricted to UTF-8,
   but implementations MUST be able to cope required field argument is the name of a header with other character
   encodings.  Therefore there are two sets the colon
   omitted (e.g.  "subject"), or the name of definitions for them.

   Implementations MUST accept a metadata item including
   the leading colon (e.g.  ":bytes"), and is case-insensitive.

   The message-id argument indicates a specific article.  The range
   argument may be any content that meets this syntax:

     S-CHAR   = %x21-FF
     S-NONTAB = CTRL / SP / S-CHAR
     S-TEXT   = (CTRL / S-CHAR) *B-CHAR

   Implementations SHOULD only generate content that meets this syntax:

     S-CHAR   = P-CHAR
     S-NONTAB = U-NONTAB
     S-TEXT   = U-TEXT

10.  IANA Considerations

   This specification requires IANA to keep a registry of
   extension-labels.  The initial contents of this registry are
   specified in Section 8.1.  As described in Section 8, names beginning
   with X are reserved for private use while all other names are
   expected to be associated with a specification in an RFC on the
   standards-track or defining following:
   o  an IESG-approved experimental protocol.

   Different entries in the registry MUST use different
   extension-labels.

   Different entries in the registry MUST NOT use the same command name.
   For this purpose, variants distinguished article number
   o  an article number followed by a second or subsequent
   keyword (e.g.  "LIST HEADERS" and "LIST OVERVIEW.FMT") count as
   different commands. dash to indicate all following
   o  an article number followed by a dash followed by another article
      number
   If there neither is specified, the current article number is used.

   If the information is available, it is returned as a need multi-line
   response following the 225 response code and contains one line for two extensions to use
   each article in the
   same command, range that exists (note that unless the argument
   is a single harmonised specification MUST range including a dash, there will be registered.

11.  Security Considerations

   This section is meant to inform application developers, information
   providers, at most one line but it
   will still be in multi-line format).  The line consists of the
   article number, a space, and users then the contents of the security limitations in NNTP as described
   by this document.  The discussion does not include definitive
   solutions to field.  In the problems revealed, though it does make some
   suggestions for reducing security risks.

11.1  Personal
   case of a header, the header name, colon, and Proprietary Information

   NNTP, because it was created to distribute network news articles,
   will forward whatever information the first space after
   the colon are all omitted.

   If the article is stored in those articles.
   Specification specified by message-id (the first form of the
   command), the article number MUST be replaced with zero, except that information is outside this scope of this
   document, but it
   if there is likely that some personal and/or proprietary
   information a current selected group and the article is available present in some of those articles.  It is very
   important
   that designers and implementers provide informative
   warnings to users so personal and/or proprietary information in
   material group, the server MAY use that is added automatically to articles (e.g.  in headers)
   is not disclosed inadvertently.  Additionally, effective article number (see the ARTICLE
   command (Section 6.2.1) and easily
   understood mechanisms to manage STAT examples (Section 6.2.4.3) for more
   details).  In the distribution other two forms of news articles
   SHOULD the command, the article number
   MUST be provided to NNTP Server administrators, so that they returned.

   Header contents are
   able to report modified as follows: all CRLF pairs are removed,
   and then each TAB is replaced with confidence a single space (note that this is
   the likely spread of any particular
   set of news articles.

11.2  Abuse of Server Log Information

   A server same transformation as is in performed by the position to save session data about a user's
   requests that might identify their reading patterns or subjects of
   interest.  This information is clearly confidential in nature OVER command
   (Section 8.3.2), and its
   handling can be constrained by law in certain countries.  People
   using the NNTP protocol same comment concerning NUL, CR, and LF
   applies).

   Note the distinction between headers and metadata appearing to provide data have
   the same meaning.  Headers are responsible always taken unchanged from the
   article; metadata are always calculated.  For example, a request for ensuring
   that such material is not distributed without
   "Lines" returns the permission contents of any
   individuals that are identifiable by the published results.

11.3  Weak Authentication and Access Control

   There is "Lines" header of the specified
   articles, if any, no user-based matter whether or token-based authentication in not they accurately state the basic
   NNTP specification.  Access
   number of lines, while a request for ":lines" returns the line count
   metadata, which is normally controlled by server
   configuration files.  Those files specify access by using domain
   names or IP addresses.  However, this specification does permit always the
   creation actual number of extensions to lines irrespective of
   what any header may state.

   If the NNTP protocol itself for such purposes;
   one such extension is [NNTP-AUTH].  While including such mechanisms requested header is optional, doing so not present in the article or if it is strongly encouraged.

   Other mechanisms are also available.  For example,
   present but empty, a proxy server
   could be put in place line for that requires authentication before connecting
   via the proxy to article is included in the NNTP server.

11.4  DNS Spoofing

   Many existing NNTP implementations authorize incoming connections by
   checking output
   but the IP address header content portion of that connection against the IP addresses
   obtained via DNS lookups of lists of domain names given in local
   configuration files.  Servers that use this type of authentication,
   and clients that find a server by doing a DNS lookup of the server
   name, rely very heavily on the Domain Name Service, and are thus
   generally prone to security attacks based on line is empty (the space after
   the deliberate
   misassociation of IP addresses and DNS names.  Clients and servers
   need to article number MAY be cautious in assuming retained or omitted).  If the continuing validity of an IP
   number/DNS name association.

   In particular, NNTP clients and servers SHOULD rely on their name
   resolver for confirmation of an IP number/DNS name association,
   rather header occurs
   in a given article more than caching once, only the result content of previous host name lookups.  Many
   platforms already can cache host name lookups locally when
   appropriate, and they SHOULD be configured to do so.  It is proper
   for these lookups to be cached, however, only when the TTL (Time To
   Live) information reported first
   occurrence is returned by HDR.  If any article number in the name server makes it likely provided
   range does not exist in the group, no line for that article number is
   included in the cached information will remain useful. output.

   If NNTP clients or servers cache the results of host name lookups in
   order to achieve second argument is a performance improvement, they message-id and no such article exists, a
   430 response MUST observe the TTL
   information reported by DNS. be returned.  If NNTP clients the second argument is a range or servers do not
   observe this rule, they could be spoofed when a previously accessed
   server's IP address changes.  As network renumbering
   is expected to
   become increasingly common, omitted and the possibility of this form of attack
   will grow.  Observing this requirement thus reduces this potential
   security vulnerability.

   This requirement also improves current selected newsgroup is invalid, a 412
   response MUST be returned.  If the load-balancing behaviour of
   clients for replicated servers using second argument is a range and no
   articles in that number range exist in the same DNS name current selected
   newsgroup, a 423 response MUST be returned.  If the second argument
   is omitted and reduces the likelihood of current article number is invalid, a user's experiencing failure in accessing sites
   that use that strategy.

11.5  UTF-8 issues

   UTF-8 [RFC3629] permits 420 response
   MUST be returned.

   A server MAY only certain sequences of octets and
   designates others as either malformed or "illegal".  The Unicode
   standard identifies allow HDR commands for a number of security issues related to illegal
   sequences and forbids their generation by conforming implementations.

   Implementations limited set of fields; it
   may behave differently in this specification respect for the first (message-id)
   form than for the other forms.  If so, it MUST NOT generate malformed or
   illegal sequences and SHOULD detect them and take some appropriate
   action.  This could include:
   o  generating a 501 respond with the
   generic 503 response code.

   o  replacing to attempts to request other fields, rather than
   returning erroneous results such sequences by as a successful empty response.

   If HDR uses the sequence %xEF.BF.BD, which encodes overview database and it is inconsistent for the "replacement character" U+FFFD;
   o  closing
   requested field, the connection;
   o  replacing such sequences by a "guessed" valid sequence (based on
      properties of server MAY return what results it can or it MAY
   respond with the UTF-8 encoding);
   In generic 503 response; in the last latter case, the implementation field
   MUST ensure that any replacement
   cannot be used to bypass validity or security checks.  For example,
   the illegal sequence %xC0.A0 is an over-long encoding for space
   (%x20).  If it is replaced by the latter NOT appear in a command line, this
   needs to happen before the command line is parsed into individual
   arguments.  If the replacement came after parsing, it would be
   possible to generate an argument with an embedded space, which is
   forbidden.  Use output from LIST HEADERS.

8.5.3  Examples

   Example of the "replacement character" does not have this
   problem, since it is permitted wherever non-US-ASCII characters are.
   Implementations SHOULD use one a successful retrieval of the first two solutions where the
   general structure subject lines from a range of the NNTP stream remains intact,
   articles (3000235 has no Subject header, and close the
   connection if it 3000236 is no longer possible to parse it sensibly.

11.6  Caching missing):
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HDR   Subject 3000234-300238
      [S] 225 Headers follow
      [S] 3000234 I am just a test article
      [S] 3000235
      [S] 3000237 Re: I am just a test article
      [S] 3000238 Ditto
      [S] .

   Example of LIST EXTENSIONS results

   The LIST EXTENSIONS command provides information about the extensions
   currently available a successful retrieval of line counts from the server.  Whenever there is a relevant
   change to the server state, the results range of this command are required
   to change accordingly.

   In most situations the results from this command in a given server
   state will not change from session to session; a given extension will
   be installed permanently on a server.  Some clients may therefore
   wish to remember which extensions a server supports to avoid the
   delay
   articles:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HDR   :lines 3000234-300238
      [S] 225 Headers follow
      [S] 3000234 42
      [S] 3000235 5
      [S] 3000237 11
      [S] 3000238 2378
      [S] .

   Example of an additional command and response, particularly if they
   open multiple connections in the same session.

   However, information about extensions related to security and privacy
   MUST NOT be cached, since this could allow a variety successful retrieval of attacks.

   For example, consider a server which permits the use of cleartext
   passwords on links that are encrypted but not otherwise:
      [Initial TCP connection set-up completed.] subject line from an article
   by message-id:
      [C] GROUP   misc.test
      [S] 200 NNTP Service Ready, posting permitted 211 1234 3000234 3002322 misc.test
      [C] LIST EXTENSIONS HDR   subject <i.am.a.test.article@example.com>
      [S] 202 Extensions supported: 225 Header information follows
      [S] XENCRYPT 0 I am just a test article
      [S] .
      [C] XENCRYPT
      [Client and server negotiate encryption on

   Example of a successful retrieval of the link] subject line from the
   current article:

      [C] GROUP   misc.test
      [S] 283 Encrypted link established 211 1234 3000234 3002322 misc.test
      [C] LIST EXTENSIONS HDR   subject
      [S] 202 Extensions supported: 225 Header information follows
      [S] XSECRET 3000234 I am just a test article
      [S] .

   Example of an unsuccessful retrieval of a header from an article by
   message-id:
      [C] XSECRET   fred flintstone HDR   subject <i.am.not.there@example.com>
      [S] 290 Password for fred accepted

   If the client caches the last LIST EXTENSIONS result, then on the
   next session it will attempt to use XSECRET on 430 No Such Article Found

   Example of an unencrypted link:
      [Initial TCP connection set-up completed.]
      [S] 200 NNTP Service Ready, posting permitted unsuccessful retrieval of headers from articles by
   number because no newsgroup was selected first:
      [Assumes current selected newsgroup is invalid.]
      [C] XSECRET   fred flintstone HDR   subject 300256-
      [S] 483 Only permitted on secure links
   exposing the password to any eavesdropper.  While the primary cause 412 No newsgroup selected

   Example of this is passing a secret without first checking the security an unsuccessful retrieval of headers because the link, caching current
   selected newsgroup is empty:
      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] HDR   subject 1-
      [S] 423 No articles in that range

   Example of LIST EXTENSIONS results can increase the risk.

   Any security extension should include requirements to check the
   security state an unsuccessful retrieval of headers because the link in a manner appropriate to that extension.

   Caching should normally only be considered server
   does not allow HDR commands for anonymous clients that
   do header:
      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HDR   Content-Type 3000234-300238
      [S] 503 HDR not use any security or privacy extensions and permitted on Content-Type

8.6  LIST HEADERS

8.6.1  Usage

   Indicating capability: HDR
   Syntax
      LIST HEADERS [MSGID|RANGE]
   Responses
      215   Field list follows (multiline)
   Parameters
      MSGID = requests list for which the time
   required access by message-id
      RANGE = requests list for an additional access by range

8.6.2  Description

   See Section 7.6.1 for general requirements of the LIST command.

   The LIST HEADERS command and response is returns a noticeable
   issue.

12.  Acknowledgements

   This document is the result list of much effort by fields that may be
   retrieved using the present and past
   members of HDR command.

   The information is returned as a multi-line response following the NNTP Working Group, chaired by Russ Allbery
   215 response code and Ned
   Freed.  It could not have been produced without them.

   The author acknowledges contains one line for each field name
   (excluding the original authors of NNTP as documented in
   RFC 977 [RFC977]: Brian Kantor trailing colon for headers and Phil Lapsey.

   The author gratefully acknowledges:
   o  The work of including the NNTP committee chaired by Eliot Lear.  The
      organization of this document was influenced by leading
   colon for metadata items).  If the last available
      draft from this working group.  A special thanks implementation allows any header
   to Eliot for
      generously providing be retrieved, it MUST NOT include any header names in the original machine-readable sources for list but
   MUST include the special entry ":" (a single colon on its own); it
   MUST still explicitly list any metadata items that document.
   o are available.
   The work order of items in the DRUMS working group, specifically RFC 1869
      [RFC1869], which list is not significant; the basis of server need
   not even consistently return the NNTP extensions mechanism
      detailed same order.  The list MAY be empty
   (though in this document.
   o  The authors of RFC 2616 [RFC2616] for circumstance there is little point in providing specific and
      relevant examples of security issues that should be considered for
      HTTP.  Since many of the same considerations exist for NNTP, those
      examples
   HDR command).

   An implementation that are relevant have been included here with some minor
      rewrites.
   o  The comments and additional information provided by the following
      individuals in preparing one or more of also supports the progenitors of this
      document:
         Russ Allbery <rra@stanford.edu>
         Wayne Davison <davison@armory.com>
         Chris Lewis <clewis@bnr.ca>
         Tom Limoncelli <tal@mars.superlink.net>
         Eric Schnoebelen <eric@egsner.cirr.com>
         Rich Salz <rsalz@osf.org>

   This work was motivated by OVER command SHOULD at least
   permit all the work of various news reader authors headers and news server authors, which includes those metadata items listed below:
   Rick Adams
      Original author of in the NNTP extensions to output from
   the RN news reader and
      last maintainer of Bnews
   Stan Barber
      Original author LIST OVERVIEW.FMT command.

   If the server treats the first form of the NNTP extensions HDR command (message-id
   specified) differently to the news readers that
      are part of Bnews
   Geoff Collyer
      Original author other two forms (range specified or
   current article number used) in respect of which headers or metadata
   items are available, then:
   o  if the OVERVIEW database proposal and one of MSGID argument is specified, the
      original authors of CNEWS
   Dan Curry
      Original author of results MUST be those
      available for the xvnews news reader
   Wayne Davison
      Author first form of the first threading extensions to HDR command;
   o  if the RN news reader
      (commonly called TRN)
   Geoff Huston
      Original author of ANU NEWS
   Phil Lapsey
      Original author of RANGE argument is specified, the UNIX reference implementation results MUST be those
      available for NNTP
   Iain Lea
      Original maintainer of the TIN news reader
   Chris Lewis
      First known implementer second and third forms of the AUTHINFO GENERIC extension
   Rich Salz
      Original author of INN
   Henry Spencer
      One of HDR command;
   o  if no argument is specified, the original authors of CNEWS
   Kim Storm
      Original author of the NN news reader

   Other people who contributed to this document include:

      Matthias Andree
      Greg Andruk
      Maurizio Codogno
      Andrew Gierth
      Juergen Helbing
      Scott Hollenbeck
      Charles Lindsey
      Ade Lovett
      Ken Murchinson
      Francois Petillon
      Peter Robinson
      Rob Siemborski
      Howard Swinehart
      Ruud van Tol
      Jeffrey Vinocur

   The author thanks them results MUST be those available
      in all and apologises to anyone omitted.

   Finally, forms of the present author gratefully acknowledges HDR command (that is, it MUST only list those
      items listed in both the vast amount
   of work put into previous drafts by cases).

   If the previous author:
      Stan Barber <sob@academ.com>

13.  References

13.1  Normative References

   [ANSI1986]
              American National Standards Institute, "Coded Character
              Set - 7-bit American Standard Code for Information
              Interchange", ANSI X3.4, 1986.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC2234]  Crocker, D. and P. Overell, "Augmented BNF for Syntax
              Specifications: ABNF", RFC 2234, November 1997.

   [RFC3548]  Josefsson, S., "The Base16, Base32, server does not treat the various forms differently, then it
   MUST always produce the same results and Base64 Data
              Encodings", RFC 3548, July 2003.

   [RFC3629]  Yergeau, F., "UTF-8, ignore any argument.

8.6.3  Examples

   Example of an implementation providing access to only a transformation format few headers:
      [C] LIST HEADERS
      [S] 215 headers supported:
      [S] Subject
      [S] Message-ID
      [S] Xref
      [S] .

   Example of ISO
              10646", STD 63, RFC 3629, November 2003.

   [RFC977]   Kantor, B. and P. Lapsley, "Network News Transfer
              Protocol", RFC 977, February 1986.

   [TF.686-1]
              International Telecommunications Union - Radio, "Glossary,
              ITU-R Recommendation TF.686-1", ITU-R Recommendation
              TF.686-1, October 1997.

13.2  Informative References

   [NNTP-AUTH]
              Vinocur, J., Newman, C. and K. Murchinson, "NNTP
              Authentication", draft-ietf-nntpext-authinfo-02 (work in
              progress), July 2004.

   [NNTP-TLS]
              Vinocur, J. and C. Newman, "Using TLS with NNTP",
              draft-ietf-nntpext-tls-nntp-01 (work in progress), October
              2003.

   [RFC1036]  Horton, M. and R. Adams, "Standard for interchange of
              USENET messages", RFC 1036, December 1987.

   [RFC1305]  Mills, D., "Network Time Protocol (Version 3)
              Specification, Implementation", RFC 1305, March 1992.

   [RFC1869]  Klensin, J., Freed, N., Rose, M., Stefferud, E. and D.

              Crocker, "SMTP Service Extensions", STD 10, RFC 1869,
              November 1995.

   [RFC2616]  Fielding, R., Gettys, J., Mogul, J., Nielsen, H.,
              Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext
              Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.

   [RFC2629]  Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629,
              June 1999.

   [RFC2822]  Resnick, P., "Internet Message Format", RFC 2822, April
              2001.

   [RFC2980]  Barber, S., "Common NNTP Extensions", RFC 2980, October
              2000.

   [ROBE1995]
              Robertson, R., "FAQ: Overview database / NOV General
              Information", January 1995.

              There is no definitive copy of this document known an implementation providing access to the
              author.  It was previously posted same fields as
   the Usenet article
              <news:nov-faq-1-930909720@agate.Berkeley.EDU>

   [SALZ1992]
              Salz, R., "Manual Page for wildmat(3) from the INN 1.4
              distribution, Revision 1.10", April 1992.

              There is no definitive copy first example in Section 8.4.3:
      [C] CAPABILITIES
      [S] 101 Capability list:

      [S] VERSION 2
      [S] READER
      [S] OVER
      [S] HDR
      [S] LIST ACTIVE NEWSGROUPS HEADERS OVERVIEW.FMT
      [S] .
      [C] LIST HEADERS
      [S] 215 headers and metadata items supported:
      [S] Date
      [S] Distribution
      [S] From
      [S] Message-ID
      [S] References
      [S] Subject
      [S] Xref
      [S] :bytes
      [S] :lines
      [S] .

   Example of this document known an implementation providing access to all headers:
      [C] LIST HEADERS
      [S] 215 metadata items supported:
      [S] :
      [S] :lines
      [S] :bytes
      [S] :x-article-number
      [S] .

   Example of an implementation distinguishing the
              author.

Author's Address

   Clive D.W. Feather
   Thus plc
   322 Regents Park Road
   London  N3 2QQ
   GB

   Phone: +44 20 8495 6138
   Fax:   +44 870 051 9937
   EMail: clive@demon.net
   URI:   http://www.davros.org/

Appendix A.  Future Directions

   It has been proposed that first form of the response code range 6xx be used for
   multiline responses.  While existing commands HDR
   command from the other two forms:
      [C] LIST HEADERS RANGE
      [S] 215 metadata items supported:
      [S] :
      [S] :lines
      [S] :bytes
      [S] .
      [C] LIST HEADERS MSGID
      [S] 215 headers and extensions do metadata items supported:
      [S] Date
      [S] Distribution
      [S] From
      [S] Message-ID
      [S] References
      [S] Subject
      [S] :lines
      [S] :bytes
      [S] :x-article-number
      [S] .

      [C] LIST HEADERS
      [S] 215 headers and metadata items supported:
      [S] Date
      [S] Distribution
      [S] From
      [S] Message-ID
      [S] References
      [S] Subject
      [S] :lines
      [S] :bytes
      [S] .
   Note how :x-article-number does not
   use this, it would at least limit the problem clients would face appear in
   dealing with an unknown response.

Appendix B.  Interaction with other specifications

   NNTP is most often used the last set of output.

9.  Augmented BNF Syntax for transferring articles NNTP

   Each of the following sections describes the syntax of a major
   element of NNTP.  This syntax extends and refines the descriptions
   elsewhere in this specification, and should be given precedence when
   resolving apparent conflicts.  Note that conform to RFC
   1036 [RFC1036] (such articles ABNF [RFC2234] strings are called "Netnews articles" here).
   It is also sometimes
   case-insensitive.  Non-terminals used for transferring email messages that
   conform to RFC 2822 [RFC2822] (such articles in several places are called "email
   articles" here).  In this situation, articles must conform both to
   this specification and to that other one; this appendix describes
   some relevant issues.

B.1  Header folding

   NNTP allows a header line to be folded (by inserting defined
   in a CRLF pair)
   before any space or TAB character.

   Both email and Netnews articles are required to have at least one
   octet other than space or TAB on each header line.  Thus folding can
   only happen separate section at one point in each sequence of consecutive spaces or
   TABs.  Netnews articles are further required to have the header name,
   colon, end.

   The non-terminals <command-line>, <command-continuation>, and following space all on
   <response> between them specify the first line; folding may only
   happen beyond text that space.  Finally, some non-conforming software will
   remove trailing spaces flows between client
   and TABs from a line.  Therefore it might be
   inadvisable to fold a header after a space or TAB. server.  For maximum safety, header lines SHOULD conform to each command, the following
   syntax rather than sequence is:
   o  the client sends an instance of <command-line>;
   o  if the client is one that in Section 9.5.

     header = header-name ":" SP [header-content] CRLF
     header-content = [WS] 1*P-CHAR *( [CRLF] WS 1*P-CHAR )

B.2  Message-IDs

   Every article handled by immediately streams data [1], it sends
      an NNTP server MUST have a unique
   message-id.  For instance of <command-datastream>;
   o  the purposes server sends an instance of this specification, a message-id <response>;
   o  while the latest response is
   an arbitrary opaque string one that merely needs to meet certain
   syntactic requirements and is just a way to refer to the article.

   Because there indicates more data is
      required (in general, a significant risk of old articles being reinjected
   into the global Usenet system, RFC 1036 [RFC1036] requires that
   message-ids are globally unique for all time.

   This specification states that message-ids are the same if and only
   if they consist of 3xx response):
      *  the same sequence of octets.  Other specifications
   may define two different sequences as being equal because they are
   putting client sends an interpretation on particular characters.  RFC 2822
   [RFC2822] has a concept instance of "quoted" and "escaped" characters.  It
   therefore considers <command-continuation>;
      *  the three message-ids:

      <abcd@example.com>
      <"abcd"@example.com>
      <"ab\cd"@example.com>
   as being identical.  Therefore server sends an NNTP implementation handing email
   articles must ensure that only one instance of these three appears in the
   protocol and the other two <response>.

   [1] There are converted to it as and when necessary,
   such as when a client checks the results of a NEWNEWS command against
   an internal database of message-ids.  Note no commands in this specification that RFC 1036 [RFC1036]
   never treats two different strings as being identical.  Its draft
   successor restricts the syntax of message-ids so that, whenever RFC
   2822 would treat two strings as equivalent, only one of them immediately
   stream data, but this non-terminal is valid
   (in the above example only defined for the first string is valid). convenience of
   extensions.

9.1  Commands

   This specification does not describe how syntax defines the message-id of an article non-terminal <command-line>, which represents
   what is determined; it may be deduced from the contents of the article or
   derived sent from some external source.  If the server is also conforming client to another specification that contains a definition of the server.

     command-line = command EOL
     command = X-command
     X-command = keyword *(WS token)

     command =/ article-command /
           body-command /
           capabilities-command /
           date-command /
           group-command /
           hdr-command /
           head-command /
           help-command /
           ihave-command /
           last-command /
           list-command /
           listgroup-command /
           mode-reader-command /
           newgroups-command /
           newnews-command /
           next-command /
           over-command /
           post-command /
           quit-command /
           stat-command

     article-command = "ARTICLE" [WS article-ref]
     body-command = "BODY" [WS article-ref]
     capabilities-command = "CAPABILITIES" [WS keyword]
     date-command = "DATE"
     group-command = "GROUP" WS newsgroup-name
     hdr-command = "HDR" WS header-meta-name [WS range-ref]
     head-command = "HEAD" [WS article-ref]
     help-command = "HELP"
     ihave-command = "IHAVE" WS message-id
   compatible with this one,
     last-command = "LAST"
     list-command = "LIST" [WS list-arguments]
     listgroup-command = "LISTGROUP" [WS newsgroup-name]
     mode-reader-command = "MODE" WS "READER"
     newgroups-command = "NEWGROUPS" WS date-time
     newnews-command = "NEWNEWS" WS wildmat WS date-time
     next-command = "NEXT"
     over-command = "OVER" [WS range-ref]
     post-command = "POST"
     quit-command = "QUIT"
     stat-command = "STAT" [WS article-ref]

     article-ref = article-number / message-id
     date = date2y / date4y
     date4y = 4DIGIT 2DIGIT 2DIGIT
     date2y = 2DIGIT 2DIGIT 2DIGIT
     date-time = date WS time [WS "GMT"]
     header-meta-name = header-name / metadata-name
     list-arguments = keyword [WS token]
     metadata-name = ":" 1*A-NOTCOLON
     range = article-number ["-" [article-number]]
     range-ref = range / message-id
     time = 2DIGIT 2DIGIT 2DIGIT

9.2  Command continuation

   This syntax defines the server SHOULD use those message-ids.  A
   common approach, and one that SHOULD be used for email and Netnews
   articles, is to extract further material sent by the message-id from client in the contents
   case of a header
   with name "Message-ID".  This may multi-stage commands and those that stream data.

     command-datastream = UNDEFINED
       ; not be as simple as copying the
   entire header contents; it may be necessary to strip off comments and
   undo quoting, or to reduce "equivalent" message-ids to a canonical
   form.

   If an article is obtained through the IHAVE command, there will be a
   message-id provided with the command.  The server MAY either use it
   or determine one from the article contents.  However, whichever it
   does it SHOULD ensure that, if the IHAVE command is repeated with the
   same argument and article, it will be recognized used, provided as a duplicate.

   If an article does not contain a message-id that hook for extensions
     command-continuation = ihave-continuation /
           post-continuation

     ihave-continuation = encoded-article
     post-continuation = encoded-article

     encoded-article = content-lines termination
       ; after undoing the server can
   identify, it "byte-stuffing", this MUST synthesize one. match <article>

9.3  Responses

9.3.1  Generic responses

   This could, for example, be a
   simple sequence number or based on syntax defines the date and time that non-terminal <response>, which represents the article
   arrived.  When handling email or Netnews articles, a Message-ID
   header SHOULD be added to ensure global consistency and uniqueness.

B.3  Article posting

   As far as NNTP
   generic form of responses - that is, what is concerned, the POST and IHAVE commands provide sent from the
   same basic facilities in a slightly different way.  However they have
   rather different intentions.

   The IHAVE command is intended for transmitting conforming articles
   between a system of NNTP servers, with all articles perhaps also
   conforming server to another specification (e.g.  all articles are Netnews
   articles).  It is expected that
   the client will have already done any
   necessary validation (or has in turn obtained the article from response to a
   third party which has done so); therefore <command> or a<command-continuation>.

     response = simple-response / multiline-response
     multiline-response = simple-response content-lines termination

     simple-response =
           simple-response-content [SP trailing-comment] CRLF
     simple-response-content = X-simple-response-content
     X-simple-response-content = 3DIGIT *(SP response-argument)
     response-argument = 1*A-CHAR
     trailing-comment = *U-CHAR

9.3.2  Initial response line contents

   This syntax defines the specific initial response lines for the
   various commands in this specification.  Only those response codes
   with arguments are listed.

     simple-response-content =/ response-111-content
           response-211-content
           response-22x-content
           response-401-content

     response-111-content = "111" SP date4y time
     response-211-content = "211" 3(SP article-number) SP newsgroup-name
     response-22x-content = ("220" / "221" / "222" / "223")
           SP article-number SP message-id
     response-401-content = "401" SP capability-label

9.3.3  Multi-line response contents SHOULD be left
   unchanged.

   In contrast,

   This syntax defines the content of the various multi-line responses
   (more precisely, the part of the response in <content-lines>), in
   each case after any "byte-stuffing" has been undone.

     multiline-response-content = article-response /
           body-response /
           capabilities-response /
           hdr-response /
           head-response /
           help-response /
           list-response /
           listgroup-response /
           newgroups-response /
           newnews-response /
           over-response

     article-response = article
     body-response = body
     capabilities-response = 1*(capability-line CRLF)
     hdr-response = *(article-number SP hdr-content CRLF)
     head-response = 1*header
     help-response = *(*B-CHAR CRLF)
     list-response = body
     listgroup-response = *(article-number CRLF)
     newgroups-response = *(newsgroup-name SPA article-number
           SPA article-number SPA newsgroup-status CRLF)
     newnews-response = *(message-id CRLF)
     over-response = *(article-number over-content CRLF)

     hdr-content = *S-NONTAB
     hdr-n-content = [(header-name ":" / metadata-name) SP hdr-content]
     newsgroup-status = %x79 / %x6E / %x6D / private-status
     over-content = 1*6(TAB hdr-content) /
           7(TAB hdr-content) *(TAB hdr-n-content)
     private-status = token ; except the values in newsgroup-status

9.4  Capability lines

   This syntax defines the generic form of a capability line in the
   capabilities list (see Section 3.3.1).

     capability-line = capability-entry
     capability-entry = X-capability-entry
     X-capability-entry = capability-label *(WS capability-argument)
     capability-label = keyword
     capability-argument = token

   This syntax defines the specific capability entries for the
   capabilities in this specification.

     capability-entry =/
           hdr-capability /
           ihave-capability /
           implementation-capability /
           list-capability /
           mode-reader-capability /
           over-capability /
           reader-capability /
           version-capability

     hdr-capability = "HDR"
     ihave-capability = "IHAVE"
     implementation-capability = "IMPLEMENTATION" *(WS token)
     list-capability = "LIST" 1*(WS keyword)
     mode-reader-capability = "MODE-READER"
     over-capability = "OVER" [WS "MSGID"]
     reader-capability = "READER" *(WS reader-option)
     reader-option = "POST" / "LISTGROUP"  ; each to appear at most once
     version-capability = "VERSION" 1*(WS version-number)
     version-number = nzDIGIT *5DIGIT

9.5  LIST variants

   This section defines more specifically the keywords for the LIST
   command and the syntax of the corresponding responses.

     ; active
     list-arguments =/ "ACTIVE" [WS wildmat]
     list-response =/ list-active-response
     list-active-response = newgroups-response

     ; active.times
     list-arguments =/ "ACTIVE.TIMES" [WS wildmat]
     list-response =/ list-active-times-response
     list-active-times-response =
           *(newsgroup-name SPA 1*DIGIT SPA newsgroup-creator CRLF)
     newsgroup-creator = U-TEXT

     ; distrib.pats
     list-arguments =/ "DISTRIB.PATS"
     list-response =/ list-distrib-pats-response
     list-distrib-pats-response =
           *(1*DIGIT ":" wildmat ":" distribution CRLF)
     distribution = token

     ; headers
     list-arguments =/ "HEADERS" [WS ("MSGID" / "RANGE")]
     list-response =/ list-headers-response
     list-headers-response = *(header-meta-name CRLF) /
           *((metadata-name / ":") CRLF)

     ; newsgroups
     list-arguments =/ "NEWSGROUPS" [WS wildmat]
     list-response =/ list-newsgroups-response
     list-newsgroups-response =
           *(newsgroup-name WS newsgroup-description CRLF)
     newsgroup-description = S-TEXT

     ; overview.fmt
     list-arguments =/ "OVERVIEW.FMT"
     list-response =/ list-overview-fmt-response
     list-overview-fmt-response = "Subject:" CRLF
           "From:" CRLF
           "Date:" CRLF
           "Message-ID:" CRLF
           "References:" CRLF
           ( ":bytes" CRLF ":lines" / "Bytes:" CRLF "Lines:") CRLF
           *((header-name ":full" / metadata-name) CRLF)

9.6  Articles

   This syntax defines the non-terminal <article>, which represents the
   format of an article as described in Section 3.6.

     article = 1*header CRLF body
     header = header-name ":" [CRLF] SP header-content CRLF
     header-content = *(S-CHAR / [CRLF] WS)
     body = *(*B-CHAR CRLF)

9.7  General non-terminals

   These non-terminals are used at various places in the syntax and are
   collected here for convenience.  A few of these non-terminals are not
   used in this specification but are provided for the consistency and
   convenience of extension authors.

     article-number = 1*16DIGIT
     content-lines = *([content-text] CRLF)
     content-text = (".." / B-NONDOT) *B-CHAR
     header-name = 1*A-NOTCOLON
     keyword = ALPHA 2*11(ALPHA / DIGIT / "." / "-")
     message-id = "<" 1*248A-NOTGT ">"
     newsgroup-name = 1*wildmat-exact
     termination = "." CRLF
     token = 1*P-CHAR

     wildmat = wildmat-pattern *("," ["!"] wildmat-pattern)
     wildmat-pattern = 1*wildmat-item
       ; must not begin with "!" if not immediately preceded by "!"
     wildmat-item = wildmat-exact / wildmat-wild
     wildmat-exact = %x21-29 / %x2B / %x2D-3E / %x40-5A / %x5E-7E /
          UTF8-non-ascii  ; exclude * , ? [ \ ]
     wildmat-wild = "*" / "?"

     base64 = *(4base64-char) [base64-terminal]
     base64-char = UPPER / LOWER / DIGIT / "+" / "/"
     base64-terminal = 2base64-char "==" / 3base64-char "="

     ; Assorted special character sets
     ;   A- means based on US-ASCII, excluding controls and SP
     ;   P- means based on UTF-8, excluding controls and SP
     ;   U- means based on UTF-8, excluding NUL CR and LF
     ;   B- means based on bytes, excluding NUL CR and LF
     A-CHAR     = %x21-7E
     A-NOTCOLON = %x21-39 / %x3B-7E  ; exclude ":"
     A-NOTGT    = %x21-3D / %x3F-7E  ; exclude ">"
     P-CHAR     = A-CHAR / UTF8-non-ascii
     U-CHAR     = CTRL / TAB / SP / A-CHAR / UTF8-non-ascii
     U-NONTAB   = CTRL /       SP / A-CHAR / UTF8-non-ascii
     U-TEXT     = P-CHAR *U-CHAR
     B-CHAR     = CTRL / TAB / SP / %x21-FF
     B-NONDOT   = CTRL / TAB / SP / %x21-2D / %x2F-FF  ; exclude "."

     ALPHA = UPPER / LOWER   ; use only when case-insensitive
     CR = %x0D
     CRLF = CR LF
     CTRL = %x01-08 / %x0B-0C / %x0E-1F
     DIGIT = %x30-39
     nzDIGIT = %x31-39
     EOL = *(SP / TAB) CRLF
     LF = %x0A
     LOWER = %x61-7A
     SP = %x20
     SPA = 1*SP
     TAB = %x09
     UPPER = %x41-5A
     UTF8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4
     UTF8-2    = %xC2-DF UTF8-tail
     UTF8-3    = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2UTF8-tail /
                 %xED %x80-9F UTF8-tail / %xEE-EF 2UTF8-tail
     UTF8-4    = %xF0 %x90-BF 2UTF8-tail / %xF1-F3 3UTF8-tail /
                 %xF4 %x80-8F 2UTF8-tail
     UTF8-tail = %x80-BF
     WS = 1*(SP / TAB)

   The following non-terminals require special consideration.  They
   represent situations where material SHOULD be restricted to UTF-8,
   but implementations MUST be able to cope with other character
   encodings.  Therefore there are two sets of definitions for them.

   Implementations MUST accept any content that meets this syntax:

     S-CHAR   = %x21-FF
     S-NONTAB = CTRL / SP / S-CHAR
     S-TEXT   = (CTRL / S-CHAR) *B-CHAR

   Implementations SHOULD only generate content that meets this syntax:

     S-CHAR   = P-CHAR
     S-NONTAB = U-NONTAB
     S-TEXT   = U-TEXT

9.8  Extensions and Validation

   The specification of a registered extension MUST include formal
   syntax that defines additional forms for the following non-terminals:

   command
      for each new command other than a variant of the LIST command -
      the syntax of each command MUST be compatible with the definition
      of <X-command>;
   command-datastream
      for each new command that immediately streams data;
   command-continuation
      for each new command that sends further material after the initial
      command line - the syntax of each continuation MUST be exactly
      what is sent to the server, including any escape mechanisms such
      as "byte-stuffing";
   simple-response-content
      for each new response code that has arguments - the syntax of each
      response MUST be compatible with the definition of
      <X-simple-response-content>;
   multiline-response-content
      for each new response code that has a multi-line response - the
      syntax MUST show the response after the lines containing the
      response code and the terminating octet have been removed and any
      "byte-stuffing" undone;
   capability-entry
      for each new capability label - the syntax of each entry MUST be
      compatible with the definition of <X-capability-entry>;
   list-arguments
      for each new variant of the LIST command - the syntax of each
      entry MUST be compatible with the definition of <X-command>;
   list-response
      for each new variant of the LIST command - the syntax MUST show
      the response after the lines containing the 215 response code and
      the terminating octet have been removed and any "byte-stuffing"
      undone.

   The =/ notation of ABNF [RFC2234] SHOULD be used for this.

   When validating the syntax in this specification, or syntax based on
   it, it should be noted that:
   o  the non-terminals <command-line>, <command-datastream>,
      <command-continuation>, <response>, and
      <multiline-response-content> describe basic concepts of the
      protocol and are not referred to by any other rule;
   o  the non-terminal <base64> is provided for the convenience of
      extension authors and is not referred to by any rule in this
      specification;
   o  for the reasons given above, the non-terminals <S-CHAR>,
      <S-NONTAB>, and <S-TEXT> each have two definitions;
   o  the non-terminal <UNDEFINED> is deliberately not defined.

10.  IANA Considerations

   This specification requires IANA to keep a registry of capability
   labels.  The initial contents of this registry are specified in
   Section 3.3.4.  As described in Section 3.3.3, labels beginning with
   X are reserved for private use while all other names are expected to
   be associated with a specification in an RFC on the standards-track
   or defining an IESG-approved experimental protocol.

   Different entries in the registry MUST use different capability
   labels.

   Different entries in the registry MUST NOT use the same command name.
   For this purpose, variants distinguished by a second or subsequent
   keyword (e.g.  "LIST HEADERS" and "LIST OVERVIEW.FMT") count as
   different commands.  If there is a need for two extensions to use the
   same command, a single harmonised specification MUST be registered.

11.  Security Considerations

   This section is meant to inform application developers, information
   providers, and users of the security limitations in NNTP as described
   by this document.  The discussion does not include definitive
   solutions to the problems revealed, though it does make some
   suggestions for reducing security risks.

11.1  Personal and Proprietary Information

   NNTP, because it was created to distribute network news articles,
   will forward whatever information is stored in those articles.
   Specification of that information is outside this scope of this
   document, but it is likely that some personal and/or proprietary
   information is available in some of those articles.  It is very
   important that designers and implementers provide informative
   warnings to users so personal and/or proprietary information in
   material that is added automatically to articles (e.g.  in headers)
   is not disclosed inadvertently.  Additionally, effective and easily
   understood mechanisms to manage the distribution of news articles
   SHOULD be provided to NNTP Server administrators, so that they are
   able to report with confidence the likely spread of any particular
   set of news articles.

11.2  Abuse of Server Log Information

   A server is in the position to save session data about a user's
   requests that might identify their reading patterns or subjects of
   interest.  This information is clearly confidential in nature and its
   handling can be constrained by law in certain countries.  People
   using the NNTP protocol to provide data are responsible for ensuring
   that such material is not distributed without the permission of any
   individuals that are identifiable by the published results.

11.3  Weak Authentication and Access Control

   There is no user-based or token-based authentication in the basic
   NNTP specification.  Access is normally controlled by server
   configuration files.  Those files specify access by using domain
   names or IP addresses.  However, this specification does permit the
   creation of extensions to the NNTP protocol itself for such purposes;
   one such extension is [NNTP-AUTH].  While including such mechanisms
   is optional, doing so is strongly encouraged.

   Other mechanisms are also available.  For example, a proxy server
   could be put in place that requires authentication before connecting
   via the proxy to the NNTP server.

11.4  DNS Spoofing

   Many existing NNTP implementations authorize incoming connections by
   checking the IP address of that connection against the IP addresses
   obtained via DNS lookups of lists of domain names given in local
   configuration files.  Servers that use this type of authentication,
   and clients that find a server by doing a DNS lookup of the server
   name, rely very heavily on the Domain Name Service, and are thus
   generally prone to security attacks based on the deliberate
   misassociation of IP addresses and DNS names.  Clients and servers
   need to be cautious in assuming the continuing validity of an IP
   number/DNS name association.

   In particular, NNTP clients and servers SHOULD rely on their name
   resolver for confirmation of an IP number/DNS name association,
   rather than caching the result of previous host name lookups.  Many
   platforms already can cache host name lookups locally when
   appropriate, and they SHOULD be configured to do so.  It is proper
   for these lookups to be cached, however, only when the TTL (Time To
   Live) information reported by the name server makes it likely that
   the cached information will remain useful.

   If NNTP clients or servers cache the results of host name lookups in
   order to achieve a performance improvement, they MUST observe the TTL
   information reported by DNS.  If NNTP clients or servers do not
   observe this rule, they could be spoofed when a previously accessed
   server's IP address changes.  As network renumbering is expected to
   become increasingly common, the possibility of this form of attack
   will grow.  Observing this requirement thus reduces this potential
   security vulnerability.

   This requirement also improves the load-balancing behaviour of
   clients for replicated servers using the same DNS name and reduces
   the likelihood of a user's experiencing failure in accessing sites
   that use that strategy.

11.5  UTF-8 issues

   UTF-8 [RFC3629] permits only certain sequences of octets and
   designates others as either malformed or "illegal".  The Unicode
   standard identifies a number of security issues related to illegal
   sequences and forbids their generation by conforming implementations.

   Implementations of this specification MUST NOT generate malformed or
   illegal sequences and SHOULD detect them and take some appropriate
   action.  This could include:
   o  generating a 501 response code.

   o  replacing such sequences by the sequence %xEF.BF.BD, which encodes
      the "replacement character" U+FFFD;
   o  closing the connection;
   o  replacing such sequences by a "guessed" valid sequence (based on
      properties of the UTF-8 encoding);
   In the last case, the implementation MUST ensure that any replacement
   cannot be used to bypass validity or security checks.  For example,
   the illegal sequence %xC0.A0 is an over-long encoding for space
   (%x20).  If it is replaced by the latter in a command line, this
   needs to happen before the command line is parsed into individual
   arguments.  If the replacement came after parsing, it would be
   possible to generate an argument with an embedded space, which is
   forbidden.  Use of the "replacement character" does not have this
   problem, since it is permitted wherever non-US-ASCII characters are.
   Implementations SHOULD use one of the first two solutions where the
   general structure of the NNTP stream remains intact, and close the
   connection if it is no longer possible to parse it sensibly.

11.6  Caching of capability lists

   The CAPABILITIES command provides a capability list, which is
   information about the current capabilities of the server.  Whenever
   there is a relevant change to the server state, the results of this
   command are required to change accordingly.

   In most situations the capabilities list in a given server state will
   not change from session to session; for example, a given extension
   will be installed permanently on a server.  Some clients may
   therefore wish to remember which extensions a server supports to
   avoid the delay of an additional command and response, particularly
   if they open multiple connections in the same session.

   However, information about extensions related to security and privacy
   MUST NOT be cached, since this could allow a variety of attacks.

   For example, consider a server which permits the use of cleartext
   passwords on links that are encrypted but not otherwise:
      [Initial TCP connection set-up completed.]
      [S] 200 NNTP Service Ready, posting permitted
      [C] CAPABILITIES
      [S] 101 Capability list:
      [S] VERSION 2
      [S] READER POST
      [S] XENCRYPT
      [S] LIST ACTIVE NEWSGROUPS
      [S] .
      [C] XENCRYPT
      [Client and server negotiate encryption on the link]
      [S] 283 Encrypted link established
      [C] CAPABILITIES
      [S] 101 Capability list:
      [S] VERSION 2
      [S] READER POST
      [S] XSECRET
      [S] LIST ACTIVE NEWSGROUPS
      [S] .
      [C] XSECRET   fred flintstone
      [S] 290 Password for fred accepted

   If the client caches the last capabilities list, then on the next
   session it will attempt to use XSECRET on an unencrypted link:
      [Initial TCP connection set-up completed.]
      [S] 200 NNTP Service Ready, posting permitted
      [C] XSECRET   fred flintstone
      [S] 483 Only permitted on secure links
   exposing the password to any eavesdropper.  While the primary cause
   of this is passing a secret without first checking the security of
   the link, caching of capability lists can increase the risk.

   Any security extension should include requirements to check the
   security state of the link in a manner appropriate to that extension.

   Caching should normally only be considered for anonymous clients that
   do not use any security or privacy extensions and for which the time
   required for an additional command and response is a noticeable
   issue.

12.  Acknowledgements

   This document is the result of much effort by the present and past
   members of the NNTP Working Group, chaired by Russ Allbery and Ned
   Freed.  It could not have been produced without them.

   The author acknowledges the original authors of NNTP as documented in
   RFC 977 [RFC977]: Brian Kantor and Phil Lapsey.

   The author gratefully acknowledges:
   o  The work of the NNTP committee chaired by Eliot Lear.  The
      organization of this document was influenced by the last available
      draft from this working group.  A special thanks to Eliot for
      generously providing the original machine-readable sources for
      that document.
   o  The work of the DRUMS working group, specifically RFC 1869
      [RFC1869], which drove the original thinking which led to the
      CAPABILITIES command and the extensions mechanism detailed in this
      document.
   o  The authors of RFC 2616 [RFC2616] for providing specific and
      relevant examples of security issues that should be considered for
      HTTP.  Since many of the same considerations exist for NNTP, those
      examples that are relevant have been included here with some minor
      rewrites.
   o  The comments and additional information provided by the following
      individuals in preparing one or more of the progenitors of this
      document:
         Russ Allbery <rra@stanford.edu>
         Wayne Davison <davison@armory.com>
         Chris Lewis <clewis@bnr.ca>
         Tom Limoncelli <tal@mars.superlink.net>
         Eric Schnoebelen <eric@egsner.cirr.com>
         Rich Salz <rsalz@osf.org>

   This work was motivated by the work of various news reader authors
   and news server authors, which includes those listed below:

   Rick Adams
      Original author of the NNTP extensions to the RN news reader and
      last maintainer of Bnews
   Stan Barber
      Original author of the NNTP extensions to the news readers that
      are part of Bnews
   Geoff Collyer
      Original author of the OVERVIEW database proposal and one of the
      original authors of CNEWS
   Dan Curry
      Original author of the xvnews news reader
   Wayne Davison
      Author of the first threading extensions to the RN news reader
      (commonly called TRN)
   Geoff Huston
      Original author of ANU NEWS
   Phil Lapsey
      Original author of the UNIX reference implementation for NNTP
   Iain Lea
      Original maintainer of the TIN news reader
   Chris Lewis
      First known implementer of the AUTHINFO GENERIC extension
   Rich Salz
      Original author of INN
   Henry Spencer
      One of the original authors of CNEWS
   Kim Storm
      Original author of the NN news reader

   Other people who contributed to this document include:

      Matthias Andree
      Greg Andruk
      Maurizio Codogno
      Mark Crispin
      Andrew Gierth
      Juergen Helbing
      Scott Hollenbeck
      Charles Lindsey
      Ade Lovett
      Ken Murchison
      Francois Petillon
      Peter Robinson
      Rob Siemborski
      Howard Swinehart
      Ruud van Tol
      Jeffrey Vinocur

   The author thanks them all and apologises to anyone omitted.

   Finally, the present author gratefully acknowledges the vast amount
   of work put into previous drafts by the previous author:
      Stan Barber <sob@academ.com>

13.  References

13.1  Normative References

   [ANSI1986]
              American National Standards Institute, "Coded Character
              Set - 7-bit American Standard Code for Information
              Interchange", ANSI X3.4, 1986.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC2234]  Crocker, D. and P. Overell, "Augmented BNF for Syntax
              Specifications: ABNF", RFC 2234, November 1997.

   [RFC3548]  Josefsson, S., "The Base16, Base32, and Base64 Data
              Encodings", RFC 3548, July 2003.

   [RFC3629]  Yergeau, F., "UTF-8, a transformation format of ISO
              10646", STD 63, RFC 3629, November 2003.

   [RFC977]   Kantor, B. and P. Lapsley, "Network News Transfer
              Protocol", RFC 977, February 1986.

   [TF.686-1]
              International Telecommunications Union - Radio, "Glossary,
              ITU-R Recommendation TF.686-1", ITU-R Recommendation
              TF.686-1, October 1997.

13.2  Informative References

   [NNTP-AUTH]
              Vinocur, J., Murchison, K. and C. Newman, "NNTP
              Authentication",
              Internet-draft draft-ietf-nntpext-authinfo-06, December
              2004.

   [NNTP-STREAM]
              Vinocur, J. and K. Murchison, "NNTP Authentication",
              Internet-draft draft-ietf-nntpext-streaming-03, December
              2004.

   [NNTP-TLS]
              Vinocur, J., Murchison, K. and C. Newman, "Using TLS with
              NNTP", Internet-draft draft-ietf-nntpext-tls-nntp-04,
              December 2004.

   [RFC1036]  Horton, M. and R. Adams, "Standard for interchange of
              USENET messages", RFC 1036, December 1987.

   [RFC1305]  Mills, D., "Network Time Protocol (Version 3)
              Specification, Implementation", RFC 1305, March 1992.

   [RFC1869]  Klensin, J., Freed, N., Rose, M., Stefferud, E. and D.
              Crocker, "SMTP Service Extensions", STD 10, RFC 1869,
              November 1995.

   [RFC2616]  Fielding, R., Gettys, J., Mogul, J., Nielsen, H.,
              Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext
              Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.

   [RFC2629]  Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629,
              June 1999.

   [RFC2822]  Resnick, P., "Internet Message Format", RFC 2822, April
              2001.

   [RFC2980]  Barber, S., "Common NNTP Extensions", RFC 2980, October
              2000.

   [ROBE1995]
              Robertson, R., "FAQ: Overview database / NOV General
              Information", January 1995.

              There is no definitive copy of this document known to the
              author.  It was previously posted as the Usenet article
              <news:nov-faq-1-930909720@agate.Berkeley.EDU>

   [SALZ1992]
              Salz, R., "Manual Page for wildmat(3) from the INN 1.4
              distribution, Revision 1.10", April 1992.

              There is no definitive copy of this document known to the
              author.

Author's Address

   Clive D.W. Feather
   Thus plc
   322 Regents Park Road
   London  N3 2QQ
   GB

   Phone: +44 20 8495 6138
   Fax:   +44 870 051 9937
   Email: clive@demon.net
   URI:   http://www.davros.org/

Appendix A.  Interaction with other specifications

   NNTP is most often used for transferring articles that conform to RFC
   1036 [RFC1036] (such articles are called "Netnews articles" here).
   It is also sometimes used for transferring email messages that
   conform to RFC 2822 [RFC2822] (such articles are called "email
   articles" here).  In this situation, articles must conform both to
   this specification and to that other one; this appendix describes
   some relevant issues.

A.1  Header folding

   NNTP allows a header line to be folded (by inserting a CRLF pair)
   before any space or TAB character.

   Both email and Netnews articles are required to have at least one
   octet other than space or TAB on each header line.  Thus folding can
   only happen at one point in each sequence of consecutive spaces or
   TABs.  Netnews articles are further required to have the header name,
   colon, and following space all on the first line; folding may only
   happen beyond that space.  Finally, some non-conforming software will
   remove trailing spaces and TABs from a line.  Therefore it might be
   inadvisable to fold a header after a space or TAB.

   For maximum safety, header lines SHOULD conform to the following
   syntax rather than that in Section 9.6.

     header = header-name ":" SP [header-content] CRLF
     header-content = [WS] token *( [CRLF] WS token )

A.2  Message-IDs

   Every article handled by an NNTP server MUST have a unique
   message-id.  For the purposes of this specification, a message-id is
   an arbitrary opaque string that merely needs to meet certain
   syntactic requirements and is just a way to refer to the article.

   Because there is a significant risk of old articles being reinjected
   into the global Usenet system, RFC 1036 [RFC1036] requires that
   message-ids are globally unique for all time.

   This specification states that message-ids are the same if and only
   if they consist of the same sequence of octets.  Other specifications
   may define two different sequences as being equal because they are
   putting an interpretation on particular characters.  RFC 2822
   [RFC2822] has a concept of "quoted" and "escaped" characters.  It
   therefore considers the three message-ids:

      <abcd@example.com>
      <"abcd"@example.com>
      <"ab\cd"@example.com>
   as being identical.  Therefore an NNTP implementation handing email
   articles must ensure that only one of these three appears in the
   protocol and the other two are converted to it as and when necessary,
   such as when a client checks the results of a NEWNEWS command against
   an internal database of message-ids.  Note that RFC 1036 [RFC1036]
   never treats two different strings as being identical.  Its draft
   successor restricts the syntax of message-ids so that, whenever RFC
   2822 would treat two strings as equivalent, only one of them is valid
   (in the above example only the first string is valid).

   This specification does not describe how the message-id of an article
   is determined; it may be deduced from the contents of the article or
   derived from some external source.  If the server is also conforming
   to another specification that contains a definition of message-id
   compatible with this one, the server SHOULD use those message-ids.  A
   common approach, and one that SHOULD be used for email and Netnews
   articles, is to extract the message-id from the contents of a header
   with name "Message-ID".  This may not be as simple as copying the
   entire header contents; it may be necessary to strip off comments and
   undo quoting, or to reduce "equivalent" message-ids to a canonical
   form.

   If an article is obtained through the IHAVE command, there will be a
   message-id provided with the command.  The server MAY either use it
   or determine one from the article contents.  However, whichever it
   does it SHOULD ensure that, if the IHAVE command is repeated with the
   same argument and article, it will be recognized as a duplicate.

   If an article does not contain a message-id that the server can
   identify, it MUST synthesize one.  This could, for example, be a
   simple sequence number or based on the date and time that the article
   arrived.  When handling email or Netnews articles, a Message-ID
   header SHOULD be added to ensure global consistency and uniqueness.

A.3  Article posting

   As far as NNTP is concerned, the POST and IHAVE commands provide the
   same basic facilities in a slightly different way.  However they have
   rather different intentions.

   The IHAVE command is intended for transmitting conforming articles
   between a system of NNTP servers, with all articles perhaps also
   conforming to another specification (e.g.  all articles are Netnews
   articles).  It is expected that the client will have already done any
   necessary validation (or has in turn obtained the article from a
   third party which has done so); therefore the contents SHOULD be left
   unchanged.

   In contrast, the POST command is intended for use when an end-user is
   injecting a newly-created article into a such a system.  The article
   being transferred might not be a conforming email or Netnews article,
   and the server is expected to validate it and, if necessary, convert
   it to the right form for onward distribution.  This is often done by
   a separate piece of software on the server installation; if so, the
   NNTP server SHOULD pass the incoming article to that software
   unaltered, making no attempt to filter characters, fold or limit
   lines, or otherwise process the incoming text.

   The POST command can fail in various ways and clients should be
   prepared to re-send an article.  When doing so, however, it is often
   important to ensure - as far as possible - that the same message-id
   is allocated to both attempts so that the server, or other servers,
   can recognize the two articles as being duplicates.  In the case of
   email or Netnews articles, therefore, the posted article SHOULD
   contain a header with name "Message-ID" and the contents of this
   header SHOULD be identical on each attempt.  The server SHOULD ensure
   that two POSTed articles with the same contents for this header are
   recognized as identical and the same message-id allocated, whether or
   not those contents are suitable for use as the message-id.

Appendix B.  Summary of Commands

   This section contains a list of every command defined in this
   document, ordered by command name and by indicating capability.

   Ordered by command name:

     +-------------------+-----------------------+---------------+
     | Command           | Indicating capability | Definition    |
     +-------------------+-----------------------+---------------+
     | ARTICLE           | READER                | Section 6.2.1 |
     |                   |                       |               |
     | BODY              | READER                | Section 6.2.3 |
     |                   |                       |               |
     | CAPABILITIES      | mandatory             | Section 5.2   |
     |                   |                       |               |
     | DATE              | READER                | Section 7.1   |
     |                   |                       |               |
     | GROUP             | READER                | Section 6.1.1 |
     |                   |                       |               |
     | HDR               | HDR                   | Section 8.5   |
     |                   |                       |               |
     | HEAD              | mandatory             | Section 6.2.2 |
     |                   |                       |               |
     | HELP              | mandatory             | Section 7.2   |
     |                   |                       |               |
     | IHAVE             | IHAVE                 | Section 6.3.2 |
     |                   |                       |               |
     | LAST              | READER                | Section 6.1.3 |
     |                   |                       |               |
     | LIST              | LIST                  | Section 7.6.1 |
     |                   |                       |               |
     | LIST ACTIVE.TIMES | LIST                  | Section 7.6.4 |
     |                   |                       |               |
     | LIST ACTIVE       | LIST                  | Section 7.6.3 |
     |                   |                       |               |
     | LIST DISTRIB.PATS | LIST                  | Section 7.6.5 |
     |                   |                       |               |
     | LIST HEADERS      | HDR                   | Section 8.6   |
     |                   |                       |               |
     | LIST NEWSGROUPS   | LIST                  | Section 7.6.6 |
     |                   |                       |               |
     | LIST OVERVIEW.FMT | OVER                  | Section 8.4   |
     |                   |                       |               |
     | LISTGROUP         | READER LISTGROUP      | Section 6.1.2 |
     |                   |                       |               |
     | MODE READER       | MODE-READER           | Section 5.3   |
     |                   |                       |               |
     | NEWGROUPS         | READER                | Section 7.3   |
     |                   |                       |               |
     | NEWNEWS           | READER                | Section 7.4   |
     |                   |                       |               |
     | NEXT              | READER                | Section 6.1.4 |
     |                   |                       |               |
     | OVER              | OVER                  | Section 8.3   |
     |                   |                       |               |
     | POST              | READER POST           | Section 6.3.1 |
     |                   |                       |               |
     | QUIT              | mandatory             | Section 5.4   |
     |                   |                       |               |
     | STAT              | mandatory             | Section 6.2.4 |
     +-------------------+-----------------------+---------------+

   Ordered by indicating capability:

     +-------------------+-----------------------+---------------+
     | Command           | Indicating capability | Definition    |
     +-------------------+-----------------------+---------------+
     | CAPABILITIES      | mandatory             | Section 5.2   |
     |                   |                       |               |
     | HEAD              | mandatory             | Section 6.2.2 |
     |                   |                       |               |
     | HELP              | mandatory             | Section 7.2   |
     |                   |                       |               |
     | QUIT              | mandatory             | Section 5.4   |
     |                   |                       |               |
     | STAT              | mandatory             | Section 6.2.4 |
     |                   |                       |               |
     | HDR               | HDR                   | Section 8.5   |
     |                   |                       |               |
     | LIST HEADERS      | HDR                   | Section 8.6   |
     |                   |                       |               |
     | IHAVE             | IHAVE                 | Section 6.3.2 |
     |                   |                       |               |
     | LIST              | LIST                  | Section 7.6.1 |
     |                   |                       |               |
     | LIST ACTIVE       | LIST                  | Section 7.6.3 |
     |                   |                       |               |
     | LIST ACTIVE.TIMES | LIST                  | Section 7.6.4 |
     |                   |                       |               |
     | LIST DISTRIB.PATS | LIST                  | Section 7.6.5 |
     |                   |                       |               |
     | LIST NEWSGROUPS   | LIST                  | Section 7.6.6 |
     |                   |                       |               |
     | MODE READER       | MODE-READER           | Section 5.3   |
     |                   |                       |               |
     | OVER              | OVER                  | Section 8.3   |
     |                   |                       |               |
     | LIST OVERVIEW.FMT | OVER                  | Section 8.4   |
     |                   |                       |               |
     | ARTICLE           | READER                | Section 6.2.1 |
     |                   |                       |               |
     | BODY              | READER                | Section 6.2.3 |
     |                   |                       |               |
     | DATE              | READER                | Section 7.1   |
     |                   |                       |               |
     | GROUP             | READER                | Section 6.1.1 |
     |                   |                       |               |
     | LAST              | READER                | Section 6.1.3 |
     |                   |                       |               |
     | NEWGROUPS         | READER                | Section 7.3   |
     |                   |                       |               |
     | NEWNEWS           | READER                | Section 7.4   |
     |                   |                       |               |
     | NEXT              | READER                | Section 6.1.4 |
     |                   |                       |               |
     | LISTGROUP         | READER LISTGROUP      | Section 6.1.2 |
     |                   |                       |               |
     | POST command is intended for use when an end-user is
   injecting a newly-created article into a such a system.  The article
   being transferred might not be a conforming email or Netnews article,
   and the server is expected to validate it and, if necessary, convert
   it to the right form for onward distribution.  This is often done by
   a separate piece of software on the server installation; if so, the
   NNTP server SHOULD pass the incoming article to that software
   unaltered, making no attempt to filter characters, fold or limit
   lines, or otherwise process the incoming text.

   The              | READER POST command can fail in various ways and clients should be
   prepared to re-send an article.  When doing so, however, it is often
   important to ensure - as far as possible - that the same message-id
   is allocated to both attempts so that the server, or other servers,
   can recognize the two articles as being duplicates.  In the case of
   email or Netnews articles, therefore, the posted article SHOULD
   contain a header with name "Message-ID" and the contents of this
   header SHOULD be identical on each attempt.  The server SHOULD ensure
   that           | Section 6.3.1 |
     +-------------------+-----------------------+---------------+

   Where two POSTed articles with the same contents for this header keywords are
   recognized as identical and given in the same message-id allocated, whether or
   not those contents are suitable for use as capability column, the message-id. second is
   an argument to the first.

Appendix C.  Summary of Response Codes

   This section contains a list of every response code defined in this
   document, whether it is multi-line, which commands can generate it,
   what arguments it has, and what its meaning is.

   Response code 100 (multi-line)
      Generated by: HELP
      Meaning: help text follows.
   Response code 101 (multi-line)
      Generated by: CAPABILITIES
      Meaning: capabilities list follows.
   Response code 111
      Generated by: DATE
      1 argument: yyyymmddhhmmss
      Meaning: server date and time.
   Response code 200
      Generated by: initial connection, MODE READER
      Meaning: service available, posting allowed.
   Response code 201
      Generated by: initial connection, MODE READER
      Meaning: service available, posting prohibited.
   Response code 202 (multi-line)
      Generated by: LIST EXTENSIONS
      Meaning: extension list follows.
   Response code 205
      Generated by: QUIT
      Meaning: connection closing (the server immediately closes the
      connection).
   Response code 211
      The 211 response code has two completely different forms depending
      on which command generated it:
         Generated by: GROUP
         4 arguments: number low high group
         Meaning: group selected.

         (multi-line)
         Generated by: LISTGROUP
         4 arguments: number low high group
         Meaning: article numbers follow.
   Response code 215 (multi-line)
      Generated by: LIST ACTIVE, LIST ACTIVE.TIMES, LIST DISTRIB.PATS,
      LIST DISTRIBUTIONS, LIST HEADERS, LIST NEWSGROUPS,
      LIST OVERVIEW.FMT
      Meaning: information follows.
   Response code 220 (multi-line)
      Generated by: ARTICLE
      2 arguments: n message-id
      Meaning: article follows.

   Response code 221 (multi-line)
      Generated by: HEAD
      2 arguments: n message-id
      Meaning: article headers follow.
   Response code 222 (multi-line)
      Generated by: BODY
      2 arguments: n message-id
      Meaning: article body follows.
   Response code 223
      Generated by: LAST, NEXT, STAT
      2 arguments: n message-id
      Meaning: article exists and selected.
   Response code 224 (multi-line)
      Generated by: OVER
      Meaning: overview information follows.
   Response code 225 (multi-line)
      Generated by: HDR
      Meaning: headers follow.
   Response code 230 (multi-line)
      Generated by: NEWNEWS
      Meaning: list of new articles follows.
   Response code 231 (multi-line)
      Generated by: NEWGROUPS
      Meaning: list of new newsgroups follows.
   Response code 235
      Generated by: IHAVE (second stage)
      Meaning: article transferred OK.
   Response code 240
      Generated by: POST (second stage)
      Meaning: article received OK.
   Response code 335
      Generated by: IHAVE (first stage)
      Meaning: send article to be transferred.
   Response code 340
      Generated by: POST (first stage)
      Meaning: send article to be posted.
   Response code 400
      Generic response and generated by initial connection
      Meaning: service not available or no longer available (the server
      immediately closes the connection).
   Response code 401
      Generic response
      1 argument: extension-label
      Meaning: the server is in the wrong mode; the indicated extension
      should be used to change the mode.

   Response code 402
      Generated by: LIST EXTENSIONS
      Meaning: server has no extensions.
   Response code 403
      Generic response
      Meaning: internal fault or problem preventing action being taken. message-id
      Meaning: article follows.
   Response code 411 221 (multi-line)
      Generated by: GROUP, LISTGROUP HEAD
      2 arguments: n message-id
      Meaning: no such newsgroup. article headers follow.

   Response code 412 222 (multi-line)
      Generated by: ARTICLE, BODY, HDR, HEAD, LAST, LISTGROUP, NEXT,
      OVER, STAT BODY
      2 arguments: n message-id
      Meaning: no newsgroup selected. article body follows.
   Response code 420 223
      Generated by: ARTICLE, BODY, HDR, HEAD, LAST, NEXT, OVER, STAT
      2 arguments: n message-id
      Meaning: current article number is invalid. exists and selected.
   Response code 421 224 (multi-line)
      Generated by: NEXT OVER
      Meaning: no next article in this group. overview information follows.
   Response code 422 225 (multi-line)
      Generated by: LAST HDR
      Meaning: no previous article in this group. headers follow.
   Response code 423 230 (multi-line)
      Generated by: ARTICLE, BODY, HDR, HEAD, OVER, STAT NEWNEWS
      Meaning: no article with that number or in that range. list of new articles follows.
   Response code 430 231 (multi-line)
      Generated by: ARTICLE, BODY, HDR, HEAD, OVER, STAT NEWGROUPS
      Meaning: no article with that message-id. list of new newsgroups follows.
   Response code 435 235
      Generated by: IHAVE (first (second stage)
      Meaning: article not wanted.
   Response code 436
      Generated by: IHAVE (either stage)
      Meaning: transfer not possible (first stage) or failed (second
      stage); try again later. transferred OK.
   Response code 437 240
      Generated by: IHAVE POST (second stage)
      Meaning: transfer rejected; do not retry. article received OK.
   Response code 440 335
      Generated by: POST IHAVE (first stage)
      Meaning: posting not permitted. send article to be transferred.
   Response code 441 340
      Generated by: POST (second (first stage)
      Meaning: posting failed.
   Response code 480
      Generic response
      Meaning: command unavailable until the client has authenticated
      itself.

   Response code 483
      Generic response
      Meaning: command unavailable until suitable privacy has been
      arranged.
   Response code 500
      Generic response
      Meaning: unknown command.
   Response code 501
      Generic response
      Meaning: syntax error in command. send article to be posted.
   Response code 502 400
      Generic response and generated by initial connection
      Meaning for the initial connection and the MODE READER command: initial connection
      Meaning: service permanently unavailable not available or no longer available (the server
      immediately closes the connection).
      Meaning for all other commands: command not permitted (and there
   Response code 401
      Generic response
      1 argument: capability-label
      Meaning: the server is no way for in the client wrong mode; the indicated capability
      should be used to change this). the mode.
   Response code 503 403
      Generic response
      Meaning: feature not supported. internal fault or problem preventing action being taken.
   Response code 504
      Generic response
      Meaning: error in base64-encoding [RFC3548] of an argument

Appendix D.  Formal specification of the standard extensions

   This section gives a formal definition of each of the extensions in
   Section 8.2 as required by Section 8 for the IANA registry.

D.1  The 411
      Generated by: GROUP, LISTGROUP extension

   o  This extension provides information about specific
      Meaning: no such newsgroup.

   Response code 412
      Generated by: ARTICLE, BODY, HDR, HEAD, LAST, LISTGROUP, NEXT,
      OVER, STAT
      Meaning: no newsgroup selected.
   Response code 420
      Generated by: ARTICLE, BODY, HDR, HEAD, LAST, NEXT, OVER, STAT
      Meaning: current article
      numbers.
   o  The extension-label number is "LISTGROUP".
   o  The extension-label has invalid.
   Response code 421
      Generated by: NEXT
      Meaning: no arguments.
   o  The extension defines one new command: LISTGROUP, whose behaviour,
      arguments, and responses are defined next article in Section 8.3.
   o  The extension does not associate any new responses this group.
   Response code 422
      Generated by: LAST
      Meaning: no previous article in this group.
   Response code 423
      Generated by: ARTICLE, BODY, HDR, HEAD, OVER, STAT
      Meaning: no article with
      pre-existing NNTP commands.
   o  The extension does that number or in that range.
   Response code 430
      Generated by: ARTICLE, BODY, HDR, HEAD, OVER, STAT
      Meaning: no article with that message-id.
   Response code 435
      Generated by: IHAVE (first stage)
      Meaning: article not affect the behaviour of a server wanted.
   Response code 436
      Generated by: IHAVE (either stage)
      Meaning: transfer not possible (first stage) or client
      other than via the new command.
   o  The extension does failed (second
      stage); try again later.
   Response code 437
      Generated by: IHAVE (second stage)
      Meaning: transfer rejected; do not affect the maximum length of commands and
      initial response lines.
   o  The extension does retry.
   Response code 440
      Generated by: POST (first stage)
      Meaning: posting not alter pipelining, and the LISTGROUP permitted.
   Response code 441
      Generated by: POST (second stage)
      Meaning: posting failed.
   Response code 480
      Generic response
      Meaning: command
      can be pipelined.
   o  Use of this extension does not alter unavailable until the output from LIST
      EXTENSIONS.
   o  The extension does not cause any pre-existing command to produce a
      401, 480, or client has authenticated
      itself.
   Response code 483 response.
   o  The LISTGROUP
      Generic response
      Meaning: command can only be used after the MODE READER
      command.

D.2  The OVER extension

   o  This extension provides support for an overview of newsgroups.
   o  The extension-label is "OVER".
   o  The extension-label unavailable until suitable privacy has the optional argument "MSGID", indicating
      that the message-id variant of the OVER command is supported.
   o  The extension defines two new commands: OVER and LIST
      OVERVIEW.FMT, whose behaviour, arguments, and responses are
      defined in Section 8.5.
   o  The extension does not associate any new responses with
      pre-existing NNTP commands.
   o  The extension requires the server to maintain an overview database
      and article metadata, as described in Section 8.4.
   o  The extension does not affect the maximum length of commands and
      initial been
      arranged.
   Response code 500
      Generic response
      Meaning: unknown command.

   Response code 501
      Generic response
      Meaning: syntax error in command.
   Response code 502
      Generic response lines.
   o  The extension does not alter pipelining, and the OVER and LIST
      OVERVIEW.FMT commands can be pipelined.
   o  Use of this extension does not alter generated by initial connection
      Meaning for the output from LIST
      EXTENSIONS.

   o  The extension does not cause any pre-existing command to produce a
      401, 480, or 483 response.
   o  The OVER initial connection and LIST OVERVIEW.FMT commands can only be used after the MODE READER command.

D.3  The HDR extension

   o  This extension provides batched header retrieval.
   o  The extension-label is "HDR".
   o  The extension-label has no arguments.
   o  The extension defines two new command:
      service permanently unavailable (the server immediately closes the
      connection).
      Meaning for all other commands: HDR and LIST HEADERS,
      whose behaviour, arguments, and responses are defined in Section
      8.6.
   o  The extension does command not associate any new responses with
      pre-existing NNTP commands.
   o  The extension requires permitted (and there
      is no way for the server client to maintain article metadata, as
      described in Section 8.4.
   o  The extension does not affect the maximum length of commands and
      initial change this).
   Response code 503
      Generic response lines.
   o  The extension does
      Meaning: feature not alter pipelining, and the HDR and LIST
      HEADERS commands can be pipelined.
   o  Use supported.
   Response code 504
      Generic response
      Meaning: error in base64-encoding [RFC3548] of this extension does not alter the output from LIST
      EXTENSIONS.
   o  The extension does not cause any pre-existing command to produce a
      401, 480, or 483 response.
   o  The HDR and LIST HEADERS commands can only be used after the MODE
      READER command. an argument

Intellectual Property Statement

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this
   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.

Disclaimer of Validity

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
   ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
   INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
   INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Copyright Statement

   Copyright (C) The Internet Society (2004). (2005).  This document is subject
   to the rights, licenses and restrictions contained in BCP 78, and
   except as set forth therein, the authors retain all their rights.

Acknowledgment

   Funding for the RFC Editor function is currently provided by the
   Internet Society.