draft-ietf-nntpext-base-14.txt   draft-ietf-nntpext-base-15.txt 
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
Network News Transport Protocol Network News Transport Protocol
draft-ietf-nntpext-base-14.txt draft-ietf-nntpext-base-15.txt
1. Status of this Document 1 Status of this memo
This document is an Internet-Draft and is in full conformance with This memo is an Internet-Draft and is in full conformance
Section 10 of RFC 2026. Internet-Drafts are working documents of the with Section 10 of RFC 2026. Internet-Drafts are working
Internet Engineering Task Force (IETF), its areas, and its working documents of the Internet Engineering Task Force (IETF), its
groups. Note that other groups may also distribute working documents areas, and its working groups. Note that other groups may
as Internet-Drafts. also distribute working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of
and may be updated, replaced, or made obsolete by other documents at six months and may be updated, replaced, or made obsolete by
any time. It is inappropriate to use Internet-Drafts as reference other documents at any time. It is inappropriate to use
material or to cite them other than as "work in progress." Internet-Drafts as reference material or to cite them other
than as "work in progress."
The list of current Internet-Drafts can be accesses at The list of current Internet-Drafts can be accesses at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft shadow directories can be accessed at The list of Internet-Draft shadow directories can be accessed
http://www.ietf.org/shadow.html. at http://www.ietf.org/shadow.html.
This section will be updated with the appropriate verbiage from RFC This section will be updated with the appropriate verbiage
2223 should this document has been found ready for publication as an from RFC 2223 should this memo have been found ready for
RFC. publication as an RFC. This update will include its standards
track status.
This document is a product of the NNTP Working Group, chaired by Ned This memo is a product of the NNTP Working Group, chaired by
Freed and Stan Barber. Ned Freed and Stan Barber.
2. Abstract 2 Abstract
The Network News Transport Protocol has been in use in the Internet The Network News Transport Protocol has been in use in the
for a decade and remains one of the most popular protocols (by volume) Internet for a decade and remains one of the most popular
in use today. This document is a replacement for RFC 977 and protocols (by volume) in use today. This memo is a
officially updates the protocol specification. It clarifies some replacement for RFC 977 and officially updates the protocol
vagueness in RFC 977, includes some new base functionality and specification. It clarifies some vagueness in RFC 977,
provides a specific mechanism to add standardized extensions to NNTP. includes some new base functionality and provides a specific
mechanism to add standardized extensions to NNTP.
3. Introduction Barber [Page 1]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
3 Introduction
This document specifies the Network News Transport Protocol (NNTP), This memo specifies the Network News Transport Protocol
which is used for the distribution, inquiry, retrieval, and posting of (NNTP), which is used for the distribution, inquiry,
net news articles using a reliable stream-based mechanism. For news retrieval, and posting of net news articles using a reliable
reading clients, NNTP enables retrieval of news articles that are stream-based mechanism. For news reading clients, NNTP
stored in a central database, giving subscribers the ability to select 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. only those articles they wish to read.
The netnews model provides for indexing, cross-referencing, and The netnews model provides for indexing, cross-referencing,
expiration of aged messages. For server-to-server interaction, NNTP is and expiration of aged messages. For server-to-server
designed for efficient transmission of net news articles over a interaction, NNTP is designed for efficient transmission of
reliable full duplex communication method. net news articles over a reliable full duplex communication
channel.
Every attempt is made to insure that the protocol specification in Every attempt is made to ensure that the protocol
this document is compatible with the version specified in RFC specification in this memo is compatible with the version
977[[1]. However, this version does not support the ill-defined SLAVE specified in RFC 977[1]. However, this version does not
command and permits four digit years to be specified in the NEWNEWS support the ill-defined SLAVE command and permits four digit
and NEWGROUPS commands. It changes the default character set to years to be specified in the NEWNEWS and NEWGROUPS commands.
UTF-8[2] instead of US-ASCII[3]. It also extends the newsgroup It changes the default character set to UTF-8[2] instead of
name matching capabilities already documented in RFC 977. US-ASCII[3]. It also extends the newsgroup name matching
capabilities already documented in RFC 977.
Generally, new functionality is available using new keywords. Part of Generally, new functionality is available using new keywords.
that new functionality involves a mechanism to discover what new Part of that new functionality involves a mechanism to
functionality is available to clients from a server. discover what new functionality is available to clients from
This mechanism can also be used to add more functionality as needs a server.
merit such additions.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", This mechanism can also be used to add more functionality as
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this needs merit such additions.
document are to be interpreted as described in RFC 2119[4].
An implementation is not compliant if it fails to satisfy one or more
of the MUST requirements for this protocol. An implementation that
Barber Page [1] The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
"OPTIONAL" in this memo are to be interpreted as described in
RFC 2119[4].
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
Barber [Page 2]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
satisfies all the MUST and all the SHOULD requirements for its compliant"; one that satisfies all the MUST requirements but
protocols is said to be "unconditionally compliant"; one that not all the SHOULD requirements for NNTP is said to be
satisfies all the MUST requirements but not all the SHOULD "conditionally compliant".
requirements for NNTP is said to be "conditionally compliant".
For the remainder of this memo, the term "client host" refers to a For the remainder of this memo, the term "client host" refers
host making use of the NNTP service, while the term "server host" to a host making use of the NNTP service, while the term
refers to a host that offers the NNTP service. In addition, where "server host" refers to a host that offers the NNTP service.
examples of interactions between a client host and a server host are In addition, where examples of interactions between a client
provided a "[C]" will be used to represent the client host and a "[S]" host and a server host are provided a "[C]" will be used to
will be used to represent the server host. represent the client host and a "[S]" will be used to
represent the server host.
For the remainder of this memo, responses will be described in tables For the remainder of this memo, responses will be described
listing the required format of a response followed by the meaning that in tables listing the required format of a response followed
should be ascribed to that response. by the meaning that should be ascribed to that response.
4. Basic Operation. 4 Basic Operation.
Every NNTP session MUST involve the following in this order: Every NNTP session MUST involve the following in this order:
CONNECTION CONNECTION
GREETING GREETING
DISCONNECTION DISCONNECTION
Other steps may occur between the GREETING and DISCONNECTION step. Other steps may occur between the GREETING and DISCONNECTION
step. They are:
They are:
CAPABILITIES DISCOVERY CAPABILITIES DISCOVERY
NEWS EXCHANGE NEWS EXCHANGE
CONCLUSION CONCLUSION
NNTP operates over any reliable data stream 8-bit-wide channel. When NNTP operates over any reliable data stream 8-bit-wide
running over TCP/IP, the official port for the NNTP service is 119. channel. When running over TCP/IP, the official port for the
Initially, the server host starts the NNTP service by listening on a NNTP service is 119. Initially, the server host starts the
TCP port. When a client host wishes to make use of the service, it NNTP service by listening on a TCP port. When a client host
MUST establish a TCP connection with the server host by connecting to wishes to make use of the service, it MUST establish a TCP
that host on the same port on which the server is listening. This is connection with the server host by connecting to that host on
the CONNECTION step. When the connection is established, the NNTP the same port on which the server is listening. This is the
server host MUST send a greeting. This is the GREETING step. The CONNECTION step. When the connection is established, the
client host and server host SHOULD then exchange commands and NNTP server host MUST send a greeting. This is the GREETING
responses (respectively) until the connection is closed or aborted. step. The client host and server host SHOULD then exchange
commands and responses (respectively) until the connection is
closed or aborted. This final step is called the
DISCONNECTION step.
Barber [Page 3]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
This final step is called the DISCONNECTION step. If there is a CONCLUSION step, it MUST immediately precede
If there is a CONCLUSION step, it MUST immediately precede the the DISCONNECTION step. There MUST be only one CONNECTION,
DISCONNECTION step. There MUST be only one CONNECTION, CONCLUSION and CONCLUSION and DISCONNECTION step for each NNTP session. All
DISCONNECTION step for each NNTP session. All other steps MAY be other steps MAY be repeated as needed. For example, the
repeated as needed. For example, the GREETING step may be repeated if GREETING step may be repeated if the client makes use of the
the client makes use of the MODE READER command (See Section 7.2 for MODE READER command (See Section 7.2 for more on the MODE
more on the MODE READER command). READER command).
The character set for all NNTP commands is UTF-8. Commands in the NNTP The character set for all NNTP commands is UTF-8. Commands in
MUST consist of an US-ASCII case-insensitive keyword, which MAY be the NNTP MUST consist of an US-ASCII case-insensitive
followed by one or more arguments. An US-ASCII CRLF pair MUST keyword, which MAY be followed by one or more arguments. An
terminate all commands. Multiple commands MUST NOT be on the same US-ASCII CRLF pair MUST terminate all commands. Multiple
line. Keywords MUST consist of printable US-ASCII characters. Unless commands MUST NOT be on the same line. Keywords MUST consist
otherwise noted elsewhere in this document, arguments SHOULD consist of printable US-ASCII characters. Unless otherwise noted
of printable US-ASCII characters. Keywords and arguments MUST be each elsewhere in this memo, arguments SHOULD consist of printable
separated by one or more US-ASCII SPACE or US-ASCII TAB characters. US-ASCII characters. Keywords and arguments MUST be each
Keywords MUST be at least three US-ASCII characters and MUST NOT separated by one or more US-ASCII SPACE or US-ASCII TAB
exceed 12 US-ASCII characters. Command lines MUST NOT exceed 512 characters. Keywords MUST be at least three US-ASCII
octets, which includes the terminating US-ASCII CRLF pair. Arguments characters and MUST NOT exceed 12 US-ASCII characters.
MUST NOT exceed 497 octets. Command lines MUST NOT exceed 512 octets, which includes the
terminating US-ASCII CRLF pair. Arguments MUST NOT exceed 497
octets.
Each response MUST start with a three-digit response code that is Each response MUST start with a three-digit response code
sufficient to distinguish all responses. Certain valid responses are that is sufficient to distinguish all responses. Certain
defined to be multi-line; for all others, the response is contained in valid responses are defined to be multi-line; for all others,
a single line. All multi-line responses MUST adhere to the following the response is contained in a single line. All multi-line
format: responses MUST adhere to the following format:
1. The repsonse consists of a sequence of one or more "lines", each The response consists of a sequence of one or more "lines",
being a stream of octets ending with 0x0D 0x0A (US-ASCII CRLF). each being a stream of octets ending with 0x0D 0x0A (US-ASCII
Apart from those line endings, the stream MUST NOT include the CRLF). Apart from those line endings, the stream MUST NOT
octets 0x00, 0x0A, or 0x0D (US-ASCII NUL, LF, and CR). include the octets 0x00, 0x0A, or 0x0D (US-ASCII NUL, LF, and
CR).
Barber Page [2] The first such line contains the response code as with a
single line response.
If any subsequent line begins with the "termination octet"
(0x2E or US_ASCII "."), that line MUST be "byte-stuffed" by
Barber [Page 4]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
2. The first such line contains the response code as with a single pre-pending an additional termination octet (0x2E) to that
line response. line of the response.
3. If any subsequent line begins with the "termination octet" (0x2E
or US_ASCII "."), that line MUST be "byte-stuffed" by pre-pending an
additional termination octet (0x2E) 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 (0x2E or US_ASCII
".")followed by CRLF in the normal way. Thus a multi-line response
is always terminated with the five octets "CRLF.CRLF" (in US-ASCII).
5. There is NO limit on the length of a line.
6. 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 US-ASCII
CRLF, that initial termination octet is disregarded.
7. Likewise, the terminating line ".CRLF" (in US-ASCII) 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 US-ASCII CRLF is disregarded; (the first CRLF of the
terminating "CRLF.CRLF" is, of course, part of the last line of the
response).
NOTE: Texts using encodings (such as UTF-16 or UTF-32) that may The lines of the response MUST be followed by a terminating
contain the NUL octet or the CR or LF octets in contexts other than line consisting of a single termination octet (0x2E or
the CRLF line ending cannot be reliably conveyed in the above format. US_ASCII ".")followed by CRLF in the normal way. Thus a
Note also that, although this standard does not limit the length of a multi-line response is always terminated with the five octets
line in any way, the standards that define the format of articles may "CRLF.CRLF" (in US-ASCII).
do so.
An NNTP server MAY have an inactivity autologout timer. Such a timer There is NO limit on the length of a line.
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 When interpreting a multi-line response, the "byte stuffing"
for the first command from the client. The receipt of any command MUST be undone; i.e. the client MUST ensure that, in any line
from the client during the timer interval SHOULD suffice to reset the beginning with the termination octet followed by octets other
autologout timer. Similarly, the receipt of any significant amount of than US-ASCII CRLF, that initial termination octet is
data from the client while in the midst of sending a multilane message disregarded.
to the server (such as during a POST or IHAVE command) SHOULD suffice
to reset the autologout timer. When the timer expires, the server Likewise, the terminating line ".CRLF" (in US-ASCII) MUST NOT
SHOULD close the TCP connection without sending any response to the be considered part of the multi-line response; i.e. the
client, including when the client is in the middle of sending a client MUST ensure that any line beginning with the
multi-line message to the server. termination octet followed immediately by US-ASCII CRLF is
disregarded; (the first CRLF of the terminating "CRLF.CRLF"
is, of course, part of the last line of the response).
NOTE: Texts using an encoding (such as UTF-16 or UTF-32) that
may contain the NUL octet or the CR or LF octets in contexts
other than the CRLF line ending cannot be reliably conveyed
in the above format.
Note also that, although this memo does not limit the length
of a line in any way, 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
Barber [Page 5]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
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, including when
the client is in the middle of sending a multi-line message
to the server.
4.1 Response Codes 4.1 Response Codes
Each response MUST begin with a three-digit status indicator. These Each response MUST begin with a three-digit status indicator.
are status reports from the server and indicate the response to the These are status reports from the server and indicate the
last command received from the client. response to the last command received from the client.
The first digit of the response broadly indicates the success, The first digit of the response broadly indicates the
failure, or progress of the previous command. success, failure, or progress of the previous command.
1xx - Informative message 1xx - Informative message
2xx - Command ok 2xx - Command ok
3xx - Command ok so far, send the rest of it. 3xx - Command ok so far, send the rest of it.
4xx - Command was correct, but couldn't be performed for some reason. 4xx - Command was correct, but couldn't be performed for
5xx - Command unimplemented, or incorrect, or a serious program error some reason.
occurred. 5xx - Command unimplemented, or incorrect, or a serious
program error occurred.
The next digit in the code indicates the function response
category.
The next digit in the code indicates the function response category.
x0x - Connection, setup, and miscellaneous messages x0x - Connection, setup, and miscellaneous messages
x1x - Newsgroup selection x1x - Newsgroup selection
x2x - Article selection x2x - Article selection
x3x - Distribution functions x3x - Distribution functions
x4x - Posting x4x - Posting
x8x - Reserved for authentication and authorization extensions x8x - Reserved for authentication and authorization
extensions
x9x - Reserved for private use (non-standard extensions) x9x - Reserved for private use (non-standard extensions)
Certain responses contain parameters such as numbers and names in Certain responses contain parameters such as numbers and
addition to the status indicator. In those cases, the number and type names in addition to the status indicator. In those cases,
of such parameters is fixed for each response code to simplify the number and type of such parameters is fixed for each
interpretation by the client (any extension MUST follow this principle response code to simplify interpretation by the client (any
as well). In all other cases, the client MUST only use the status extension MUST follow this principle as well). In all other
indicator itself to determine the nature of the response. The exact cases, the client MUST only use the status indicator itself
to determine the nature of the response. The exact response
Barber [Page 6]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
codes that can be returned in response to a given command are
detailed in the description of the keyword that is the first
part of the command.
Barber Page [3] Parameters MUST be separated from the numeric status
indicator and from each other by a single US-ASCII space. All
numeric parameters MUST be in base 10 (decimal) format, and
MAY have leading zeros. String parameters MUST contain at
least one character and MUST NOT contain US-ASCII spaces, CR,
LF, or tab). The server MAY add any text after the response
code or last parameter 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
parameter by at least one US-ASCII space.
The server MUST respond to any command with the appropriate
generic response (given in section 4.1.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 memo, including new commands, new 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 memo 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 memo 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 memo nor any extension registered with IANA (see
section 12) will specify any response codes of the x9x
pattern. (Implementers of extensions are accordingly
Barber [Page 7]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
cautioned not to use such responses for extensions that may
subsequently be submitted for registration.)
response codes that can be returned in response to a given command are 4.1.1 Generic Response Codes
detailed in the description of the keyword that is the first part of
the command.
Parameters MUST be separated from the numeric status indicator and The server MUST respond to any command with the appropriate
from each other by a single US-ASCII space. All numeric parameters one of the following generic responses if it represents the
MUST be in base 10 (decimal) format, and MAY have leading zeros. situation.
String parameters MUST contain at least one character and MUST NOT If the command is not recognized, or it is an optional
contain US-ASCII spaces, CR, LF, or tab). The server MAY add any text command or extension that is not implemented by the server,
after the response code or last parameter as appropriate, and the the response code 500 MUST be returned.
client MUST NOT make decisions based on this text. Such text MUST be
separated from the numeric status indicator or the last parameter by
at least one US-ASCII space.
The server MUST respond to any command with the appropriate generic If there is a syntax error in the arguments of a recognized
response (given in section 4.1.1) if it represents the situation. command, the response code 501 MUST be returned. Note that
Otherwise, each recognized command MUST return one of the response where a command has variants depending on a keyword (e.g.
codes specifically listed in its description or in an extension. A LIST ACTIVE and LIST NEWSGROUPS), then 501 MUST be used when
server MAY provide extensions to this specification, including new the requested variant is not implemented but the base command
commands, new features of existing commands, and other ways of is.
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 If the client is not authorized to use the specified facility
digit of the response to determine the result. For example, an when the server is in its current state, the response code
unexpected 2xx should be taken as success and an unexpected 4xx or 5xx 502 MUST be returned. A different command might change the
as failure. server state and permit the command if it is retried.
Response codes not specified in this standard MAY be used for any If the server does not provide an optional feature, then the
installation-specific additional commands also not specified. These response code 403 MUST be returned if the omission is
SHOULD be chosen to fit the pattern of x9x specified above. temporary (e.g. because a necessary facility is unavailable)
Neither this document nor any extension registered with IANA (see and the code 503 if it is permanent (e.g. because the server
section 12) will specify any response codes of the x9x pattern. does not store the required information).
(Implementers of extensions are accordingly cautioned not to use such
responses for extensions that may subsequently be submitted for
registration.)
4.1.1 Generic Response Codes 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. It MAY give a
401 response code to any command to indicate that termination
is imminent (following a 401 response, it MUST NOT close the
TCP connection immediately).
The server MUST respond to any command with the appropriate one of the 4.2 Streaming
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, NNTP is designed to operate over a reliable bi-directional
the response code 501 MUST be returned. Note that where a command has connection such as TCP. Therefore, if a command does not
variants depending on a keyword (e.g. LIST ACTIVE and LIST Barber [Page 8]
NEWSGROUPS), then 501 MUST be used when the requested variant is not INTERNET DRAFT S. Barber
implemented but the base command is. Expires: July 15, 2002 Academ Consulting Services
January 2002
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 "streaming". However, certain server
implementations throw away all text received from the client
following certain commands before sending their response. If
this happens, streaming will be affected because one or more
commands will have been ignored or misinterpreted, and the
client will be matching the wrong responses to each command.
Since there are significant benefits to streaming, but also
circumstances where it is reasonable or common for servers to
behave in the above manner, this memo puts certain
requirements on both clients and servers.
If the client is not authorized to use the specified facility when the Except where stated otherwise, a client MAY use streaming.
server is in its current state, the response code 502 MUST be That is, it may send a command before receiving the response
returned. A different command might change the server state and permit for the previous command. The server MUST allow streaming and
the command if it is retried. MUST NOT throw away any text received after a command.
Finally, the server MUST process commands in the order they
are sent.
If the server does not provide an optional feature, then the response If the specific description of a command describes it as "not
code 403 MUST be returned if the omission is temporary (e.g. because a streamable", that command MUST end any stream of commands.
necessary facility is unavailable) and the code 503 if it is That is, the client MUST NOT send any following command until
permanent (e.g. because the server does not store the required receiving the CRLF at the end of the response from the
information). 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.
If the server has to terminate the connection for some reason, it MUST The initial connection must not be part of a stream; that is,
give a 400 response code to the next command and then immediately the client MUST NOT send any command until receiving the CRLF
close the TCP connection. It MAY give a 401 response code to any at the end of the greeting.
command to indicate that termination is imminent (following a 401
response, it MUST NOT close the TCP connection immediately).
5. The WILDMAT format If the client uses blocking system calls to send commands, it
MUST ensure that the amount of text sent in streaming 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 bytes for TCP.
The WILDMAT format[5] described here is based on the version first 5 The WILDMAT format
Barber Page [4] The WILDMAT format described here is based on the version
first developed by Rich Salz [5], which in turn was derived
Barber [Page 9]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
from the format used in the UNIX "find" command to articulate
file names. It was developed to provide a uniform mechanism
for matching newsgroup names in the same manner that the UNIX
shell matches filenames.
5.1 Wildmat syntax
A wildmat is described by the following augmented BNF[6]
syntax (note that this syntax contains ambiguities and
special cases described at 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-
7F /UTF-8-non-ascii ; exclude * , ? [ \ ]
wildmat-wild = "*" / "?"
UTF-8-non-ascii is defined in section 13.
This syntax must be interpreted subject to the following
rule:
Where a wildmat-pattern is not immediately preceded by "!",
it shall not begin with a "!".
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 only current use of wildmats. Backslash
is commonly used to supress the special meaning of characters
and brackets to introduce sets, but there is no existing
standard practice for these in wildmats and so they were
omitted from this memo. A future extension to this memo may
provide semantics for these characters.
5.2 Wildmat semantics
A wildmat is tested against a string, and either matches or
does not match. To do this, each constituent wildmat-pattern
Barber [Page 10]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
developed by Rich Salz which was derived from the format used in the is matched against the string and the rightmost pattern that
UNIX "find" command to articulate file names. It was developed to matches is identified. If that wildmat-pattern is not
provide a uniform mechanism for matching patterns in the same manner preceded with "!", the whole wildmat matches. If it is
that the UNIX shell matches filenames. Patterns are implicitly preceded by "!", or if no wildmat-pattern matches, the whole
anchored at the beginning and end of each string when testing for a wildmat does not match.
match. There are five pattern-matching operations other than a strict
one-to-one match between the pattern and the source to be checked for
a match. The first is an asterisk (*) to match any sequence of zero or
more UTF-8 characters. The second is a question mark (?) to match any
single UTF-8 character. The third specifies a specific set of
characters. The set is specified as a list of characters, or as a
range of characters where the beginning and end of the range are
separated by a minus (or dash) character, or as any combination of
lists and ranges. The dash can also be included in the set as a
character it if is the beginning or end of the set. This set is
enclosed in square brackets. The close square bracket (]) may be used
in a set if it is the first character in the set. The fourth operation
is the same as the logical not of the third operation and is specified
the same way as the third with the addition of a caret character (^)
at the beginning of the test string just inside the open square
bracket. The final operation uses the backslash character to
invalidate the special meaning of the open square bracket ([), the
asterisk, backslash, or the question mark. Two backslashes in sequence
will result in the evaluation of the backslash as a character with no
special meaning.
Implementers must be careful to apply the pattern-matching operators For example, consider the wildmat "a*,!*b,*c*":
to whole characters encoded in UTF-8, and not to individual octets.
5.1 Negating the wildmat pattern the string "aaa" matches because the rightmost match is
with "a*"
the string "abb" does not match because the rightmost
match is with "*b"
the string "ccb" matches because the rightmost match is
with "*c*"
the string "xxx" does not match because no wildmat-pattern
matches
The exclamation point can be used at the beginning of a wildmat to A wildmat-pattern matches a string if the string can be
negate it. That is, if the remainder of the pattern would match the broken into components, each of which matches the
string then the negated pattern does not, and vice versa. If it corresponding wildmat-item in the pattern; the matches must
appears as any other character other than the first one, it has no be in the same order, and the whole string must be used in
special meaning. the match. 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).
5.2 Examples A wildmat-exact matches the same character (which may be more
than one octet in UTF-8).
[^]-] matches any single character other than "?" matches exactly one character (which may be more than one
a close square bracket or a minus octet).
sign/dash
*bdc matches any string that ends with the
string "bdc" including the string "bdc"
(without quotes)
[0-9a-zA-Z] matches any single printable
alphanumeric ASCII character
a??d matches any four character string which
begins with a and ends with d
!bc*d matches any string that does not start
with "bc" and end with "d" (without
quotes)
!\\x matches any string that does not start
with "\x" (without quotes)
6. Format for Keyword Descriptions "*" 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.
On the following pages are descriptions of each keyword recognized by 5.3 Extensions
the NNTP server and the responses that will be returned by those
commands. These keywords are grouped by the functional step in which
they are used.
Each keyword is shown in upper case for clarity, although the NNTP
server ignores case in the interpretation of commands.
Parameters are shown as follows:
o UPPERCASE indicates literal text to be included in the
command;
o lowercase indicates a token described elsewhere;
Barber Page [5] An NNTP server or extension MAY extend the syntax or
semantics of wildmats provided that all wildmats that meet
the requirements of section 5.1 have the meaning ascribed to
Barber [Page 11]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
them by section 5.2. Future editions of this memo may also
extend wildmats.
5.4 Examples
In these examples, $ and @ are used to represent the two
octets 0xC2 and 0xA3 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" and "def"
$@ the one character string "#"
a* any string that begins with "a"
a*b any string that begins with "a" and ends with "b"
a*,*b any string that begins with "a" or ends with "b"
a*,!*b any string that begins with "a" and does not end with
"b"
any string that begins with "a" and does not end with
a*,!*b,c* "b", and any string that begins with "c" no matter
what it ends with
any string that begins with "a" or "c" and does not
a*,c*,!*b 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
6 Format for Keyword Descriptions
On the following pages are descriptions of each keyword
recognized by the NNTP server and the responses that will be
returned by those commands. These keywords are grouped by the
functional step in which they are used.
Each keyword is shown in upper case for clarity, although the
NNTP server ignores case in the interpretation of commands.
Parameters are shown as follows:
Barber [Page 12]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
o [brackets] indicate that the parameter is optional; UPPERCASE indicates literal text to be included in the
o ellipsis... indicates that the parameter may be repeated command;
any number of times (it must occur at least once); lowercase indicates a token described elsewhere;
o vertical|bar indicates a choice of two mutually exclusive [brackets] indicate that the parameter is optional;
ellipsis... indicates that the parameter may be repeated
any number of times (it must occur at least
once);
vertical|bar indicates a choice of two mutually exclusive
parameters (exactly one must be provided). parameters (exactly one must be provided).
Parameters are case or language specific only when specified (either Parameters are case or language specific only when specified
in this document or in RFC 1036[6]). (either in this memo or in RFC 1036[7]).
The name "wildmat" for a parameter indicates that it is a wildmat The name "wildmat" for a parameter indicates that it is a
format pattern as defined in section 5. wildmat format pattern as defined in section 5. If the
parameter does not meet the requirements of that section (for
example, if it does not fit the grammar of 5.1) the NNTP
server MAY place some interpretation on it (not specified by
this memo) or otherwise MUST generate a 501 response.
7. The GREETING Step 7 The GREETING Step
7.1 Initial Connection 7.1 Initial Connection
There is no keyword presented by the client upon initial connection to There is no keyword presented by the client upon initial
the server. The server MUST present an appropriate response code as a connection to the server. The server MUST present an
greeting to the client. This response informs the client about what appropriate response code as a greeting to the client. This
steps the client should take to reach the news exchange step. response informs the client about what steps the client
If the server will accept further commands from the client including should take to reach the news exchange step.
POST, the server MUST present a 200 greeting code.
If the server will accept further commands from the client, but it is If the server will accept further commands from the client
not authorized to post articles using the POST command, the server including POST, the server MUST present a 200 greeting code.
MUST present a 201 greeting code. If the server will accept further commands from the client,
but it is not authorized to post articles using the POST
command, the server MUST present a 201 greeting code.
Otherwise the server MUST present a 400 or 502 greeting code and then Otherwise the server MUST present a 400 or 502 greeting code
immediately close the connection. 502 MUST be used if the client is and then immediately close the connection. 502 MUST be used
not permitted under any circumstances to interact with the server and if the client is not permitted under any circumstances to
400 otherwise. interact with the server and 400 otherwise.
Barber [Page 13]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
7.1.1 Responses 7.1.1 Responses
200 Service available, posting allowed 200 Service available, posting allowed
201 Service available, posting prohibited 201 Service available, posting prohibited
400 Service temporarily unavailable 400 Service temporarily unavailable
502 Service unavailable 502 Service unavailable
Following a 400 or 502 response the server MUST immediately close the Following a 400 or 502 response the server MUST immediately
connection. close the connection.
7.1.2 Initial Connection Example 7.1.2 Initial Connection Example
Example of a normal connection from an authorized client Example of a normal connection from an authorized client
[Initial TCP connection setup completed.] [Initial TCP connection setup completed.]
[C] Initial TCP connection completed [C] Initial TCP connection completed
[S] 200 NNTP Service Ready, posting permitted [S] 200 NNTP Service Ready, posting permitted
Client can send commands at this point. In this example, the client Client can send commands at this point. In this example, the
jumps directly to the conclusion step (See section 10). client jumps directly to the conclusion step (See section
10).
[C] QUIT [C] QUIT
[S] 205 NNTP Service exits normally [S] 205 NNTP Service exits normally
[Server closes connection.] [Server closes connection.]
Example of a normal connection from an unauthorized client Example of a normal connection from an unauthorized client
[C] Initial TCP connection completed [C] Initial TCP connection completed
[S] 502 NNTP Service Unavailable [S] 502 NNTP Service Unavailable
[Server closes connection.] [Server closes connection.]
Example of a normal connection from an authorized client that is not Example of a normal connection from an authorized client that
permitted to post is not permitted to post
[Initial TCP connection setup completed.] [Initial TCP connection setup completed.]
[S] 201 NNTP Service Ready, posting prohibited [S] 201 NNTP Service Ready, posting prohibited
Client can send commands at this point. In this example, the
Barber Page[6] client jumps directly to the conclusion step (See section
10).
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
Client can send commands at this point. In this example, the client
jumps directly to the conclusion step (See section 10).
[C] QUIT [C] QUIT
[S] 205 NNTP Service exits normally [S] 205 NNTP Service exits normally
[Server closes connection.] [Server closes connection.]
Example of a connection from any client where the server is unable to Example of a connection from any client where the server is
provide service unable to provide service
[Initial TCP connection setup completed.] [Initial TCP connection setup completed.]
[S] 400 NNTP Service temporarily unavailable [S] 400 NNTP Service temporarily unavailable
[Server closes connection.] [Server closes connection.]
Barber [Page 14]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
7.2 MODE READER 7.2 MODE READER
MODE READER MODE READER
MODE READER SHOULD be sent by any client that intends to use
any command other than IHAVE, HEAD, STAT, LIST, LIST
EXTENSIONS, or commands advertised by the server as available
via LIST EXTENSIONS. This command is not streamable.
MODE READER SHOULD be sent by any client that intends to use any Servers MAY require that this command be issued before any
command other than IHAVE, HEAD, STAT, LIST, LIST EXTENSIONS, or other commands are sent and MAY reject any other commands
commands advertised by the server as available via LIST EXTENSIONS. until after a MODE READER command has been sent.
Servers MAY require that this command be issued before any other
commands are sent and MAY reject any other commands until after a MODE
READER command has been sent.
The server MUST present a response using the same codes as the The server MUST present a response using the same codes as
initial greeting (as described in section 7.1) to indicate its the initial greeting (as described in section 7.1) to
ability to provide reading service to the client. indicate its ability to provide reading service to the
client.
Clients SHOULD wait for a response to MODE READER after sending this Clients SHOULD wait for a response to MODE READER after
command and SHOULD NOT send any additional commands until that sending this command and SHOULD NOT send any additional
response has been received from the server. commands until that response has been received from the
server.
Once MODE READER is sent, IHAVE (and any extensions intended for Once MODE READER is sent, IHAVE (and any extensions intended
peer-to-peer article transfer) MAY no longer be permitted, even if it for peer-to-peer article transfer) MAY no longer be
were permitted before the MODE READER command. The results of LIST permitted, even if it were permitted before the MODE READER
EXTENSIONS MAY be different following a MODE READER command than prior command. The results of LIST EXTENSIONS MAY be different
to the issuing of that command. following a MODE READER command than prior to the issuing of
that command.
Servers are encouraged to not require this command even though clients Servers are encouraged to not require this command even
SHOULD send it when appropriate. It is present to support some news though clients SHOULD send it when appropriate. It is present
architectures that switch between modes based on whether a given to support some news architectures that switch between modes
connection is a peer-to-peer connection with another server or a news based on whether a given connection is a peer-to-peer
reading client. connection with another server or a news reading client.
7.2.1 Responses 7.2.1 Responses
200 Posting permitted 200 Posting permitted
201 Posting prohibited 201 Posting prohibited
400 Service temporarily unavailable 400 Service temporarily unavailable
502 Service unavailable 502 Service unavailable
Following a 400 or 502 response the server MUST immediately close the Barber [Page 15]
connection. INTERNET DRAFT S. Barber
Note that the response need not be the same as the one presented Expires: July 15, 2002 Academ Consulting Services
during the initial greeting. January 2002
Following a 400 or 502 response the server MUST immediately
close the connection.
Note that the response need not be the same as the one
presented during the initial greeting.
7.2.2 MODE READER Examples 7.2.2 MODE READER Examples
Example of use of the MODE READER command by an authorized client Example of use of the MODE READER command by an authorized
client
[C] MODE READER [C] MODE READER
[S] 200 NNTP Service Ready, posting permitted [S] 200 NNTP Service Ready, posting permitted
Client can send commands at this point. In this example, the client Client can send commands at this point. In this example, the
jumps directly to the conclusion step (See section 10). client jumps directly to the conclusion step (See section
10).
[C] QUIT [C] QUIT
[S] 205 NNTP Service exits normally [S] 205 NNTP Service exits normally
[Server closes connection.] [Server closes connection.]
Example of use of MODE READER by a client not authorized to
Barber Page[7] receive service from the server as a news reader
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
Example of use of MODE READER by a client not authorized to receive
service from the server as a news reader
[C] MODE READER [C] MODE READER
[S] 502 Service Unavailable [S] 502 Service Unavailable
[Server closes connection.] [Server closes connection.]
Example of a normal connection from an authorized client that
Example of a normal connection from an authorized client that is not is not permitted to post
permitted to post
[C] MODE READER [C] MODE READER
[S] 201 NNTP Service Ready, posting prohibited [S] 201 NNTP Service Ready, posting prohibited
Client can send commands at this point. In this example, the client Client can send commands at this point. In this example, the
jumps directly to the conclusion step (See section 10). client jumps directly to the conclusion step (See section
10).
[C] QUIT [C] QUIT
[S] 205 NNTP Service exits normally [S] 205 NNTP Service exits normally
[Server closes connection.] [Server closes connection.]
Example of a connection from any client where the server is
Example of a connection from any client where the server is unable to unable to provide news reader service
provide news reader service
[C] MODE READER [C] MODE READER
[S] 400 NNTP Service temporarily unavailable [S] 400 NNTP Service temporarily unavailable
[Server closes connection.] [Server closes connection.]
8. The CAPABILITIES DISCOVERY Step 8 The CAPABILITIES DISCOVERY Step
Barber [Page 16]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
To discover what extensions are available, an NNTP client can
query the server with the LIST EXTENSIONS command.
If a particular extension is unavailable, the client can
attempt to work around it or it may wish to terminate the
session.
To discover what extensions are available, an NNTP client can query
the server with the LIST EXTENSIONS command.
If a particular extension is unavailable, the client can attempt to
work around it or it may wish to terminate the session.
See section 12 for further discussion of extensions. See section 12 for further discussion of extensions.
8.1 LIST EXTENSIONS 8.1 LIST EXTENSIONS
The LIST EXTENSIONS command allows a client to determine which The LIST EXTENSIONS command allows a client to determine
extensions are supported by the server. which extensions are supported by the server. This command
MUST be implemented by any server that implements any
extensions defined in this memo. This command is not
streamable.
To discover what extensions are available, an NNTP client SHOULD query To discover what extensions are available, an NNTP client
the server early in the session for extensions information by issuing SHOULD query the server early in the session for extensions
the LIST EXTENSIONS command. This command MAY be issued at anytime information by issuing the LIST EXTENSIONS command. This
during a session. It is not required that the client issues this command MAY be issued at anytime during a session. It is not
command before attempting to make use of any extension. The response required that the client issues this command before
generated by this command MAY change during a session because of other attempting to make use of any extension. The response
state information. However, an NNTP client MUST NOT cache (for use in generated by this command MAY change during a session because
another session) any information returned if the LIST EXTENSIONS of other state information. However, an NNTP client MUST NOT
command succeeds. That is, an NNTP client is only able to get the cache (for use in another session) any information returned
current and correct information concerning available extensions during if the LIST EXTENSIONS command succeeds. That is, an NNTP
a session by issuing a LIST EXTENSIONS command during that session and client is only able to get the current and correct
information concerning available extensions during a session
by issuing a LIST EXTENSIONS command during that session and
processing that response. processing that response.
A successful response starts with a 202 code and is followed by a list A successful response starts with a 202 code and is followed
of extensions, one per line. Each line MUST begin with an by a list of extensions, one per line. Each line MUST begin
extension-label and optionally one or more parameters (separated by with an extension-label and optionally one or more parameters
single spaces). The extension-label and the meaning of the parameters (separated by single spaces). The extension-label and the
are specified as part of the definition of the extension. The meaning of the parameters are specified as part of the
extension-label MUST be in uppercase. definition of the extension. The extension-label MUST be in
uppercase.
The server MUST NOT list the same extension twice in the response, and
MUST list all supported extensions. The order in which the extensions
are listed is not significant. The server need not even consistently
return the same order.
Barber Page[8]
The server MUST NOT list the same extension twice in the
response, and MUST list all supported extensions. The order
Barber [Page 17]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
in which the extensions are listed is not significant. The
If the server does not support any extensions, it SHOULD return a 402 server need not even consistently return the same order.
failure response but MAY return an empty list instead. If the server does not support any extensions, it SHOULD
return a 402 failure response but MAY return an empty list
instead.
8.1.1 Responses 8.1.1 Responses
202 Extension list follows (multi-line response) 202 Extension list follows (multi-line response)
400 Service temporarily unavailable 400 Service temporarily unavailable
402 Server has no extensions 402 Server has no extensions
500 Unknown Command 500 Unknown Command
501 Syntax Error 501 Syntax Error
502 Program error, function not performed 502 Program error, function not performed
Following a 503 response an extension might still be available, and Following a 502 response an extension might still be
the client MAY attempt to use it available, and the client MAY attempt to use it
The LIST EXTENSIONS command is optional, and a server MAY issue a 500 The LIST EXTENSIONS command is optional, and a server MAY
(unknown command) or 501 (syntax error) response to it. issue a 500 (unknown command) or 501 (syntax error) response
to it.
8.1.1.1 LIST EXTENSIONS Examples 8.1.1.1 LIST EXTENSIONS Examples
Example of a successful response: Example of a successful response:
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 202 Extensions supported: [S] 202 Extensions supported:
[S] OVER [S] OVER
[S] PAT [S] HDR
[S] LISTGROUP [S] LISTGROUP
[S] . [S] .
The particular extensions shown here are simply examples of
The particular extensions shown here are simply examples of what might what might be defined in other places, and no particular
be defined in other places, and no particular meaning should be meaning should be attributed to them.
attributed to them.
Example where no extensions are available, using preferred Example where no extensions are available, using preferred
format: format:
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 402 Server has no extensions [S] 402 Server has no extensions
Example where no extensions are available, using an empty
Example where no extensions are available, using an empty list: list:
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 202 Extensions supported: [S] 202 Extensions supported:
[S] . [S] .
Barber [Page 18]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
9. The NEWS EXCHANGE Step 9 The NEWS EXCHANGE Step
During this step, two basic types of transactions occur: During this step, two basic types of transactions occur:
* article retrieval from the server
o article retrieval from the server * article posting to the server
o article posting to the server
9.1 Article Retrieval 9.1 Article Retrieval
News reading clients have available a variety of mechanisms to News reading clients have available a variety of mechanisms
retrieve articles via NNTP. The news articles are stored and indexed to retrieve articles via NNTP. The news articles are stored
using three types of keys. One key is the message id of an article. and indexed using three types of keys. One key is the message
According to RFC 1036, this identifier should be globally unique. id of an article. According to RFC 1036, this identifier
should be globally unique. Another key is composed of the
newsgroup name and the article number within that newsgroup.
That key MUST be unique to a particular server (there will be
only one article with that number within a particular
newsgroup), but is not required to be globally unique.
Additionally, because 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. The final key is the
arrival timestamp, giving the time that the article arrived
at the server.
Another key is composed of the newsgroup name and the article number The server MUST ensure that article numbers are issued in
within that newsgroup. That key MUST be unique to a particular server order of arrival timestamp; that is, articles arriving later
(there will be only one article with that number within a particular MUST have higher numbers than those that arrive earlier. The
newsgroup), but is not required to be globally unique. Additionally, server SHOULD allocate the next sequential unused number to
because the same article can be cross-posted to multiple newsgroups, each new article.
there may be multiple keys that point to the same article on the same
Barber Page [9] Article numbers MUST lie between 1 and 4,294,967,295
inclusive. The client and server SHOULD NOT use leading
zeroes in specifying article numbers, and MUST NOT use more
than 16 digits. In some situations, the value zero replaces
an article number to show some special situation.
Message ids are defined in RFC 2822 with the following
modifications:
* A message id MUST NOT contain a US-ASCII space within any
quoted-pair.
* A message id MUST NOT be longer than 250 octets.
Barber [Page 19]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
server. The final key is the arrival timestamp, giving the time that * RFC 2822 obsolete syntax for message ids are not supported
the article arrived at the server. by the protocol specified in this memo.
The server MUST ensure that article numbers are 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
next sequential unused number to each new article.
Article numbers MUST lie between 1 and 4,294,967,295 inclusive. The
client and server SHOULD NOT use leading zeroes in specifying article
numbers, and MUST NOT use more than 16 digits. In some situations, the
value zero replaces an article number to show some special situation.
9.1.1 Article Retrieval by Newsgroup Name and Article Number 9.1.1 Article Retrieval by Newsgroup Name and Article Number
The following commands are used to set the current newsgroup name and The following commands are used to set the current newsgroup
the "current article pointer" which is used by other commands for name and the "current article pointer" which is used by other
article retrieval. At the start of an NNTP session, both of these commands for article retrieval. At the start of an NNTP
values are undefined. session, both of these values are undefined.
9.1.1.1 GROUP 9.1.1.1 GROUP
GROUP ggg GROUP ggg
The required parameter ggg is the name of the newsgroup to be selected The required parameter ggg is the name of the newsgroup to be
(e.g. "news.software.b"). A list of valid newsgroups may be obtained selected (e.g. "news.software.b"). A list of valid newsgroups
by using the LIST keyword. See section 9.4 for more information on may be obtained by using the LIST keyword. See section 9.4
the LIST keyword. for more information on the LIST keyword.
The successful selection response will return the article numbers of
the 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 estimate of the number of
articles on file in the group.
If the group is not empty, the estimate MUST be at least the actual The successful selection response will return the article
number of articles available, and MUST be no greater than one more numbers of the first and last articles in the group at the
than the difference between the reported low and high water marks. moment of selection (these numbers are referred to as the
(Some implementations will actually count the number of articles on "reported low water mark" and the "reported high water
file. Others will just subtract the low water mark from the high water mark"), and an estimate of the number of articles on file in
mark and add one to get an estimate.) the group.
If the group is empty, one of the following three situations will If the group is not empty, the estimate MUST be at least the
occur. Clients MUST accept all three cases; servers MUST NOT represent actual number of articles available, and MUST be no greater
an empty group in any other way. than one more than the difference between the reported low
o The high water mark will be one less than the low water and high water marks. (Some implementations will actually
mark, and the estimated article count will be zero. Servers count the number of articles on file. Others will just
SHOULD use this method to show an empty group. This is the only subtract the low water mark from the high water mark and add
time that the high water mark can be less than the low water one to get an estimate.)
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 count might be zero or
non-zero; if non-zero, the same requirements apply as for a
non-empty group.
The set of articles in a group may change after the GROUP command is If the group is empty, one of the following three situations
carried out. That is: will occur. Clients MUST accept all three cases; servers MUST
o articles may be removed from the group NOT represent an empty group in any other way.
o articles may be reinstated in the group with the same
article number, but those articles MUST have numbers no less than
the reported low water mark (note that this is a reinstatement of
the previous article, not a new article reusing the number)
o new articles may be added with article numbers greater than
the reported high water mark (if an article that was the one with
the highest number has been removed, the next new article will
not have the number one greater than the reported high water
mark)
Except when the group is empty and all three numbers are zero, The high water mark will be one less than the low water mark,
whenever a subsequent GROUP command for the same newsgroup is issued, and the estimated article count will be zero. Servers SHOULD
use this method to show an empty group. This is the only time
that the high water mark can be less than the low water mark.
All three numbers will be zero.
Barber [Page 20]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
Barber Page [10] The high water mark is greater than or equal to the low water
mark; the estimated article count might be zero or non-zero;
if non-zero, the same requirements apply as for a non-empty
group.
INTERNET DRAFT S. Barber The set of articles in a group may change after the GROUP
Expires: May 15, 2002 Academ Consulting Services command is carried out. That is:
November 2001 * articles may be removed from the group
either by the same client or a different client, the reported low * articles may be reinstated in the group with the same
water mark in the response MUST be no less than that in any previous article number, but those articles MUST have numbers no
response for that newsgroup sent to any client. The client may make less than the reported low water mark (note that this is a
use of the low water mark to remove all remembered information about reinstatement of the previous article, not a new article
articles with lower numbers, as these will never recur. This includes reusing the number)
the situation when the high water mark is one less than the low water * new articles may be added with article numbers greater
mark. than the reported high water mark (if an article that was
the one with the highest number has been removed, the next
new article will not have the number one greater than the
reported high water mark)
No similar assumption can be made about the high water mark, as this Except when the group is empty and all three numbers are
can decrease if an article is removed, and then increase again if it zero, whenever a subsequent GROUP command for the same
is reinstated or if new articles arrive. newsgroup is issued, either by the same client or a different
client, the reported low water mark in the response MUST be
no less than that in any previous response for that newsgroup
sent to any client. The client may make use of 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 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 by means of this command, the When a valid group is selected by means of this command, the
internally maintained "current article pointer" MUST be set to the internally maintained "current article pointer" MUST be set
first article in the group and the name of the current newsgroup MUST to the first article in the group and the name of the current
be set to the selected newsgroup name. If an invalid group is newsgroup MUST be set to the selected newsgroup name. If an
specified, the previously selected group, if any, and article MUST invalid group is specified, the previously selected group, if
remain selected. If an empty newsgroup is selected, the "current any, and article MUST remain selected. If an empty newsgroup
article pointer" is in an indeterminate state and MUST NOT be used. is selected, the "current article pointer" is in an
indeterminate state and MUST NOT be used.
Barber [Page 21]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
The GROUP keyword (or the LISTGROUP keyword, if implemented) MUST be The GROUP keyword (or the LISTGROUP keyword, if implemented)
used by a client and a successful response received before the any MUST be used by a client and a successful response received
other command is used that depends on having the "current article before the any other command is used that depends on having
pointer" be valid. the "current article pointer" be valid.
If the group specified is not available on the server MUST return a If the group specified is not available on the server, it
411 error code. MUST return a 411 error code.
9.1.1.1.1 Responses 9.1.1.1.1 Responses
211 n l h ggg Group successfully selected (n = 211 n l h ggg Group successfully selected (n =
estimated number of articles in the estimated number of articles in the
group, l = low water mark, h = high group, l = low water mark, h = high
water mark, ggg = name of the group water mark, ggg = name of the group
411 No such newsgroup 411 No such newsgroup
9.1.1.1.2 GROUP Examples 9.1.1.1.2 GROUP Examples
skipping to change at line 786 skipping to change at page 67, line ?
9.1.1.1.2 GROUP Examples 9.1.1.1.2 GROUP Examples
Example for a group known to the server Example for a group known to the server
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
Example for a group unknown to the server Example for a group unknown to the server
[C] GROUP example.is.sob.bradner.or.barber [C] GROUP example.is.sob.bradner.or.barber
[S] 411 example.is.sob.bradner.or.barber is unknown [S] 411 example.is.sob.bradner.or.barber is unknown
9.1.1.2 LAST 9.1.1.2 LAST
LAST LAST
If the current newsgroup is valid, the internally maintained
"current article pointer" MUST be set to the previous article
in the current newsgroup. If already positioned at the first
article of the newsgroup, an error message MUST be returned
and the current article MUST remain selected.
If the current newsgroup is valid, the internally maintained "current There MAY be no previous article in the group, although the
article pointer" MUST be set to the previous article in the current current article number is not the reported low water mark.
newsgroup. If already positioned at the first article of the There MUST NOT be a previous article when the current article
newsgroup, an error message MUST be returned and the current article number is the reported low water mark.
MUST remain selected. Barber [Page 22]
There MAY be no previous article in the group, although the current
article number is not the reported low water mark. There MUST NOT be a
previous article when the current article number is 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 successful, a response indicating the current article number and a
message-id string MUST be returned. No article text is sent in
Barber Page [11]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
response to this command.
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 successful, a response indicating the current article
number and a message-id string MUST be returned. No article
text is sent in response to this command.
9.1.1.2.1 Responses 9.1.1.2.1 Responses
223 n a Article found (n = number, a = message-id) 223 n a Article found (n = number, a = message-id)
412 No newsgroup selected 412 No newsgroup selected
420 Current article pointer is invalid 420 Current article pointer is invalid
422 No previous article in this group 422 No previous article in this group
9.1.1.2.2 LAST Examples 9.1.1.2.2 LAST Examples
Example of a successful article retrieval using LAST Example of a successful article retrieval using LAST
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] NEXT [C] NEXT
[S] 223 3000237 <668929@domain.com> retrieved [S] 223 3000237 <668929@example.org> retrieved
[C] LAST [C] LAST
[S] 223 3000234 <45223423@to.to> retrieved [S] 223 3000234 <45223423@example.com> retrieved
Example of an attempt to retrieve an article without having
Example of an attempt to retrieve an article without having selected a selected a group (via the GROUP command) first
group (via the GROUP command) first
[S] 200 NNTP Service ready [S] 200 NNTP Service ready
[C] LAST [C] LAST
[S] 412 no newsgroup selected [S] 412 no newsgroup selected
Example of an attempt to retrieve an article using the LAST
Example of an attempt to retrieve an article using the LAST command command when the current article pointer is pointing at the
when the current article pointer is pointing at the first article in first article in the group
the group
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] LAST [C] LAST
[S] 422 No previous article to retrieve [S] 422 No previous article to retrieve
Example of an attempt to retrieve an article using the LAST
Example of an attempt to retrieve an article using the LAST command command when the current group selected is empty
when the current group selected is empty Barber [Page 23]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] LAST [C] LAST
[S] 420 No current article selected [S] 420 No current article selected
9.1.1.3 NEXT 9.1.1.3 NEXT
NEXT NEXT
If the current newsgroup is valid, the internally maintained
"current article pointer" MUST be advanced to the next
article in the current newsgroup. If no more articles remain
in the current group, an error message MUST be returned and
the current article MUST remain selected.
If the current newsgroup is valid, the internally maintained "current If successful, a response indicating the current article
article pointer" MUST be advanced to the next article in the current number and the message-id string MUST be returned. No
newsgroup. If no more articles remain in the current group, an error article text is sent in response to this command.
message MUST be returned and the current article MUST remain selected.
If successful, a response indicating the current article number and
the message-id string MUST be returned. No article text is sent in
response to this command.
Barber Page [12]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
9.1.1.3.1 Responses 9.1.1.3.1 Responses
223 n a Article found (n = number, a = message-id) 223 n a Article found (n = number, a = message-id)
412 No newsgroup selected 412 No newsgroup selected
420 Current article pointer is invalid 420 Current article pointer is invalid
421 No next article in this group 421 No next article in this group
9.1.1.3.2 NEXT Examples 9.1.1.3.2 NEXT Examples
Example of a successful article retrieval using NEXT Example of a successful article retrieval using NEXT
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] NEXT [C] NEXT
[S] 223 3000237 <668929@domain.com> retrieved [S] 223 3000237 <668929@example.org> retrieved
Example of an attempt to retrieve an article without having
Example of an attempt to retrieve an article without having selected a selected a group (via the GROUP command) first
group (via the GROUP command) first
[S] 200 NNTP Service ready [S] 200 NNTP Service ready
[C] NEXT [C] NEXT
[S] 412 no newsgroup selected [S] 412 no newsgroup selected
Barber [Page 24]
Example of an attempt to retrieve an article using the NEXT command INTERNET DRAFT S. Barber
when the current article pointer is pointing at the last article in Expires: July 15, 2002 Academ Consulting Services
the group January 2002
Example of an attempt to retrieve an article using the NEXT
command when the current article pointer is pointing at the
last article in the group
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] ARTICLE 3002322 [C] ARTICLE 3002322
[S] 220 3002322 <411@whitehouse.gov> retrieved [S] 220 3002322 <411@example.net> retrieved
[S] Path: pathost!demo!whitehouse!not-for-mail [S] Path: pathost!demo!whitehouse!not-for-mail
[S] From: nobody@whitehouse.gov(Demo User) [S] From: ˘Demo User÷ <nobody@example.net>
[S] Newsgroups: misc.test [S] Newsgroups: misc.test
[S] Subject: I am just a test article [S] Subject: I am just a test article
[S] Date: 6 Oct 1998 04:38:40 -0500 [S] Date: 6 Oct 1998 04:38:40 -0500
[S] Organization: The White House, Washington, DC [S] Organization: An Example Net, Uncertain, Texas
[S] Message-ID: <411@whitehouse.gov> [S] Message-ID: <411@example.net>
[S] [S]
[S] This is just a test article. [S] This is just a test article.
[S] . [S] .
[C] NEXT [C] NEXT
[S] 421 No next article to retrieve [S] 421 No next article to retrieve
Example of an attempt to retrieve an article using the NEXT
Example of an attempt to retrieve an article using the NEXT command command when the current group selected is empty
when the current group selected is empty
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
Barber Page [13]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
[C] NEXT [C] NEXT
[S] 420 No current article selected [S] 420 No current article selected
9.2 Retrieval of Articles and Article Sections 9.2 Retrieval of Articles and Article Sections
The ARTICLE, BODY, HEAD, and STAT commands are very similar. They The ARTICLE, BODY, HEAD, and STAT commands are very similar.
differ only in the parts of the article that are presented to the They differ only in the parts of the article that are
client and in the successful response code. The ARTICLE command is presented to the client and in the successful response code.
described here in full, while the other commands are described in The ARTICLE command is described here in full, while the
terms of the differences. other commands are described in terms of the differences.
An article, as defined by RFC 1036, consists of two parts:
An article, as defined by RFC 1036, consists of two parts: the article the article headers and the article body. When responding to
headers and the article body. When responding to one of these one of these commands, the server presents the entire article
commands, the server presents the entire article or appropriate part or appropriate part and does not attempt to alter or
and does not attempt to alter or translate it in any way. translate it in any way.
Barber [Page 25]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
9.2.1 ARTICLE 9.2.1 ARTICLE
ARTICLE <message-id> ARTICLE <message-id>
ARTICLE [number] ARTICLE [number]
The ARTICLE command selects an article based on the arguments
and presents the header, a blank line, and the body of that
article. The command has two forms.
The ARTICLE command selects an article based on the arguments and In the first form, a message-id is specified (including the
presents the header, a blank line, and the body of that article. The angle brackets), and the server presents the article with
command has two forms. that message-id in its headers. In this case, the server MUST
NOT alter the "current article pointer". This is both to
facilitate the presentation of articles that may be
referenced within another article being read, and because of
the semantic difficulties of determining the proper sequence
and membership of an article that may have been crossposted
to more than one newsgroup.
In the first form, a message-id is specified (including the angle In the second form, an article number may be specified. If
brackets), and the server presents the article with that message-id in so, and if there is an article with that number in the
its headers. In this case, the server MUST NOT alter the "current currently selected group, the server MUST set the current
article pointer". This is both to facilitate the presentation of article pointer to that number.
articles that may be referenced within another article being read, and
because of the semantic difficulties of determining the proper
sequence and membership of an article which may have been posted to
more than one newsgroup.
In the second form, an article number may be specified. If so, and if Then, whether or not a number was specified, the article
there is an article with that number in the currently selected group, indicated by the current article pointer is presented to the
the server MUST set the current article pointer to that number. client.
Then, whether or not a number was specified, the article indicated by
the current article pointer is presented to the client.
Note that a previously valid article number MAY become invalid if the
article has been removed. A previously invalid article number MAY
become valid if the article has been reinstated, but such an article
number MUST be no less than the reported low water mark for that
group.
The server MUST NOT change the currently selected group as a result of Note that a previously valid article number MAY become
this command. The server MUST NOT change the current selected article invalid if the article has been removed. A previously invalid
except when an article number argument was provided and the article article number MAY become valid if the article has been
exists; in particular, it MUST NOT change it following an unsuccessful reinstated, but such an article number MUST be no less than
response. the reported low water mark for that group.
The server MUST NOT change the currently selected group as a
result of this command. The server MUST NOT change the
current selected article except when an article number
argument was provided and the article exists; in particular,
it MUST NOT change it following an unsuccessful response.
9.2.1.1 Responses 9.2.1.1 Responses
First form (message-id specified): First form (message-id specified):
Barber [Page 26]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
220 0 a Article follows (multi-line response, a = 220 0 a Article follows (multi-line response, a =
message-id) message-id)
430 No article found with that message-id 430 No article found with that message-id
502 Program error, function not performed 502 Program error, function not performed
Second form (optional article number specified): Second form (optional article number specified):
220 n a Article follows (multi-line response, n = 220 n a Article follows (multi-line response, n =
article number, a = message-id) article number, a = message-id)
412 No newsgroup selected 412 No newsgroup selected
420 No current article selected 420 No current article selected
423 No such article in this newsgroup 423 No such article in this newsgroup
502 Program error, function no performed 502 Program error, function not performed
Barber Page [14] The 420 response only occurs if no article number has been
specified.
INTERNET DRAFT S. Barber In the 220 response, the first parameter is 0 for the first
Expires: May 15, 2002 Academ Consulting Services form and the article number (within the current group) for
November 2001 the second form. The second parameter is the message-id of
the article (within angle brackets). This is taken from the
message-id header line of the article (required by RFC 1036).
If there is no such line, the message-id "<0>" MUST be used
instead (without the double quotes).
The 420 response only occurs if no article number has been specified. Since the message-id field is unique for each article, it may
In the 220 response, the first parameter is 0 for the first form and be used by a client to skip duplicate displays of articles
the article number (within the current group) for the second form. The that have been posted more than once, or to more than one
second parameter is the message-id of the article (within angle newsgroup.
brackets). This is taken from the message-id header line of the
article (required by RFC 1036). If there is no such line, the
message-id "<0>" MUST be used instead (without the double quotes).
Since the message-id field is unique for each article, it may be used
by a client to skip duplicate displays of articles that have been
posted more than once, or to more than one newsgroup.
The article headers and body are returned as a multilane response
following the initial response line.
The article headers and body are returned as a multi-line
response following the initial response line.
9.2.1.2 Examples 9.2.1.2 Examples
Example of a successful retrieval of an article (using no article Example of a successful retrieval of an article (using no
number) article number)
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] ARTICLE [C] ARTICLE
[S] 220 3000234 <45223423@to.to> [S] 220 3000234 <45223423@example.com>
Barber [Page 27]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
[S] Path: pathost!demo!somewhere!not-for-mail [S] Path: pathost!demo!somewhere!not-for-mail
[S] From: nobody@nowhere.to (Demo User) [S] From: ˘Demo User÷ <nobody@example.com>
[S] Newsgroups: misc.test [S] Newsgroups: misc.test
[S] Subject: I am just a test article [S] Subject: I am just a test article
[S] Date: 6 Oct 1998 04:38:40 -0500 [S] Date: 6 Oct 1998 04:38:40 -0500
[S] Organization: Nowhere, To [S] Organization: An Example Com, San Jose, CA
[S] Message-ID: <45223423@to.to> [S] Message-ID: <45223423@example.com>
[S] [S]
[S] This is just a test article. [S] This is just a test article.
[S] . [S] .
Example of a successful retrieval of an article by message-id Example of a successful retrieval of an article by message-id
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] ARTICLE <45223423@to.to> [C] ARTICLE <45223423@example.com>
[S] 220 0 <45223423@to.to> [S] 220 0 <45223423@example.com>
[S] Path: pathost!demo!somewhere!not-for-mail [S] Path: pathost!demo!somewhere!not-for-mail
[S] From: nobody@nowhere.to (Demo User) [S] From: ˘Demo User÷ <nobody@example.com>
[S] Newsgroups: misc.test [S] Newsgroups: misc.test
[S] Subject: I am just a test article [S] Subject: I am just a test article
[S] Date: 6 Oct 1998 04:38:40 -0500 [S] Date: 6 Oct 1998 04:38:40 -0500
[S] Organization: Nowhere, To [S] Organization: An Example Com, San Jose, CA
[S] Message-ID: <45223423@to.to> [S] Message-ID: <45223423@example.com>
[S] [S]
[S] This is just a test article. [S] This is just a test article.
[S] . [S] .
Example of an unsuccessful retrieval of an article by
Example of an unsuccessful retrieval of an article by message-id message-id
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] ARTICLE <i.am.not.there@nowhere.to> [C] ARTICLE <i.am.not.there@example.com>
[S] 430 No Such Article Found [S] 430 No Such Article Found
Barber Page [15]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
Example of an unsuccessful retrieval of an article by number Example of an unsuccessful retrieval of an article by number
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 news.groups [S] 211 1234 3000234 3002322 news.groups
[C] ARTICLE 300256 [C] ARTICLE 300256
[S] 423 No such article number in this group [S] 423 No such article number in this group
Example of an unsuccessful retrieval of an article by number
Example of an unsuccessful retrieval of an article by number because because no newsgroup was selected first
no newsgroup was selected first
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] ARTICLE 300256 [C] ARTICLE 300256
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Example of an attempt to retrieve an article when the current
Example of an attempt to retrieve an article when the current group group selected is empty
selected is empty Barber [Page 28]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] ARTICLE [C] ARTICLE
[S] 420 No current article selected [S] 420 No current article selected
Example of a failure due to the service being unavailable Example of a failure due to the service being unavailable
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] ARTICLE <i.am.a.test.article@nowhere.to> [C] ARTICLE <i.am.a.test.article@example.com>
[S] 502 Service unavailable [S] 502 Service unavailable
9.2.2 HEAD 9.2.2 HEAD
HEAD <message-id> HEAD <message-id>
HEAD [number] HEAD [number]
The HEAD command behaves identically to the ARTICLE command
The HEAD command behaves identically to the ARTICLE command except except that, if the article exists, only the headers are
that, if the article exists, only the headers are presented (the blank presented (the blank line separating the headers and body
line separating the headers and body MUST NOT be included). MUST NOT be included).
9.2.2.1 Responses 9.2.2.1 Responses
First form (message-id specified): First form (message-id specified):
221 0 a Article follows (multi-line response, a = 221 0 a Article follows (multi-line response, a =
message-id) message-id)
430 No article found with that message-id 430 No article found with that message-id
502 Program error, function not performed 502 Program error, function not performed
Second form (optional article number specified): Second form (optional article number specified):
221 n a Article follows (multi-line response, n = 221 n a Article follows (multi-line response, n =
skipping to change at line 1108 skipping to change at page 67, line ?
430 No article found with that message-id 430 No article found with that message-id
502 Program error, function not performed 502 Program error, function not performed
Second form (optional article number specified): Second form (optional article number specified):
221 n a Article follows (multi-line response, n = 221 n a Article follows (multi-line response, n =
article number, a = message-id) article number, a = message-id)
412 No newsgroup selected 412 No newsgroup selected
420 No current article selected 420 No current article selected
423 No such article in this newsgroup 423 No such article in this newsgroup
502 Program error, function no performed 502 Program error, function not performed
Except that only the headers are included in the response, the 221
response behaves identically to the 220 response of the ARTICLE
command.
9.2.2.2 Examples
Example of a successful retrieval of the headers in an article (using
no article number)
Barber Page [16] Except that only the headers are included in the response,
the 221 response behaves identically to the 220 response of
the ARTICLE command.
Barber [Page 29]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
9.2.2.2 Examples
Example of a successful retrieval of the headers in an
article (using no article number)
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] HEAD [C] HEAD
[S] 221 3000234 <45223423@to.to> [S] 221 3000234 <45223423@example.com>
[S] Path: pathost!demo!somewhere!not-for-mail [S] Path: pathost!demo!somewhere!not-for-mail
[S] From: nobody@nowhere.to (Demo User) [S] From: ˘Demo User÷ <nobody@example.com>
[S] Newsgroups: misc.test [S] Newsgroups: misc.test
[S] Subject: I am just a test article [S] Subject: I am just a test article
[S] Date: 6 Oct 1998 04:38:40 -0500 [S] Date: 6 Oct 1998 04:38:40 -0500
[S] Organization: Nowhere, To [S] Organization: An Example Com, San Jose, CA
[S] Message-ID: <45223423@to.to> [S] Message-ID: <45223423@example.com>
[S] . [S] .
Example of a successful retrieval of the headers in an
Example of a successful retrieval of the headers in an article by article by message-id
message-id
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] HEAD <45223423@to.to> [C] HEAD <45223423@example.com>
[S] 221 0 <45223423@to.to> [S] 221 0 <45223423@example.com>
[S] Path: pathost!demo!somewhere!not-for-mail [S] Path: pathost!demo!somewhere!not-for-mail
[S] From: nobody@nowhere.to (Demo User) [S] From: ˘Demo User÷ <nobody@example.com>
[S] Newsgroups: misc.test [S] Newsgroups: misc.test
[S] Subject: I am just a test article [S] Subject: I am just a test article
[S] Date: 6 Oct 1998 04:38:40 -0500 [S] Date: 6 Oct 1998 04:38:40 -0500
[S] Organization: Nowhere, To [S] Organization: An Example Com, San Jose, CA
[S] Message-ID: <45223423@to.to> [S] Message-ID: <45223423@example.com>
[S] . [S] .
Example of an unsuccessful retrieval of the header of an
Example of an unsuccessful retrieval of the header of an article by article by message-id
message-id
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] HEAD <i.am.not.there@nowhere.to> [C] HEAD <i.am.not.there@example.com>
[S] 430 No Such Article Found [S] 430 No Such Article Found
Example of an unsuccessful retrieval of the header of an
Example of an unsuccessful retrieval of the header of an article by article by number
number
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] HEAD 300256 [C] HEAD 300256
[S] 423 No such article number in this group [S] 423 No such article number in this group
Barber [Page 30]
Example of an unsuccessful retrieval the header of an article by INTERNET DRAFT S. Barber
number because no newsgroup was selected first Expires: July 15, 2002 Academ Consulting Services
January 2002
Example of an unsuccessful retrieval the header of an article
by number because no newsgroup was selected first
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] HEAD 300256 [C] HEAD 300256
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Example of an attempt to retrieve the header of an article
Example of an attempt to retrieve the header of an article when the when the current group selected is empty
current group selected is empty
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
Barber Page [17]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] HEAD [C] HEAD
[S] 420 No current article selected [S] 420 No current article selected
Example of a failure due to the service being unavailable Example of a failure due to the service being unavailable
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] HEAD <i.am.a.test.article@nowhere.to> [C] HEAD <i.am.a.test.article@example.com>
[S] 502 Service unavailable [S] 502 Service unavailable
9.2.3 BODY 9.2.3 BODY
BODY <message-id> BODY <message-id>
BODY [number] BODY [number]
The BODY command behaves identically to the ARTICLE command
The BODY command behaves identically to the ARTICLE command except except that, if the article exists, only the body is
that, if the article exists, only the body is presented (the blank presented (the blank line separating the headers and body
line separating the headers and body MUST NOT be included). MUST NOT be included).
9.2.3.1 Responses 9.2.3.1 Responses
First form (message-id specified): First form (message-id specified):
222 0 a Article follows (multi-line response, a = 222 0 a Article follows (multi-line response, a =
message-id) message-id)
430 No article found with that message-id 430 No article found with that message-id
502 Program error, function not performed 502 Program error, function not performed
Second form (optional article number specified): Second form (optional article number specified):
222 n a Article follows (multi-line response, n = 222 n a Article follows (multi-line response, n =
article number, a = message-id) article number, a = message-id)
412 No newsgroup selected 412 No newsgroup selected
420 No current article selected 420 No current article selected
423 No such article in this newsgroup 423 No such article in this newsgroup
502 Program error, function no performed Barber [Page 31]
INTERNET DRAFT S. Barber
Except that only the body is included in the response, the 222 Expires: July 15, 2002 Academ Consulting Services
response behaves identically to the 220 response of the ARTICLE January 2002
command. 502 Program error, function not performed
Except that only the body is included in the response, the
222 response behaves identically to the 220 response of the
ARTICLE command.
9.2.3.2 Examples 9.2.3.2 Examples
Example of a successful retrieval of the body of an article (using no Example of a successful retrieval of the body of an article
article number) (using no article number)
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] BODY [C] BODY
[S] 222 3000234 <45223423@to.to> [S] 222 3000234 <45223423@example.com>
[S] This is just a test article. [S] This is just a test article.
[S] . [S] .
Example of a successful retrieval of the body of an article
Example of a successful retrieval of the body of an article by by message-id
message-id
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] BODY <45223423@to.to> [C] BODY <45223423@example.com>
[S] 222 0 <45223423@to.to> [S] 222 0 <45223423@example.com>
[S] This is just a test article. [S] This is just a test article.
[S] . [S] .
Example of an unsuccessful retrieval of the body of an
Example of an unsuccessful retrieval of the body of an article by article by message-id
Barber Page [18]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
message-id
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] BODY <i.am.not.there@nowhere.to> [C] BODY <i.am.not.there@example.com>
[S] 430 No Such Article Found [S] 430 No Such Article Found
Example of an unsuccessful retrieval of the body of an
Example of an unsuccessful retrieval of the body of an article by article by number
number
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] BODY 300256 [C] BODY 300256
[S] 423 No such article number in this group [S] 423 No such article number in this group
Example of an unsuccessful retrieval of the body of an
Example of an unsuccessful retrieval of the body of an article by article by number because no newsgroup was selected first
number because no newsgroup was selected first
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] BODY 300256 [C] BODY 300256
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Barber [Page 32]
Example of an attempt to retrieve the body of an article when the INTERNET DRAFT S. Barber
current group selected is empty Expires: July 15, 2002 Academ Consulting Services
January 2002
Example of an attempt to retrieve the body of an article when
the current group selected is empty
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] BODY [C] BODY
[S] 420 No current article selected [S] 420 No current article selected
Example of a failure due to the service being unavailable Example of a failure due to the service being unavailable
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] BODY <i.am.a.test.article@nowhere.to> [C] BODY <i.am.a.test.article@example.com>
[S] 502 Service unavailable [S] 502 Service unavailable
9.2.4 STAT 9.2.4 STAT
STAT <message-id> STAT <message-id>
STAT [number] STAT [number]
The STAT command behaves identically to the ARTICLE command
except that, if the article exists, it is NOT presented to
the client.
The STAT command behaves identically to the ARTICLE command except This command allows the client to determine whether an
that, if the article exists, it is NOT presented to the client. article exists, and in the second form what its message-id
This command allows the client to determine whether an article exists, is, without having to process an arbitrary amount of text.
and in the second form what its message-id is, without having to
process an arbitrary amount of text.
9.2.4.1 Responses 9.2.4.1 Responses
First form (message-id specified): First form (message-id specified):
223 0 a Article follows (a = message-id) 223 0 a Article exists (a = message-id)
430 No article found with that message-id 430 No article found with that message-id
502 Program error, function not performed 502 Program error, function not performed
Second form (optional article number specified): Second form (optional article number specified):
223 n a Article follows (n = article number, a = 223 n a Article exists (n = article number, a =
message-id) message-id)
412 No newsgroup selected 412 No newsgroup selected
420 No current article selected 420 No current article selected
423 No such article in this newsgroup 423 No such article in this newsgroup
502 Program error, function no performed 502 Program error, function not performed
The parameters of the 223 response are identical to those that would
Barber Page [19]
Barber [Page 33]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
have been given in a 220 response to the equivalent ARTICLE command. The parameters of the 223 response are identical to those
However, the response is NOT multi-line. that would have been given in a 220 response to the
equivalent ARTICLE command. However, the response is NOT
multi-line.
9.2.4.2 Examples 9.2.4.2 Examples
Example of STAT on an existing article (using no article number) Example of STAT on an existing article (using no article
number)
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] STAT [C] STAT
[S] 223 3000234 <45223423@to.to> [S] 223 3000234 <45223423@example.com>
Example of a STAT of an existing article by message-id Example of a STAT of an existing article by message-id
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] STAT <45223423@to.to> [C] STAT <45223423@example.com>
[S] 223 0 <45223423@to.to> [S] 223 0 <45223423@example.com>
Example of an STAT of an article not on the server by
Example of an STAT of an article not on the server by message-id message-id
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] STAT <i.am.not.there@nowhere.to> [C] STAT <i.am.not.there@example.com>
[S] 430 No Such Article Found [S] 430 No Such Article Found
Example of STAT of an article not in the server by number Example of STAT of an article not in the server by number
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] STAT 300256 [C] STAT 300256
[S] 423 No such article number in this group [S] 423 No such article number in this group
Example of STAT of an article by number when no newsgroup was
Example of STAT of an article by number when no newsgroup was selected selected first
first
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] STAT 300256 [C] STAT 300256
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Example of STAT of an article when the current group selected
Example of STAT of an article when the current group selected is empty is empty
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] STAT [C] STAT
[S] 420 No current article selected [S] 420 No current article selected
Example of a failure due to the service being unavailable Example of a failure due to the service being unavailable
Barber [Page 34]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] STAT <i.am.a.test.article@nowhere.to> [C] STAT <i.am.a.test.article@example.com>
[S] 502 Service unavailable [S] 502 Service unavailable
9.3 Article Posting 9.3 Article Posting
Article posting is done in one of two modes: individual article Article posting is done in one of two modes: individual
posting from news reading clients and article transfer from other news article posting from news reading clients and article
servers. transfer from other news servers.
9.3.1 POST 9.3.1 POST
Barber Page [20]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
POST POST
If posting is allowed, response code 340 MUST be returned to
indicate that the article to be posted should be sent.
Response code 440 MUST be sent if that posting is prohibited
for some installation-dependent reason.
If posting is allowed, response code 340 MUST be returned to indicate If posting is permitted, the article MUST be presented to the
that the article to be posted should be sent. Response code 440 MUST server by the client in the format specified by RFC 1036 (or
be sent if that posting is prohibited for some installation-dependent by any of its successors or extensions). The text forming the
reason. header and body of the message to be posted MUST be sent by
the client in the format defined above (section 0) for multi-
If posting is permitted, the article MUST be presented to the server line responses (except that there is no initial line
by the client in the format specified by RFC 1036 (or by any of its containing a response code). Thus a single period (".") on a
successors or extensions). The text forming the header and body of the line indicates the end of the text, and lines starting with a
message to be posted MUST be sent by the client in the format defined
above (section 4) for multi-line responses (except that there is no
initial line containing a response code). Thus a single period (".")
on a line indicates the end of the text, and lines starting with a
period in the original text have that period doubled during period in the original text have that period doubled during
transmission. transmission.
Following the presentation of the termination sequence by the client, Following the presentation of the termination sequence by the
the server MUST return a response code indicating success or failure client, the server MUST return a response code indicating
of the article transfer. Note that response codes 340 and 440 are used success or failure of the article transfer. Note that
in direct response to the POST command. Others are returned following response codes 340 and 440 are used in direct response to the
the sending of the article. POST command. Others are returned following the sending of
the article.
No attempt shall be made by the server to filter characters, fold or No attempt shall be made by the server to filter characters,
limit lines, or otherwise process incoming text. The intent is that fold or limit lines, or otherwise process incoming text. The
the server just passes the incoming message to be posted to the server intent is that the server just passes the incoming message to
installation's news posting software, which is not part of this be posted to the server installation's news posting software,
specification. which is not defined by this memo.
The client SHOULD NOT assume that the article has been successfully Barber [Page 35]
transferred unless it receives an affirmative response from the INTERNET DRAFT S. Barber
server. Since, however, the affirmative response may have been sent Expires: July 15, 2002 Academ Consulting Services
and lost, the client SHOULD use the same message-id in the article January 2002
when resending it or check whether the article was successfully posted The client SHOULD NOT assume that the article has been
before resending it to ensure that the resend will not result in a successfully transferred unless it receives an affirmative
duplicate article. response from the server. Since, however, the affirmative
response may have been sent and lost, the client SHOULD use
the same message-id in the article when resending it or check
whether the article was successfully posted before resending
it to ensure that the resend will not result in a duplicate
article.
This command is not streamable.
9.3.1.1 Responses 9.3.1.1 Responses
240 Article received ok 240 Article received ok
340 Send article to be posted 340 Send article to be posted
440 Posting not permitted 440 Posting not permitted
441 Posting failed 441 Posting failed
9.3.1.2 Examples 9.3.1.2 Examples
Example of a successful posting Example of a successful posting
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] POST [C] POST
[S] 340 Input article. End with <CR-LF>.<CR-LF> [S] 340 Input article. End with <CR-LF>.<CR-LF>
[C] From: demo@testdomain.com(Demo User) [C] From: ˘Demo User÷ <nobody@example.net>
[C] Newsgroups: misc.test [C] Newsgroups: misc.test
[C] Subject: I am just a test article [C] Subject: I am just a test article
[C] Organization: Testdomain, USA [C] Organization: An Example Net
[C] [C]
[C] This is just a test article. [C] This is just a test article.
[C] . [C] .
[S] 240 Article received ok [S] 240 Article received ok
Example of an unsuccessful posting Example of an unsuccessful posting
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] POST [C] POST
[S] 340 Input article. End with <CR-LF>.<CR-LF> [S] 340 Input article. End with <CR-LF>.<CR-LF>
[C] From: demo@testdomain.com(Demo User) [C] From: ˘Demo User÷ <nobody@example.net>
Barber Page [21]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
[C] Newsgroups: misc.test [C] Newsgroups: misc.test
[C] Subject: I am just a test article [C] Subject: I am just a test article
[C] Organization: Testdomain, USA [C] Organization: An Example Net
[C] [C]
Barber [Page 36]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
[C] This is just a test article. [C] This is just a test article.
[C] . [C] .
[S] 441 Posting failed [S] 441 Posting failed
Example of an attempt to post when posting is not allowed
Example of an attempt to posting when posting is not allowed
[S] 201 NNTP Service Ready, read-only [S] 201 NNTP Service Ready, read-only
[C] POST [C] POST
[S] 440 Posting not permitted [S] 440 Posting not permitted
9.3.2 IHAVE 9.3.2 IHAVE
IHAVE <message-id> IHAVE <message-id>
The IHAVE command informs the server that the client has an
article whose id is <message-id>. If the server desires a
copy of that article, it MUST return response code 335
instructing the client to send the entire article. If the
server does not want the article (if, for example, the server
already has a copy of it), response code 435 indicating that
the article is not wanted MUST be returned. Finally, if the
article isn't wanted immediately but the client should retry
later if possible (if, for example, another client is in the
process of sending the same article to the server), response
code 436 MUST be returned.
The IHAVE command informs the server that the client has an article If transmission of the article is requested, the client MUST
whose id is <message-id>. If the server desires a copy of that send the entire article, including header and body, in the
article, it MUST return response code 335 instructing the client to format defined above (section 4) for multi-line responses
send the entire article. If the server does not want the article (if, (except that there is no initial line containing a response
for example, the server already has a copy of it), response code 435 code). Thus a single period (".") on a line indicates the end
indicating that the article is not wanted MUST be returned. Finally, of the text, and lines starting with a period in the original
if the article isn't wanted immediately but the client should retry text have that period doubled during transmission. The server
later if possible (if, for example, another client is in the process MUST return either response code 235, indicating that the
of sending the same article to the server), response code 436 MUST be article was successfully transferred, response code 436,
returned. indicating that the transfer failed but should be tried again
later, or response code 437, indicating that the article was
If transmission of the article is requested, the client MUST send the rejected.
entire article, including header and body, in the format defined above
(section 4) for multi-line responses (except that there is no initial
line containing a response code). Thus a single period (".") on a line
indicates the end of the text, and lines starting with a period in the
original text have that period doubled during transmission. The server
MUST then return a response code indicating success or failure of the
transferal of the article.
This function differs from the POST command in that it is intended for This function differs from the POST command in that it is
use in transferring already-posted articles between hosts. It SHOULD intended for use in transferring already-posted articles
NOT be used when the client is a personal news reading program, since between hosts. It SHOULD NOT be used when the client is a
this command indicates that the forthcoming article has already been personal news reading program, since this command indicates
posted at another site and is being forwarded from another host. that the forthcoming article has already been posted at
However, the server MAY elect not to post or forward the article if another site and is being forwarded from another host.
after further examination of the article it deems it inappropriate to Barber [Page 37]
do so. Reasons for such subsequent rejection of an article may include INTERNET DRAFT S. Barber
such problems as inappropriate newsgroups or distributions, disk space Expires: July 15, 2002 Academ Consulting Services
limitations, article lengths, garbled headers, and the like. These are January 2002
typically restrictions enforced by the server host's news software and However, the server MAY elect not to post or forward the
not necessarily the NNTP server itself. article if after further examination of the article it deems
it inappropriate to do so. Reasons for such subsequent
rejection of an article may include such problems as
inappropriate newsgroups or distributions, disk space
limitations, article lengths, garbled headers, and the like.
These are typically restrictions enforced by the server
host's news software and not necessarily the NNTP server
itself.
The client SHOULD NOT assume that the article has been successfully The client SHOULD NOT assume that the article has been
transferred unless it receives an affirmative response from the successfully transferred unless it receives an affirmative
server. A lack of response (such as a dropped network connection or a response from the server. A lack of response (such as a
network timeout) SHOULD be treated the same as a 436 error response. dropped network connection or a network timeout) SHOULD be
Because some news server software may not be able to immediately treated the same as a 436 error response.
determine whether or not an article is suitable for posting or
forwarding, an NNTP server MAY acknowledge the successful transfer of
the article (with a 235 response) but later silently discard it.
Because some news server software may not be able immediately
to determine whether or not an article is suitable for
posting or forwarding, an NNTP server MAY acknowledge the
successful transfer of the article (with a 235 response) but
later silently discard it.
9.3.2.1 Responses 9.3.2.1 Responses
235 Article transferred ok 235 Article transferred ok
335 Send article to be transferred 335 Send article to be transferred
435 Article not wanted, please don't send it. 435 Article not wanted, please donĂt send it.
Barber Page [22]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
436 Transfer failed, try again later. 436 Transfer failed, try again later.
437 Article rejected, please don't sent it again. 437 Article rejected, please donĂt sent it again.
9.3.2.2 Examples 9.3.2.2 Examples
Example of successfully sending an article to another site Example of successfully sending an article to another site
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] IHAVE <i.am.an.article.you.will.want@nowhere.to> [C] IHAVE <i.am.an.article.you.will.want@example.com>
[S] 335 Send it. End with <CR-LF>.<CR-LF> [S] 335 Send it. End with <CR-LF>.<CR-LF>
[C] Path: pathost!demo!somewhere!not-for-mail [C] Path: pathost!demo!somewhere!not-for-mail
[C] From: nobody@nowhere.to (Demo User) [C] From: ˘Demo User÷ <nobody@example.com>
[C] Newsgroups: misc.test [C] Newsgroups: misc.test
[C] Subject: I am just a test article [C] Subject: I am just a test article
[C] Date: 6 Oct 1998 04:38:40 -0500 [C] Date: 6 Oct 1998 04:38:40 -0500
[C] Organization: Nowhere, To Barber [Page 38]
[C] Message-ID: <i.am.a.test.article@nowhere.to> INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
[C] Organization: An Example Com, San Jose, CA
[C] Message-ID: <i.am.a.test.article@example.com>
[C] [C]
[C] This is just a test article. [C] This is just a test article.
[C] . [C] .
[S] 235 Article transferred ok [S] 235 Article transferred ok
Example of sending an article to another site that rejects it Example of sending an article to another site that rejects it
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] IHAVE <i.am.an.article.you.will.want@nowhere.to> [C] IHAVE <i.am.an.article.you.will.want@example.com>
[S] 335 Send it. End with <CR-LF>.<CR-LF> [S] 335 Send it. End with <CR-LF>.<CR-LF>
[C] Path: pathost!demo!somewhere!not-for-mail [C] Path: pathost!demo!somewhere!not-for-mail
[C] From: nobody@nowhere.to (Demo User) [C] From: ˘Demo User÷ <nobody@example.com>
[C] Newsgroups: misc.test [C] Newsgroups: misc.test
[C] Subject: I am just a test article [C] Subject: I am just a test article
[C] Date: 6 Oct 1998 04:38:40 -0500 [C] Date: 6 Oct 1998 04:38:40 -0500
[C] Organization: Nowhere, To [C] Organization: An Example Com, San Jose, CA
[C] Message-ID: <i.am.a.test.article@nowhere.to> [C] Message-ID: <i.am.a.test.article@example.com>
[C] [C]
[C] This is just a test article. [C] This is just a test article.
[C] . [C] .
[S] 437 Article rejected. Don't send again [S] 437 Article rejected. Don't send again
Example of sending an article to another site where the
Example of sending an article to another site where the transfer fails transfer fails
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] IHAVE <i.am.an.article.you.will.want@nowhere.to> [C] IHAVE <i.am.an.article.you.will.want@example.com>
[S] 335 Send it. End with <CR-LF>.<CR-LF> [S] 335 Send it. End with <CR-LF>.<CR-LF>
[C] Path: pathost!demo!somewhere!not-for-mail [C] Path: pathost!demo!somewhere!not-for-mail
[C] From: nobody@nowhere.to (Demo User) [C] From: ˘Demo User÷ <nobody@example.com>
[C] Newsgroups: misc.test [C] Newsgroups: misc.test
[C] Subject: I am just a test article [C] Subject: I am just a test article
[C] Date: 6 Oct 1998 04:38:40 -0500 [C] Date: 6 Oct 1998 04:38:40 -0500
[C] Organization: An Example Com, San Jose, CA
Barber Page [23] [C] Message-ID: <i.am.a.test.article@example.com>
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
[C] Organization: Nowhere, To
[C] Message-ID: <i.am.a.test.article@nowhere.to>
[C] [C]
[C] This is just a test article. [C] This is just a test article.
[C] . [C] .
[S] 436 Transfer failed [S] 436 Transfer failed
Example of sending an article to a site that already has it Example of sending an article to a site that already has it
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] IHAVE <i.am.an.article.you.have@nowhere.to> [C] IHAVE <i.am.an.article.you.have@example.com>
[S] 435 Duplicate [S] 435 Duplicate
Barber [Page 39]
Example of sending an article to a site that requests the article be INTERNET DRAFT S. Barber
tried again later Expires: July 15, 2002 Academ Consulting Services
January 2002
Example of sending an article to a site that requests the
article be tried again later
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] IHAVE <i.am.an.article.you.defer@nowhere.to> [C] IHAVE <i.am.an.article.you.defer@example.com>
[S] 436 Retry later [S] 436 Retry later
9.4 The LIST Keyword 9.4 The LIST Keyword
9.4.1 LIST 9.4.1 LIST
LIST [ACTIVE [wildmat]] LIST [ACTIVE [wildmat]]
The response to the LIST keyword with no parameters returns a
The response to the LIST keyword with no parameters returns a list of list of valid newsgroups and associated information. Each
valid newsgroups and associated information. Each newsgroup is sent newsgroup is sent as a line of text in the following format:
as a line of text in the following format:
group first last status group first last status
where <group> is the name of the newsgroup, <last> is the
number of the last known article currently in that newsgroup,
<first> is the number of the first article currently in the
newsgroup, and <status> indicates the current status of the
group on this server. Typically, the <status> will consist of
the US-ASCII character 'y' where posting is permitted, 'n'
where posting is not permitted and 'm' where postings will be
forwarded to the newsgroup moderator by the news server.
Other status strings may exist. The definition of these other
values and the circumstances under which they are returned is
covered in other specifications. Each field in the line is
separated from its neighboring fields by one or more US-ASCII
spaces.
where <group> is the name of the newsgroup, <last> is the number of The <first> and <last> fields will always be numeric. They
the last known article currently in that newsgroup, <first> is the may have leading zeros. The <first> field corresponds to the
number of the first article currently in the newsgroup, and <status> "reported low water mark" and the <last> field corresponds to
indicates the current status of the group on this server. Typically, the "reported high water mark" described in the GROUP command
the <status> will be consist of the US-ASCII character 'y' where (see Section 9.1.1.1).
posting is permitted, 'n' where posting is not permitted and 'm' where
postings will be forwarded to the newsgroup moderator by the news
server. Other status strings may exist. The definition of these other
values and the circumstances under which they are returned is covered
in other specifications. Each field in the line is separated from its
neighboring fields by one or more US-ASCII spaces.
The <first> and <last> fields will always be numeric. They may have
leading zeros. The <first> field corresponds to the "reported low
water mark" and the <last> field corresponds to the "reported high
water mark" described in the GROUP command (see Section 9.1.1.1).
The status of a newsgroup only indicates how posts to that newsgroup
are processed. It does not indicate if the current client is permitted
to post. That is indicated by the status code returned as part of the
greeting.
Please note that an empty list (i.e., the text body returned by this
command consists only of the terminating period) is a possible valid
response, and indicates that there are currently no valid newsgroups.
If the optional wildmat parameter is specified, the list is limited to
only the groups that match the pattern.
Specifying a single group is usually very efficient for the server. The status of a newsgroup only indicates how posts to that
Multiple groups may be specified by using wildmat patterns (described newsgroup are processed. It does not indicate if the current
in section 5). client is permitted to post. That is indicated by the status
code returned as part of the greeting.
Please note that an empty list (i.e., the text body returned
by this command consists only of the terminating period) is a
Barber [Page 40]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
possible valid response, and indicates that there are
currently no valid newsgroups.
If the optional wildmat parameter is specified, the list is
limited to only the groups that match the pattern.
9.4.1.1 Responses 9.4.1.1 Responses
215 Information Follows (multi-line response) 215 Information Follows (multi-line response)
Barber Page [24]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
9.4.1.2 Examples 9.4.1.2 Examples
Example of LIST returning a list of newsgroups Example of LIST returning a list of newsgroups
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST [C] LIST
[S] 215 list of newsgroups follows [S] 215 list of newsgroups follows
[S] misc.test 3000234 3002322 y [S] misc.test 3000234 3002322 y
[S] alt.fc-writers.recovery 1 4 y [S] alt.fc-writers.recovery 1 4 y
[S] tx.natives.recovery 56 89 y [S] tx.natives.recovery 56 89 y
[S] . [S] .
skipping to change at line 1653 skipping to change at page 67, line ?
9.4.1.2 Examples 9.4.1.2 Examples
Example of LIST returning a list of newsgroups Example of LIST returning a list of newsgroups
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST [C] LIST
[S] 215 list of newsgroups follows [S] 215 list of newsgroups follows
[S] misc.test 3000234 3002322 y [S] misc.test 3000234 3002322 y
[S] alt.fc-writers.recovery 1 4 y [S] alt.fc-writers.recovery 1 4 y
[S] tx.natives.recovery 56 89 y [S] tx.natives.recovery 56 89 y
[S] . [S] .
Example of LIST returning no newsgroups Example of LIST returning no newsgroups
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST [C] LIST
[S] 215 list of newsgroups follows [S] 215 list of newsgroups follows
[S] . [S] .
9.4.2 LIST ACTIVE.TIMES 9.4.2 LIST ACTIVE.TIMES
LIST ACTIVE.TIMES [wildmat] LIST ACTIVE.TIMES [wildmat]
The active.times file is maintained by some news transport systems to The active.times file is maintained by some news transport
contain information about who created a particular newsgroup and when. systems to contain information about who created a particular
newsgroup and when. The format of this file includes three
The format of this file includes three fields separated from each fields separated from each other by one or more US-ASCII
other by one or more US-ASCII space characters. The first field is the space characters. The first field is the name of the
name of the newsgroup. The second is the time when this group was newsgroup. The second is the time when this group was created
created on this news server measured in seconds since the start of on this news server measured in seconds since the start of
January 1, 1970. The third is the email address of the entity that January 1, 1970. The third is the email address of the
created the newsgroup and must be a mailbox as defined in RFC 2822. entity that created the newsgroup and must be a mailbox as
defined in RFC 28228. When executed, the information is
When executed, the information is displayed following the 215 displayed following the 215 response. When display is
response. When display is completed, the server will send a period on completed, the server will send a period on a line by itself.
a line by itself. If the information is not available, the server will If the information is not available, the server will return
return the 503 error response. If the server does not recognize the Barber [Page 41]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
the 503 error response. If the server does not recognize the
command, it SHOULD return the 501 error response. command, it SHOULD return the 501 error response.
If the optional wildmat parameter is specified, the list is limited to If the optional wildmat parameter is specified, the list is
only the groups that match the pattern. limited to only the groups that match the pattern.
Multiple groups may be specified by using wildmat patterns(described
in section 5).
9.4.2.1 Responses 9.4.2.1 Responses
215 Information Follows (multi-line response) 215 Information Follows (multi-line response)
501 Syntax error 501 Syntax error
503 Program error, function not performed 503 Program error, function not performed
9.4.2.2 Examples 9.4.2.2 Examples
Example of LIST ACTIVE.TIMES returning a list of newsgroups Example of LIST ACTIVE.TIMES returning a list of newsgroups
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST ACTIVE.TIMES [C] LIST ACTIVE.TIMES
[S] 215 information follows [S] 215 information follows
[S] misc.test 930445408 <creatme@isc.org> [S] misc.test 930445408 <creatme@isc.org>
[S] alt.rfc-writers.recovery 930562309 <m@nowhere.to> [S] alt.rfc-writers.recovery 930562309 <m@example.com>
[S] tx.natives.recovery 930678923 <sob@academ.com> [S] tx.natives.recovery 930678923 <sob@academ.com>
[S] . [S] .
Example of LIST ACTIVE.TIMES returning an error (The server
Barber Page [25] software is not configured to maintain this information, but
does recognize the command as valid.)
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
Example of LIST ACTIVE.TIMES returning an error (The server software is
not configured to maintain this information, but does recognize the
command as valid.)
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST ACTIVE.TIMES [C] LIST ACTIVE.TIMES
[S] 503 program error, function not performed [S] 503 program error, function not performed
Example of LIST ACTIVE.TIMES sent to a server that does not
Example of LIST ACTIVE.TIMES sent to a server that does not recognize recognize this argument (e.g. The software does not maintain
this argument (e.g. The software does not maintain this information.) this information.)
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST ACTIVE.TIMES [C] LIST ACTIVE.TIMES
[S] 501 Syntax Error [S] 501 Syntax Error
9.4.3 LIST DISTRIBUTIONS 9.4.3 LIST DISTRIBUTIONS
LIST DISTRIBUTIONS LIST DISTRIBUTIONS
The distributions file is maintained by some news transport systems to The distributions file is maintained by some news transport
contain information about valid values for the Distribution: line in a systems to contain information about valid values for the
news article header and about what the values mean. Each line contains Distribution: line in a news article header and about what
two fields, the value and a short explanation on the meaning of the the values mean. Each line contains two fields, the value and
value. The first field is separated from the second field by one or Barber [Page 42]
more US-ASCII spaces. When executed, the information is displayed INTERNET DRAFT S. Barber
following the 215 response. When display is completed, the server will Expires: July 15, 2002 Academ Consulting Services
send a period on a line by itself. If the information is not January 2002
available, the server will return the 503 error response. If the a short explanation on the meaning of the value. The first
server does not recognize this command, it SHOULD return the 501 error field is separated from the second field by one or more US-
response. ASCII spaces. When executed, the information is displayed
following the 215 response. When display is completed, the
server will send a period on a line by itself. If the
information is not available, the server will return the 503
error response. If the server does not recognize this
command, it SHOULD return the 501 error response.
9.4.3.1 Responses 9.4.3.1 Responses
215 Information Follows (multi-line response) 215 Information Follows (multi-line response)
501 Syntax error 501 Syntax error
503 Program error, function not performed 503 Program error, function not performed
9.4.3.2 Examples 9.4.3.2 Examples
Example of LIST DISTRIBUTIONS returning a list of newsgroups Example of LIST DISTRIBUTIONS returning a list of newsgroups
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST DISTRIBUTIONS [C] LIST DISTRIBUTIONS
[S] 215 information follows [S] 215 information follows
[S] usa United States of America [S] usa United States of America
[S] na North America [S] na North America
[S] world All over the World [S] world All over the World
[S] . [S] .
Example of LIST DISTRIBUTIONS returning an error (e.g. The
Example of LIST DISTRIBUTIONS returning an error (e.g. The server server software is not configured to maintain this
software is not configured to maintain this information, but does information, but does recognize the command as valid.)
recognize the command as valid.)
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST DISTRIBUTIONS [C] LIST DISTRIBUTIONS
[S] 503 program error, function not performed [S] 503 program error, function not performed
Example of LIST DISTRIBUTIONS sent to a server that does not
Example of LIST DISTRIBUTIONS sent to a server that does not recognize recognize the command (e.g. The server does not maintain this
the command (e.g. The server does not maintain this information information regardless of configuration.)
regardless of configuration.)
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST DISTRIBUTIONS [C] LIST DISTRIBUTIONS
Barber Page [26]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
[S] 501 Syntax Error [S] 501 Syntax Error
9.4.4 LIST DISTRIB.PATS 9.4.4 LIST DISTRIB.PATS
LIST DISTRIB.PATS LIST DISTRIB.PATS
The distrib.pats file is maintained by some news transport systems to Barber [Page 43]
allow clients to choose a value for the Distribution: line in the INTERNET DRAFT S. Barber
header of a news article being posted. The information returned Expires: July 15, 2002 Academ Consulting Services
consists of lines, in no particular order, each of which contains January 2002
three fields separated by colons. These fields are a weight, a group The distrib.pats file is maintained by some news transport
name or wildmat pattern, and a Distribution: value, in that order. systems to allow clients to choose a value for the
The client MAY use this information to select a Distribution: value Distribution: line in the header of a news article being
based on the name of a newsgroup. To do so, it should determine the posted. The information returned consists of lines, in no
lines whose second field matches the newsgroup name, select that line particular order, each of which contains three fields
with the highest weight (with 0 being the lowest), and use the separated by colons. These fields are a weight, a wildmat
Distribution: field from that line. (which may be a simple group name), and a Distribution:
value, in that order.
The client MAY use this information to select a Distribution:
value based on the name of a newsgroup. To do so, it should
determine the lines whose second field matches the newsgroup
name, select that line with the highest weight (with 0 being
the lowest), and use the Distribution: field from that line.
When executed, the information is displayed following the 215 When executed, the information is displayed following the 215
response. When display is completed, the server will send a period on response. When display is completed, the server will send a
a line by itself. If the information is not available, the server will period on a line by itself. If the information is not
return the 503 error response. If this command is not recognized, the available, the server will return the 503 error response. If
server SHOULD return the 501 error response. this command is not recognized, the server SHOULD return the
501 error response.
9.4.4.1 Responses 9.4.4.1 Responses
215 Information Follows (multi-line response) 215 Information Follows (multi-line response)
501 Syntax error 501 Syntax error
503 Program error, function not performed 503 Program error, function not performed
9.4.4.2 Examples 9.4.4.2 Examples
Example of LIST DISTRIB.PATS returning a list of newsgroups Example of LIST DISTRIB.PATS returning a list of newsgroups
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST DISTRIB.PATS [C] LIST DISTRIB.PATS
[S] 215 information follows [S] 215 information follows
[S] 10:local.*:local [S] 10:local.*:local
[S] . [S] .
Example of LIST DISTRIB.PATS returning an error (e.g. The
Example of LIST DISTRIB.PATS returning an error (e.g. The server software server software is not configured to maintain this
is not configured to maintain this information, but does recognize the information, but does recognize the command as valid.)
command as valid.)
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST DISTRIB.PATS [C] LIST DISTRIB.PATS
[S] 503 program error, function not performed [S] 503 program error, function not performed
Barber [Page 44]
Example of LIST DISTRIB.PATS sent to a server that does not recognize the INTERNET DRAFT S. Barber
command (e.g. The software does not maintain this information regardless Expires: July 15, 2002 Academ Consulting Services
of configuration.) January 2002
Example of LIST DISTRIB.PATS sent to a server that does not
recognize the command (e.g. The software does not maintain
this information regardless of configuration.)
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST DISTRIB.PATS [C] LIST DISTRIB.PATS
[S] 501 Syntax Error [S] 501 Syntax Error
9.4.5 LIST NEWSGROUPS 9.4.5 LIST NEWSGROUPS
LIST NEWSGROUPS [wildmat] LIST NEWSGROUPS [wildmat]
The newsgroups file is maintained by some news transport systems to The newsgroups file is maintained by some news transport
contain the name of each newsgroup that is active on the server and systems to contain the name of each newsgroup that is active
a short description about the purpose of each newsgroup. Each line on the server and a short description about the purpose of
in the file contains two fields, the newsgroup name and a short each newsgroup. Each line in the file contains two fields,
explanation of the purpose of that newsgroup. The first field is the newsgroup name and a short explanation of the purpose of
separated from the second field by one or more US-ASCII spaces. When that newsgroup. The first field is separated from the second
field by one or more US-ASCII spaces. When executed, the
Barber Page [27] information is displayed following the 215 response. When
display is completed, the server will send a period on a line
INTERNET DRAFT S. Barber by itself. If the information is not available, the server
Expires: May 15, 2002 Academ Consulting Services will return the 503 response. If the server does not
November 2001 recognize the command it should return a 501 response. If the
executed, the information is displayed following the 215 response. optional wildmat parameter is specified, the list is limited
When display is completed, the server will send a period on a line to only those groups that match the wildmat (no matching is
by itself. If the information is not available, the server will done on the group descriptions). If nothing is matched an
return the 503 response. If the server does not recognize the empty list is returned, not an error.
command it should return a 501 response. If the optional matching
parameter is specified, the list is limited to only the groups that
match the pattern (no matching is done on the group descriptions).
Multiple groups may be specified by using a wildmat(see section 5),
not regular expressions. If nothing is matched an empty list is
returned, not an error.
9.4.5.1 Responses 9.4.5.1 Responses
215 Information Follows (multi-line response) 215 Information Follows (multi-line response)
501 Syntax error 501 Syntax error
503 Program error, function not performed 503 Program error, function not performed
9.4.5.2 Examples 9.4.5.2 Examples
Example of LIST NEWSGROUPS returning a list of newsgroups Example of LIST NEWSGROUPS returning a list of newsgroups
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST NEWSGROUPS [C] LIST NEWSGROUPS
[S] 215 information follows [S] 215 information follows
[S] misc.test General Usenet testing [S] misc.test General Usenet testing
[S] alt.rfc-writers.recovery RFC Writers Recovery [S] alt.rfc-writers.recovery RFC Writers Recovery
Barber [Page 45]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
[S] tx.natives.recovery Texas Natives Recovery [S] tx.natives.recovery Texas Natives Recovery
[S] . [S] .
Example of LIST NEWSGROUPS returning an error (e.g. The
Example of LIST NEWSGROUPS returning an error (e.g. The server server software recognizes the command as valid, but the
software recognizes the command as valid, but the information is not information is not available.)
available.)
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST NEWSGROUPS [C] LIST NEWSGROUPS
[S] 503 program error, function not performed [S] 503 program error, function not performed
9.5 Standard extensions 9.5 Standard extensions
Each of the following sections describes an extension that a server Each of the following sections describes an extension that a
MAY provide. If the server provides the extension, it MUST include the server MAY provide. If the server provides the extension, it
appropriate extension label in the response to LIST EXTENSIONS. If it MUST include the appropriate extension label in the response
does not provide it, it MUST NOT include the appropriate extension to LIST EXTENSIONS. If it does not provide it, it MUST NOT
label. The descriptions of facilities in each section are written as include the appropriate extension label. The descriptions of
if the extension is provided. If it is not provided, the entire facilities in each section are written as if the extension is
section should be ignored. provided. If it is not provided, the entire section should be
ignored.
9.5.1 LISTGROUP extension 9.5.1 LISTGROUP extension
This extension provides one command and has the extension label This extension provides one command and has the extension
LISTGROUP. label LISTGROUP.
9.5.1.1 The LISTGROUP Command 9.5.1.1 The LISTGROUP Command
LISTGROUP [ggg] LISTGROUP [ggg]
The LISTGROUP command is used to get a listing of all the article The LISTGROUP command is used to get a listing of all the
numbers in a particular newsgroup. article numbers in a particular newsgroup.
The optional parameter ggg is the name of the newsgroup to be The optional parameter ggg is the name of the newsgroup to be
selected (e.g. "news.software.b"). A list of valid newsgroups may selected (e.g. "news.software.misc"). A list of valid
be obtained from the LIST command. If no group is specified, the newsgroups may be obtained from the LIST command. If no group
current group is used as the default argument. is specified, the current group is used as the default
argument.
Barber Page [28] The successful selection response will be a list of the
article numbers in the group followed by a period on a line
by itself. The list starts on the next line following the 211
response code.
Barber [Page 46]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
The successful selection response will be a list of the article
numbers in the group followed by a period on a line by itself. The
list starts on the next line following the 211 response code.
When a valid group is selected by means of this command, the When a valid group is selected by means of this command, the
internally maintained "current article pointer" MUST be set to the internally maintained "current article pointer" MUST be set
first article in the group and the name of the current newsgroup to the first article in the group and the name of the current
MUST be set to the selected newsgroup name. If an invalid group is newsgroup MUST be set to the selected newsgroup name. If an
specified, the previously selected group and article remain invalid group is specified, the previously selected group and
selected. If an empty newsgroup is selected, the "current article article remain selected. If an empty newsgroup is selected,
pointer" may be in an indeterminate state and should not be used. the "current article pointer" may be in an indeterminate
state and should not be used.
The LISTGROUP keyword MAY be used by a client as a replacement for
the GROUP command in establishing a valid "current article pointer."
After a successful response is received, any other command may be
used that depends on having the "current article pointer" be valid.
If a group name is specified and that group is not available on that The LISTGROUP keyword MAY be used by a client as a
server, the server MUST respond with the 411 error code. replacement for the GROUP command in establishing a valid
"current article pointer." After a successful response is
received, any other command may be used that depends on
having the "current article pointer" be valid.
A server that does not implement this command SHOULD return a 500 If a group name is specified and that group is not available
error response. on that server, the server MUST respond with the 411 error
code.
A server that does not implement this command SHOULD return a
500 error response.
9.5.1.1.1 Responses 9.5.1.1.1 Responses
211 List of article numbers follow (multi-line 211 List of article numbers follow (multi-line
response) response)
411 No such group 411 No such group
412 No newsgroup currently selected 412 No newsgroup currently selected
500 Command not recognized 500 Command not recognized
9.5.1.1.2 Examples 9.5.1.1.2 Examples
skipping to change at line 1941 skipping to change at page 67, line ?
412 No newsgroup currently selected 412 No newsgroup currently selected
500 Command not recognized 500 Command not recognized
9.5.1.1.2 Examples 9.5.1.1.2 Examples
Example of LISTGROUP on an empty group: Example of LISTGROUP on an empty group:
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LISTGROUP example.empty.newsgroup [C] LISTGROUP example.empty.newsgroup
[S] 211 list of article numbers follows [S] 211 list of article numbers follows
[S] . [S] .
Example of LISTGROUP on a valid current group: Example of LISTGROUP on a valid current group:
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 2000 3000234 3002322 misc.test selected [S] 211 2000 3000234 3002322 misc.test selected
Barber [Page 47]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
[C] LISTGROUP [C] LISTGROUP
[S] 211 list follows [S] 211 list follows
[S] 3000234 [S] 3000234
[S] 3000237 [S] 3000237
[S] 3000238 [S] 3000238
[S] 3000239 [S] 3000239
[S] 3002322 [S] 3002322
[S] . [S] .
Example of LISTGROUP failing because no group has been
Example of LISTGROUP failing because no group has been selected: selected:
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LISTGROUP [C] LISTGROUP
[S] 412 no current group [S] 412 no current group
[C] GROUP example.is.sob.bradner.or.barber [C] GROUP example.is.sob.bradner.or.barber
Barber Page [29]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
[S] 411 no such group [S] 411 no such group
[C] LISTGROUP [C] LISTGROUP
[S] 412 no current group [S] 412 no current group
9.5.2 The OVER Extension 9.5.2 The OVER Extension
This extension provides two commands, OVER and LIST OVERVIEW.FMT. The This extension provides two commands, OVER and LIST
label for this extension is OVER. OVERVIEW.FMT. The label for this extension is OVER.
9.5.2.1 LIST OVERVIEW.FMT 9.5.2.1 LIST OVERVIEW.FMT
LIST OVERVIEW.FMT LIST OVERVIEW.FMT
The overview.fmt file is maintained by some news transport
systems to contain the order in which header information is
stored in the overview databases for each newsgroup. When
executed, news article header fields are displayed one line
at a time in the order in which they are stored in the
overview database[9] following the 215 response. When
display is completed, the server will send a period on a line
by itself. If the information is not available, the server
will return the 503 response.
The overview.fmt file is maintained by some news transport systems to If the header has the word "full" (without quotes) after the
contain the order in which header information is stored in the colon, the header's name is prepended to its field in the
overview databases for each newsgroup. When executed, news article output returned by the server.
header fields are displayed one line at a time in the order in which
they are stored in the overview database[6] following the 215
response. When display is completed, the server will send a period on
a line by itself. If the information is not available, the server will
return the 503 response.
If the header has the word "full" (without quotes) after the colon,
the header's name is prepended to its field in the output returned by
the server.
This is command is part of the optional OVER extension which includes This is command is part of the optional OVER extension which
the OVER command defined in section . If the OVER extension is not includes the OVER command defined in section . If the OVER
implemented, then this command MUST NOT be implemented. If that case, Barber [Page 48]
the server MUST return a 501 error response when this command is INTERNET DRAFT S. Barber
presented by the client. Expires: July 15, 2002 Academ Consulting Services
January 2002
extension is not implemented, then this command MUST NOT be
implemented. If that case, the server MUST return a 501 error
response when this command is presented by the client.
9.5.2.1.1 Responses 9.5.2.1.1 Responses
215 Information follows (multi-line response) 215 Information follows (multi-line response)
501 Syntax Error 501 Syntax Error
503 Program error, function not performed 503 Program error, function not performed
9.5.2.1.2 Examples 9.5.2.1.2 Examples
Example of LIST OVERVIEW.FMT returning a list of newsgroups Example of LIST OVERVIEW.FMT returning a list of newsgroups
skipping to change at line 2015 skipping to change at page 67, line ?
Example of LIST OVERVIEW.FMT returning a list of newsgroups Example of LIST OVERVIEW.FMT returning a list of newsgroups
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST OVERVIEW.FMT [C] LIST OVERVIEW.FMT
[S] 215 Order of fields in overview database. [S] 215 Order of fields in overview database.
[S] Subject: [S] Subject:
[S] From: [S] From:
[S] Date: [S] Date:
[S] Message-ID: [S] Message-ID:
[S] . [S] .
Example of LIST OVERVIEW.FMT returning an error Example of LIST OVERVIEW.FMT returning an error
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] LIST OVERVIEW.FMT [C] LIST OVERVIEW.FMT
[S] 503 program error, function not performed [S] 503 program error, function not performed
9.5.2.2 OVER 9.5.2.2 OVER
OVER [range] OVER [range]
The OVER command returns specific header information for the The OVER command returns specific header information for the
article(s) specified from the current selected group. The information article(s) specified from the current selected group. The
information returned in the response to this command can be
Barber Page [30] used by clients to follow discussion threads.
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
returned in the response to this command can be used by clients to
follow discussion threads.
The optional range argument may be any of the following: The optional range argument may be any of the following:
* an article number
o an article number * an article number followed by a dash to indicate all
o an article number followed by a dash to indicate all
following following
o an article number followed by a dash followed by another * an article number followed by a dash followed by another
article number article number
If no argument is specified, then information from the current article Barber [Page 49]
is displayed. Successful responses start with a 224 response followed INTERNET DRAFT S. Barber
by the overview information for all matched messages. Once the output Expires: July 15, 2002 Academ Consulting Services
is complete, a period is sent on a line by itself. If no argument is January 2002
specified, the information for the current article is returned. A If no argument is specified, then information from the
newsgroup must have been selected earlier, else a 412 error response current article is displayed. Successful responses start with
is returned. If no articles are in the range specified, the server a 224 response followed by the overview information for all
returns a 420 error response. A 502 response will be returned if the matched messages. Once the output is complete, a period is
client only has permission to transfer articles. A 500 response SHOULD sent on a line by itself. A newsgroup must have been selected
be returned by servers do not implement this command. earlier, else a 412 error response is returned. If no
articles are in the range specified, the server returns a 420
The output consists of one line per article, sorted in numerical order error response. A 502 response will be returned if the client
of article number. Each line consists of a number of fields separated only has permission to transfer articles. A 500 response
by an US-ASCII TAB character. The first 8 fields MUST be the SHOULD be returned by servers that do not implement this
following, in order: command.
article number, subject, author, date, message-ID, references,
byte count, line count.
The content of each field is formed by taking the original content
(such as the raw subject line from the article), removing all US-ASCII
CRLF pairs, and then replacing each remaining US-ASCII NUL, TAB, CR,
or LF character with a single US-ASCII space.
The content of any subsequent field is given by the response to the
LIST OVERVIEW.FMT command. A field may be empty (in which case there
will be two adjacent US-ASCII tabs, and a sequence of trailing
US-ASCII tabs may be omitted).
The server SHOULD not produce output for articles that no longer The output consists of one line per article, sorted in
exist. numerical order of article number. Each line consists of a
number of fields separated by an US-ASCII TAB character. The
first 8 fields MUST be the following, in order: article
number, subject, author, date, message-ID, references, byte
count, line count.
The article number field should contain the article number
(within the group). The line count and byte count are
calculated by the server based on the actual size and number
of lines in the article. The content of the rest of the
fields is formed by taking the original header content (such
as the raw subject line from the article), removing all US-
ASCII CRLF pairs, and then replacing each remaining US-ASCII
NUL, TAB, CR, or LF character with a single US-ASCII space.
The content of any subsequent field is given by the response
to the LIST OVERVIEW.FMT command. A field may be empty (in
which case there will be two adjacent US-ASCII tabs, and a
sequence of trailing US-ASCII tabs may be omitted).
The server SHOULD not produce output for articles that no
longer exist.
9.5.2.2.1 Responses 9.5.2.2.1 Responses
224 Overview information follows (multi-line 224 Overview information follows (multi-line
response) response)
412 No newsgroup currently selected 412 No newsgroup currently selected
420 No article(s) selected 420 No article(s) selected
500 Command not recognized 500 Command not recognized
502 Program error, functions no performed 502 Program error, functions no performed
Barber [Page 50]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
9.5.2.2.2 Examples 9.5.2.2.2 Examples
Example of a successful retrieval of overview information for an article Example of a successful retrieval of overview information for
(using no article number) an article (using no article number)
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] OVER [C] OVER
[S] 224 Overview information follows [S] 224 Overview information follows
300234|I am just a test article|nobody@nowhere.to 300234|I am just a test article|÷Demo User÷
(Demo User)|6 Oct 1998 04:38:40 -0500| <nobody@example.com>|6 Oct 1998 04:38:40 -0500|
<45223423@to.to> <45223423@example.com>|<45454@example.net>|1234|
17|Xref: news.example.com misc.test:3000363
[S] . [S] .
[Please note that the line that begins with 300234 is all one line that [Please note that the line that begins with 300234 is all one
has been wrapped for readability. A vertical bar has been inserted to line that has been wrapped for readability. A vertical bar
has been inserted to show where the US-ASCII TAB should
Barber Page [31] actually be.]
Example of an unsuccessful retrieval of overview information
INTERNET DRAFT S. Barber on an article by number
Expires: May 15, 2002 Academ Consulting Services
November 2001
show where the US-ASCII TAB should actually be.]
Example of an unsuccessful retrieval of overview information on an
article by number
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] OVER 300256 [C] OVER 300256
[S] 420 No such article in this group [S] 420 No such article in this group
Example of an unsuccessful retrieval of overview information
Example of an unsuccessful retrieval of overview information by number by number because no newsgroup was selected first
because no newsgroup was selected first
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] OVER [C] OVER
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Example of an attempt to retrieve an article when the current
Example of an attempt to retrieve an article when the current group group selected is empty
selected is empty
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] OVER [C] OVER
[S] 420 No current article selected [S] 420 No current article selected
9.5.3 The HDR Extension 9.5.3 The HDR Extension
This extension provides one new command, HDR. The label for this Barber [Page 51]
extension is PAT. INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
This extension provides one new command, HDR. The label for
this extension is HDR
9.5.3.1 HDR 9.5.3.1 HDR
HDR range|<message-id> HDR header range|<message-id>
The HDR command is used to retrieve specific headers from
specific articles in the currently selected group.
The HDR command is used to retrieve specific headers from specific The required header parameter is the name of a header line
articles in the currently selected group. (e.g. "subject") in a newsgroup article. See RFC-1036 for a
The required header parameter is the name of a header line (e.g. list of valid header lines. The required range argument may
"subject") in a newsgroup article. See RFC-1036 for a list of valid be any of the following:
header lines. The required range argument may be any of the following: * an article number
o an article number * an article number followed by a dash to indicate all
o an article number followed by a dash to indicate all
following following
o an article number followed by a dash followed by another * an article number followed by a dash followed by another
article number. article number.
The required message-id argument indicates a specific article. The The required message-id argument indicates a specific
range and message-id arguments are mutually exclusive. article. The range and message-id arguments are mutually
exclusive.
A successful response consists of a 221 code followed by the output
from the command. The output consists of one line for each article
where the relevant header line exists. The line consists of the
article number, a US-ASCII space, and then the contents of the header
(without the header name). A valid response includes an empty list
(indicating that there were no matches). Once the output is complete,
a period is sent on a line by itself. If the optional argument is a
message-id and no such article exists, a 430 error response shall be
returned. A 502 response shall be returned if the client only has
permission to transfer articles. A 500 response SHOULD be issued by
all servers that do not recognize this command.
A successful response consists of a 221 code followed by the
output from the command. The output consists of one line for
each article where the relevant header line exists. The line
consists of the article number, a US-ASCII space, and then
the contents of the header (without the header name). A valid
response includes an empty list (indicating that there were
no matches). Once the output is complete, a period is sent on
a line by itself. If the optional argument is a message-id
and no such article exists, a 430 error response shall be
returned. A 502 response shall be returned if the client only
has permission to transfer articles. A 500 response SHOULD be
issued by all servers that do not recognize this command.
9.5.3.1.1 Responses 9.5.3.1.1 Responses
221 Header follows (multi-line response) 221 Header follows (multi-line response)
412 No newsgroup selected 412 No newsgroup selected
Barber Page [32]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
430 No such article 430 No such article
500 Command not recognized 500 Command not recognized
Barber [Page 52]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
502 Program error, function not performed 502 Program error, function not performed
9.5.3.1.2 Examples 9.5.3.1.2 Examples
Example of a successful retrieval of subject lines from a range of Example of a successful retrieval of subject lines from a
articles range of articles
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] HDR Subject 3000234-300238 [C] HDR Subject 3000234-300238
[S] 221 Header Follows [S] 221 Header Follows
[S] 3000234 I am just a test article [S] 3000234 I am just a test article
[S] 3000237 Re: I am just a test article [S] 3000237 Re: I am just a test article
[S] 3000238 Ditto [S] 3000238 Ditto
[S] . [S] .
Example of a successful retrieval of header from an article
Example of a successful retrieval of header from an article by message-id by message-id
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] HDR subject <i.am.a.test.article@nowhere.to> [C] HDR subject <i.am.a.test.article@example.com>
[S] 221 Header information follows [S] 221 Header information follows
[S] 3000345 I am just a test article [S] 3000345 I am just a test article
[S] . [S] .
Example of an unsuccessful retrieval of a header from an
Example of an unsuccessful retrieval of a header from an article by article by message-id
message-id
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] HDR subject <i.am.not.there@nowhere.to> [C] HDR subject <i.am.not.there@example.com>
[S] 430 No Such Article Found [S] 430 No Such Article Found
Example of an unsuccessful retrieval of headers from articles
Example of an unsuccessful retrieval of headers from articles by number by number because no newsgroup was selected first
because no newsgroup was selected first
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] HDR subject 300256- [C] HDR subject 300256-
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Example of an unsuccessful retrieval of headers from articles
Example of an unsuccessful retrieval of headers from articles by by message-id because no newsgroup was selected first
message-id because no newsgroup was selected first
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] HDR subject <i.am.a.test.article@nowhere.to> [C] HDR subject <i.am.a.test.article@example.com>
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Example of retrieving header information when the current
Example of retrieving header information when the current group selected group selected is empty
is empty Barber [Page 53]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] HDR subject 0- [C] HDR subject 0-
[S] 221 Headers follow [S] 221 Headers follow
. .
Example of a failure due to restrictions configured into the
Barber Page [33] server
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
Example of a failure due to restrictions configured into the server
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] GROUP news.group [C] GROUP news.group
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] HDR Subject 3000234-300238 [C] HDR Subject 3000234-300238
[S] 502 Service Unavailable [S] 502 Service Unavailable
10. The CONCLUSION Step 10 The CONCLUSION Step
10.1 QUIT 10.1 QUIT
QUIT QUIT
The server process MUST acknowledge the QUIT command and then
close the connection to the client. This is the preferred
method for a client to indicate that it has finished all its
transactions with the NNTP server.
The server process MUST acknowledge the QUIT command and then close If a client simply disconnects (or the connection times out
the connection to the client. This is the preferred method for a or some other fault occurs), the server MUST gracefully cease
client to indicate that it has finished all its transactions with the its attempts to service the client, disconnecting from its
NNTP server. end if necessary.
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.
10.1.1 Responses 10.1.1 Responses
250 Connection closing 250 Connection closing
10.1.2 Example 10.1.2 Example
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] QUIT [C] QUIT
[S] 205 closing connection [S] 205 closing connection
[Server closes connection.] [Server closes connection.]
11. Other Keywords 11 Other Keywords
There are other keywords that may be used at any time between the Barber [Page 54]
beginning of a session and its termination. Using these keywords does INTERNET DRAFT S. Barber
not alter any state information, but the response generated from the Expires: July 15, 2002 Academ Consulting Services
use of these keywords may provide useful information to clients that January 2002
use them. There are other keywords that may be used at any time between
the beginning of a session and its termination. Using these
keywords does not alter any state information, but the
response generated from the use of these keywords may provide
useful information to clients that use them.
11.1 DATE 11.1 DATE
DATE DATE
This command exists to help clients find out the current Coordinated This command exists to help clients find out the current
Universal Time[7] from the server's perspective. This command Coordinated Universal Time[10] from the server's perspective.
SHOULD NOT be used as a substitute for NTP[8], but to provide This command MUST NOT be used as a substitute for NTP[11],
information that might be useful when using the NEWNEWS command (see but to provide information that might be useful when using
section 11.4). A system providing NNTP service SHOULD implement NTP the NEWNEWS command (see section 11.4). A system providing
for the purposes of keeping the system clock as accurate as possible. NNTP service SHOULD implement NTP for the purposes of keeping
This command returns a one-line response code of 111 followed by the the system clock as accurate as possible.
date and time on the server in the form YYYYMMDDhhmmss.
This command returns a one-line response code of 111 followed
by the date and time on the server in the form
YYYYMMDDhhmmss. This date and time is presented in
Coordinated Universal Time.
11.1.1 Response 11.1.1 Response
111 YYYYMMDDhhmmss Local date on server 111 YYYYMMDDhhmmss Current date and time on server
presented in Coordinated
Universal Time
11.1.2 Example 11.1.2 Example
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] DATE [C] DATE
Barber Page[34]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
[S] 111 19990623135624 [S] 111 19990623135624
11.2 The HELP Command 11.2 The HELP Command
HELP HELP
This command provides a short summary of commands that are understood This command provides a short summary of commands that are
by this implementation of the server. The help text will be presented understood by this implementation of the server. The help
as a textual response terminated by a single period on a line by text will be presented as a textual response terminated by a
itself. single period on a line by itself.
This text is not guaranteed to be in any particular format and SHALL Barber [Page 55]
NOT be used by clients as a replacement for the LIST EXTENSIONS INTERNET DRAFT S. Barber
command described in section 8.1. Expires: July 15, 2002 Academ Consulting Services
January 2002
This text is not guaranteed to be in any particular format
and SHALL NOT be used by clients as a replacement for the
LIST EXTENSIONS command described in section 8.1.
11.2.1 Responses 11.2.1 Responses
100 Help text follows (multi-line response) 100 Help text follows (multi-line response)
11.2.2 Example 11.2.2 Example
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] HELP [C] HELP
[S] 100 Help text follows [S] 100 Help text follows
[S] This is some help text. There is no specific [S] This is some help text. There is no specific
[S] formatting requirement for this test, though [S] formatting requirement for this test, though
[S] it is customary for it to list the valid commands [S] it is customary for it to list the valid commands
[S] and give a brief definition of what they do [S] and give a brief definition of what they do
[S] . [S] .
11.3 NEWGROUPS 11.3 NEWGROUPS
skipping to change at line 2330 skipping to change at page 67, line ?
[S] 100 Help text follows [S] 100 Help text follows
[S] This is some help text. There is no specific [S] This is some help text. There is no specific
[S] formatting requirement for this test, though [S] formatting requirement for this test, though
[S] it is customary for it to list the valid commands [S] it is customary for it to list the valid commands
[S] and give a brief definition of what they do [S] and give a brief definition of what they do
[S] . [S] .
11.3 NEWGROUPS 11.3 NEWGROUPS
NEWGROUPS date time [GMT] NEWGROUPS date time [GMT]
A list of newsgroups created since <date and time> MUST be
listed in the same format as the LIST command.
A list of newsgroups created since <date and time> MUST be listed in The date is sent as 6 or 8 digits in the format [XX]YYMMDD,
the same format as the LIST command. where XX is the first two digits of the year, YY is the last
The date is sent as 6 or 8 digits in the format [XX]YYMMDD, where XX two digits of the year, MM is the two digits of the month
is the first two digits of the year, YY is the last two digits of the (with leading zero, if appropriate), and DD is the day of the
year, MM is the two digits of the month (with leading zero, if month (with leading zero, if appropriate). If the first two
appropriate), and DD is the day of the month (with leading zero, if digits of the year are not specified, the year is to be taken
appropriate). If the first two digits of the year are not specified, from the current century if YY is smaller than or equal to
the year is to be taken from the current century if YY is smaller than the current year, otherwise the year is from the previous
or equal to the current year, otherwise the year is from the previous
century. century.
Time must also be specified. It must be as 6 digits HHMMSS with HH Time must also be specified. It must be as 6 digits HHMMSS
being hours in the 24-hour clock 00-23, MM minutes 00-59, and SS with HH being hours in the 24-hour clock 00-23, MM minutes
seconds 00-60, which allows for leap seconds. The token "GMT" 00-59, and SS seconds 00-60, which allows for leap seconds.
specifies that the date and time are given in Coordinated Universal The token "GMT" specifies that the date and time are given in
Time. If the token "GMT" is omitted then the date and time are Coordinated Universal Time. If the token "GMT" is omitted
specified in the server's local timezone. Note that there is no way then the date and time are specified in the server's local
within this specification of NNTP to establish the server's local timezone. Note that there is no way using the protocol
Barber [Page 56]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
specified in this memo to establish the server's local
timezone. timezone.
Note that an empty list (i.e., the text body returned by this command Note that an empty list (i.e., the text body returned by this
consists only of the terminating period) is a possible valid response, command consists only of the terminating period) is a
and indicates that there are currently no new newsgroups. possible valid response, and indicates that there are
currently no new newsgroups.
Clients SHOULD make all queries using Coordinated Universal Time when Clients SHOULD make all queries using Coordinated Universal
possible. Time (i.e. by including the ˘GMT÷ parameter) when possible.
11.3.1 Responses 11.3.1 Responses
231 List of new newsgroups follows (multi-line 231 List of new newsgroups follows (multi-line
response) response)
Barber Page [35]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
11.3.2 Examples 11.3.2 Examples
Example where there are new groups Example where there are new groups
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] NEWGROUPS 19990624 000000 GMT [C] NEWGROUPS 19990624 000000 GMT
[S] 231 list of new newsgroups follows [S] 231 list of new newsgroups follows
[S] alt.rfc-writers.recovery [S] alt.rfc-writers.recovery
[S] tx.natives.recovery [S] tx.natives.recovery
[S] . [S] .
Example where there are no new groups Example where there are no new groups
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] NEWGROUPS 19990624 000000 GMT [C] NEWGROUPS 19990624 000000 GMT
[S] 231 list of new newsgroups follows [S] 231 list of new newsgroups follows
[S] . [S] .
11.4 NEWNEWS 11.4 NEWNEWS
NEWNEWS newsgroups date time [GMT] NEWNEWS wildmat date time [GMT]
A list of message-ids of articles posted or received on the
A list of message-ids of articles posted or received to the specified server to the list of newsgroups that match the wildmat since
newsgroup or groups since "date" will be listed. The format of the "date" will be listed. The format of the listing will be one
listing will be one message-id per line, as though text were being message-id per line, as though text were being sent. The
sent. Each message-id SHALL appear only once in a response. The order order of the response has no specific significance and may
of the response has no specific significance and may vary from vary from response to response in the same session. If a
response to response in the same session. A single line consisting message-id appears more than once it has the same meaning as
solely of one period followed by CR-LF will terminate the list. Barber [Page 57]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
if it appears only once. A single line consisting solely of
one period followed by CR-LF will terminate the list.
Date and time are in the same format as the NEWGROUPS command. The Date and time are in the same format as the NEWGROUPS
newsgroups parameter MUST be in wildmat format and MAY consist of command.
multiple wildmat constructs separated by an US-ASCII comma character.
Note that an empty list (i.e., the text body returned by this command Note that an empty list (i.e., the text body returned by this
consists only of the terminating period) is a possible valid response, command consists only of the terminating period) is a
and indicates that there is currently no new news. possible valid response, and indicates that there is
currently no new news.
Clients SHOULD make all queries in Coordinated Universal Time when Clients SHOULD make all queries in Coordinated Universal Time
possible. (i.e. by using the ˘GMT÷ parameter) when possible.
11.4.1 Responses 11.4.1 Responses
230 List of new articles by message-id follows (may be a 230 List of new articles by message-id follows (may be a
multi-line response) multi-line response)
11.4.2 Examples 11.4.2 Examples
Example where there are new articles Example where there are new articles
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] NEWNEWS news.*,sci.* 19990624 000000 [C] NEWNEWS news.*,sci.* 19990624 000000 GMT
[S] 230 list of new articles by message-id follows [S] 230 list of new articles by message-id follows
[S] <i.am.a.new.article@nowhere.to> [S] <i.am.a.new.article@example.com>
[S] <i.am.another.new.article@nowhere.to> [S] <i.am.another.new.article@example.com>
Example where there are no new articles Example where there are no new articles
[S] 200 NNTP Service Ready [S] 200 NNTP Service Ready
[C] NEWNEWS alt.* 19990624 000000 [C] NEWNEWS alt.* 19990624 000000 GMT
[S] 230 list of new articles by message-id follows [S] 230 list of new articles by message-id follows
Barber Page [36]
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
[S] . [S] .
12. Framework for NNTP Extensions 12 Framework for NNTP Extensions
Although NNTP is widely and robustly deployed, some parts of the
Internet community might wish to extend the NNTP service. This memo
defines a means whereby an extended NNTP client may query the server
to determine the service extensions that it supports.
It must be emphasized that any extension to the NNTP service should Although NNTP is widely and robustly deployed, some parts of
not be considered lightly. NNTP's strength comes primarily from its the Internet community might wish to extend the NNTP service.
simplicity. Experience with many protocols has shown that: This memo defines a means whereby an extended NNTP client may
query the server to determine the service extensions that it
supports.
Protocols with few options tend towards ubiquity, whilst protocols Barber [Page 58]
with many options tend towards obscurity. INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
It must be emphasized that any extension to the NNTP service
should not be considered lightly. NNTP's strength comes
primarily from its simplicity. Experience with many
protocols has shown that:
This means that each and every extension, regardless of its benefits, Protocols with few options tend towards ubiquity, whilst
must be carefully scrutinized with respect to its implementation, protocols with many options tend towards obscurity.
deployment, and interoperability costs. In many cases, the cost of
extending the NNTP service will likely outweigh the benefit.
Given this environment, the framework for the extensions described in This means that each and every extension, regardless of its
this memo consists of: benefits, must be carefully scrutinized with respect to its
implementation, deployment, and interoperability costs. In
many cases, the cost of extending the NNTP service will
likely outweigh the benefit.
a)a mechanism for clients to determine a server's available extensions Given this environment, the framework for the extensions
b)a registry of NNTP service extensions described in this memo consists of:
* a mechanism for clients to determine a server's available
extensions
* a registry of NNTP service extensions
The LIST EXTENSIONS command is described in section 8.1 of this memo The LIST EXTENSIONS command is described in section 8.1 of
and is the mechanism for clients to use to determine what extensions this memo and is the mechanism for clients to use to
are available for client use. determine what extensions are available for client use.
The IANA shall maintain a registry of NNTP service extensions. The IANA shall maintain a registry of NNTP service
extensions.
An extension is identified by a unique extension-label, which is a An extension is identified by a unique extension-label, which
string of 1 to 12 uppercase letters. The extension-label will often be is a string of 1 to 12 uppercase letters. The extension-label
the name of a new command that the extension adds. However this is not will often be the name of a new command that the extension
a requirement: an extension might not add any new commands or adds. However this is not a requirement: an extension might
keywords. not add any new commands or keywords.
An extension is either a private extension or else it is included in An extension is either a private extension or else it is
the IANA registry and is defined in an RFC. Such RFCs either must be included in the IANA registry and is defined in an RFC. Such
on the standards-track or must define an IESG-approved experimental RFCs either must be on the standards-track or must define an
protocol. IESG-approved experimental protocol.
The definition of an extension must include: The definition of an extension must include:
* a descriptive name for the extension
o a descriptive name for the extension Barber [Page 59]
o the extension-label (which is returned by LIST EXTENSIONS INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
* the extension-label (which is returned by LIST EXTENSIONS
to indicate to the client that the server supports this to indicate to the client that the server supports this
particular extension) particular extension)
o the syntax, values, and meanings of any parameters * the syntax, values, and meanings of any parameters
following the extension-label in the output of LIST EXTENSIONS following the extension-label in the output of LIST
o any new NNTP keywords associated with the extension EXTENSIONS
o the syntax and possible values of parameters associated * any new NNTP keywords associated with the extension
* the syntax and possible values of parameters associated
with the new NNTP keywords with the new NNTP keywords
o any new parameters the extension associates with any other * any new parameters the extension associates with any other
pre-existing NNTP keywords pre-existing NNTP keywords
o how support for the extension affects the behavior of a * how support for the extension affects the behavior of a
server and NNTP client server and NNTP client
o any increase in the maximum length of commands over the * any increase in the maximum length of commands over the
value specified in this memo value specified in this memo
* a specific statement about the effect on streaming this
extension may have (if any)
The extension-label of private extensions MUST begin with "X". The The extension-label of private extensions MUST begin with
extension-label of registered extensions MUST NOT begin with "X". "X". The extension-label of registered extensions MUST NOT
begin with "X".
Any keyword values presented in the NNTP response that do not begin Any keyword values presented in the NNTP response that do not
with "X" MUST correspond to a standard, standards-track, or begin with "X" MUST correspond to a standard, standards-
IESG-approved experimental NNTP service extension registered with track, or IESG-approved experimental NNTP service extension
IANA. A conforming server MUST NOT offer non "X" prefixed keyword registered with IANA. A conforming server MUST NOT offer non
values that are not described in a registered extension. "X" prefixed keyword values that are not described in a
registered extension.
Except where stated otherwise, the commands in this document are Except where stated otherwise, the commands in this memo are
understood (even if not supported) by all servers and are not understood (even if not supported) by all servers and are not
described in the list of features returned by the LIST EXTENSIONS described in the list of features returned by the LIST
command. EXTENSIONS command.
Barber Page [37] A server MAY provide additional keywords - either new
commands or new parameters to existing commands - as part of
a private extension. These new keywords MUST begin with "X".
A server MUST NOT send different response codes to basic NNTP
commands documented here or commands documented in registered
extensions in response to the availability or use of a
private extension.
Barber [Page 60]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
A server MAY provide additional keywords - either new commands or new
parameters to existing commands - as part of a private extension.
These new keywords MUST begin with "X".
A server MUST NOT send different response codes to basic NNTP commands
documented here or commands documented in registered extensions in
response to the availability or use of a private extension.
12.1 Initial IANA Registry 12.1 Initial IANA Registry
The IANA's initial registry of NNTP service extensions consists of The IANA's initial registry of NNTP service extensions
these entries: consists of these entries:
Service Extension NNTP Extension Label Added Behavior Service Extension NNTP Extension Label Added Behavior
Overview Support OVER Defined in this memo
Specific Article
LISTGROUP Defined in this memo
Numbers
Header Pattern
HDR Defined in this memo
Matching
Overview OVER Defined 13 Augmented BNF Syntax for NNTP Commands
Support in this
document
Specific Article Numbers LISTGROUP Defined
in this
document
Header Pattern Matching HDR Defined
in this
document
13. Augmented BNF[9] Syntax for NNTP Commands This syntax defines the non-terminal "command". The non-
terminal "parameter" is used for command parameters whose
syntax is specified elsewhere. The syntax is in alphabetical
order. Note that ABNF strings are case insensitive.
This syntax defines the non-terminal "command". The non-terminal article-command = "ARTICLE" [1*WSP (msg-id / article-
"parameter" is used for command parameters whose syntax is specified number)] *WSP CRLF
elsewhere. The syntax is in alphabetical order. Note that ABNF strings
are case insensitive.
article-command = "ARTICLE" [1*WSP (msg-id / article-number)] *WSP
CRLF
article-number = 1*16DIGIT article-number = 1*16DIGIT
argument = parameter ; excluding sequence ".." argument = parameter ; excluding sequence ".."
body-command = "BODY" [1*WSP (msg-id / article-number)] *WSP CRLF body-command = "BODY" [1*WSP (msg-id / article-number)]
*WSP CRLF
command = article-command / command = article-command /
body-command / body-command /
date-command / date-command /
group-command / group-command /
head-command / head-command /
help-command / help-command /
ihave-command / ihave-command /
last-command / last-command /
list-active-times-command / list-active-times-command /
list-distrib-pats-command / list-distrib-pats-command /
list-distributions-command / list-distributions-command /
list-extensions-command / list-extensions-command /
list-newsgroups-command / list-newsgroups-command /
list-overview-fmt-command / list-overview-fmt-command /
list-command / list-command /
listgroup-command / listgroup-command /
mode-reader-command / mode-reader-command /
Barber [Page 61]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
newgroups-command / newgroups-command /
newnews-command / newnews-command /
next-command / next-command /
over-command / over-command /
hdr-command / hdr-command /
post-command / post-command /
quit-command / quit-command /
stat-command stat-command
CR = %x0D CR = %x0D
CRLF = CR LF CRLF = CR LF
date-command = "DATE" *WSP CRLF date-command = "DATE" *WSP CRLF
date = 6*8DIGIT date = 6*8DIGIT
DIGIT = %x30-39 DIGIT = %x30-39
group-command = "GROUP" 1*WSP newsgroup *WSP CRLF group-command = "GROUP" 1*WSP wildmat *WSP CRLF
hdr-command = "PAT" 1*WSP header 1*WSP (range / msg-id) *WSP CRLF hdr-command = "HDR" 1*WSP header 1*WSP (range / msg-id)
head-command = "HEAD" [1*WSP (msg-id / article-number)] *WSP CRLF *WSP CRLF
head-command = "HEAD" [1*WSP (msg-id / article-number)]
Barber Page[38] *WSP CRLF
INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services
November 2001
header = parameter header = parameter
help-command = "HELP" *WSP CRLF help-command = "HELP" *WSP CRLF
HT = %x09 HT = %x09
ihave-command = "IHAVE" 1*WSP msg-id *WSP CRLF ihave-command = "IHAVE" 1*WSP msg-id *WSP CRLF
last-command = "LAST" *WSP CRLF last-command = "LAST" *WSP CRLF
LF = %x0A LF = %x0A
list-active-times-command = "LIST" 1*WSP "ACTIVE.TIMES" list-active-times-command = "LIST" 1*WSP "ACTIVE.TIMES"
[1*WSP wildmat] *WSP CRLF [1*WSP wildmat] *WSP CRLF
list-command = "LIST" [1*WSP "ACTIVE" [1*WSP wildmat] *WSP CRLF list-command = "LIST" [1*WSP "ACTIVE" [1*WSP wildmat]]
list-distrib-pats-command = "LIST" 1*WSP "DISTRIB.PATS" *WSP CRLF
list-distributions-command = "LIST" 1*WSP "DISTRIBUTIONS" *WSP CRLF
list-extensions-command = "LIST" 1*WSP "EXTENSIONS" *WSP CRLF
list-newsgroups-command = "LIST" 1*WSP "NEWSGROUPS" [1*WSP wildmat]
*WSP CRLF *WSP CRLF
list-overview-fmt-command = "LIST" 1*WSP "OVERVIEW.FMT" *WSP CRLF list-distrib-pats-command = "LIST" 1*WSP "DISTRIB.PATS"
listgroup-command = "LISTGROUP" [1*WSP newsgroup] *WSP CRLF
mode-reader-command = "MODE" 1*WSP "READER" *WSP CRLF
msg-id = <defined in RFC2822>
newgroups-command = "NEWGROUPS" 1*WSP date 1*WSP time [1*WSP
"GMT"/"UTC"] *WSP CRLF
newnews-command = "NEWNEWS" 1*WSP newsgroup *("," newsgroup)
1*WSP date 1*WSP time [1*WSP "GMT"/"UTC"]
*WSP CRLF *WSP CRLF
newsgroup = parameter list-distributions-command = "LIST" 1*WSP "DISTRIBUTIONS"
*WSP CRLF
list-extensions-command = "LIST" 1*WSP "EXTENSIONS" *WSP
CRLF
list-newsgroups-command = "LIST" 1*WSP "NEWSGROUPS" [1*WSP
wildmat] *WSP CRLF
list-overview-fmt-command = "LIST" 1*WSP "OVERVIEW.FMT"
*WSP CRLF
listgroup-command = "LISTGROUP" [1*WSP wildmat] *WSP CRLF
mode-reader-command = "MODE" 1*WSP "READER" *WSP CRLF
msg-id = <defined in section 9.1 of this memo>
Barber [Page 62]
INTERNET DRAFT S. Barber
Expires: July 15, 2002 Academ Consulting Services
January 2002
newgroups-command = "NEWGROUPS" 1*WSP date 1*WSP time
1*WSP "GMT"] *WSP CRLF
newnews-command = "NEWNEWS" 1*WSP wildmat 1*WSP date
1*WSP time [1*WSP "GMT÷]*WSP CRLF
next-command = "NEXT" *WSP CRLF next-command = "NEXT" *WSP CRLF
over-command = "OVER" [1*WSP range] *WSP CRLF over-command = "OVER" [1*WSP range] *WSP CRLF
parameter = 1*(%x21-FF) ; generic command parameter parameter = 1*(%x21-FF) ; generic command parameter
post-command = "POST" *WSP CRLF post-command = "POST" *WSP CRLF
quit-command = "QUIT" *WSP CRLF quit-command = "QUIT" *WSP CRLF
range = article-number ["-" [article-number]] range = article-number ["-" [article-number]]
SP = %x20 SP = %x20
stat-command = "STAT" [1*WSP (msg-id / article-number)] *WSP CRLF stat-command = "STAT" [1*WSP (msg-id / article-number)]
*WSP CRLF
time = 6DIGIT time = 6DIGIT
UTF-8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4 / UTF8-5 / UTF8-6 UTF-8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4 / UTF8-5 /
UTF8-6
UTF8-1 = %x80-BF UTF8-1 = %x80-BF
UTF8-2 = %xC0-DF UTF8-1 UTF8-2 = %xC0-DF UTF8-1
UTF8-3 = %xE0-EF 2UTF8-1 UTF8-3 = %xE0-EF 2UTF8-1
UTF8-4 = %xF0-F7 3UTF8-1 UTF8-4 = %xF0-F7 3UTF8-1
UTF8-5 = %xF8-FB 4UTF8-1 UTF8-5 = %xF8-FB 4UTF8-1
UTF8-6 = %xFC-FD 5UTF8-1 UTF8-6 = %xFC-FD 5UTF8-1
wildmat = ["!"]1*("*" / "?" / wildmat-exact / wildmat-set / wildmat = wildmat-pattern *("," ["!"] wildmat-pattern)
"\" (%x22-7F / UTF-8-non-ascii)) wildmat-pattern = 1*wildmat-item
wildmat-exact = %x22-29 / %x2B-3E / %x40-5A / %x5D-7F / wildmat-item = wildmat-exact / wildmat-wild
UTF-8-non-ascii ; exclude space ! * ? [ \ wildmat-exact = %x21-29 / %x2B / %x2D-3E / %x40-5A / %x5E-
wildmat-non-hyphen = %x21-2C / %x2E-7F / UTF-8-non-ascii ; exclude 7F /UTF-8-non-ascii ; exclude * , ? [ \ ]
space - wildmat-wild = "*" / "?"
wildmat-set = "[" ["^"] ["]" / "-"] *(wildmat-non-hyphen"["-"
wildmat-non-hyphen]) ["-"]
WSP = SP / HT WSP = SP / HT
14. Security Considerations 14 Security Considerations
This section is meant to inform application developers, information This section is meant to inform application developers,
providers, and users of the security limitations in NNTP as described information providers, and users of the security limitations
by this document. The discussion does not include definitive solutions in NNTP as described by this memo. The discussion does not
to the problems revealed, though it does make some suggestions for include definitive solutions to the problems revealed, though
reducing security risks. it does make some suggestions for reducing security risks.
14.1 Personal and Proprietary Information 14.1 Personal and Proprietary Information
NNTP, because it was created to distribute network news articles, will NNTP, because it was created to distribute network news
forward whatever information is stored in those articles. articles, will forward whatever information is stored in
Specification of that information is outside this scope of this Barber [Page 63]
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 is not disclosed
inadvertently. Additionally, effective and easily understood
mechanisms to manage the distribution of news articles must be
provided to NNTP Server administrators, so that they are able to
report with confidence what information is and is not being forwarded
in news articles passing though their servers.
Barber Page [39]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
those articles. Specification of that information is outside
this scope of this memo, 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 is not disclosed
inadvertently. Additionally, effective and easily understood
mechanisms to manage the distribution of news articles must
be provided to NNTP Server administrators, so that they are
able to report with confidence what information is and is not
being forwarded in news articles passing though their
servers.
14.2 Abuse of Server Log Information 14.2 Abuse of Server Log Information
A server is in the position to save session data about a user's A server is in the position to save session data about a
requests that might identify their reading patterns or subjects of user's requests that might identify their reading patterns or
interest. This information is clearly confidential in nature and its subjects of interest. This information is clearly
handling can be constrained by law in certain countries. People using confidential in nature and its handling can be constrained by
the NNTP protocol to provide data are responsible for ensuring that law in certain countries. People using the NNTP protocol to
such material is not distributed without the permission of any provide data are responsible for ensuring that such material
individuals that are identifiable by the published results. is not distributed without the permission of any individuals
that are identifiable by the published results.
14.3 Weak Authentication and Access Control 14.3 Weak Authentication and Access Control
There is no user-based or token-based authentication in the basic NNTP There is no user-based or token-based authentication in the
specification. Access is normally controlled by server configuration basic NNTP specification. Access is normally controlled by
files. Those files specify access by using domain names or IP server configuration files. Those files specify access by
addresses. However, this specification does permit the creation of using domain names or IP addresses. However, this memo does
extensions to the NNTP protocol itself for such purposes. While permit the creation of extensions to the NNTP protocol itself
including such mechanisms is optional, doing so is strongly for such purposes. While including such mechanisms is
encouraged. optional, doing so is strongly encouraged.
Other mechanisms are also available. For example, a proxy server could Other mechanisms are also available. For example, a proxy
be put in place that requires authentication before connecting via the server could be put in place that requires authentication
proxy to the NNTP server. before connecting via the proxy to the NNTP server.
14.4 DNS Spoofing 14.4 DNS Spoofing
Many existing NNTP implementations authorize incoming connections by Many existing NNTP implementations authorize incoming
checking the IP address of that connection against the IP addresses connections by checking the IP address of that connection
obtained via DNS lookups of lists of domain names given in local Barber [Page 64]
configuration files. Servers that use this type of authentication, INTERNET DRAFT S. Barber
and clients that find a server by doing a DNS lookup of the server Expires: July 15, 2002 Academ Consulting Services
name, rely very heavily on the Domain Name Service, and are thus January 2002
generally prone to security attacks based on the deliberate against the IP addresses obtained via DNS lookups of lists of
misassociation of IP addresses and DNS names. Clients and servers domain names given in local configuration files. Servers
need to be cautious in assuming the continuing validity of an IP that use this type of authentication, and clients that find a
number/DNS name association. server by doing a DNS lookup of the server name, rely very
heavily on the Domain Name Service, and are thus generally
In particular, NNTP clients and servers SHOULD rely on their name prone to security attacks based on the deliberate
resolver for confirmation of an IP number/DNS name association, rather misassociation of IP addresses and DNS names. Clients and
than caching the result of previous host name lookups. Many platforms servers need to be cautious in assuming the continuing
already can cache host name lookups locally when appropriate, and they validity of an IP number/DNS name association.
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 behavior of clients In particular, NNTP clients and servers SHOULD rely on their
for replicated servers using the same DNS name and reduces the name resolver for confirmation of an IP number/DNS name
likelihood of a user's experiencing failure in accessing sites that association, rather than caching the result of previous host
use that strategy. 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.
15. References 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.
[1] Kantor, B and P. Lapsley, "Network News Transfer Protocol", This requirement also improves the load-balancing behavior of
RFC-977, U.C. San Diego and U.C. Berkeley. clients for replicated servers using the same DNS name and
[2] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC reduces the likelihood of a user's experiencing failure in
2279, Alis Technologies. accessing sites that use that strategy.
[3] Coded Character Set-7-bit American Standard Code for Information
Interchange, ANSI x3.4-1986.
[4] Bradner, Scott, "Keywords for use in RFCs to Indicate Requirement
40] Barber [Page 65]
INTERNET DRAFT S. Barber INTERNET DRAFT S. Barber
Expires: May 15, 2002 Academ Consulting Services Expires: July 15, 2002 Academ Consulting Services
November 2001 January 2002
Levels", RFC-2119, Harvard University. 15 References
[5] Salz, Rich, Manual Page for wildmat(3) from the INN 1.4
distribution, UUNET Technologies, Revision 1.10, April, 1992. 1 Kantor, B and P. Lapsley, "Network News Transfer Protocol",
[6] Robertson, Rob, "FAQ: Overview database / NOV General RFC-977, U.C. San Diego and U.C. Berkeley, February, 1986.
Information", ftp://ftp.uu.net/networking/news/nntp/inn/faq-nov.Z, 2 Yergeau, F., "UTF-8, a transformation format of ISO 10646",
RFC 2279, Alis Technologies, January, 1998.
3 Coded Character Set-7-bit American Standard Code for
Information Interchange, ANSI x3.4-1986.
4 Bradner, Scott, "Keywords for use in RFCs to Indicate
Requirement Levels", RFC-2119, Harvard University, March,
1997.
5 Salz, Rich, Manual Page for wildmat(3) from the INN 1.4
distribution, UUNET Technologies, Revision 1.10, April,
1992.
6 Crocker, D. and Overell, P., "Augmented BNF for Syntax
Specifications: ABNF", RFC-2234, Internet Mail Consortium
and Demon Internet, Ltd., November, 1997.
7 Horton, M. and Adams, R., "Standard for the Interchange of
USENET messages", RFC 1036, AT&T Bell Laboratories and The
Center for Seismic Studies, December, 1987.
8 Resnick, P., Editor, "Internet Message Format", RFC 2822,
QUALCOMM Incorporated, April 2001.
9 Robertson, Rob, "FAQ: Overview database / NOV General
Information",
ftp://ftp.uu.net/networking/news/nntp/inn/faq-nov.Z,
January, 1995. January, 1995.
[7] International Telecommunications Union-Radio, "Glossary", ITU-R 10 International Telecommunications Union-Radio, "Glossary",
Recommendation TF.686-1, October, 1997. ITU-R Recommendation TF.686-1, October, 1997.
[8] Mills, David L., "Network Time Protocol (Version 3), 11 Mills, David L., "Network Time Protocol (Version 3),
Specification, Implementation and Analysis", RFC-1305, University of Specification, Implementation and Analysis", RFC-1305,
Delaware, March 1992. University of Delaware, March 1992.
[9] Crocker, D. and Overell, P., "Augmented BNF for Syntax
Specifications: ABNF", RFC-2234, Internet Mail Consortium and Demon
Internet, Ltd.
16. Notes 16 Notes
UNIX is a registered trademark of the X/Open Consortium. UNIX is a registered trademark of the X/Open Company Ltd.
17. Acknowledgments 17 Acknowledgments
The author acknowledges the original authors of NNTP as documented in The author acknowledges the original authors of NNTP as
RFC 977: Brian Kantor and Phil Lapsey. documented in RFC 977: Brian Kantor and Phil Lapsey.
The author gratefully acknowledges the work of the NNTP committee Barber [Page 66]
chaired by Eliot Lear. The organization of this document was INTERNET DRAFT S. Barber
influenced by the last available draft from this working group. A Expires: July 15, 2002 Academ Consulting Services
special thanks to Eliot for generously providing the original January 2002
machine-readable sources for that document. The author gratefully acknowledges the work of the NNTP
committee chaired by Eliot Lear. The organization of this
memo 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.
The author gratefully acknowledges the work of the Marshall Rose & The author gratefully acknowledges the work of the Marshall
John G. Meyers in RFC 1939 and the work of the DRUMS working group, Rose & John G. Meyers in RFC 1939 and the work of the DRUMS
specifically RFC 1869, which is the basis of the NNTP extensions working group, specifically RFC 1869, which is the basis of
mechanism detailed in this document. the NNTP extensions mechanism detailed in this memo.
The author gratefully acknowledges the authors of RFC 2616 for The author gratefully acknowledges the authors of RFC 2616
providing specific and relevant examples of security issues that for providing specific and relevant examples of security
should be considered for HTTP. Since many of the same considerations issues that should be considered for HTTP. Since many of the
exist for NNTP, those examples that are relevant have been included same considerations exist for NNTP, those examples that are
here with some minor rewrites. relevant have been included here with some minor rewrites.
The author gratefully acknowledges the comments and additional The author gratefully acknowledges the comments and
information provided by the following individuals in preparing one of additional information provided by the following individuals
the progenitors of this document: in preparing one or more of the progenitors of this memo:
o Russ Allbery <rra@stanford.edu> Russ Allbery <rra@stanford.edu>
o Wayne Davison <davison@armory.com> Wayne Davison <davison@armory.com>
o Clive D.W. Feather <clive@demon.net> Clive D.W. Feather <clive@demon.net>
o Chris Lewis <clewis@bnr.ca> Chris Lewis <clewis@bnr.ca>
o Tom Limoncelli <tal@mars.superlink.net> Tom Limoncelli <tal@mars.superlink.net>
o Eric Schnoebelen <eric@egsner.cirr.com> Eric Schnoebelen <eric@egsner.cirr.com>
o Rich Salz <rsalz@osf.org> Rich Salz <rsalz@osf.org>
This work was motivated by the work of various news reader authors and This work was motivated by the work of various news reader
news server authors, which includes those listed below: authors and news server authors, which includes those listed
o Rick Adams-Original author of the NNTP extensions to the RN below:
news reader and last maintainer of Bnews Rick Adams-Original author of the NNTP extensions to the
o Stan Barber-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. news readers that are part of Bnews.
o Geoff Collyer-Original author of the OVERVIEW database Geoff Collyer-Original author of the OVERVIEW database
proposal and one of the original authors of CNEWS proposal and one of the original authors of CNEWS
o Dan Curry-Original author of the xvnews news reader Dan Curry-Original author of the xvnews news reader
o Wayne Davison-Author of the first threading extensions to Wayne Davison-Author of the first threading extensions to
the RN news reader (commonly called TRN). the RN news reader (commonly called TRN).
o Geoff Huston-Original author of ANU NEWS Geoff Huston-Original author of ANU NEWS
o Phil Lapsey-Original author of the UNIX reference Phil Lapsey-Original author of the UNIX reference
implementation for NNTP implementation for NNTP
o Iain Lea-Original maintainer of the TIN news reader Iain Lea-Original maintainer of the TIN news reader
o Chris Lewis-First known implementer of the AUTHINFO GENERIC Chris Lewis-First known implementer of the AUTHINFO
GENERIC extension
Barber Page [41] Rich Salz-Original author of INN
Henry Spencer-One of the original authors of CNEWS
INTERNET DRAFT S. Barber Kim Storm-Original author of the NN news reader
Expires: May 15, 2002 Academ Consulting Services
extension
o Rich Salz-Original author of INN
o Henry Spencer-One of the original authors of CNEWS
o Kim Storm-Original author of the NN news reader
18. Author's Address 18 Author's Address
Stan Barber Stan Barber
P.O. Box 300481 P.O. Box 300481
Houston, Texas 77230 Houston, Texas 77230
Email: sob@academ.com Email: sob@academ.com
This document expires May 15, 2002. This memo expires July 15, 2002.
Barber Page [42]
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/