draft-ietf-nntpext-base-19.txt   draft-ietf-nntpext-base-20.txt 
NNTP C. Feather NNTP C. Feather
Internet-Draft Thus plc Internet-Draft Thus plc
Expires: January 30, 2004 August 1, 2003 Expires: April 15, 2004 October 16, 2003
Network News Transport Protocol Network News Transport Protocol
draft-ietf-nntpext-base-19 draft-ietf-nntpext-base-20
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC2026. all provisions of Section 10 of RFC2026.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that other Task Force (IETF), its areas, and its working groups. Note that other
groups may also distribute working documents as Internet-Drafts. groups may also distribute working documents as Internet-Drafts.
skipping to change at page 1, line 30 skipping to change at page 1, line 30
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at http:// The list of current Internet-Drafts can be accessed at http://
www.ietf.org/ietf/1id-abstracts.txt. 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 at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on January 30, 2004. This Internet-Draft will expire on April 15, 2004.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2003). All Rights Reserved. Copyright (C) The Internet Society (2003). All Rights Reserved.
Abstract Abstract
The Network News Transport Protocol (NNTP) has been in use in the The Network News Transport Protocol (NNTP) has been in use in the
Internet for a decade and remains one of the most popular protocols Internet for a decade and remains one of the most popular protocols
(by volume) in use today. This document is a replacement for RFC 977 (by volume) in use today. This document is a replacement for RFC 977
and officially updates the protocol specification. It clarifies some and officially updates the protocol specification. It clarifies some
vagueness in RFC 977, includes some new base functionality and vagueness in RFC 977, includes some new base functionality, and
provides a specific mechanism to add standardized extensions to NNTP. provides a specific mechanism to add standardized extensions to NNTP.
Administration Administration
This document is a product of the NNTP Working Group, chaired by Russ This document is a product of the NNTP Working Group, chaired by Russ
Allbery and Ned Freed. Allbery and Ned Freed.
This is draft 19. This is draft 20.
Outstanding issues
OUTSTANDING ISSUE
Outstanding substantive (as opposed to editorial) issues in the
text are shown thus.
Author's Note Author's Note
This draft is written in XML using an NNTP-specific DTD. Custom This draft is written in XML using an NNTP-specific DTD. Custom
software is used to convert this to RFC 2629 [RFC2629] format, and software is used to convert this to RFC 2629 [RFC2629] format, and
then the public "xml2rfc" package to further reduce this to text, then the public "xml2rfc" package to further reduce this to text,
nroff source, and HTML. nroff source, and HTML.
No perl was used in producing this draft. No perl was used in producing this draft.
Rights Rights
UNIX is a registered trademark of the X/Open Company Ltd. UNIX is a registered trademark of the X/Open Company Ltd.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 5 1. Introduction . . . . . . . . . . . . . . . . . . . . . . 5
2. Notation . . . . . . . . . . . . . . . . . . . . . . . . . 6 2. Notation . . . . . . . . . . . . . . . . . . . . . . . . 6
3. Basic Concepts . . . . . . . . . . . . . . . . . . . . . . 7 3. Basic Concepts . . . . . . . . . . . . . . . . . . . . . 8
3.1 Commands and Responses . . . . . . . . . . . . . . . . . . 7 3.1 Commands and Responses . . . . . . . . . . . . . . . . . 8
3.2 Response Codes . . . . . . . . . . . . . . . . . . . . . . 9 3.2 Response Codes . . . . . . . . . . . . . . . . . . . . . 10
3.2.1 Generic Response Codes . . . . . . . . . . . . . . . . . . 10 3.2.1 Generic Response Codes . . . . . . . . . . . . . . . . . 11
3.2.1.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2.1.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Pipelining . . . . . . . . . . . . . . . . . . . . . . . . 13 3.3 Pipelining . . . . . . . . . . . . . . . . . . . . . . . 15
3.3.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.3.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 15
3.4 Articles . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.4 Articles . . . . . . . . . . . . . . . . . . . . . . . . 16
4. The WILDMAT format . . . . . . . . . . . . . . . . . . . . 17 4. The WILDMAT format . . . . . . . . . . . . . . . . . . . 18
4.1 Wildmat syntax . . . . . . . . . . . . . . . . . . . . . . 17 4.1 Wildmat syntax . . . . . . . . . . . . . . . . . . . . . 18
4.2 Wildmat semantics . . . . . . . . . . . . . . . . . . . . 17 4.2 Wildmat semantics . . . . . . . . . . . . . . . . . . . 18
4.3 Extensions . . . . . . . . . . . . . . . . . . . . . . . . 18 4.3 Extensions . . . . . . . . . . . . . . . . . . . . . . . 19
4.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . 19
5. Session administration commands . . . . . . . . . . . . . 20 5. Session administration commands . . . . . . . . . . . . 21
5.1 Initial Connection . . . . . . . . . . . . . . . . . . . . 20 5.1 Initial Connection . . . . . . . . . . . . . . . . . . . 21
5.2 MODE READER . . . . . . . . . . . . . . . . . . . . . . . 21 5.2 MODE READER . . . . . . . . . . . . . . . . . . . . . . 22
5.3 LIST EXTENSIONS . . . . . . . . . . . . . . . . . . . . . 23 5.3 LIST EXTENSIONS . . . . . . . . . . . . . . . . . . . . 24
5.4 QUIT . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.4 QUIT . . . . . . . . . . . . . . . . . . . . . . . . . . 27
6. Article posting and retrieval . . . . . . . . . . . . . . 26 6. Article posting and retrieval . . . . . . . . . . . . . 28
6.1 Group and article selection . . . . . . . . . . . . . . . 26 6.1 Group and article selection . . . . . . . . . . . . . . 28
6.1.1 GROUP . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6.1.1 GROUP . . . . . . . . . . . . . . . . . . . . . . . . . 28
6.1.2 LAST . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 6.1.2 LAST . . . . . . . . . . . . . . . . . . . . . . . . . . 31
6.1.3 NEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.1.3 NEXT . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.2 Retrieval of articles and article sections . . . . . . . . 32 6.2 Retrieval of articles and article sections . . . . . . . 34
6.2.1 ARTICLE . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.2.1 ARTICLE . . . . . . . . . . . . . . . . . . . . . . . . 34
6.2.2 HEAD . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.2.2 HEAD . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6.2.3 BODY . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 6.2.3 BODY . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.2.4 STAT . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.2.4 STAT . . . . . . . . . . . . . . . . . . . . . . . . . . 41
6.3 Article posting . . . . . . . . . . . . . . . . . . . . . 41 6.3 Article posting . . . . . . . . . . . . . . . . . . . . 43
6.3.1 POST . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 6.3.1 POST . . . . . . . . . . . . . . . . . . . . . . . . . . 43
6.3.2 IHAVE . . . . . . . . . . . . . . . . . . . . . . . . . . 43 6.3.2 IHAVE . . . . . . . . . . . . . . . . . . . . . . . . . 45
7. Information commands . . . . . . . . . . . . . . . . . . . 46 7. Information commands . . . . . . . . . . . . . . . . . . 49
7.1 DATE . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 7.1 DATE . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.2 HELP . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 7.2 HELP . . . . . . . . . . . . . . . . . . . . . . . . . . 49
7.3 NEWGROUPS . . . . . . . . . . . . . . . . . . . . . . . . 47 7.3 NEWGROUPS . . . . . . . . . . . . . . . . . . . . . . . 50
7.4 NEWNEWS . . . . . . . . . . . . . . . . . . . . . . . . . 49 7.4 NEWNEWS . . . . . . . . . . . . . . . . . . . . . . . . 52
7.5 Time . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 7.5 Time . . . . . . . . . . . . . . . . . . . . . . . . . . 53
7.5.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 50 7.5.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 53
7.6 The LIST commands . . . . . . . . . . . . . . . . . . . . 51 7.6 The LIST commands . . . . . . . . . . . . . . . . . . . 54
7.6.1 LIST ACTIVE . . . . . . . . . . . . . . . . . . . . . . . 51 7.6.1 LIST ACTIVE . . . . . . . . . . . . . . . . . . . . . . 54
7.6.2 LIST ACTIVE.TIMES . . . . . . . . . . . . . . . . . . . . 53 7.6.2 LIST ACTIVE.TIMES . . . . . . . . . . . . . . . . . . . 56
7.6.3 LIST DISTRIBUTIONS . . . . . . . . . . . . . . . . . . . . 54 7.6.3 LIST DISTRIBUTIONS . . . . . . . . . . . . . . . . . . . 57
7.6.4 LIST DISTRIB.PATS . . . . . . . . . . . . . . . . . . . . 55 7.6.4 LIST DISTRIB.PATS . . . . . . . . . . . . . . . . . . . 58
7.6.5 LIST NEWSGROUPS . . . . . . . . . . . . . . . . . . . . . 57 7.6.5 LIST NEWSGROUPS . . . . . . . . . . . . . . . . . . . . 60
8. Framework for NNTP extensions . . . . . . . . . . . . . . 59 8. Framework for NNTP extensions . . . . . . . . . . . . . 62
8.1 Initial IANA registry . . . . . . . . . . . . . . . . . . 61 8.1 Initial IANA registry . . . . . . . . . . . . . . . . . 64
8.2 Standard extensions . . . . . . . . . . . . . . . . . . . 61 8.2 Standard extensions . . . . . . . . . . . . . . . . . . 64
8.3 The LISTGROUP extension . . . . . . . . . . . . . . . . . 61 8.3 The LISTGROUP extension . . . . . . . . . . . . . . . . 64
8.3.1 LISTGROUP . . . . . . . . . . . . . . . . . . . . . . . . 61 8.3.1 LISTGROUP . . . . . . . . . . . . . . . . . . . . . . . 64
8.4 Article metadata . . . . . . . . . . . . . . . . . . . . . 63 8.4 Article metadata . . . . . . . . . . . . . . . . . . . . 66
8.4.1 The :bytes metadata item . . . . . . . . . . . . . . . . . 63 8.4.1 The :bytes metadata item . . . . . . . . . . . . . . . . 67
8.4.2 The :lines metadata item . . . . . . . . . . . . . . . . . 63 8.4.2 The :lines metadata item . . . . . . . . . . . . . . . . 67
8.5 The OVER extension . . . . . . . . . . . . . . . . . . . . 64 8.5 The OVER extension . . . . . . . . . . . . . . . . . . . 67
8.5.1 OVER . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 8.5.1 OVER . . . . . . . . . . . . . . . . . . . . . . . . . . 68
8.5.2 LIST OVERVIEW.FMT . . . . . . . . . . . . . . . . . . . . 68 8.5.2 LIST OVERVIEW.FMT . . . . . . . . . . . . . . . . . . . 72
8.6 The HDR extension . . . . . . . . . . . . . . . . . . . . 70 8.6 The HDR extension . . . . . . . . . . . . . . . . . . . 74
8.6.1 HDR . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 8.6.1 HDR . . . . . . . . . . . . . . . . . . . . . . . . . . 74
8.6.2 LIST HEADERS . . . . . . . . . . . . . . . . . . . . . . . 74 8.6.2 LIST HEADERS . . . . . . . . . . . . . . . . . . . . . . 78
9. Augmented BNF Syntax for NNTP . . . . . . . . . . . . . . 77 9. Augmented BNF Syntax for NNTP . . . . . . . . . . . . . 81
9.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . . 77 9.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . 81
9.2 Responses . . . . . . . . . . . . . . . . . . . . . . . . 79 9.2 Responses . . . . . . . . . . . . . . . . . . . . . . . 83
9.3 Articles . . . . . . . . . . . . . . . . . . . . . . . . . 79 9.3 Articles . . . . . . . . . . . . . . . . . . . . . . . . 83
9.4 General non-terminals . . . . . . . . . . . . . . . . . . 79 9.4 General non-terminals . . . . . . . . . . . . . . . . . 83
10. IANA Considerations . . . . . . . . . . . . . . . . . . . 81 10. IANA Considerations . . . . . . . . . . . . . . . . . . 85
11. Security Considerations . . . . . . . . . . . . . . . . . 82 11. Security Considerations . . . . . . . . . . . . . . . . 86
11.1 Personal and Proprietary Information . . . . . . . . . . . 82 11.1 Personal and Proprietary Information . . . . . . . . . . 86
11.2 Abuse of Server Log Information . . . . . . . . . . . . . 82 11.2 Abuse of Server Log Information . . . . . . . . . . . . 86
11.3 Weak Authentication and Access Control . . . . . . . . . . 82 11.3 Weak Authentication and Access Control . . . . . . . . . 86
11.4 DNS Spoofing . . . . . . . . . . . . . . . . . . . . . . . 83 11.4 DNS Spoofing . . . . . . . . . . . . . . . . . . . . . . 87
11.5 UTF-8 issues . . . . . . . . . . . . . . . . . . . . . . . 83 11.5 UTF-8 issues . . . . . . . . . . . . . . . . . . . . . . 87
12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . 85 11.6 Caching of LIST EXTENSIONS results . . . . . . . . . . . 88
Normative References . . . . . . . . . . . . . . . . . . . 87 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . 90
Informative References . . . . . . . . . . . . . . . . . . 88 Normative References . . . . . . . . . . . . . . . . . . 92
Author's Address . . . . . . . . . . . . . . . . . . . . . 88 Informative References . . . . . . . . . . . . . . . . . 93
A. Future Directions . . . . . . . . . . . . . . . . . . . . 89 Author's Address . . . . . . . . . . . . . . . . . . . . 93
B. Interaction with other specifications . . . . . . . . . . 90 A. Future Directions . . . . . . . . . . . . . . . . . . . 94
B.1 Header folding . . . . . . . . . . . . . . . . . . . . . . 90 B. Interaction with other specifications . . . . . . . . . 95
B.2 Message-IDs . . . . . . . . . . . . . . . . . . . . . . . 90 B.1 Header folding . . . . . . . . . . . . . . . . . . . . . 95
B.3 Article posting . . . . . . . . . . . . . . . . . . . . . 91 B.2 Message-IDs . . . . . . . . . . . . . . . . . . . . . . 95
Intellectual Property and Copyright Statements . . . . . . 93 B.3 Article posting . . . . . . . . . . . . . . . . . . . . 96
C. Summary of Response Codes . . . . . . . . . . . . . . . 98
D. Formal specification of the standard extensions . . . . 103
D.1 The LISTGROUP extension . . . . . . . . . . . . . . . . 103
D.2 The OVER extension . . . . . . . . . . . . . . . . . . . 103
D.3 The HDR extension . . . . . . . . . . . . . . . . . . . 104
Intellectual Property and Copyright Statements . . . . . 106
1. Introduction 1. Introduction
This document specifies the Network News Transport Protocol (NNTP), This document specifies the Network News Transport Protocol (NNTP),
which is used for the distribution, inquiry, retrieval, and posting which is used for the distribution, inquiry, retrieval, and posting
of Netnews articles using a reliable stream-based mechanism. For news of Netnews articles using a reliable stream-based mechanism. For news
reading clients, NNTP enables retrieval of news articles that are reading clients, NNTP enables retrieval of news articles that are
stored in a central database, giving subscribers the ability to stored in a central database, giving subscribers the ability to
select only those articles they wish to read. select only those articles they wish to read.
skipping to change at page 5, line 29 skipping to change at page 5, line 29
Every attempt is made to ensure that the protocol specification in Every attempt is made to ensure that the protocol specification in
this document is compatible with the version specified in RFC 977 this document is compatible with the version specified in RFC 977
[RFC977]. However, this version does not support the ill-defined [RFC977]. However, this version does not support the ill-defined
SLAVE command and permits four digit years to be specified in the SLAVE command and permits four digit years to be specified in the
NEWNEWS and NEWGROUPS commands. It changes the default character set NEWNEWS and NEWGROUPS commands. It changes the default character set
to UTF-8 [RFC2279] instead of US-ASCII [ANSI1986]. It now requires to UTF-8 [RFC2279] instead of US-ASCII [ANSI1986]. It now requires
all articles to have a message-id, eliminating the "<0>" placeholder all articles to have a message-id, eliminating the "<0>" placeholder
used in RFC 977. It also extends the newsgroup name matching used in RFC 977. It also extends the newsgroup name matching
capabilities already documented in RFC 977. capabilities already documented in RFC 977.
Generally, new functionality is made available using new commands. Generally, new functionality is made available using new commands. A
Part of that new functionality involves a mechanism to discover what number of such commands (including some commands taken from RFC 2980
new functionality is available to clients from a server. This [RFC2980]) are now mandatory. Part of the new functionality involves
mechanism can also be used to add more functionality as needs merit a mechanism to discover what new functionality is available to
such additions. clients from a server. This mechanism can also be used to add more
functionality as needs merit such additions.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
An implementation is not compliant if it fails to satisfy one or more An implementation is not compliant if it fails to satisfy one or more
of the MUST requirements for this protocol. An implementation that of the MUST requirements for this protocol. An implementation that
satisfies all the MUST and all the SHOULD requirements for its satisfies all the MUST and all the SHOULD requirements for its
protocols is said to be "unconditionally compliant"; one that protocols is said to be "unconditionally compliant"; one that
satisfies all the MUST requirements but not all the SHOULD satisfies all the MUST requirements but not all the SHOULD
skipping to change at page 6, line 12 skipping to change at page 6, line 12
"server" or "server host" refers to a host that offers the NNTP "server" or "server host" refers to a host that offers the NNTP
service. service.
2. Notation 2. Notation
The following notational conventions are used in this document. The following notational conventions are used in this document.
UPPERCASE indicates literal text to be included in the UPPERCASE indicates literal text to be included in the
command; command;
lowercase indicates a token described elsewhere; lowercase indicates a token described elsewhere;
[brackets] indicate that the parameter is optional; [brackets] indicate that the argument is optional;
ellipsis... indicates that the parameter may be repeated any ellipsis... indicates that the argument may be repeated any
number of times (it must occur at least once); number of times (it must occur at least once);
vertical|bar indicates a choice of two mutually exclusive vertical|bar indicates a choice of two mutually exclusive
parameters (exactly one must be provided). arguments (exactly one must be provided).
The name "message-id" for a command or response parameter indicates The name "message-id" for a command or response argument indicates
that it is the message-id of an article as described in Section 3.4, that it is the message-id of an article as described in Section 3.4,
including the angle brackets. including the angle brackets.
The name "wildmat" for a parameter indicates that it is a wildmat as The name "wildmat" for a argument indicates that it is a wildmat as
defined in Section 4. If the parameter does not meet the requirements defined in Section 4. If the argument does not meet the requirements
of that section (for example, if it does not fit the grammar of of that section (for example, if it does not fit the grammar of
Section 4.1) the NNTP server MAY place some interpretation on it (not Section 4.1) the NNTP server MAY place some interpretation on it (not
specified by this document) or otherwise MUST treat it as a syntax specified by this document) or otherwise MUST treat it as a syntax
error. error.
Responses for each command will be described in tables listing the Responses for each command will be described in tables listing the
required format of a response followed by the meaning that should be required format of a response followed by the meaning that should be
ascribed to that response. ascribed to that response.
The terms "NUL", "TAB", "LF", "CR, and "space" refer to the octets The terms "NUL", "TAB", "LF", "CR, and "space" refer to the octets
skipping to change at page 7, line 5 skipping to change at page 6, line 49
Examples in this document are not normative but serve to illustrate Examples in this document are not normative but serve to illustrate
usages, arguments, and responses. In the examples, a "[C]" will be usages, arguments, and responses. In the examples, a "[C]" will be
used to represent the client host and a "[S]" will be used to used to represent the client host and a "[S]" will be used to
represent the server host. Most of the examples do not rely on a represent the server host. Most of the examples do not rely on a
particular server state. In some cases, however, they do assume that particular server state. In some cases, however, they do assume that
the current selected newsgroup (see the GROUP command (Section the current selected newsgroup (see the GROUP command (Section
6.1.1)) is invalid; when so, this is indicated at the start of the 6.1.1)) is invalid; when so, this is indicated at the start of the
example. example.
Terms which might be read as specifying details of a client or server
implementation, such as "database", are used simply to ease
description. Providing that implementations conform to the protocol
and format specifications in this document, no specific technique is
mandated.
3. Basic Concepts 3. Basic Concepts
3.1 Commands and Responses 3.1 Commands and Responses
NNTP operates over any reliable data stream 8-bit-wide channel. NNTP operates over any reliable data stream 8-bit-wide channel.
Initially, the server host starts the NNTP service by listening on a Initially, the server host starts the NNTP service by listening on a
TCP port; when running over TCP/IP, the official port for the NNTP TCP port; when running over TCP/IP, the official port for the NNTP
service is 119. When a client host wishes to make use of the service, service is 119. When a client host wishes to make use of the service,
it MUST establish a TCP connection with the server host by connecting it MUST establish a TCP connection with the server host by connecting
to that host on the same port on which the server is listening. When to that host on the same port on which the server is listening. When
skipping to change at page 7, line 41 skipping to change at page 8, line 41
Where this specification permits UTF-8 characters outside the range Where this specification permits UTF-8 characters outside the range
U+0000 to U+007F, implementations MUST NOT use the Byte Order Mark U+0000 to U+007F, implementations MUST NOT use the Byte Order Mark
(U+FEFF, encoding %xEF.BB.BF), and MUST use the Word Joiner (U+2060, (U+FEFF, encoding %xEF.BB.BF), and MUST use the Word Joiner (U+2060,
encoding %xE2.91.A0) for the meaning Zero Width No-Break Space, in encoding %xE2.91.A0) for the meaning Zero Width No-Break Space, in
command lines and the initial lines of responses, and SHOULD apply command lines and the initial lines of responses, and SHOULD apply
these same principles throughout. these same principles throughout.
Commands may have variants, using a second keyword immediately after Commands may have variants, using a second keyword immediately after
the first to indicate which variant is required. The only such the first to indicate which variant is required. The only such
commands in this specification are LIST and MODE. commands in this specification are LIST and MODE. Note that such
variants are sometimes referred to as if they were commands in their
own right: "the LIST ACTIVE" command should be read as shorthand for
"the ACTIVE variant of the LIST command".
Keywords are case-insensitive; the case of keywords for commands MUST Keywords are case-insensitive; the case of keywords for commands MUST
be ignored by the server. Command and response parameters are case or be ignored by the server. Command and response arguments are case or
language specific only when stated, either in this document or in language specific only when stated, either in this document or in
other relevant specifications. other relevant specifications.
An NNTP server MUST implement all the commands in this specification An NNTP server MUST implement all the commands in this specification
except for those marked as optional and those in extensions. except for those marked as optional and those in extensions.
Each response MUST start with a three-digit response code that is Each response MUST start with a three-digit response code that is
sufficient to distinguish all responses. Certain valid responses are sufficient to distinguish all responses. Certain valid responses are
defined to be multi-line; for all others, the response is contained defined to be multi-line; for all others, the response is contained
in a single line. The first or only line of the response MUST NOT in a single line. The first or only line of the response MUST NOT
skipping to change at page 9, line 24 skipping to change at page 10, line 25
expires, the server SHOULD close the TCP connection without sending expires, the server SHOULD close the TCP connection without sending
any response to the client. any response to the client.
3.2 Response Codes 3.2 Response Codes
Each response MUST begin with a three-digit status indicator. These Each response MUST begin with a three-digit status indicator. These
are status reports from the server and indicate the response to the are status reports from the server and indicate the response to the
last command received from the client. 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 success,
failure, or progress of the previous command. failure, or progress of the previous command:
1xx - Informative message. 1xx - Informative message.
2xx - Command completed OK. 2xx - Command completed 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 4xx - Command was syntactically correct but failed for some
reason. reason.
5xx - Command unimplemented, or incorrect, or a serious program 5xx - Command unknown, unsupported, unavailable, or syntax error.
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 privacy 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 arguments such as numbers and names in
addition to the status indicator. In those cases, to simplify addition to the status indicator. In those cases, to simplify
interpretation by the client the number and type of such parameters interpretation by the client the number and type of such arguments is
is fixed for each response code, as is whether or not the code fixed for each response code, as is whether or not the code
introduces a multi-line response. Any extension MUST follow this introduces a multi-line response. Any extension MUST follow this
principle as well, but note that, for historical reasons, the 211 principle as well, but note that, for historical reasons, the 211
response code is an exception to this. In all other cases, the client response code is an exception to this. In all other cases, the client
MUST only use the status indicator itself to determine the nature of MUST only use the status indicator itself to determine the nature of
the response. The exact response codes that can be returned by any the response. The exact response codes that can be returned by any
given command are detailed in the description of that command. given command are detailed in the description of that command.
Parameters MUST be separated from the numeric status indicator and Arguments MUST be separated from the numeric status indicator and
from each other by a single space. All numeric parameters MUST be in from each other by a single space. All numeric arguments MUST be in
base 10 (decimal) format, and MAY have leading zeros. String base 10 (decimal) format, and MAY have leading zeros. String
parameters MUST contain at least one character and MUST NOT contain arguments MUST contain at least one character and MUST NOT contain
TAB, LF, CR, or space. The server MAY add any text after the response TAB, LF, CR, or space. The server MAY add any text after the response
code or last parameter as appropriate, and the client MUST NOT make code or last argument as appropriate, and the client MUST NOT make
decisions based on this text. Such text MUST be separated from the decisions based on this text. Such text MUST be separated from the
numeric status indicator or the last parameter by at least one space. numeric status indicator or the last argument by at least one space.
The server MUST respond to any command with the appropriate generic The server MUST respond to any command with the appropriate generic
response (given in Section 3.2.1) if it represents the situation. response (given in Section 3.2.1) if it represents the situation.
Otherwise, each recognized command MUST return one of the response Otherwise, each recognized command MUST return one of the response
codes specifically listed in its description or in an extension. A codes specifically listed in its description or in an extension. A
server MAY provide extensions to this specification, including new server MAY provide extensions to this specification, including new
commands, new variants or features of existing commands, and other commands, new variants or features of existing commands, and other
ways of changing the internal state of the server. However, the ways of changing the internal state of the server. However, the
server MUST NOT produce any other responses to a client that does not server MUST NOT produce any other responses to a client that does not
invoke any of the additional features. (Therefore a client that invoke any of the additional features. (Therefore a client that
skipping to change at page 11, line 9 skipping to change at page 12, line 11
If the command is not recognized, or it is an optional command or If the command is not recognized, or it is an optional command or
extension that is not implemented by the server, the response code extension that is not implemented by the server, the response code
500 MUST be returned. 500 MUST be returned.
If there is a syntax error in the arguments of a recognized command, If there is a syntax error in the arguments of a recognized command,
including the case where more arguments are provided than the command including the case where more arguments are provided than the command
specifies or the command line is longer than the server accepts, the specifies or the command line is longer than the server accepts, the
response code 501 MUST be returned. The line MUST NOT be truncated or response code 501 MUST be returned. The line MUST NOT be truncated or
split and then interpreted. Note that where a command has variants split and then interpreted. Note that where a command has variants
depending on a second keyword (e.g. LIST ACTIVE and LIST NEWSGROUPS), depending on a second keyword (e.g. LIST ACTIVE and LIST NEWSGROUPS),
then 501 MUST be used when the requested variant is not implemented then 501 MUST be used when the base command is implemented but the
but the base command is. requested variant is not, and 500 MUST be used only when the base
command itself is not implemented.
If the server experiences an internal fault or problem that means it If the server experiences an internal fault or problem that means it
is unable to carry out the command (for example, a necessary file is is unable to carry out the command (for example, a necessary file is
missing or a necessary service could not be contacted), the response missing or a necessary service could not be contacted), the response
code 403 MUST be returned. If the server recognises the command but code 403 MUST be returned. If the server recognises the command but
does not provide an optional feature (for example because it does not does not provide an optional feature (for example because it does not
store the required information), or only handles a subset of store the required information), or only handles a subset of
legitimate cases (see the HDR command (Section 8.6.1) for an legitimate cases (see the HDR command (Section 8.6.1) for an
example), the response code 503 MUST be returned. Note that where a example), the response code 503 MUST be returned. Note that where a
command is optional (e.g. LIST ACTIVE.TIMES) and is not provided by a command is optional (e.g. LIST ACTIVE.TIMES) and is not provided by a
server, this MAY be treated as an unimplemented command (response server, this MAY be treated as an unimplemented command (response
code 500 or 501) or as a working command where the information is not code 500 or 501 as appropriate) or as a working command where the
available (response code 503). information is not available (response code 503).
If the client is not authorized to use the specified facility when If the client is not authorized to use the specified facility when
the server is in its current state, then either the response code 480 the server is in its current state, then the appropriate one of the
or the response code 502 MUST be returned. The response code 480 following response codes MUST be used.
SHOULD be used if a different command (for example, an extension used
to present credentials) might change the server state so that the
command is permitted. The response code 502 SHOULD be used if the
server wishes to indicate that it is necessary to terminate the
connection and start a new one with the appropriate authority before
the command can be used. Since it is not always possible to clearly
distinguish these two cases, a server MAY issue either of these
response codes for either case. (Note that the server MUST NOT close
the TCP connection immediately after a 502 response except at the
initial connection (Section 5.1) and with the MODE READER (Section
5.2) command.)
OUTSTANDING ISSUE
This isn't a complete solution to the 480 issue; what about the 502: it is necessary to terminate the connection and start a new one
TLS extension, which uses 483 to mean "you need encryption". with the appropriate authority before the command can be used.
Should 480 be used for other than "you need authentication"? What Note that the server MUST NOT close the TCP connection immediately
code should be used to mean "can't do AUTH until after MODE after a 502 response except at the initial connection (Section
READER"? 5.1) and with the MODE READER (Section 5.2) command. See also the
latter command for historical usage of this response.
Do we need a more generic mechanism for "you must invoke extension 480: the client must authenticate itself to the server (that is,
X to do Y"? provide information as to the identity of the client) before the
facility can be used. This will involve the use of an
authentication extension.
The best proposal made so far is that all 48x codes, if returned 483: the client must negotiate appropriate privacy protection on the
from an existing command, mean "unavailable unless some connection. This will involve the use of a privacy extension.
authentication or privacy extension is invoked". Does this tie in
with the issue of permitting existing commands not listed in an
extension?
I asked if anyone used 48x with *existing commands* to mean other 401: the client must change the state of the connection in some other
than "you are missing a privacy or authentication extension". manner. The first argument of the response MUST be the
Effectively the answer is "no". extension-label (see Section 8) of the extension (which may be a
private extension) that provides the necessary mechanism, or
"MODE-READER" if it is necessary to use the MODE READER (Section
5.2) command.
If the server has to terminate the connection for some reason, it If the server has to terminate the connection for some reason, it
MUST give a 400 response code to the next command and then MUST give a 400 response code to the next command and then
immediately close the TCP connection. immediately close the TCP connection.
With the exception of mandatory commands and the 500 response, the The client MUST be prepared to receive any of these responses for any
client MUST be prepared to receive any of these responses for any command (except, of course, that the server MUST NOT generate a 500
command. response code for mandatory commands).
3.2.1.1 Examples 3.2.1.1 Examples
Example of an unknown command: Example of an unknown command:
[C] MAIL [C] MAIL
[S] 500 Unknown command [S] 500 Unknown command
Example of an unsupported extension: Example of an unsupported extension:
skipping to change at page 13, line 4 skipping to change at page 13, line 43
Example of a syntax error: Example of a syntax error:
[C] ARTICLE a.message.id@no.angle.brackets [C] ARTICLE a.message.id@no.angle.brackets
[S] 501 Syntax error [S] 501 Syntax error
Example of an overlong command line: Example of an overlong command line:
[C] HEAD 53 54 55 [C] HEAD 53 54 55
[S] 501 Too many arguments [S] 501 Too many arguments
Example of a bad wildmat: Example of a bad wildmat:
[C] LIST ACTIVE u[ks].* [C] LIST ACTIVE u[ks].*
[S] 501 Syntax error [S] 501 Syntax error
Example of an attempt to access a restricted facility: Example of an attempt to access a facility not available to this
connection:
[C] MODE READER
[S] 200 Reader mode, posting permitted
[C] IHAVE <i.am.an.article.you.will.want@example.com>
[S] 502 Permission denied
Example of an attempt to access a facility requiring authentication:
[C] GROUP secret.group [C] GROUP secret.group
[S] 480 Permission denied [S] 480 Permission denied
followed by a successful attempt following authentication: followed by a successful attempt following such authentication:
[C] XSECRET fred flintstone [C] XSECRET fred flintstone
[S] 290 Password for fred accepted. [S] 290 Password for fred accepted
[C] GROUP secret.group [C] GROUP secret.group
[S] 211 5 1 20 secret.group selected [S] 211 5 1 20 secret.group selected
Example of an attempt to access a facility not available to this Example of an attempt to access a facility requiring privacy:
connection:
[C] MODE READER [C] GROUP secret.group
[S] 200 Reader mode, posting permitted [S] 483 Secure connection required
[C] IHAVE <i.am.an.article.you.will.want@example.com> [C] XENCRYPT
[S] 502 Permission denied [Client and server negotiate encryption on the link]
[S] 283 Encrypted link established
[C] GROUP secret.group
[S] 211 5 1 20 secret.group selected
Example of a need to change mode before using a facility:
[C] GROUP binary.group
[S] 401 XHOST Not on this virtual host
[C] XHOST binary.news.example.org
[S] 290 binary.news.example.org virtual host selected
[C] GROUP binary.group
[S] 211 5 1 77 binary.group selected
Example of a temporary failure: Example of a temporary failure:
[C] GROUP archive.local [C] GROUP archive.local
[S] 403 Archive server temporarily offline [S] 403 Archive server temporarily offline
Example of the server needing to close down immediately: Example of the server needing to close down immediately:
[C] ARTICLE 123 [C] ARTICLE 123
[S] 400 Power supply failed, running on UPS [S] 400 Power supply failed, running on UPS
skipping to change at page 21, line 47 skipping to change at page 22, line 47
201 Posting prohibited 201 Posting prohibited
400 Service temporarily unavailable [1] 400 Service temporarily unavailable [1]
502 Service permanently unavailable [1] 502 Service permanently unavailable [1]
[1] Following a 400 or 502 response the server MUST immediately close [1] Following a 400 or 502 response the server MUST immediately close
the connection. the connection.
5.2.2 Description 5.2.2 Description
MODE READER SHOULD be sent by any client that intends to use any MODE READER SHOULD be sent by any client that intends to use any
command other than IHAVE, HEAD, STAT, LIST ACTIVE, LIST EXTENSIONS, command in this specification (including Section 8) other than IHAVE,
or a command advertised by the server as available via LIST HEAD, STAT, LIST ACTIVE, or LIST EXTENSIONS; other extensions MAY
EXTENSIONS. also require MODE READER to be used. Servers MAY require that this
command be issued before any commands other than the above are sent
and MAY reject such commands until after a MODE READER command has
been sent. Such rejections SHOULD use response code 401 with argument
"MODE-READER", but for historical reasons response code 502 MAY be
used, even though this situation does not meet the conditions for
that response.
Servers MAY require that this command be issued before any commands Once MODE READER is sent, IHAVE (and any related extensions) MAY no
other than the above are sent and MAY reject such commands until longer be permitted, even if it were permitted before the MODE READER
after a MODE READER command has been sent. Where an extension is only command. The results of LIST EXTENSIONS MAY be different following a
available after a MODE READER command, or where the effects of the MODE READER command than prior to the issuing of that command.
extension will change, the LIST EXTENSIONS command MUST produce
different results that indicate the change.
The server MUST return a response using the same codes as the initial The server MUST return a response using the same codes as the initial
greeting (as described in Section 5.1.1) to indicate its ability to greeting (as described in Section 5.1.1) to indicate its ability to
provide reading service to the client. Note that the response need provide reading service to the client. Note that the response need
not be the same as the one presented during the initial greeting. not be the same as the one presented during the initial greeting.
Once MODE READER is sent, IHAVE (and any extensions intended for
peer-to-peer article transfer) MAY no longer be permitted, even if it
were permitted before the MODE READER command. The results of LIST
EXTENSIONS MAY be different following a MODE READER command than
prior to the issuing of that command.
Servers are encouraged to not require this command even though Servers are encouraged to not require this command even though
clients SHOULD send it when appropriate. It is present to support clients SHOULD send it when appropriate. It is present to support
some news architectures that switch between modes based on whether a some news architectures that switch between modes based on whether a
given connection is a peer-to-peer connection with another server or given connection is a peer-to-peer connection with another server or
a news reading client. a news reading client.
5.2.3 Examples 5.2.3 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
which then terminates the session (see Section 5.4): which then terminates the session (see Section 5.4):
skipping to change at page 23, line 16 skipping to change at page 24, line 14
[S] 502 NNTP Service permanently unavailable [S] 502 NNTP Service permanently unavailable
[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
temporarily unable to provide news reader service: temporarily unable to 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.]
Example of a facility that requires MODE READER before use, using the
preferred response:
[C] GROUP misc.test
[S] 401 MODE-READER currently in peering mode
[C] MODE READER
[S] 200 NNTP Service Ready, posting permitted
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
Example of a facility that requires MODE READER before use, using the
historical but deprecated response:
[C] GROUP misc.test
[S] 502 Not available in peering mode
[C] MODE READER
[S] 200 NNTP Service Ready, posting permitted
[C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test
Example of a facility that cannot be used after MODE READER:
[C] IHAVE <i.am.an.article.you.have@example.com>
[S] 435 Duplicate
[C] MODE READER
[S] 200 Reader mode, posting permitted
[C] IHAVE <i.am.an.article.you.have@example.com>
[S] 502 Permission denied
5.3 LIST EXTENSIONS 5.3 LIST EXTENSIONS
5.3.1 Usage 5.3.1 Usage
This command is optional. This command is optional.
This command MUST NOT be pipelined.
Syntax Syntax
LIST EXTENSIONS LIST EXTENSIONS
Responses Responses
202 Extension list follows (multiline) 202 Extension list follows (multiline)
402 Server has no extensions 402 Server has no extensions
5.3.2 Description 5.3.2 Description
The LIST EXTENSIONS command allows a client to determine which The LIST EXTENSIONS command allows a client to determine which
skipping to change at page 23, line 46 skipping to change at page 25, line 27
This command MUST be implemented by any server that implements any This command MUST be implemented by any server that implements any
extensions defined in this document or any other extension in the extensions defined in this document or any other extension in the
IANA registry, and is optional otherwise. IANA registry, and is optional otherwise.
This command MAY be issued at anytime during a session. It is not This command MAY be issued at anytime during a session. It is not
required that the client issues this command before attempting to required that the client issues this command before attempting to
make use of any extension. The response generated by this command MAY make use of any extension. The response generated by this command MAY
change during a session because of other state information (which in change during a session because of other state information (which in
turn may be changed by the effects of other commands). An NNTP client turn may be changed by the effects of other commands). An NNTP client
MUST NOT cache (for use in another session) any information returned is only able to get the current and correct information concerning
if the LIST EXTENSIONS command succeeds. That is, an NNTP client is
only able to get the current and correct information concerning
available extensions at any point during a session by issuing a LIST available extensions at any point during a session by issuing a LIST
EXTENSIONS command at that point of that session and processing the EXTENSIONS command at that point of that session and processing the
response. response, and the server MUST ensure that those extensions currently
listed in the returned information are available. Therefore, if an
extension (including those in Section 8) is only available before or
after a MODE READER command, the LIST EXTENSIONS command MUST only
include the extension in that situation. Similarly, if only some of
the commands in an extension will be available, or if the behaviour
of the extension will change in some other manner, before or after a
MODE READER command, this MUST be indicated by different arguments to
the extension-label in the results of LIST EXTENSIONS in each
situation.
While some extensions are likely to be always available or never
available, others will "appear" and "disappear" depending on server
state changes within the session or external events between sessions.
An NNTP client may cache the results of this command, but MUST NOT
rely on the correctness of any cached results, whether from earlier
in this session or from a previous session, MUST cope gracefully with
the cached status being out of date, and SHOULD (if caching results)
provide a way to force the cached information to be refreshed.
Furthermore, a client MUST NOT use cached results in relation to
security, privacy, and authentication extensions. See Section 11.6
for further discussion of this topic.
The list of extensions is returned as a multi-line response following The list of extensions is returned as a multi-line response following
the 202 response code. Each extension is listed on a separate line; the 202 response code. Each extension is listed on a separate line;
the line MUST begin with an extension-label and optionally one or the line MUST begin with an extension-label and optionally one or
more parameters (separated by single spaces). The extension-label and more arguments (separated by single spaces). The extension-label and
the meaning of the parameters are specified as part of the definition the meaning of the arguments are specified as part of the definition
of the extension. The extension-label is a string of 1 to 12 US-ASCII of the extension. The extension-label is a string of 1 to 12 US-ASCII
letters and MUST be in uppercase. Parameters are strings of 1 or more letters and MUST be in uppercase. Arguments are strings of 1 or more
printable UTF-8 characters (that is, either printable US-ASCII printable UTF-8 characters (that is, either printable US-ASCII
characters or any UTF-8 sequence outside the US-ASCII range, but not characters or any UTF-8 sequence outside the US-ASCII range, but not
space or TAB). space or TAB).
The server MUST NOT list the same extension twice in the response, The server MUST NOT list the same extension twice in the response,
and MUST list all supported extensions. The order in which the and MUST list all supported extensions. The order in which the
extensions are listed is not significant. The server need not even extensions are listed is not significant. The server need not even
consistently return the same order. If the server does not support consistently return the same order. If the server does not support
any extensions, it MUST return an empty list. The 402 response code any extensions, it MUST return an empty list. The 402 response code
is documented for historic reasons only; clients SHOULD handle it is documented for historic reasons only; clients SHOULD handle it
skipping to change at page 27, line 7 skipping to change at page 29, line 7
411 No such newsgroup 411 No such newsgroup
Parameters Parameters
group = name of newsgroup group = name of newsgroup
number = estimated number of articles in the group number = estimated number of articles in the group
low = reported low water mark low = reported low water mark
high = reported high water mark high = reported high water mark
6.1.1.2 Description 6.1.1.2 Description
The required parameter is the name of the newsgroup to be selected The required argument is the name of the newsgroup to be selected
(e.g. "news.software.b"). A list of valid newsgroups may be obtained (e.g. "news.software.b"). A list of valid newsgroups may be obtained
by using the LIST ACTIVE command (see Section 7.6.1). by using the LIST ACTIVE command (see Section 7.6.1).
The successful selection response will return the article numbers of The successful selection response will return the article numbers of
the first and last articles in the group at the moment of selection 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 (these numbers are referred to as the "reported low water mark" and
the "reported high water mark"), and an estimate of the number of the "reported high water mark"), and an estimate of the number of
articles in the group currently available. articles in the group currently available.
If the group is not empty, the estimate MUST be at least the actual If the group is not empty, the estimate MUST be at least the actual
skipping to change at page 32, line 28 skipping to change at page 34, line 28
responding to one of these commands, the server MUST present the responding to one of these commands, the server MUST present the
entire article or appropriate part and MUST NOT attempt to alter or entire article or appropriate part and MUST NOT attempt to alter or
translate it in any way. translate it in any way.
6.2.1 ARTICLE 6.2.1 ARTICLE
6.2.1.1 Usage 6.2.1.1 Usage
Syntax Syntax
ARTICLE message-id ARTICLE message-id
ARTICLE [number] ARTICLE number
ARTICLE
Responses Responses
First form (message-id specified) First form (message-id specified)
220 0 message-id Article follows (multiline) 220 0 message-id Article follows (multiline)
430 No article found with that message-id 430 No article with that message-id
Second form (optional article number specified) Second form (article number specified)
220 n message-id Article follows (multiline) 220 n message-id Article follows (multiline)
412 No newsgroup selected 412 No newsgroup selected
420 Current article number is invalid [1] 423 No articles in that range
423 No such article in this newsgroup
Third form (current article number used)
220 n message-id Article follows (multiline)
412 No newsgroup selected
420 Current article number is invalid
Parameters Parameters
number = Requested article number number = Requested article number
n = Returned article number n = Returned article number
message-id = Article message-id message-id = Article message-id
[1] The 420 response can only occur if no article number has been
specified.
6.2.1.2 Description 6.2.1.2 Description
The ARTICLE command selects an article based on the arguments and The ARTICLE command selects an article based on the arguments and
presents the entire article (that is, the headers, an empty line, and presents the entire article (that is, the headers, an empty line, and
the body in that order). The command has two forms. the body in that order). The command has three forms.
In the first form, a message-id is specified and the server presents In the first form, a message-id is specified and the server presents
the article with that message-id. In this case, the server MUST NOT the article with that message-id. In this case, the server MUST NOT
alter the current selected newsgroup or current article number. This alter the current selected newsgroup or current article number. This
is both to facilitate the presentation of articles that may be is both to facilitate the presentation of articles that may be
referenced within another article being read, and because of the referenced within another article being read, and because of the
semantic difficulties of determining the proper sequence and semantic difficulties of determining the proper sequence and
membership of an article that may have been crossposted to more than membership of an article that may have been crossposted to more than
one newsgroup. one newsgroup.
In the response, the article number is replaced with zero (that is, In the response, the article number is replaced with zero (that is,
the server is not required to determine whether the article is in the the server is not required to determine whether the article is in the
current group or what article number(s) it has). current selected newsgroup or what article number(s) it has).
In the second form, an article number may be specified. If so, and if In the second form, an article number is specified. If there is an
there is an article with that number in the currently selected article with that number in the current selected newsgroup, the
newsgroup, the server MUST set the current article number to that server MUST set the current article number to that number.
number.
Then, whether or not a number was specified, the article indicated by In the third form, the article indicated by the current article
the current article number is presented to the client. number in the current selected newsgroup is used.
Note that a previously valid article number MAY become invalid if the Note that a previously valid article number MAY become invalid if the
article has been removed. A previously invalid article number MAY article has been removed. A previously invalid article number MAY
become valid if the article has been reinstated, but such an article 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 number MUST be no less than the reported low water mark for that
group. group.
The server MUST NOT change the current selected newsgroup as a result The server MUST NOT change the current selected newsgroup as a result
of this command. The server MUST NOT change the current article of this command. The server MUST NOT change the current article
number except when an article number argument was provided and the number except when an article number argument was provided and the
skipping to change at page 33, line 52 skipping to change at page 35, line 51
unsuccessful response. unsuccessful response.
Since the message-id is unique for each article, it may be used by a Since the message-id is unique for each article, it may be used by a
client to skip duplicate displays of articles that have been posted client to skip duplicate displays of articles that have been posted
more than once, or to more than one newsgroup. more than once, or to more than one newsgroup.
The article is returned as a multi-line response following the 220 The article is returned as a multi-line response following the 220
response code. response code.
If the argument is a message-id and no such article exists, a 430 If the argument is a message-id and no such article exists, a 430
response MUST be returned. If the current article number is invalid, response MUST be returned. If the argument is a number or is omitted
a 420 response MUST be returned. If there is no article with the and the current selected newsgroup is invalid, a 412 response MUST be
specified number, a 423 response MUST be returned. If the current returned. If the argument is a number and that article does not exist
selected newsgroup is invalid, a 412 response MUST be returned. in the current selected newsgroup, a 423 response MUST be returned.
If the argument is omitted and the current article number is invalid,
a 420 response MUST be returned.
6.2.1.3 Examples 6.2.1.3 Examples
Example of a successful retrieval of an article (using no article Example of a successful retrieval of an article (using no article
number): number):
[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@example.com> [S] 220 3000234 <45223423@example.com>
skipping to change at page 35, line 28 skipping to change at page 37, line 29
[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
6.2.2 HEAD 6.2.2 HEAD
6.2.2.1 Usage 6.2.2.1 Usage
Syntax Syntax
HEAD message-id HEAD message-id
HEAD [number] HEAD number
HEAD
Responses Responses
First form (message-id specified) First form (message-id specified)
221 0 message-id Headers follow (multiline) 221 0 message-id Headers follow (multiline)
430 No article found with that message-id 430 No article with that message-id
Second form (optional article number specified) Second form (article number specified)
221 n message-id Headers follow (multiline) 221 n message-id Headers follow (multiline)
412 No newsgroup selected 412 No newsgroup selected
420 Current article number is invalid [1] 423 No articles in that range
423 No such article in this newsgroup
Third form (current article number used)
221 n message-id Headers follow (multiline)
412 No newsgroup selected
420 Current article number is invalid
Parameters Parameters
number = Requested article number number = Requested article number
n = Returned article number n = Returned article number
message-id = Article message-id message-id = Article message-id
[1] The 420 response can only occur if no article number has been
specified.
6.2.2.2 Description 6.2.2.2 Description
The HEAD command behaves identically to the ARTICLE command except The HEAD command behaves identically to the ARTICLE command except
that, if the article exists, the response code is 221 instead of 220 that, if the article exists, the response code is 221 instead of 220
and only the headers are presented (the empty line separating the and only the headers are presented (the empty line separating the
headers and body MUST NOT be included). headers and body MUST NOT be included).
6.2.2.3 Examples 6.2.2.3 Examples
Example of a successful retrieval of the headers of an article (using Example of a successful retrieval of the headers of an article (using
skipping to change at page 37, line 31 skipping to change at page 39, line 37
[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
6.2.3 BODY 6.2.3 BODY
6.2.3.1 Usage 6.2.3.1 Usage
Syntax Syntax
BODY message-id BODY message-id
BODY [number] BODY number
BODY
Responses Responses
First form (message-id specified) First form (message-id specified)
222 0 message-id Body follows (multiline) 222 0 message-id Body follows (multiline)
430 No article found with that message-id 430 No article with that message-id
Second form (optional article number specified) Second form (article number specified)
222 n message-id Body follows (multiline) 222 n message-id Body follows (multiline)
412 No newsgroup selected 412 No newsgroup selected
420 Current article number is invalid [1] 423 No articles in that range
423 No such article in this newsgroup Third form (current article number used)
222 n message-id Body follows (multiline)
412 No newsgroup selected
420 Current article number is invalid
Parameters Parameters
number = Requested article number number = Requested article number
n = Returned article number n = Returned article number
message-id = Article message-id message-id = Article message-id
[1] The 420 response can only occur if no article number has been
specified.
6.2.3.2 Description 6.2.3.2 Description
The BODY command behaves identically to the ARTICLE command except The BODY command behaves identically to the ARTICLE command except
that, if the article exists, the response code is 222 instead of 220 that, if the article exists, the response code is 222 instead of 220
and only the body is presented (the empty line separating the headers and only the body is presented (the empty line separating the headers
and body MUST NOT be included). and body MUST NOT be included).
6.2.3.3 Examples 6.2.3.3 Examples
skipping to change at page 39, line 23 skipping to change at page 41, line 29
[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
6.2.4 STAT 6.2.4 STAT
6.2.4.1 Usage 6.2.4.1 Usage
Syntax Syntax
STAT message-id STAT message-id
STAT [number] STAT number
STAT
Responses Responses
First form (message-id specified) First form (message-id specified)
223 0 message-id Article exists 223 0 message-id Article exists
430 No article found with that message-id 430 No article with that message-id
Second form (optional article number specified) Second form (article number specified)
223 n message-id Article exists 223 n message-id Article exists
412 No newsgroup selected 412 No newsgroup selected
420 Current article number is invalid [1] 423 No articles in that range
423 No such article in this newsgroup
Third form (current article number used)
223 n message-id Article exists
412 No newsgroup selected
420 Current article number is invalid
Parameters Parameters
number = Requested article number number = Requested article number
n = Returned article number n = Returned article number
message-id = Article message-id message-id = Article message-id
[1] The 420 response can only occur if no article number has been
specified.
6.2.4.2 Description 6.2.4.2 Description
The STAT command behaves identically to the ARTICLE command except The STAT command behaves identically to the ARTICLE command except
that, if the article exists, it is NOT presented to the client and that, if the article exists, it is NOT presented to the client and
the response code is 223 instead of 220. Note that the response is the response code is 223 instead of 220. Note that the response is
NOT multi-line. NOT multi-line.
This command allows the client to determine whether an article This command allows the client to determine whether an article
exists, and in the second form what its message-id is, without having exists, and in the second and third forms what its message-id is,
to process an arbitrary amount of text. without having to process an arbitrary amount of text.
6.2.4.3 Examples 6.2.4.3 Examples
Example of STAT on an existing article (using no article number): Example of STAT on an existing article (using no article number):
[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@example.com> [S] 223 3000234 <45223423@example.com>
skipping to change at page 48, line 33 skipping to change at page 51, line 33
"GMT" specifies that the date and time are given in Coordinated "GMT" specifies that the date and time are given in Coordinated
Universal Time [TF.686-1]; if it is omitted then the date and time Universal Time [TF.686-1]; if it is omitted then the date and time
are specified in the server's local timezone. Note that there is no are specified in the server's local timezone. Note that there is no
way using the protocol specified in this document to establish the way using the protocol specified in this document to establish the
server's local timezone. server's local timezone.
Note that an empty list is a possible valid response and indicates Note that an empty list is a possible valid response and indicates
that there are no new newsgroups since that date-time. that there are no new newsgroups since that date-time.
Clients SHOULD make all queries using Coordinated Universal Time Clients SHOULD make all queries using Coordinated Universal Time
(i.e. by including the "GMT" parameter) when possible. (i.e. by including the "GMT" argument) when possible.
7.3.3 Examples 7.3.3 Examples
Example where there are new groups: Example where there are new groups:
[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.fc-writers.recovery 4 1 y [S] alt.fc-writers.recovery 4 1 y
[S] tx.natives.recovery 89 56 y [S] tx.natives.recovery 89 56 y
[S] . [S] .
skipping to change at page 49, line 37 skipping to change at page 52, line 37
MAY appear more than once; if it does so, it has the same meaning as MAY appear more than once; if it does so, it has the same meaning as
if it appeared only once. if it appeared only once.
Date and time are in the same format as the NEWGROUPS command (see Date and time are in the same format as the NEWGROUPS command (see
Section 7.3). Section 7.3).
Note that an empty list is a possible valid response and indicates Note that an empty list is a possible valid response and indicates
that there is currently no new news in the relevant groups. that there is currently no new news in the relevant groups.
Clients SHOULD make all queries in Coordinated Universal Time (i.e. Clients SHOULD make all queries in Coordinated Universal Time (i.e.
by using the "GMT" parameter) when possible. by using the "GMT" argument) when possible.
7.4.3 Examples 7.4.3 Examples
Example where there are new articles: Example where there are new articles:
[C] NEWNEWS news.*,sci.* 19990624 000000 GMT [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@example.com> [S] <i.am.a.new.article@example.com>
[S] <i.am.another.new.article@example.com> [S] <i.am.another.new.article@example.com>
[S] . [S] .
skipping to change at page 51, line 34 skipping to change at page 54, line 34
LIST ACTIVE [wildmat] LIST ACTIVE [wildmat]
Responses Responses
215 Information follows (multiline) 215 Information follows (multiline)
Parameters Parameters
wildmat = groups of interest wildmat = groups of interest
7.6.1.2 Description 7.6.1.2 Description
The LIST ACTIVE command with no parameters returns a list of valid The LIST ACTIVE command with no arguments returns a list of valid
newsgroups and associated information. The server MUST include every newsgroups and associated information. The server MUST include every
group that the client is permitted to select with the GROUP (Section group that the client is permitted to select with the GROUP (Section
6.1.1) command. Each newsgroup is sent as a line of text in the 6.1.1) command. Each newsgroup is sent as a line of text in the
following format: following format:
group high low status group high low status
where: where:
"group" is the name of the newsgroup; "group" is the name of the newsgroup;
skipping to change at page 52, line 35 skipping to change at page 55, line 35
extension or may be private to the server. A client SHOULD treat an extension or may be private to the server. A client SHOULD treat an
unrecognised status as giving no information. unrecognised status as giving no information.
The status of a newsgroup only indicates how posts to that newsgroup The status of a newsgroup only indicates how posts to that newsgroup
are normally processed and is not necessarily customised to the are normally processed and is not necessarily customised to the
specific client. For example, if the current client is forbidden from specific client. For example, if the current client is forbidden from
posting, then this will apply equally to groups with status "y". posting, then this will apply equally to groups with status "y".
Conversely, a client with special privileges (not defined by this Conversely, a client with special privileges (not defined by this
specification) might be able to post to a group with status "n". specification) might be able to post to a group with status "n".
If the optional wildmat parameter is specified, the response is If the optional wildmat argument is specified, the response is
limited to only the groups (if any) whose names match the wildmat. If limited to only the groups (if any) whose names match the wildmat. If
no wildmat is specified, the keyword ACTIVE MAY be omitted without no wildmat is specified, the keyword ACTIVE MAY be omitted without
altering the effect of the command. altering the effect of the command.
7.6.1.3 Examples 7.6.1.3 Examples
Example of LIST ACTIVE returning a list of newsgroups: Example of LIST ACTIVE returning a list of newsgroups:
[C] LIST ACTIVE [C] LIST ACTIVE
[S] 215 list of newsgroups follows [S] 215 list of newsgroups follows
skipping to change at page 54, line 12 skipping to change at page 57, line 12
MAY omit all groups created before the date and time of the oldest MAY omit all groups created before the date and time of the oldest
entry. The client MUST NOT assume that the list is complete or that entry. The client MUST NOT assume that the list is complete or that
it matches the list returned by LIST ACTIVE. The NEWGROUPS command it matches the list returned by LIST ACTIVE. The NEWGROUPS command
(Section 7.3) may provide a better way to access this information and (Section 7.3) may provide a better way to access this information and
the results of the two commands SHOULD be consistent (subject to the the results of the two commands SHOULD be consistent (subject to the
caveats in the description of that command). caveats in the description of that command).
If the information is available, it is returned as a multi-line If the information is available, it is returned as a multi-line
response following the 215 response code. response following the 215 response code.
If the optional wildmat parameter is specified, the response is If the optional wildmat argument is specified, the response is
limited to only the groups (if any) whose names match the wildmat and limited to only the groups (if any) whose names match the wildmat and
for which the information is available. Note that an empty list is a for which the information is available. Note that an empty list is a
possible valid response (whether or not a wildmat is specified) and possible valid response (whether or not a wildmat is specified) and
indicates that there are no such groups. indicates that there are no such groups.
7.6.2.3 Examples 7.6.2.3 Examples
Example of LIST ACTIVE.TIMES returning a list of newsgroups: Example of LIST ACTIVE.TIMES returning a list of newsgroups:
[C] LIST ACTIVE.TIMES [C] LIST ACTIVE.TIMES
skipping to change at page 57, line 39 skipping to change at page 60, line 39
description of the group. description of the group.
The list MAY omit newsgroups for which the information is unavailable The list MAY omit newsgroups for which the information is unavailable
and MAY include groups not available on the server. The client MUST and MAY include groups not available on the server. The client MUST
NOT assume that the list is complete or that it matches the list NOT assume that the list is complete or that it matches the list
returned by LIST ACTIVE. returned by LIST ACTIVE.
If the information is available, it is returned as a multi-line If the information is available, it is returned as a multi-line
response following the 215 response code. response following the 215 response code.
If the optional wildmat parameter is specified, the response is If the optional wildmat argument is specified, the response is
limited to only the groups (if any) whose names match the wildmat and limited to only the groups (if any) whose names match the wildmat and
for which the information is available. Note that an empty list is a for which the information is available. Note that an empty list is a
possible valid response (whether or not a wildmat is specified) and possible valid response (whether or not a wildmat is specified) and
indicates that there are no such groups. indicates that there are no such groups.
7.6.5.3 Examples 7.6.5.3 Examples
Example of LIST NEWSGROUPS returning a list of newsgroups: Example of LIST NEWSGROUPS returning a list of newsgroups:
[C] LIST NEWSGROUPS [C] LIST NEWSGROUPS
skipping to change at page 59, line 49 skipping to change at page 62, line 49
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 is a
string of 1 to 12 uppercase US-ASCII letters. The extension-label string of 1 to 12 uppercase US-ASCII letters. The extension-label
will often be the name of a new command that the extension adds. will often be the name of a new command that the extension adds.
However this is not a requirement: an extension might not add any new However this is not a requirement: an extension might not add any new
commands or keywords. 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 included in
the IANA registry and is defined in an RFC. Such RFCs either must be the IANA registry and is defined in an RFC. Such RFCs either must be
on the standards-track or must define an IESG-approved experimental on the standards track or must define an IESG-approved experimental
protocol. protocol.
The definition of an extension must include: The definition of an extension must include:
o a descriptive name for the extension o a descriptive name for the extension;
o the extension-label (which is returned by LIST EXTENSIONS to o the extension-label (which is returned by LIST EXTENSIONS to
indicate to the client that the server supports this particular indicate to the client that the server supports this particular
extension) - the extension-label of a registered extension MUST extension) - the extension-label of a registered extension MUST
NOT begin with "X"; NOT begin with "X";
o the syntax, values, and meanings of any parameters following the o the syntax, values, and meanings of any arguments following the
extension-label in the output of LIST EXTENSIONS extension-label in the output of LIST EXTENSIONS;
o any new NNTP commands associated with the extension - the names of o any new NNTP commands associated with the extension - the names of
commands associated with registered extensions MUST NOT begin with commands associated with registered extensions MUST NOT begin with
"X"; "X";
o the syntax and possible values of parameters associated with the o the syntax and possible values of arguments associated with the
new NNTP commands new NNTP commands;
o the response codes and possible values of parameters for the o the response codes and possible values of arguments for the
responses of the new NNTP commands responses of the new NNTP commands;
o any new parameters the extension associates with any other o any new arguments the extension associates with any other
pre-existing NNTP commands pre-existing NNTP commands;
o how support for the extension affects the behavior of a server and o how support for the extension affects the behavior of a server and
NNTP client NNTP client;
o any increase in the maximum length of commands and initial o any increase in the maximum length of commands and initial
response lines over the value specified in this document response lines over the value specified in this document;
o a specific statement about the effect on pipelining this extension o a specific statement about the effect on pipelining this extension
may have (if any) may have (if any);
o a specific statement about the circumstances when use of this
extension can alter the output from LIST EXTENSIONS;
o the circumstances under which the extension can cause any
pre-existing command to produce a 401, 480, or 483 response;
o whether the extension can be used before or after the MODE READER
command, and what changes (if any) the latter has on the
extension.
A private extension need not be included in the output of LIST A private extension need not be included in the output of LIST
EXTENSIONS. A server MAY provide additional keywords - either for new EXTENSIONS. A server MAY provide additional keywords - either for new
commands or new variants of existing commands - as part of a private commands or new variants of existing commands - as part of a private
extension. To avoid the risk of a clash with a future registered extension. To avoid the risk of a clash with a future registered
extension, the names of private extensions and commands defined by extension, the names of private extensions and commands defined by
them SHOULD begin with "X". them SHOULD begin with "X".
A server MUST NOT send different response codes to basic NNTP A server MUST NOT send different response codes to basic NNTP
commands documented here or commands documented in registered commands documented here or commands documented in registered
extensions in response to the availability or use of a private extensions in response to the availability or use of a private
extension. extension.
8.1 Initial IANA registry 8.1 Initial IANA registry
The IANA's initial registry of NNTP service extensions consists of The IANA's initial registry of NNTP service extensions consists of
these entries: these entries:
Extension Label Added behavior +-------------------------+--------------+--------------------------+
Specific article numbers LISTGROUP Defined in this document | Extension | Label | Added behaviour |
Overview support OVER Defined in this document +-------------------------+--------------+--------------------------+
Batched header retrieval HDR Defined in this document | Specific article | LISTGROUP | Defined in this document |
| numbers | | |
| | | |
| Overview support | OVER | Defined in this document |
| | | |
| Batched header | HDR | Defined in this document |
| retrieval | | |
+-------------------------+--------------+--------------------------+
8.2 Standard extensions 8.2 Standard extensions
Each of the following sections describes an extension that a server Each of the following sections describes an extension that a server
MAY provide. If the server provides the extension, it MUST include MAY provide. If the server provides the extension, it MUST include
the appropriate extension label in the response to LIST EXTENSIONS. the appropriate extension label in the response to LIST EXTENSIONS.
If it does not provide it, it MUST NOT include the appropriate If it does not provide it, it MUST NOT include the appropriate
extension label. The descriptions of facilities in each section are extension label. The descriptions of facilities in each section are
written as if the extension is provided. If it is not provided, the written as if the extension is provided. If it is not provided, the
entire section should be ignored. entire section should be ignored.
The formal definitions of these extensions are provided in Appendix
D.
If the server provides an extension, it MUST implement all of the If the server provides an extension, it MUST implement all of the
commands in the specification of the extension except for those commands in the specification of the extension except for those
marked as optional. If it does not provide an extension, it MUST NOT marked as optional. If it does not provide an extension, it MUST NOT
implement any of the commands in the specification of that extension. implement any of the commands in the specification of that extension.
8.3 The LISTGROUP extension 8.3 The LISTGROUP extension
This extension provides one command and has the extension label This extension provides one command and has the extension label
LISTGROUP. LISTGROUP.
skipping to change at page 62, line 4 skipping to change at page 65, line 20
Responses Responses
211 number low high group Article numbers follow (multiline) 211 number low high group Article numbers follow (multiline)
411 No such newsgroup 411 No such newsgroup
412 No newsgroup selected [1] 412 No newsgroup selected [1]
Parameters Parameters
group = name of newsgroup group = name of newsgroup
number = estimated number of articles in the group number = estimated number of articles in the group
low = reported low water mark low = reported low water mark
high = reported high water mark high = reported high water mark
[1] The 412 response can only occur if no group has been specified. [1] The 412 response can only occur if no group has been specified.
8.3.1.2 Description 8.3.1.2 Description
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 article
numbers in a particular newsgroup. numbers in a particular newsgroup.
The optional parameter is the name of the newsgroup to be selected The optional argument is the name of the newsgroup to be selected
(e.g. "news.software.misc"). A list of valid newsgroups may be (e.g. "news.software.misc"). A list of valid newsgroups may be
obtained from the LIST ACTIVE command. If no group is specified, the obtained from the LIST ACTIVE command. If no group is specified, the
current selected newsgroup is used. current selected newsgroup is used.
The list of article numbers is returned as a multi-line response The list of article numbers is returned as a multi-line response
following the 211 response code (the parameters on the initial following the 211 response code (the arguments on the initial
response line are the same as for the GROUP command (see Section response line are the same as for the GROUP command (see Section
6.1.1). The list contains one number per line, is in numerical order, 6.1.1). The list contains one number per line, is in numerical order,
and lists precisely those articles that exist in the group. and lists precisely those articles that exist in the group.
When a valid group is selected by means of this command, the current When a valid group is selected by means of this command, the current
selected newsgroup MUST be set to that group and the current article selected newsgroup MUST be set to that group and the current article
number MUST be set to the first article in the group. If an empty number MUST be set to the first article in the group. If an empty
newsgroup is selected, the current article pointer is made invalid. newsgroup is selected, the current article pointer is made invalid.
If an invalid group is specified, the current selected newsgroup and If an invalid group is specified, the current selected newsgroup and
current article number MUST NOT be changed. current article number MUST NOT be changed.
skipping to change at page 64, line 40 skipping to change at page 68, line 9
inconsistent). It MUST NOT include fields for which the database is inconsistent). It MUST NOT include fields for which the database is
inconsistent or which are not stored in the database. Therefore if a inconsistent or which are not stored in the database. Therefore if a
header appears in the LIST OVERVIEW.FMT output but not the OVER header appears in the LIST OVERVIEW.FMT output but not the OVER
output for a given article, that header does not appear in the output for a given article, that header does not appear in the
article, and similarly for metadata items. article, and similarly for metadata items.
These rules assume the fields being stored in the database remain These rules assume the fields being stored in the database remain
constant for long periods of time, with the database therefore being constant for long periods of time, with the database therefore being
consistent. When the set of fields to be stored is changed, it will consistent. When the set of fields to be stored is changed, it will
be inconsistent until either the database is rebuilt or the only be inconsistent until either the database is rebuilt or the only
articles remaining are those received during the change. Therefore articles remaining are those received since the change. Therefore the
the output from LIST OVERVIEW.FMT needs to be altered twice: before output from LIST OVERVIEW.FMT needs to be altered twice: before any
any fields stop being stored, they MUST be removed from the output, fields stop being stored, they MUST be removed from the output, then
then when the database is once more known to be consistent, the new when the database is once more known to be consistent, the new fields
fields SHOULD be added to the output. SHOULD be added to the output.
This extension is based on the Overview/NOV database [ROBE1995] This extension is based on the Overview/NOV database [ROBE1995]
developed by Geoff Collyer. developed by Geoff Collyer.
8.5.1 OVER 8.5.1 OVER
8.5.1.1 Usage 8.5.1.1 Usage
Syntax Syntax
OVER message-id OVER message-id
OVER [range] OVER range
OVER
Responses Responses
First form (message-id specified) First form (message-id specified)
224 Overview information follows (multiline) 224 Overview information follows (multiline)
430 No article found with that message-id 430 No article with that message-id
Second form (optional range specified) Second form (range specified)
224 Overview information follows (multiline) 224 Overview information follows (multiline)
412 No newsgroup selected 412 No newsgroup selected
420 Current article number is invalid [1]
423 No articles in that range 423 No articles in that range
Parameters Third form (current article number used)
message-id = Article message-id 224 Overview information follows (multiline)
range = Article(s) to return information for 412 No newsgroup selected
420 Current article number is invalid
[1] The 420 response can only occur if no article number has been Parameters
specified. range = number(s) of articles
message-id = message-id of article
8.5.1.2 Description 8.5.1.2 Description
The OVER command returns the contents of the headers and metadata in The OVER command returns the contents of the headers and metadata in
the database for the article(s) specified. the database for an article specified by message-id, or from a
specified article or range of articles in the current selected
newsgroup.
In the first form the article is specified by message-id. In the The message-id argument indicates a specific article. The range
second form articles in the current selected newsgroup are specified argument may be any of the following:
using the optional range argument, which may be any of the following:
o an article number o an article number
o an article number followed by a dash to indicate all following o an article number followed by a dash to indicate all following
o an article number followed by a dash followed by another article o an article number followed by a dash followed by another article
number number
If no argument is specified, then the current article number is used. If neither is specified, the current article number is used.
If the information is available, it is returned as a multi-line If the information is available, it is returned as a multi-line
response following the 224 response code. If the argument is a response following the 224 response code and contains one line per
message-id and no such article exists, a 430 response MUST be
returned. If the current selected newsgroup is invalid, a 412
response MUST be returned. If there are no articles in the range
specified, a 423 response MUST be returned. If OVER is sent without
any arguments and the current article number is invalid, a 420
response MUST be returned.
For a successful response, the output consists of one line per
article, sorted in numerical order of article number (note that article, sorted in numerical order of article number (note that
unless the argument is a range including a dash, there will only be unless the argument is a range including a dash, there will only be
one line but it will still be in multi-line format). Each line one line but it will still be in multi-line format). Each line
consists of a number of fields separated by a TAB. A field may be consists of a number of fields separated by a TAB. A field may be
empty (in which case there will be two adjacent TABs), and a sequence empty (in which case there will be two adjacent TABs), and a sequence
of trailing TABs may be omitted. of trailing TABs may be omitted.
The first 8 fields MUST be the following, in order: The first 8 fields MUST be the following, in order:
"0" (first form) or article number (second form) "0" (first form) or article number (second form)
skipping to change at page 67, line 17 skipping to change at page 70, line 27
Nevertheless, servers SHOULD check for these characters and replace Nevertheless, servers SHOULD check for these characters and replace
each one by a single space (so that, for example, CR LF LF TAB will each one by a single space (so that, for example, CR LF LF TAB will
become two spaces, since the CR and first LF will be removed by the become two spaces, since the CR and first LF will be removed by the
unfolding process). This will encourage robustness in the face of unfolding process). This will encourage robustness in the face of
non-conforming data; it is also possible that future versions of this non-conforming data; it is also possible that future versions of this
specification may permit these characters to appear in articles. specification may permit these characters to appear in articles.
The server SHOULD NOT produce output for articles that no longer The server SHOULD NOT produce output for articles that no longer
exist. exist.
If the argument is a message-id and no such article exists, a 430
response MUST be returned. If the argument is a range or is omitted
and the current selected newsgroup is invalid, a 412 response MUST be
returned. If the argument is a range and no articles in that number
range exist in the current selected newsgroup, a 423 response MUST be
returned. If the argument is omitted and the current article number
is invalid, a 420 response MUST be returned.
8.5.1.3 Examples 8.5.1.3 Examples
In the first three examples, TAB has been replaced by vertical bar In the first three examples, TAB has been replaced by vertical bar
and some lines have been folded for readability. and some lines have been folded for readability.
Example of a successful retrieval of overview information for an Example of a successful retrieval of overview information for an
article (using no article number): article (using no article number):
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
skipping to change at page 70, line 39 skipping to change at page 74, line 5
[S] From: [S] From:
[S] Date: [S] Date:
[S] Message-ID: [S] Message-ID:
[S] References: [S] References:
[S] Bytes: [S] Bytes:
[S] Lines: [S] Lines:
[S] Xref:full [S] Xref:full
[S] Distribution:full [S] Distribution:full
[S] . [S] .
Example of LIST OVERVIEW.FMT returning an error: Example of LIST OVERVIEW.FMT returning an error where the command is
recognised but the software does not maintain this information:
[C] LIST OVERVIEW.FMT [C] LIST OVERVIEW.FMT
[S] 503 overview.fmt not available [S] 503 overview.fmt not available
8.6 The HDR extension 8.6 The HDR extension
This extension provides two new commands: HDR and LIST HEADERS. The This extension provides two new commands: HDR and LIST HEADERS. The
label for this extension is HDR. label for this extension is HDR.
The HDR extension provides access to specific headers and metadata The HDR extension provides access to specific headers and metadata
items (collectively "fields") of articles or groups of articles. In items (collectively "fields") of articles or groups of articles. In
the case of headers, an implementation MAY restrict the use of this the case of headers, an implementation MAY restrict the use of this
extension to a specific list of headers or MAY allow it to be used extension to a specific list of headers or MAY allow it to be used
with any header. In the latter case it MUST use the parameter "ALL" with any header. In the latter case it MUST use the argument "ALL"
following the extension label in the output of LIST EXTENSIONS; in following the extension label in the output of LIST EXTENSIONS; in
the former case it MUST NOT use any parameter. the former case it MUST NOT use any argument.
The HDR command may take information from a database rather than
directly from the articles. If so, the same issues of consistency and
inconsistency apply as with the OVER extension (Section 8.5) and the
LIST HEADERS command SHOULD take the same approach as the LIST
OVERVIEW.FMT command in resolving them.
8.6.1 HDR 8.6.1 HDR
8.6.1.1 Usage 8.6.1.1 Usage
Syntax Syntax
HDR header range
HDR header message-id HDR header message-id
HDR header range
HDR header HDR header
Responses Responses
First form (range specified) First form (message-id specified)
225 Headers follow (multiline)
412 No newsgroup selected
423 No articles in that range
Second form (message-id specified)
225 Headers follow (multiline) 225 Headers follow (multiline)
430 No article with that message-id 430 No article with that message-id
Second form (range specified)
225 Headers follow (multiline)
412 No newsgroup selected
423 No articles in that range
Third form (current article number used) Third form (current article number used)
225 Headers follow (multiline) 225 Headers follow (multiline)
412 No newsgroup selected 412 No newsgroup selected
420 Current article number is invalid 420 Current article number is invalid
Parameters Parameters
header = name of header, without the colon header = name of header, without the colon
range = number(s) of articles range = number(s) of articles
message-id = message-id of article message-id = message-id of article
8.6.1.2 Description 8.6.1.2 Description
The HDR command retrieves specific headers from an article or The HDR command retrieves specific headers from an article specified
specified range of articles in the current selected newsgroup, or by message-id, or from a specified article or range of articles in
from an article specified by message-id. It can also return certain the current selected newsgroup. It can also return certain metadata
metadata about the article or articles. about the article or articles.
The required header parameter is the name of a header (e.g. The required header argument is the name of a header (e.g. "subject")
"subject") in an article, or the name of a metadata item, and is in an article, or the name of a metadata item, and is
case-insensitive. Names of metadata items always begin with a colon. case-insensitive. Names of metadata items always begin with a colon.
Except where stated otherwise, metadata items are treated as if they Except where stated otherwise, metadata items are treated as if they
were header contents, and references to headers in this description were header contents, and references to headers in this description
apply equally to metadata items. apply equally to metadata items.
The range parameter may be any of the following: The message-id argument indicates a specific article. The range
argument may be any of the following:
o an article number o an article number
o an article number followed by a dash to indicate all following o an article number followed by a dash to indicate all following
o an article number followed by a dash followed by another article o an article number followed by a dash followed by another article
number number
The message-id argument indicates a specific article. As shown by the If neither is specified, the current article number is used.
syntax, the range and message-id arguments are mutually exclusive; if
neither is specified, the current article number is used.
If the information is available, it is returned as a multi-line If the information is available, it is returned as a multi-line
response following the 225 response code and contains one line for response following the 225 response code and contains one line for
each article where the relevant header line or metadata item exists. each article where the relevant header line or metadata item exists
(note that unless the argument is a range including a dash, there
will be at most one line but it will still be in multi-line format).
The line consists of the article number, a space, and then the The line consists of the article number, a space, and then the
contents of the header (without the header name or the colon and contents of the header (without the header name or the colon and
space that follow it) or metadata item. If the article is specified space that follow it) or metadata item. If the article is specified
by message-id rather than by article range, the article number is by message-id, the article number is given as "0".
given as "0".
Header contents are modified as follows: all CRLF pairs are removed, Header contents are modified as follows: all CRLF pairs are removed,
and then each TAB is replaced with a single space (note that this is and then each TAB is replaced with a single space (note that this is
the same transformation as is performed by the OVER extension the same transformation as is performed by the OVER extension
(Section 8.5.1.2), and the same comment concerning NUL, CR, and LF (Section 8.5.1.2), and the same comment concerning NUL, CR, and LF
applies). applies).
The header content is in all cases taken from the article. This means The header content is in all cases taken from the article. This means
that, for example, a request for the header "Lines" returns the that, for example, a request for the header "Lines" returns the
contents of the "Lines" header of the specified articles, if any, not contents of the "Lines" header of the specified articles, if any, not
skipping to change at page 72, line 48 skipping to change at page 76, line 23
header occurs in a given article multiple times, only the content of header occurs in a given article multiple times, only the content of
the first occurrence is returned by HDR. the first occurrence is returned by HDR.
If the requested header is not present in the article or if it is If the requested header is not present in the article or if it is
present but empty, a line for that article is included in the output present but empty, a line for that article is included in the output
but the header content portion of the line is empty (the space after but the header content portion of the line is empty (the space after
the article number MAY be retained or omitted). If any article number the article number MAY be retained or omitted). If any article number
in the provided range does not exist in the group, no line for that in the provided range does not exist in the group, no line for that
article number is included in the output. article number is included in the output.
If the optional argument is a message-id and no such article exists, If the second argument is a message-id and no such article exists, a
a 430 response MUST be returned. If the optional argument is not a 430 response MUST be returned. If the second argument is a range or
message-id and the current selected newsgroup is invalid, a 412 is omitted and the current selected newsgroup is invalid, a 412
response MUST be returned. If the optional argument is an article response MUST be returned. If the second argument is a range and no
number or number range and no article with that number or in that articles in that number range exist in the current selected
number range exists in the current selected newsgroup, a 423 response newsgroup, a 423 response MUST be returned. If the second argument is
MUST be returned. If HDR is sent without any arguments and the omitted and the current article number is invalid, a 420 response
current article number is invalid, a 420 response MUST be returned. MUST be returned.
A server MAY only allow HDR commands for a limited set of headers and A server MAY only allow HDR commands for a limited set of headers and
metadata items. If so, it MUST respond with a 503 response to metadata items. If so, it MUST respond with the generic 503 response
attempts to request other headers, rather than returning erroneous to attempts to request other headers, rather than returning erroneous
results such as a successful empty response. results such as a successful empty response.
If HDR uses a separate database and it is inconsistent for the
requested header or metadata item, the server MAY return what results
it can or it MAY respond with the generic 503 response; in the latter
case, the field MUST NOT appear in the output from LIST HEADERS.
8.6.1.3 Examples 8.6.1.3 Examples
Example of a successful retrieval of subject lines from a range of Example of a successful retrieval of subject lines from a range of
articles (3000235 has no Subject header, and 3000236 is missing): articles (3000235 has no Subject header, and 3000236 is missing):
[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] 225 Headers follow [S] 225 Headers follow
[S] 3000234 I am just a test article [S] 3000234 I am just a test article
skipping to change at page 75, line 16 skipping to change at page 78, line 42
8.6.2.2 Description 8.6.2.2 Description
The LIST HEADERS command returns a list of headers and metadata items The LIST HEADERS command returns a list of headers and metadata items
that may be retrieved using the HDR command. that may be retrieved using the HDR command.
The information is returned as a multi-line response following the The information is returned as a multi-line response following the
215 response code and contains one line for each header or metadata 215 response code and contains one line for each header or metadata
item name (excluding the colon in the former case). If the item name (excluding the colon in the former case). If the
implementation allows any header to be retrieved (also indicated by implementation allows any header to be retrieved (also indicated by
the "ALL" parameter to the extension label) it MUST NOT include any the "ALL" argument to the extension label) it MUST NOT include any
header names in the list but MUST include the special entry ":" (a header names in the list but MUST include the special entry ":" (a
single colon on its own); it MUST still list any metadata items that single colon on its own); it MUST still list any metadata items that
are available. The order of items in the list is not significant; the are available. The order of items in the list is not significant; the
server need not even consistently return the same order. The list MAY server need not even consistently return the same order. The list MAY
be empty (though in this circumstance there is little point in be empty (though in this circumstance there is little point in
providing the extension). providing the extension).
If the list of available fields is not the same for all articles (for
example, because the HDR command uses the same database as the OVER
command and the set of fields being stored has recently changed),
then the response should indicate the situation for a newly-arrived
article.
An implementation that also supports the OVER extension SHOULD at An implementation that also supports the OVER extension SHOULD at
least permit all the headers and metadata items listed in the output least permit all the headers and metadata items listed in the output
from the LIST OVERVIEW.FMT command. from the LIST OVERVIEW.FMT command.
8.6.2.3 Examples 8.6.2.3 Examples
Example of an implementation providing access to only a few headers: Example of an implementation providing access to only a few headers:
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 202 extensions supported: [S] 202 extensions supported:
skipping to change at page 76, line 31 skipping to change at page 80, line 4
[S] . [S] .
Example of an implementation providing access to all headers: Example of an implementation providing access to all headers:
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 202 extensions supported: [S] 202 extensions supported:
[S] HDR ALL [S] HDR ALL
[S] . [S] .
[C] LIST HEADERS [C] LIST HEADERS
[S] 215 metadata items supported: [S] 215 metadata items supported:
[S] : [S] :
[S] :bytes
[S] :lines [S] :lines
[S] :article-number [S] :bytes
[S] :x-article-number
[S] . [S] .
9. Augmented BNF Syntax for NNTP 9. Augmented BNF Syntax for NNTP
Each of the following sections describes the syntax of a major Each of the following sections describes the syntax of a major
element of NNTP. This syntax extends and refines the descriptions element of NNTP. This syntax extends and refines the descriptions
elsewhere in this specification, and should be given precedence when elsewhere in this specification, and should be given precedence when
resolving apparent conflicts. Note that ABNF [RFC2234] strings are resolving apparent conflicts. Note that ABNF [RFC2234] strings are
case insensitive. Non-terminals used in several places are defined in case insensitive. Non-terminals used in several places are defined in
a separate section at the end. a separate section at the end.
skipping to change at page 77, line 34 skipping to change at page 81, line 34
hdr-command / hdr-command /
head-command / head-command /
help-command / help-command /
ihave-command / ihave-command /
last-command / last-command /
list-active-command / list-active-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-headers-command /
list-newsgroups-command / list-newsgroups-command /
list-overview-fmt-command / list-overview-fmt-command /
listgroup-command / listgroup-command /
mode-reader-command / mode-reader-command /
newgroups-command / newgroups-command /
newnews-command / newnews-command /
next-command / next-command /
over-command / over-command /
post-command / post-command /
quit-command / quit-command /
skipping to change at page 78, line 12 skipping to change at page 82, line 13
hdr-command = "HDR" WS header-meta-name [range-ref] hdr-command = "HDR" WS header-meta-name [range-ref]
head-command = "HEAD" [article-ref] head-command = "HEAD" [article-ref]
help-command = "HELP" help-command = "HELP"
ihave-command = "IHAVE" WS message-id ihave-command = "IHAVE" WS message-id
last-command = "LAST" last-command = "LAST"
list-active-command = "LIST" [WS "ACTIVE" [WS wildmat]] list-active-command = "LIST" [WS "ACTIVE" [WS wildmat]]
list-active-times-command = "LIST" WS "ACTIVE.TIMES" [WS wildmat] list-active-times-command = "LIST" WS "ACTIVE.TIMES" [WS wildmat]
list-distrib-pats-command = "LIST" WS "DISTRIB.PATS" list-distrib-pats-command = "LIST" WS "DISTRIB.PATS"
list-distributions-command = "LIST" WS "DISTRIBUTIONS" list-distributions-command = "LIST" WS "DISTRIBUTIONS"
list-extensions-command = "LIST" WS "EXTENSIONS" list-extensions-command = "LIST" WS "EXTENSIONS"
list-headers-command = "LIST" WS "HEADERS"
list-newsgroups-command = "LIST" WS "NEWSGROUPS" [WS wildmat] list-newsgroups-command = "LIST" WS "NEWSGROUPS" [WS wildmat]
list-overview-fmt-command = "LIST" WS "OVERVIEW.FMT" list-overview-fmt-command = "LIST" WS "OVERVIEW.FMT"
listgroup-command = "LISTGROUP" [WS newsgroup-name] listgroup-command = "LISTGROUP" [WS newsgroup-name]
mode-reader-command = "MODE" WS "READER" mode-reader-command = "MODE" WS "READER"
newgroups-command = "NEWGROUPS" WS date-time newgroups-command = "NEWGROUPS" WS date-time
newnews-command = "NEWNEWS" WS wildmat WS date-time newnews-command = "NEWNEWS" WS wildmat WS date-time
next-command = "NEXT" next-command = "NEXT"
over-command = "OVER" [WS range] over-command = "OVER" [WS range-ref]
post-command = "POST" post-command = "POST"
quit-command = "QUIT" quit-command = "QUIT"
stat-command = "STAT" [article-ref] stat-command = "STAT" [article-ref]
x-command = x-command-name *(WS x-argument) x-command = x-command-name *(WS x-argument)
; Each extension command is specified fully elsewhere ; Each extension command is specified fully elsewhere
article-ref = WS (article-number / message-id) article-ref = WS (article-number / message-id)
article-number = 1*16DIGIT article-number = 1*16DIGIT
date = [2DIGIT] 6DIGIT date = [2DIGIT] 6DIGIT
date-time = date WS time [WS "GMT"] date-time = date WS time [WS "GMT"]
skipping to change at page 79, line 16 skipping to change at page 83, line 16
This syntax defines the non-terminal "response", which represents This syntax defines the non-terminal "response", which represents
what is sent from the server to the client in response to a command. what is sent from the server to the client in response to a command.
response = simple-response / multiline-response response = simple-response / multiline-response
multiline-response = simple-response *content-line termination multiline-response = simple-response *content-line termination
termination = "." CRLF termination = "." CRLF
content-line = [content-text] CRLF content-line = [content-text] CRLF
content-text = (".." / B-NONDOT) *B-CHAR content-text = (".." / B-NONDOT) *B-CHAR
simple-response = 3DIGIT parameters [ SP trailing-comment ] CRLF simple-response = 3DIGIT arguments [ SP trailing-comment ] CRLF
trailing-comment = *U-CHAR trailing-comment = *U-CHAR
parameters = *( SP parameter ) ; How many depends on the response arguments = *( SP argument ) ; How many depends on the response
parameter = 1*A-CHAR argument = 1*A-CHAR
9.3 Articles 9.3 Articles
This syntax defines the non-terminal "article", which represents the This syntax defines the non-terminal "article", which represents the
format of an article as described in Section 3.4. format of an article as described in Section 3.4.
article = 1*header CRLF body article = 1*header CRLF body
header = header-name ":" [CRLF] SP header-content CRLF header = header-name ":" [CRLF] SP header-content CRLF
header-content = *( P-CHAR / [CRLF] WS ) header-content = *( P-CHAR / [CRLF] WS )
body = *(*B-CHAR CRLF) body = *(*B-CHAR CRLF)
skipping to change at page 80, line 36 skipping to change at page 85, line 5
SP = %x20 SP = %x20
UTF8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4 UTF8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4
UTF8-2 = %xC2-DF UTF8-tail UTF8-2 = %xC2-DF UTF8-tail
UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2UTF8-tail / UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2UTF8-tail /
%xED %x80-9F UTF8-tail / %xEE-EF 2UTF8-tail %xED %x80-9F UTF8-tail / %xEE-EF 2UTF8-tail
UTF8-4 = %xF0 %x90-BF 2UTF8-tail / %xF1-F3 3UTF8-tail / UTF8-4 = %xF0 %x90-BF 2UTF8-tail / %xF1-F3 3UTF8-tail /
%xF4 %x80-8F 2UTF8-tail %xF4 %x80-8F 2UTF8-tail
UTF8-tail = %x80-BF UTF8-tail = %x80-BF
WS = 1*(SP / HT) WS = 1*(SP / HT)
OUTSTANDING ISSUE
When draft-yergeau-rfc2279bis-04.txt replaces 2279, need to update
references.
10. IANA Considerations 10. IANA Considerations
This specification requires IANA to keep a registry of This specification requires IANA to keep a registry of
extension-labels. The initial contents of this registry are specified extension-labels. The initial contents of this registry are specified
in Section 8.1. As described in Section 8, names beginning with X are in Section 8.1. As described in Section 8, names beginning with X are
reserved for private use while all other names are to be associated reserved for private use while all other names are to be associated
with a specification in an RFC on the standards-track or defining an with a specification in an RFC on the standards-track or defining an
IESG-approved experimental protocol. IESG-approved experimental protocol.
11. Security Considerations 11. Security Considerations
skipping to change at page 83, line 52 skipping to change at page 87, line 52
UTF-8 [RFC2279] permits only certain sequences of octets and UTF-8 [RFC2279] permits only certain sequences of octets and
designates others as either malformed or "illegal". The Unicode designates others as either malformed or "illegal". The Unicode
standard identifies a number of security issues related to illegal standard identifies a number of security issues related to illegal
sequences and forbids their generation by conforming implementations. sequences and forbids their generation by conforming implementations.
Implementations of this specification MUST NOT generate malformed or Implementations of this specification MUST NOT generate malformed or
illegal sequences and SHOULD detect them and take some appropriate illegal sequences and SHOULD detect them and take some appropriate
action. This could include: action. This could include:
o replacing such sequences by a "guessed" valid sequence (based on o generating a 501 response code.
properties of the UTF-8 encoding);
o replacing such sequences by the sequence %xEF.BF.BD, which encodes o replacing such sequences by the sequence %xEF.BF.BD, which encodes
the "replacement character" U+FFFD; the "replacement character" U+FFFD;
o closing the connection; o closing the connection;
o generating a 501 response code. o replacing such sequences by a "guessed" valid sequence (based on
properties of the UTF-8 encoding);
In the first case, the implementation MUST ensure that any In the last case, the implementation MUST ensure that any replacement
replacement cannot be used to bypass validity or security checks. For cannot be used to bypass validity or security checks. For example,
example, the illegal sequence %xC0.A0 is an over-long encoding for the illegal sequence %xC0.A0 is an over-long encoding for space
space (%x20). If it is replaced by the latter in a command line, this (%x20). If it is replaced by the latter in a command line, this needs
needs to happen before the command line is parsed into individual to happen before the command line is parsed into individual
arguments. If the replacement came after parsing, it would be arguments. If the replacement came after parsing, it would be
possible to generate an argument with an embedded space, which is possible to generate an argument with an embedded space, which is
forbidden. Use of the "replacement character" does not have this forbidden. Use of the "replacement character" does not have this
problem, since it is permitted wherever non-US-ASCII characters are. problem, since it is permitted wherever non-US-ASCII characters are.
Implementations SHOULD use one of the first two solutions where the
general structure of the NNTP stream remains intact, and close the
connection if it is no longer possible to parse it sensibly.
OUTSTANDING ISSUE 11.6 Caching of LIST EXTENSIONS results
Yergeau says that you MUST detect illegal sequences. He also The LIST EXTENSIONS command provides information about the extensions
rejects the first bullet point and consequent text; I'm discussing currently available from the server. Whenever there is a relevant
it with him now. change to the server state, the results of this command are required
to change accordingly.
In most situations the results from this command in a given server
state will not change from session to session; a given extension will
be installed permanently on a server. Some clients may therefore wish
to remember which extensions a server supports to avoid the delay of
an additional command and response, particularly if they open
multiple connections in the same session.
However, information about extensions related to security and privacy
MUST NOT be cached, since this could allow a variety of attacks.
For example, consider a server which permits the use of cleartext
passwords on links that are encrypted but not otherwise:
[Initial TCP connection setup completed.]
[S] 200 NNTP Service Ready, posting permitted
[C] LIST EXTENSIONS
[S] 202 Extensions supported:
[S] XENCRYPT
[S] .
[C] XENCRYPT
[Client and server negotiate encryption on the link]
[S] 283 Encrypted link established
[C] LIST EXTENSIONS
[S] 202 Extensions supported:
[S] XSECRET
[S] .
[C] XSECRET fred flintstone
[S] 290 Password for fred accepted
If the client caches the last LIST EXTENSIONS result, then on the
next session it will attempt to use XSECRET on an unencrypted link:
[Initial TCP connection setup completed.]
[S] 200 NNTP Service Ready, posting permitted
[C] XSECRET fred flintstone
[S] 483 Only permitted on secure links
exposing the password to any eavesdropper. While the primary cause of
this is passing a secret without first checking the security of the
link, caching of LIST EXTENSIONS results can increase the risk.
Any security extension should include requirements to check the
security state of the link in a manner appropriate to that extension.
Caching should normally only be considered for anonymous clients that
do not use any security or privacy extensions and for which the time
required for an additional command and response is a noticable issue.
12. Acknowledgments 12. Acknowledgments
The author acknowledges the original authors of NNTP as documented in The author acknowledges the original authors of NNTP as documented in
RFC 977 [RFC977]: Brian Kantor and Phil Lapsey. RFC 977 [RFC977]: Brian Kantor and Phil Lapsey.
The author gratefully acknowledges the work of the NNTP committee The author gratefully acknowledges the work of the NNTP committee
chaired by Eliot Lear. The organization of this document was chaired by Eliot Lear. The organization of this document was
influenced by the last available draft from this working group. A influenced by the last available draft from this working group. A
special thanks to Eliot for generously providing the original special thanks to Eliot for generously providing the original
skipping to change at page 87, line 12 skipping to change at page 92, line 12
Stan Barber <sob@academ.com> Stan Barber <sob@academ.com>
Normative References Normative References
[ANSI1986] [ANSI1986]
American National Standards Institute, "Coded Character American National Standards Institute, "Coded Character
Set - 7-bit American Standard Code for Information Set - 7-bit American Standard Code for Information
Interchange", ANSI X3.4, 1986. Interchange", ANSI X3.4, 1986.
[RFC1305] Mills, D., "Network Time Protocol (Version 3)
Specification, Implementation", RFC 1305, March 1992.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2234] Crocker, D. and P. Overell, "Augmented BNF for Syntax [RFC2234] Crocker, D. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", RFC 2234, November 1997. Specifications: ABNF", RFC 2234, November 1997.
[RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO
10646", RFC 2279, January 1998. 10646", RFC 2279, January 1998.
[RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April
2001.
[RFC977] Kantor, B. and P. Lapsley, "Network News Transfer [RFC977] Kantor, B. and P. Lapsley, "Network News Transfer
Protocol", RFC 977, February 1986. Protocol", RFC 977, February 1986.
[ROBE1995]
Robertson, R., "FAQ: Overview database / NOV General
Information", January 1995.
[TF.686-1] [TF.686-1]
International Telecommunications Union - Radio, "Glossary, International Telecommunications Union - Radio, "Glossary,
ITU-R Recommendation TF.686-1", ITU-R Recommendation ITU-R Recommendation TF.686-1", ITU-R Recommendation
TF.686-1, October 1997. TF.686-1, October 1997.
Informative References Informative References
[RFC1036] Horton, M. and R. Adams, "Standard for interchange of [RFC1036] Horton, M. and R. Adams, "Standard for interchange of
USENET messages", RFC 1036, December 1987. USENET messages", RFC 1036, December 1987.
[RFC1305] Mills, D., "Network Time Protocol (Version 3)
Specification, Implementation", RFC 1305, March 1992.
[RFC1869] Klensin, J., Freed, N., Rose, M., Stefferud, E. and D. [RFC1869] Klensin, J., Freed, N., Rose, M., Stefferud, E. and D.
Crocker, "SMTP Service Extensions", STD 10, RFC 1869, Crocker, "SMTP Service Extensions", STD 10, RFC 1869,
November 1995. November 1995.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., [RFC2616] Fielding, R., Gettys, J., Mogul, J., Nielsen, H.,
Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[RFC2629] Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629, [RFC2629] Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629,
June 1999. June 1999.
[RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April
2001.
[RFC2980] Barber, S., "Common NNTP Extensions", RFC 2980, October
2000.
[ROBE1995]
Robertson, R., "FAQ: Overview database / NOV General
Information", January 1995.
[SALZ1992] [SALZ1992]
Salz, R., "Manual Page for wildmat(3) from the INN 1.4 Salz, R., "Manual Page for wildmat(3) from the INN 1.4
distribution, Revision 1.10", April 1992. distribution, Revision 1.10", April 1992.
Author's Address Author's Address
Clive D.W. Feather Clive D.W. Feather
Thus plc Thus plc
322 Regents Park Road 322 Regents Park Road
London N3 2QQ London N3 2QQ
GB GB
Phone: +44 20 8495 6138 Phone: +44 20 8495 6138
Fax: +44 870 051 9937 Fax: +44 870 051 9937
EMail: clive@demon.net
URI: http://www.davros.org/ URI: http://www.davros.org/
Appendix A. Future Directions Appendix A. Future Directions
It has been proposed that the response code range 6xx is used for It has been proposed that the response code range 6xx is used for
multiline responses. While existing commands and extensions do not multiline responses. While existing commands and extensions do not
use this, it would at least limit the problem clients would face in use this, it would at least limit the problem clients would face in
dealing with an unknown response. dealing with an unknown response.
Appendix B. Interaction with other specifications Appendix B. Interaction with other specifications
skipping to change at page 93, line 5 skipping to change at page 98, line 5
important to ensure - as far as possible - that the same message-id important to ensure - as far as possible - that the same message-id
is allocated to both attempts so that the server, or other servers, is allocated to both attempts so that the server, or other servers,
can recognise the two articles as being duplicates. In the case of can recognise the two articles as being duplicates. In the case of
email or Usenet articles, therefore, the posted article SHOULD email or Usenet articles, therefore, the posted article SHOULD
contain a header with name "Message-ID" and the contents of this contain a header with name "Message-ID" and the contents of this
header SHOULD be identical on each attempt. The server SHOULD ensure header SHOULD be identical on each attempt. The server SHOULD ensure
that two POSTed articles with the same contents for this header are that two POSTed articles with the same contents for this header are
recognised as identical and the same message-id allocated, whether or recognised as identical and the same message-id allocated, whether or
not those contents are suitable for use as the message-id. not those contents are suitable for use as the message-id.
Appendix C. Summary of Response Codes
This section contains a list of every response code defined in this
document, whether it is multi-line, which commands can generate it,
what arguments it has, and what its meaning is.
Response code 100 (multi-line)
Generated by: HELP
Meaning: help text follows.
Response code 111
Generated by: DATE
1 argument: yyyymmddhhmmss
Meaning: server date and time.
Response code 200
Generated by: initial connection, MODE READER
Meaning: service available, posting allowed.
Response code 201
Generated by: initial connection, MODE READER
Meaning: service available, posting prohibited.
Response code 202 (multi-line)
Generated by: LIST EXTENSIONS
Meaning: extension list follows.
Response code 205
Generated by: QUIT
Meaning: connection closing (the server immediately closes the
connection).
Response code 211
The 211 response code has two completely different forms depending
on which command generated it:
Generated by: GROUP
4 arguments: number low high group
Meaning: group selected.
(multi-line)
Generated by: LISTGROUP
Meaning: article numbers follow.
Response code 215 (multi-line)
Generated by: LIST ACTIVE, LIST ACTIVE.TIMES, LIST DISTRIB.PATS,
LIST DISTRIBUTIONS, LIST HEADERS, LIST NEWSGROUPS,
LIST OVERVIEW.FMT
Meaning: information follows.
Response code 220 (multi-line)
Generated by: ARTICLE
2 arguments: n message-id
Meaning: article follows.
Response code 221 (multi-line)
Generated by: HEAD
2 arguments: n message-id
Meaning: article headers follow.
Response code 222 (multi-line)
Generated by: BODY
2 arguments: n message-id
Meaning: article body follows.
Response code 223
Generated by: LAST, NEXT, STAT
2 arguments: n message-id
Meaning: article exists and selected.
Response code 224 (multi-line)
Generated by: OVER
Meaning: overview information follows.
Response code 225 (multi-line)
Generated by: HDR
Meaning: headers follow.
Response code 230 (multi-line)
Generated by: NEWNEWS
Meaning: list of new articles follows.
Response code 231 (multi-line)
Generated by: NEWGROUPS
Meaning: list of new newsgroups follows.
Response code 235
Generated by: IHAVE (second stage)
Meaning: article transferred OK.
Response code 240
Generated by: POST (second stage)
Meaning: article received OK.
Response code 335
Generated by: IHAVE (first stage)
Meaning: send article to be transferred.
Response code 340
Generated by: POST (first stage)
Meaning: send article to be posted.
Response code 400
Generic response and generated by initial connection
Meaning: service not available or no longer available (the server
immediately closes the connection).
Response code 401
Generic response
1 argument: extension-label
Meaning: the server is in the wrong mode; the indicated extension
should be used to change the mode.
Response code 402
Generated by: LIST EXTENSIONS
Meaning: server has no extensions.
Response code 403
Generic response
Meaning: internal fault or problem preventing action being taken.
Response code 411
Generated by: GROUP, LISTGROUP
Meaning: no such newsgroup.
Response code 412
Generated by: ARTICLE, BODY, HDR, HEAD, LAST, LISTGROUP, NEXT,
OVER, STAT
Meaning: no newsgroup selected.
Response code 420
Generated by: ARTICLE, BODY, HDR, HEAD, LAST, NEXT, OVER, STAT
Meaning: current article number is invalid.
Response code 421
Generated by: NEXT
Meaning: no next article in this group.
Response code 422
Generated by: LAST
Meaning: no previous article in this group.
Response code 423
Generated by: ARTICLE, BODY, HDR, HEAD, OVER, STAT
Meaning: no articles in that range.
Response code 430
Generated by: ARTICLE, BODY, HDR, HEAD, OVER, STAT
Meaning: no article with that message-id.
Response code 435
Generated by: IHAVE (first stage)
Meaning: article not wanted.
Response code 436
Generated by: IHAVE (either stage)
Meaning: transfer not possible (first stage) or failed (second
stage); try again later.
Response code 437
Generated by: IHAVE (second stage)
Meaning: transfer rejected; do not retry.
Response code 440
Generated by: POST (first stage)
Meaning: posting not permitted.
Response code 441
Generated by: POST (second stage)
Meaning: posting failed.
Response code 480
Generic response
Meaning: command unavailable until the client has authenticated
itself.
Response code 483
Generic response
Meaning: command unavailable until suitable privacy has been
arranged.
Response code 500
Generic response
Meaning: unknown command.
Response code 501
Generic response
Meaning: syntax error in command.
Response code 502
Generic response and generated by initial connection
Meaning for the initial connection and the MODE READER command:
service permanently unavailable (the server immediately closes the
connection).
Meaning for all other commands: command not permitted (and there
is no way for the client to change this).
Response code 503
Generic response
Meaning: feature not supported.
Appendix D. Formal specification of the standard extensions
This section gives a formal definition of each of the extensions in
Section 8.2 as required by Section 8 for the IANA registry.
D.1 The LISTGROUP extension
o This extension provides information about specific article
numbers.
o The extension-label is "LISTGROUP".
o The extension-label has no arguments.
o The extension defines one new command: LISTGROUP, whose behaviour,
arguments, and responses are defined in Section 8.3.
o The extension does not associate any new responses with
pre-existing NNTP commands.
o The extension does not affect the behaviour of a server or client
other than via the new command.
o The extension does not affect the maximum length of commands and
initial response lines.
o The extension does not alter pipelining, and the LISTGROUP command
can be pipelined.
o Use of this extension does not alter the output from LIST
EXTENSIONS.
o The extension does not cause any pre-existing command to produce a
401, 480, or 483 response.
o The LISTGROUP command can only be used after the MODE READER
command.
D.2 The OVER extension
o This extension provides support for an overview of newsgroups.
o The extension-label is "OVER".
o The extension-label has no arguments.
o The extension defines two new commands: OVER and LIST
OVERVIEW.FMT, whose behaviour, arguments, and responses are
defined in Section 8.5.
o The extension does not associate any new responses with
pre-existing NNTP commands.
o The extension requires the server to maintain an overview database
and article metadata, as described in Section 8.4.
o The extension does not affect the maximum length of commands and
initial response lines.
o The extension does not alter pipelining, and the OVER and LIST
OVERVIEW.FMT commands can be pipelined.
o Use of this extension does not alter the output from LIST
EXTENSIONS.
o The extension does not cause any pre-existing command to produce a
401, 480, or 483 response.
o The OVER and LIST OVERVIEW.FMT commands can only be used after the
MODE READER command.
D.3 The HDR extension
o This extension provides batched header retrieval.
o The extension-label is "HDR".
o The extension-label has the optional argument "ALL", indicating it
may be used with any header or metadata item.
o The extension defines two new commands: HDR and LIST HEADERS,
whose behaviour, arguments, and responses are defined in Section
8.6.
o The extension does not associate any new responses with
pre-existing NNTP commands.
o The extension requires the server to maintain article metadata, as
described in Section 8.4.
o The extension does not affect the maximum length of commands and
initial response lines.
o The extension does not alter pipelining, and the HDR and LIST
HEADERS commands can be pipelined.
o Use of this extension does not alter the output from LIST
EXTENSIONS.
o The extension does not cause any pre-existing command to produce a
401, 480, or 483 response.
o The HDR and LIST HEADERS commands can only be used after the MODE
READER command.
Intellectual Property Statement Intellectual Property Statement
The IETF takes no position regarding the validity or scope of any The IETF takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to intellectual property or other rights that might be claimed to
pertain to the implementation or use of the technology described in pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights this document or the extent to which any license under such rights
might or might not be available; neither does it represent that it might or might not be available; neither does it represent that it
has made any effort to identify any such rights. Information on the has made any effort to identify any such rights. Information on the
IETF's procedures with respect to rights in standards-track and IETF's procedures with respect to rights in standards-track and
standards-related documentation can be found in BCP-11. Copies of standards-related documentation can be found in BCP-11. Copies of
skipping to change at page 94, line 7 skipping to change at page 107, line 7
The limited permissions granted above are perpetual and will not be The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assignees. revoked by the Internet Society or its successors or assignees.
This document and the information contained herein is provided on an This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Acknowledgement Acknowledgment
Funding for the RFC Editor function is currently provided by the Funding for the RFC Editor function is currently provided by the
Internet Society. Internet Society.
 End of changes. 

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