draft-ietf-nntpext-base-22.txt   draft-ietf-nntpext-base-23.txt 
NNTP C. Feather NNTP C. Feather
Internet-Draft Thus plc Internet-Draft Thus plc
Expires: September 19, 2004 March 21, 2004 Expires: February 24, 2005 August 26, 2004
Network News Transport Protocol Network News Transport Protocol
draft-ietf-nntpext-base-22 draft-ietf-nntpext-base-23
Status of this Memo Status of this Memo
By submitting this Internet-Draft, I certify that any applicable This document is an Internet-Draft and is subject to all provisions
patent or other IPR claims of which I am aware have been disclosed, of section 3 of RFC 3667. By submitting this Internet-Draft, each
and any of which I become aware will be disclosed, in accordance with author represents that any applicable patent or other IPR claims of
RFC 3667. which he or she is aware have been or will be disclosed, and any of
which he or she become aware will be disclosed, in accordance with
RFC 3668.
Internet-Drafts are working documents of the Internet Engineering 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
groups may also distribute working documents as Internet-Drafts. other groups may also distribute working documents as
Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
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
www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on September 19, 2004. This Internet-Draft will expire on February 24, 2005.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2004). All Rights Reserved. Copyright (C) The Internet Society (2004).
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.
skipping to change at page 1, line 48 skipping to change at page 2, line 4
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 22.
Author's Note Author's Note
This draft is written in XML using an NNTP-specific DTD. Custom This document 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 document.
Rights Rights
UNIX is a registered trademark of The Open Group. UNIX is a registered trademark of The Open Group.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . 5 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5
2. Notation . . . . . . . . . . . . . . . . . . . . . . . . 6 2. Notation . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3. Basic Concepts . . . . . . . . . . . . . . . . . . . . . 8 3. Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . 8
3.1 Commands and Responses . . . . . . . . . . . . . . . . . 8 3.1 Commands and Responses . . . . . . . . . . . . . . . . . 8
3.2 Response Codes . . . . . . . . . . . . . . . . . . . . . 10 3.2 Response Codes . . . . . . . . . . . . . . . . . . . . . 10
3.2.1 Generic Response Codes . . . . . . . . . . . . . . . . . 11 3.2.1 Generic Response Codes . . . . . . . . . . . . . . . 11
3.2.1.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2.1.1 Examples . . . . . . . . . . . . . . . . . . . . 13
3.3 Pipelining . . . . . . . . . . . . . . . . . . . . . . . 15 3.3 Pipelining . . . . . . . . . . . . . . . . . . . . . . . 14
3.3.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 16 3.3.1 Examples . . . . . . . . . . . . . . . . . . . . . . 15
3.4 Articles . . . . . . . . . . . . . . . . . . . . . . . . 16 3.4 Articles . . . . . . . . . . . . . . . . . . . . . . . . 16
4. The WILDMAT format . . . . . . . . . . . . . . . . . . . 18 4. The WILDMAT format . . . . . . . . . . . . . . . . . . . . . 18
4.1 Wildmat syntax . . . . . . . . . . . . . . . . . . . . . 18 4.1 Wildmat syntax . . . . . . . . . . . . . . . . . . . . . 18
4.2 Wildmat semantics . . . . . . . . . . . . . . . . . . . 18 4.2 Wildmat semantics . . . . . . . . . . . . . . . . . . . 18
4.3 Extensions . . . . . . . . . . . . . . . . . . . . . . . 19 4.3 Extensions . . . . . . . . . . . . . . . . . . . . . . . 19
4.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . 20 4.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . 20
5. Session administration commands . . . . . . . . . . . . 21 5. Session administration commands . . . . . . . . . . . . . . 21
5.1 Initial Connection . . . . . . . . . . . . . . . . . . . 21 5.1 Initial Connection . . . . . . . . . . . . . . . . . . . 21
5.2 MODE READER . . . . . . . . . . . . . . . . . . . . . . 22 5.2 MODE READER . . . . . . . . . . . . . . . . . . . . . . 22
5.3 LIST EXTENSIONS . . . . . . . . . . . . . . . . . . . . 25 5.3 LIST EXTENSIONS . . . . . . . . . . . . . . . . . . . . 24
5.4 QUIT . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.4 QUIT . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6. Article posting and retrieval . . . . . . . . . . . . . 28 6. Article posting and retrieval . . . . . . . . . . . . . . . 28
6.1 Group and article selection . . . . . . . . . . . . . . 28 6.1 Group and article selection . . . . . . . . . . . . . . 28
6.1.1 GROUP . . . . . . . . . . . . . . . . . . . . . . . . . 28 6.1.1 GROUP . . . . . . . . . . . . . . . . . . . . . . . 28
6.1.2 LAST . . . . . . . . . . . . . . . . . . . . . . . . . . 31 6.1.2 LAST . . . . . . . . . . . . . . . . . . . . . . . . 31
6.1.3 NEXT . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.1.3 NEXT . . . . . . . . . . . . . . . . . . . . . . . . 32
6.2 Retrieval of articles and article sections . . . . . . . 34 6.2 Retrieval of articles and article sections . . . . . . . 33
6.2.1 ARTICLE . . . . . . . . . . . . . . . . . . . . . . . . 34 6.2.1 ARTICLE . . . . . . . . . . . . . . . . . . . . . . 34
6.2.2 HEAD . . . . . . . . . . . . . . . . . . . . . . . . . . 37 6.2.2 HEAD . . . . . . . . . . . . . . . . . . . . . . . . 37
6.2.3 BODY . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.2.3 BODY . . . . . . . . . . . . . . . . . . . . . . . . 38
6.2.4 STAT . . . . . . . . . . . . . . . . . . . . . . . . . . 41 6.2.4 STAT . . . . . . . . . . . . . . . . . . . . . . . . 40
6.3 Article posting . . . . . . . . . . . . . . . . . . . . 44 6.3 Article posting . . . . . . . . . . . . . . . . . . . . 42
6.3.1 POST . . . . . . . . . . . . . . . . . . . . . . . . . . 44 6.3.1 POST . . . . . . . . . . . . . . . . . . . . . . . . 42
6.3.2 IHAVE . . . . . . . . . . . . . . . . . . . . . . . . . 46 6.3.2 IHAVE . . . . . . . . . . . . . . . . . . . . . . . 44
7. Information commands . . . . . . . . . . . . . . . . . . 50 7. Information commands . . . . . . . . . . . . . . . . . . . . 48
7.1 DATE . . . . . . . . . . . . . . . . . . . . . . . . . . 50 7.1 DATE . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.2 HELP . . . . . . . . . . . . . . . . . . . . . . . . . . 50 7.2 HELP . . . . . . . . . . . . . . . . . . . . . . . . . . 48
7.3 NEWGROUPS . . . . . . . . . . . . . . . . . . . . . . . 51 7.3 NEWGROUPS . . . . . . . . . . . . . . . . . . . . . . . 49
7.4 NEWNEWS . . . . . . . . . . . . . . . . . . . . . . . . 53 7.4 NEWNEWS . . . . . . . . . . . . . . . . . . . . . . . . 50
7.5 Time . . . . . . . . . . . . . . . . . . . . . . . . . . 54 7.5 Time . . . . . . . . . . . . . . . . . . . . . . . . . . 51
7.5.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 54 7.5.1 Examples . . . . . . . . . . . . . . . . . . . . . . 52
7.6 The LIST commands . . . . . . . . . . . . . . . . . . . 55 7.6 The LIST commands . . . . . . . . . . . . . . . . . . . 52
7.6.1 LIST ACTIVE . . . . . . . . . . . . . . . . . . . . . . 55 7.6.1 LIST ACTIVE . . . . . . . . . . . . . . . . . . . . 52
7.6.2 LIST ACTIVE.TIMES . . . . . . . . . . . . . . . . . . . 57 7.6.2 LIST ACTIVE.TIMES . . . . . . . . . . . . . . . . . 54
7.6.3 LIST DISTRIBUTIONS . . . . . . . . . . . . . . . . . . . 59 7.6.3 LIST DISTRIBUTIONS . . . . . . . . . . . . . . . . . 56
7.6.4 LIST DISTRIB.PATS . . . . . . . . . . . . . . . . . . . 60 7.6.4 LIST DISTRIB.PATS . . . . . . . . . . . . . . . . . 56
7.6.5 LIST NEWSGROUPS . . . . . . . . . . . . . . . . . . . . 61 7.6.5 LIST NEWSGROUPS . . . . . . . . . . . . . . . . . . 58
8. Framework for NNTP extensions . . . . . . . . . . . . . 63 8. Framework for NNTP extensions . . . . . . . . . . . . . . . 60
8.1 Initial IANA registry . . . . . . . . . . . . . . . . . 65 8.1 Initial IANA registry . . . . . . . . . . . . . . . . . 62
8.2 Standard extensions . . . . . . . . . . . . . . . . . . 65 8.2 Standard extensions . . . . . . . . . . . . . . . . . . 62
8.3 The LISTGROUP extension . . . . . . . . . . . . . . . . 65 8.3 The LISTGROUP extension . . . . . . . . . . . . . . . . 62
8.3.1 LISTGROUP . . . . . . . . . . . . . . . . . . . . . . . 66 8.3.1 LISTGROUP . . . . . . . . . . . . . . . . . . . . . 62
8.4 Article metadata . . . . . . . . . . . . . . . . . . . . 67 8.4 Article metadata . . . . . . . . . . . . . . . . . . . . 64
8.4.1 The :bytes metadata item . . . . . . . . . . . . . . . . 68 8.4.1 The :bytes metadata item . . . . . . . . . . . . . . 65
8.4.2 The :lines metadata item . . . . . . . . . . . . . . . . 68 8.4.2 The :lines metadata item . . . . . . . . . . . . . . 65
8.5 The OVER extension . . . . . . . . . . . . . . . . . . . 68 8.5 The OVER extension . . . . . . . . . . . . . . . . . . . 65
8.5.1 OVER . . . . . . . . . . . . . . . . . . . . . . . . . . 69 8.5.1 OVER . . . . . . . . . . . . . . . . . . . . . . . . 66
8.5.2 LIST OVERVIEW.FMT . . . . . . . . . . . . . . . . . . . 74 8.5.2 LIST OVERVIEW.FMT . . . . . . . . . . . . . . . . . 70
8.6 The HDR extension . . . . . . . . . . . . . . . . . . . 76 8.6 The HDR extension . . . . . . . . . . . . . . . . . . . 72
8.6.1 HDR . . . . . . . . . . . . . . . . . . . . . . . . . . 76 8.6.1 HDR . . . . . . . . . . . . . . . . . . . . . . . . 72
8.6.2 LIST HEADERS . . . . . . . . . . . . . . . . . . . . . . 80 8.6.2 LIST HEADERS . . . . . . . . . . . . . . . . . . . . 76
9. Augmented BNF Syntax for NNTP . . . . . . . . . . . . . 84 9. Augmented BNF Syntax for NNTP . . . . . . . . . . . . . . . 79
9.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . 84 9.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . 79
9.2 Responses . . . . . . . . . . . . . . . . . . . . . . . 86 9.2 Command continuation . . . . . . . . . . . . . . . . . . 81
9.3 Multi-line response contents . . . . . . . . . . . . . . 86 9.3 Responses . . . . . . . . . . . . . . . . . . . . . . . 81
9.4 Articles . . . . . . . . . . . . . . . . . . . . . . . . 88 9.3.1 Generic responses . . . . . . . . . . . . . . . . . 81
9.5 General non-terminals . . . . . . . . . . . . . . . . . 88 9.3.2 Initial response line contents . . . . . . . . . . . 82
10. IANA Considerations . . . . . . . . . . . . . . . . . . 90 9.3.3 Multi-line response contents . . . . . . . . . . . . 82
11. Security Considerations . . . . . . . . . . . . . . . . 91 9.4 LIST EXTENSIONS responses . . . . . . . . . . . . . . . 84
11.1 Personal and Proprietary Information . . . . . . . . . . 91 9.5 Articles . . . . . . . . . . . . . . . . . . . . . . . . 84
11.2 Abuse of Server Log Information . . . . . . . . . . . . 91 9.6 General non-terminals . . . . . . . . . . . . . . . . . 84
11.3 Weak Authentication and Access Control . . . . . . . . . 91 10. IANA Considerations . . . . . . . . . . . . . . . . . . . 87
11.4 DNS Spoofing . . . . . . . . . . . . . . . . . . . . . . 92 11. Security Considerations . . . . . . . . . . . . . . . . . 88
11.5 UTF-8 issues . . . . . . . . . . . . . . . . . . . . . . 92 11.1 Personal and Proprietary Information . . . . . . . . . . 88
11.6 Caching of LIST EXTENSIONS results . . . . . . . . . . . 93 11.2 Abuse of Server Log Information . . . . . . . . . . . . 88
12. Acknowledgements . . . . . . . . . . . . . . . . . . . . 95 11.3 Weak Authentication and Access Control . . . . . . . . . 88
Normative References . . . . . . . . . . . . . . . . . . 97 11.4 DNS Spoofing . . . . . . . . . . . . . . . . . . . . . . 89
Informative References . . . . . . . . . . . . . . . . . 98 11.5 UTF-8 issues . . . . . . . . . . . . . . . . . . . . . . 89
Author's Address . . . . . . . . . . . . . . . . . . . . 98 11.6 Caching of LIST EXTENSIONS results . . . . . . . . . . . 90
A. Future Directions . . . . . . . . . . . . . . . . . . . 99 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . 92
B. Interaction with other specifications . . . . . . . . . 100 13. References . . . . . . . . . . . . . . . . . . . . . . . . 94
B.1 Header folding . . . . . . . . . . . . . . . . . . . . . 100 13.1 Normative References . . . . . . . . . . . . . . . . . . . 94
B.2 Message-IDs . . . . . . . . . . . . . . . . . . . . . . 100 13.2 Informative References . . . . . . . . . . . . . . . . . . 94
B.3 Article posting . . . . . . . . . . . . . . . . . . . . 101 Author's Address . . . . . . . . . . . . . . . . . . . . . . 95
C. Summary of Response Codes . . . . . . . . . . . . . . . 103 A. Future Directions . . . . . . . . . . . . . . . . . . . . . 96
D. Formal specification of the standard extensions . . . . 108 B. Interaction with other specifications . . . . . . . . . . . 97
D.1 The LISTGROUP extension . . . . . . . . . . . . . . . . 108 B.1 Header folding . . . . . . . . . . . . . . . . . . . . . 97
D.2 The OVER extension . . . . . . . . . . . . . . . . . . . 108 B.2 Message-IDs . . . . . . . . . . . . . . . . . . . . . . 97
D.3 The HDR extension . . . . . . . . . . . . . . . . . . . 109 B.3 Article posting . . . . . . . . . . . . . . . . . . . . 98
Intellectual Property and Copyright Statements . . . . . 111 C. Summary of Response Codes . . . . . . . . . . . . . . . . . 100
D. Formal specification of the standard extensions . . . . . . 104
D.1 The LISTGROUP extension . . . . . . . . . . . . . . . . 104
D.2 The OVER extension . . . . . . . . . . . . . . . . . . . 104
D.3 The HDR extension . . . . . . . . . . . . . . . . . . . 105
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
reading clients, NNTP enables retrieval of news articles that are news reading clients, NNTP enables retrieval of news articles that
stored in a central database, giving subscribers the ability to are 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.
The Netnews model provides for indexing, cross-referencing, and The Netnews model provides for indexing, cross-referencing, and
expiration of aged messages. For server-to-server interaction, NNTP expiration of aged messages. For server-to-server interaction, NNTP
is designed for efficient transmission of Netnews articles over a is designed for efficient transmission of Netnews articles over a
reliable full duplex communication channel. reliable full duplex communication channel.
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 [RFC3629] instead of US-ASCII [ANSI1986]. It now requires to UTF-8 [RFC3629] instead of US-ASCII [ANSI1986] (note that US-ASCII
all articles to have a message-id, eliminating the "<0>" placeholder is a subset of UTF-8). It now requires all articles to have a
used in RFC 977. It also extends the newsgroup name matching message-id, eliminating the "<0>" placeholder used in RFC 977 in some
capabilities already documented in RFC 977. responses. It also extends the newsgroup name matching capabilities
already documented in RFC 977.
Generally, new functionality is made available using new commands. A Generally, new functionality is made available using new commands. A
number of such commands (including some commands taken from RFC 2980 number of such commands (including some commands taken from RFC 2980
[RFC2980]) are now mandatory. Part of the new functionality involves [RFC2980]) are now mandatory. Part of the new functionality involves
a mechanism to discover what new functionality is available to a mechanism to discover what new functionality is available to
clients from a server. This mechanism can also be used to add more clients from a server. This mechanism can also be used to add more
functionality as needs merit such additions. 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
skipping to change at page 6, line 34 skipping to change at page 6, line 34
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
with those codes in US-ASCII [ANSI1986] (that is, %x00, %x09, %x0A, %x00, %x09, %x0A, %x0D, and %x20 respectively (that is, the octets
%x0D, and %x20 respectively), as do quoted characters (so "." and "<" with those codes in US-ASCII [ANSI1986] and thus UTF-8 [RFC3629]).
refer to %x2E and %x3C). The term "CRLF" or "CRLF pair" means the The term "CRLF" or "CRLF pair" means the sequence CR immediately
sequence CR immediately followed by LF (that is, %x0D.0A). A followed by LF (that is, %x0D.0A). A "printable US-ASCII character"
"printable US-ASCII character" is an octet in the range %x21-7E. is an octet in the range %x21-7E. Quoted characters refer to the
octets with those codes in US-ASCII (so "." and "<" refer to %x2E and
%x3C) and will always be printable US-ASCII characters; similarly,
"digit" refers to the octets %x30-39.
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. Examples may use commands (or other names) not defined in
this specification (such as an XENCRYPT command). These will be used
to illustrate some point and do not imply that any such command is
defined elsewhere or needs to exist in any particular implementation.
Terms which might be read as specifying details of a client or server Terms which might be read as specifying details of a client or server
implementation, such as "database", are used simply to ease implementation, such as "database", are used simply to ease
description. Providing that implementations conform to the protocol description. Providing that implementations conform to the protocol
and format specifications in this document, no specific technique is and format specifications in this document, no specific technique is
mandated. 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
it MUST establish a TCP connection with the server host by connecting service, it MUST establish a TCP connection with the server host by
to that host on the same port on which the server is listening. When connecting to that host on the same port on which the server is
the connection is established, the NNTP server host MUST send a listening. When the connection is established, the NNTP server host
greeting. The client host and server host then exchange commands and MUST send a greeting. The client host and server host then exchange
responses (respectively) until the connection is closed or aborted. commands and responses (respectively) until the connection is closed
or aborted.
The character set for all NNTP commands is UTF-8 [RFC3629]. Commands The character set for all NNTP commands is UTF-8 [RFC3629]. Commands
in NNTP MUST consist of a keyword, which MAY be followed by one or in NNTP MUST consist of a keyword, which MAY be followed by one or
more arguments. A CRLF pair MUST terminate all commands. Multiple more arguments. A CRLF pair MUST terminate all commands. Multiple
commands MUST NOT be on the same line. Keywords MUST consist of commands MUST NOT be on the same line. Keywords MUST consist of
printable US-ASCII characters. Unless otherwise noted elsewhere in printable US-ASCII characters. Unless otherwise noted elsewhere in
this document, arguments SHOULD consist of printable US-ASCII this document, arguments SHOULD consist of printable US-ASCII
characters. Keywords and arguments MUST be each separated by one or characters. Keywords and arguments MUST be each separated by one or
more space or TAB characters. Keywords MUST be at least three more space or TAB characters. Keywords MUST be at least three
characters and MUST NOT exceed 12 characters. Command lines MUST NOT characters and MUST NOT exceed 12 characters. Command lines MUST NOT
exceed 512 octets, which includes the terminating CRLF pair. The exceed 512 octets, which includes the terminating CRLF pair. The
arguments MUST NOT exceed 497 octets. A server MAY relax these limits arguments MUST NOT exceed 497 octets. A server MAY relax these
for commands defined in an extension. limits for commands defined in an extension.
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.
The term "character" means a single Unicode code point and The term "character" means a single Unicode code point and
implementations are not required to carry out normalisation. Thus implementations are not required to carry out normalisation. Thus
skipping to change at page 8, line 52 skipping to change at page 9, line 4
with dieresis) is two; the two need not be treated as equivalent. with dieresis) is two; the two need not be treated as equivalent.
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. Note that such commands in this specification are LIST and MODE. Note that such
variants are sometimes referred to as if they were commands in their variants are sometimes referred to as if they were commands in their
own right: "the LIST ACTIVE" command should be read as shorthand for own right: "the LIST ACTIVE" command should be read as shorthand for
"the ACTIVE variant of the LIST command". "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 arguments are case- or be ignored by the server. Command and response arguments are case-
language-specific only when stated, either in this document or in or 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
exceed 512 octets, which includes the response code and the exceed 512 octets, which includes the response code and the
skipping to change at page 9, line 19 skipping to change at page 9, line 20
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
exceed 512 octets, which includes the response code and the exceed 512 octets, which includes the response code and the
terminating CRLF pair; an extension MAY specify a greater maximum for terminating CRLF pair; an extension MAY specify a greater maximum for
commands that it defines, but not for any other command. commands that it defines, but not for any other command.
All multi-line responses MUST adhere to the following format: All multi-line responses MUST adhere to the following format:
1. The response consists of a sequence of one or more "lines", each 1. The response consists of a sequence of one or more "lines", each
being a stream of octets ending with a CRLF pair. Apart from being a stream of octets ending with a CRLF pair. Apart from
those line endings, the stream MUST NOT include the octets NUL, those line endings, the stream MUST NOT include the octets NUL,
LF, or CR. LF, or CR.
2. The first such line contains the response code as with a single 2. The first such line contains the response code as with a single
line response. line response.
3. If any subsequent line begins with the "termination octet" ("." 3. If any subsequent line begins with the "termination octet" ("."
or %x2E), that line MUST be "byte-stuffed" by pre-pending an or %x2E), that line MUST be "byte-stuffed" by pre-pending an
additional termination octet to that line of the response. additional termination octet to that line of the response.
4. The lines of the response MUST be followed by a terminating line 4. The lines of the response MUST be followed by a terminating line
consisting of a single termination octet followed by a CRLF pair consisting of a single termination octet followed by a CRLF pair
in the normal way. Thus a multi-line response is always in the normal way. Thus a multi-line response is always
terminated with the five octets CRLF "." CRLF (%x0D.0A.2E.0D.0A). terminated with the five octets CRLF "." CRLF (%x0D.0A.2E.0D.0A).
5. When interpreting a multi-line response, the "byte-stuffing" MUST 5. When interpreting a multi-line response, the "byte-stuffing" MUST
be undone; i.e. the client MUST ensure that, in any line be undone; i.e. the client MUST ensure that, in any line
beginning with the termination octet followed by octets other beginning with the termination octet followed by octets other
than a CRLF pair, that initial termination octet is disregarded. than a CRLF pair, that initial termination octet is disregarded.
6. Likewise, the terminating line ("." CRLF or %x2E.0D.0A) MUST NOT 6. Likewise, the terminating line ("." CRLF or %x2E.0D.0A) MUST NOT
be considered part of the multi-line response; i.e. the client be considered part of the multi-line response; i.e. the client
MUST ensure that any line beginning with the termination octet MUST ensure that any line beginning with the termination octet
followed immediately by a CRLF pair is disregarded; (the first followed immediately by a CRLF pair is disregarded; (the first
CRLF pair of the terminating CRLF "." CRLF is, of course, part of CRLF pair of the terminating CRLF "." CRLF is, of course, part of
the last line of the response). the last line of the response).
Note that texts using an encoding (such as UTF-16 or UTF-32) that may Note that texts using an encoding (such as UTF-16 or UTF-32) that may
contain the octets NUL, LF, or CR other than a CRLF pair cannot be contain the octets NUL, LF, or CR other than a CRLF pair cannot be
reliably conveyed in the above format. However, except when stated reliably conveyed in the above format (that is, they violate the MUST
otherwise, this specification does not require the content to be requirement above). However, except when stated otherwise, this
UTF-8 and it is possible for octets above and below 128 to be mixed specification does not require the content to be UTF-8 and therefore
arbitrarily. it MAY include octets above and below 128 mixed arbitrarily.
This document does not place any limit on the length of a subsequent This document does not place any limit on the length of a subsequent
line in a multi-line response. However, the standards that define the line in a multi-line response. However, the standards that define
format of articles may do so. the format of articles may do so.
An NNTP server MAY have an inactivity autologout timer. Such a timer An NNTP server MAY have an inactivity autologout timer. Such a timer
SHOULD be of at least three minutes duration, with the exception that SHOULD be of at least three minutes duration, with the exception that
there MAY be a shorter limit on how long the server is willing to there MAY be a shorter limit on how long the server is willing to
wait for the first command from the client. The receipt of any wait for the first command from the client. The receipt of any
command from the client during the timer interval SHOULD suffice to command from the client during the timer interval SHOULD suffice to
reset the autologout timer. Similarly, the receipt of any significant reset the autologout timer. Similarly, the receipt of any
amount of data from the client while in the midst of sending a significant amount of data from the client while in the midst of
multi-line message to the server (such as during a POST or IHAVE sending a multi-line message to the server (such as during a POST or
command) SHOULD suffice to reset the autologout timer. When the timer IHAVE command) SHOULD suffice to reset the autologout timer. When
expires, the server SHOULD close the TCP connection without sending the timer expires, the server SHOULD close the TCP connection without
any response to the client. sending 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 syntactically correct but failed for some 4xx - Command was syntactically correct but failed for some
reason. reason.
5xx - Command unknown, unsupported, unavailable, or syntax error. 5xx - Command unknown, unsupported, unavailable, or syntax error.
The next digit in the code indicates the function response category: The next digit in the code indicates the function response category:
x0x - Connection, set-up, and miscellaneous messages x0x - Connection, set-up, 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 privacy 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 arguments 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
skipping to change at page 11, line 8 skipping to change at page 10, line 49
x4x - Posting x4x - Posting
x8x - Reserved for authentication and privacy 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 arguments 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 arguments is interpretation by the client the number and type of such arguments 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 that the response may be
MUST only use the status indicator itself to determine the nature of multi-line or not depending on the command (GROUP or LISTGROUP) that
the response. The exact response codes that can be returned by any generated it. In all other cases, the client MUST only use the
given command are detailed in the description of that command. status indicator itself to determine the nature of the response. The
exact response codes that can be returned by any given command are
detailed in the description of that command.
Arguments MUST be separated from the numeric status indicator and Arguments MUST be separated from the numeric status indicator and
from each other by a single space. All numeric arguments 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
arguments 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
code or last argument as appropriate, and the client MUST NOT make response code or last argument as appropriate, and the client MUST
decisions based on this text. Such text MUST be separated from the NOT make decisions based on this text. Such text MUST be separated
numeric status indicator or the last argument by at least one space. from the numeric status indicator or the last argument by at least
one space.
The server MUST respond to any command with the appropriate generic 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 43 skipping to change at page 11, line 39
If a client receives an unexpected response, it SHOULD use the first If a client receives an unexpected response, it SHOULD use the first
digit of the response to determine the result. For example, an digit of the response to determine the result. For example, an
unexpected 2xx should be taken as success and an unexpected 4xx or unexpected 2xx should be taken as success and an unexpected 4xx or
5xx as failure. 5xx as failure.
Response codes not specified in this document MAY be used for any Response codes not specified in this document MAY be used for any
installation-specific additional commands also not specified. These installation-specific additional commands also not specified. These
SHOULD be chosen to fit the pattern of x9x specified above. SHOULD be chosen to fit the pattern of x9x specified above.
Neither this document nor any extension registered with IANA (see Neither this document nor any registered extension (see Section 8)
Section 8) will specify any response codes of the x9x pattern. will specify any response codes of the x9x pattern. (Implementers of
(Implementers of extensions are accordingly cautioned not to use such extensions are accordingly cautioned not to use such responses for
responses for extensions that may subsequently be submitted for extensions that may subsequently be submitted for registration.)
registration.)
3.2.1 Generic Response Codes 3.2.1 Generic Response Codes
The server MUST respond to any command with the appropriate one of The server MUST respond to any command with the appropriate one of
the following generic responses if it represents the situation. the following generic responses if it represents the situation.
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
split and then interpreted. Note that where a command has variants or split and then interpreted. Note that where a command has
depending on a second keyword (e.g. LIST ACTIVE and LIST NEWSGROUPS), variants depending on a second keyword (e.g. LIST ACTIVE and LIST
then 501 MUST be used when the base command is implemented but the NEWSGROUPS), then 501 MUST be used when the base command is
requested variant is not, and 500 MUST be used only when the base implemented but the requested variant is not, and 500 MUST be used
command itself is not implemented. only when the base command itself is not implemented.
As a special case, if an argument is required to be a base64-encoded
string [RFC3548] (there are no such arguments in this specification,
but there may be in extensions) and is not validly encoded, the
response code 504 MUST be returned.
If the server experiences an internal fault or problem that means it 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 recognizes the command but code 403 MUST be returned. If the server recognizes 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
server, this MAY be treated as an unimplemented command (response a server, this MAY be treated as an unimplemented command (response
code 500 or 501 as appropriate) or as a working command where the code 500 or 501 as appropriate) or as a working command where the
information is not 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 the appropriate one of the the server is in its current state, then the appropriate one of the
following response codes MUST be used. following response codes MUST be used.
502: it is necessary to terminate the connection and start a new one 502: it is necessary to terminate the connection and start a new one
with the appropriate authority before the command can be used. with the appropriate authority before the command can be used.
Note that the server MUST NOT close the TCP connection immediately Note that the server MUST NOT close the TCP connection immediately
after a 502 response except at the initial connection (Section after a 502 response except at the initial connection (Section
5.1) and with the MODE READER (Section 5.2) command. See also the 5.1) and with the MODE READER (Section 5.2) command. See also the
latter command for historical usage of this response. latter command for historical usage of this response.
480: the client must authenticate itself to the server (that is, 480: the client must authenticate itself to the server (that is,
provide information as to the identity of the client) before the provide information as to the identity of the client) before the
facility can be used. This will involve the use of an facility can be used on this connection. This will involve the
authentication extension. use of an authentication extension such as [NNTP-AUTH].
483: the client must negotiate appropriate privacy protection on the 483: the client must negotiate appropriate privacy protection on the
connection. This will involve the use of a privacy extension. connection. This will involve the use of a privacy extension such
as [NNTP-TLS].
401: the client must change the state of the connection in some other 401: the client must change the state of the connection in some other
manner. The first argument of the response MUST be the manner. The first argument of the response MUST be the
extension-label (see Section 8) of the extension (which may be a extension-label (see Section 8) of the extension (which may be a
private extension) that provides the necessary mechanism, or private extension) that provides the necessary mechanism, or
"MODE-READER" if it is necessary to use the MODE READER (Section "MODE-READER" if it is necessary to use the MODE READER (Section
5.2) command. 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.
skipping to change at page 13, line 23 skipping to change at page 13, line 18
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.
The client MUST be prepared to receive any of these responses for any The client MUST be prepared to receive any of these responses for any
command (except, of course, that the server MUST NOT generate a 500 command (except, of course, that the server MUST NOT generate a 500
response code for mandatory commands). 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:
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 202 Extensions supported: [S] 202 Extensions supported:
[S] LISTGROUP [S] LISTGROUP
[S] . [S] .
[C] OVER [C] OVER
[S] 500 Unknown command [S] 500 Unknown command
Example of an unsupported variant: Example of an unsupported variant:
[C] MODE POSTER [C] MODE POSTER
[S] 501 Unknown MODE option [S] 501 Unknown MODE option
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 a base64-encoding error (the second argument is meant to
be base64-encoded):
[C] XENCRYPT RSA abcd=efg
[S] 504 Base64 encoding error
Example of an attempt to access a facility not available to this Example of an attempt to access a facility not available to this
connection: connection:
[C] MODE READER [C] MODE READER
[S] 200 Reader mode, posting permitted [S] 200 Reader mode, posting permitted
[C] IHAVE <i.am.an.article.you.will.want@example.com> [C] IHAVE <i.am.an.article.you.will.want@example.com>
[S] 502 Permission denied [S] 502 Permission denied
Example of an attempt to access a facility requiring authentication: 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 such 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 requiring privacy: Example of an attempt to access a facility requiring privacy:
[C] GROUP secret.group [C] GROUP secret.group
[S] 483 Secure connection required [S] 483 Secure connection required
[C] XENCRYPT [C] XENCRYPT
[Client and server negotiate encryption on the link] [Client and server negotiate encryption on the link]
[S] 283 Encrypted link established [S] 283 Encrypted link established
[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 a need to change mode before using a facility: Example of a need to change mode before using a facility:
[C] GROUP binary.group [C] GROUP binary.group
[S] 401 XHOST Not on this virtual host [S] 401 XHOST Not on this virtual host
[C] XHOST binary.news.example.org [C] XHOST binary.news.example.org
[S] 290 binary.news.example.org virtual host selected [S] 290 binary.news.example.org virtual host selected
[C] GROUP binary.group [C] GROUP binary.group
[S] 211 5 1 77 binary.group selected [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
[Server closes connection.] [Server closes connection.]
3.3 Pipelining 3.3 Pipelining
NNTP is designed to operate over a reliable bi-directional connection NNTP is designed to operate over a reliable bi-directional connection
such as TCP. Therefore, if a command does not depend on the response such as TCP. Therefore, if a command does not depend on the response
to the previous one, it should not matter if it is sent before that to the previous one, it should not matter if it is sent before that
response is received. Doing this is called "pipelining". However, response is received. Doing this is called "pipelining". However,
skipping to change at page 15, line 19 skipping to change at page 15, line 6
3.3 Pipelining 3.3 Pipelining
NNTP is designed to operate over a reliable bi-directional connection NNTP is designed to operate over a reliable bi-directional connection
such as TCP. Therefore, if a command does not depend on the response such as TCP. Therefore, if a command does not depend on the response
to the previous one, it should not matter if it is sent before that to the previous one, it should not matter if it is sent before that
response is received. Doing this is called "pipelining". However, response is received. Doing this is called "pipelining". However,
certain server implementations throw away all text received from the certain server implementations throw away all text received from the
client following certain commands before sending their response. If client following certain commands before sending their response. If
this happens, pipelining will be affected because one or more this happens, pipelining will be affected because one or more
commands will have been ignored or misinterpreted, and the client commands will have been ignored or misinterpreted, and the client
will be matching the wrong responses to each command. Since there are will be matching the wrong responses to each command. Since there
significant benefits to pipelining, but also circumstances where it are significant benefits to pipelining, but also circumstances where
is reasonable or common for servers to behave in the above manner, it is reasonable or common for servers to behave in the above manner,
this document puts certain requirements on both clients and servers. this document puts certain requirements on both clients and servers.
Except where stated otherwise, a client MAY use pipelining. That is, Except where stated otherwise, a client MAY use pipelining. That is,
it may send a command before receiving the response for the previous it may send a command before receiving the response for the previous
command. The server MUST allow pipelining and MUST NOT throw away any command. The server MUST allow pipelining and MUST NOT throw away
text received after a command. Irrespective of whether or not any text received after a command. Irrespective of whether or not
pipelining is used, the server MUST process commands in the order pipelining is used, the server MUST process commands in the order
they are sent. they are sent.
If the specific description of a command says it "MUST NOT be If the specific description of a command says it "MUST NOT be
pipelined", that command MUST end any pipeline of commands. That is, pipelined", that command MUST end any pipeline of commands. That is,
the client MUST NOT send any following command until receiving the the client MUST NOT send any following command until receiving the
CRLF at the end of the response from the command. The server MAY CRLF at the end of the response from the command. The server MAY
ignore any data received after the command and before the CRLF at the ignore any data received after the command and before the CRLF at the
end of the response is sent to the client. end of the response is sent to the client.
skipping to change at page 17, line 9 skipping to change at page 16, line 39
of a CRLF pair, and MUST end with a CRLF pair. This specification of a CRLF pair, and MUST end with a CRLF pair. This specification
puts no further restrictions on the body; in particular, it MAY be puts no further restrictions on the body; in particular, it MAY be
empty. empty.
The headers of an article consist of one or more header lines. Each The headers of an article consist of one or more header lines. Each
header line consists of a header name, a colon, a space, the header header line consists of a header name, a colon, a space, the header
content, and a CRLF in that order. The name consists of one or more content, and a CRLF in that order. The name consists of one or more
printable US-ASCII characters other than colon and, for the purposes printable US-ASCII characters other than colon and, for the purposes
of this specification, is not case-sensitive. There MAY be more than of this specification, is not case-sensitive. There MAY be more than
one header line with the same name. The content MUST NOT contain one header line with the same name. The content MUST NOT contain
CRLF; it MAY be empty. A header may be "folded"; that is, a CRLF pair CRLF; it MAY be empty. A header may be "folded"; that is, a CRLF
may be placed before any TAB or space in the line; there MUST still pair may be placed before any TAB or space in the line; there MUST
be some other octet between any two CRLF pairs in a header line. still be some other octet between any two CRLF pairs in a header
(Note that folding means that the header line occupies more than one line. (Note that folding means that the header line occupies more
line when displayed or transmitted; nevertheless it is still referred than one line when displayed or transmitted; nevertheless it is still
to as "a" header line.) The presence or absence of folding does not referred to as "a" header line.) The presence or absence of folding
affect the meaning of the header line; that is, the CRLF pairs does not affect the meaning of the header line; that is, the CRLF
introduced by folding are not considered part of the header content. pairs introduced by folding are not considered part of the header
Header lines SHOULD NOT be folded before the space after the colon content. Header lines SHOULD NOT be folded before the space after
that follows the header name, and SHOULD include at least one octet the colon that follows the header name, and SHOULD include at least
other than %x09 or %x20 between CRLF pairs. However, if an article one octet other than %x09 or %x20 between CRLF pairs. However, if an
has been received from elsewhere with one of these, clients and article has been received from elsewhere with one of these, clients
servers MAY transfer it to the other without re-folding it. and servers MAY transfer it to the other without re-folding it.
The content of a header SHOULD be in UTF-8. However, if a server The content of a header SHOULD be in UTF-8. However, if a server
receives an article from elsewhere that uses octets in the range 128 receives an article from elsewhere that uses octets in the range 128
to 255 in some other manner, it MAY pass it to a client without to 255 in some other manner, it MAY pass it to a client without
modification. Therefore clients MUST be prepared to receive such modification. Therefore clients MUST be prepared to receive such
headers and also data derived from them (e.g. in the responses from headers and also data derived from them (e.g. in the responses from
the OVER extension (Section 8.5)) and MUST NOT assume that they are the OVER extension (Section 8.5)) and MUST NOT assume that they are
always UTF-8. always UTF-8. How the client will then process those headers,
including identifying the encoding used, is outside the scope of this
document.
Each article MUST have a unique message-id; two articles offered by Each article MUST have a unique message-id; two articles offered by
an NNTP server MUST NOT have the same message-id. For the purposes of an NNTP server MUST NOT have the same message-id. For the purposes
this specification, message-ids are opaque strings that MUST meet the of this specification, message-ids are opaque strings that MUST meet
following requirements: the following requirements:
o A message-id MUST begin with "<" and end with ">", and MUST NOT o A message-id MUST begin with "<" and end with ">", and MUST NOT
contain the latter except at the end. contain the latter except at the end.
o A message-id MUST be between 3 and 250 octets in length. o A message-id MUST be between 3 and 250 octets in length.
o A message-id MUST NOT contain octets other than printable US-ASCII o A message-id MUST NOT contain octets other than printable US-ASCII
characters. characters.
Two message-ids are the same if and only if they consist of the same Two message-ids are the same if and only if they consist of the same
sequence of octets. sequence of octets.
This specification does not describe how the message-id of an article This specification does not describe how the message-id of an article
is determined. If the server does not have any way to determine a is determined. If the server does not have any way to determine a
message-id from the article itself, it MUST synthesize one (this message-id from the article itself, it MUST synthesize one (this
specification does not require the article to be changed as a specification does not require the article to be changed as a
result). See also Appendix B.2. result). See also Appendix B.2.
4. The WILDMAT format 4. The WILDMAT format
skipping to change at page 19, line 11 skipping to change at page 19, line 6
4.2 Wildmat semantics 4.2 Wildmat semantics
A wildmat is tested against a string, and either matches or does not A wildmat is tested against a string, and either matches or does not
match. To do this, each constituent wildmat-pattern is matched match. To do this, each constituent wildmat-pattern is matched
against the string and the rightmost pattern that matches is against the string and the rightmost pattern that matches is
identified. If that wildmat-pattern is not preceded with "!", the identified. If that wildmat-pattern is not preceded with "!", the
whole wildmat matches. If it is preceded by "!", or if no whole wildmat matches. If it is preceded by "!", or if no
wildmat-pattern matches, the whole wildmat does not match. wildmat-pattern matches, the whole wildmat does not match.
For example, consider the wildmat "a*,!*b,*c*": For example, consider the wildmat "a*,!*b,*c*":
the string "aaa" matches because the rightmost match is with "a*" the string "aaa" matches because the rightmost match is with "a*"
the string "abb" does not match because the rightmost match is the string "abb" does not match because the rightmost match is
with "*b" with "*b"
the string "ccb" matches because the rightmost match is with "*c*" the string "ccb" matches because the rightmost match is with "*c*"
the string "xxx" does not match because no wildmat-pattern matches the string "xxx" does not match because no wildmat-pattern matches
A wildmat-pattern matches a string if the string can be broken into A wildmat-pattern matches a string if the string can be broken into
components, each of which matches the corresponding wildmat-item in components, each of which matches the corresponding wildmat-item in
the pattern; the matches must be in the same order, and the whole the pattern; the matches must be in the same order, and the whole
string must be used in the match. The pattern is "anchored"; that is, string must be used in the match. The pattern is "anchored"; that
the first and last characters in the string must match the first and is, the first and last characters in the string must match the first
last item respectively (unless that item is an asterisk matching zero and last item respectively (unless that item is an asterisk matching
characters). zero characters).
A wildmat-exact matches the same character (which may be more than A wildmat-exact matches the same character (which may be more than
one octet in UTF-8). one octet in UTF-8).
"?" matches exactly one character (which may be more than one octet). "?" matches exactly one character (which may be more than one octet).
"*" matches zero or more characters. It can match an empty string, "*" matches zero or more characters. It can match an empty string,
but it cannot match a subsequence of a UTF-8 sequence that is not but it cannot match a subsequence of a UTF-8 sequence that is not
aligned to the character boundaries. aligned to the character boundaries.
skipping to change at page 21, line 12 skipping to change at page 21, line 12
*a? any string with "a" as its penultimate character *a? any string with "a" as its penultimate character
*a?? any string with "a" as its antepenultimate character *a?? any string with "a" as its antepenultimate character
5. Session administration commands 5. Session administration commands
5.1 Initial Connection 5.1 Initial Connection
5.1.1 Usage 5.1.1 Usage
Responses Responses
200 Service available, posting allowed 200 Service available, posting allowed [1]
201 Service available, posting prohibited 201 Service available, posting prohibited [1]
400 Service temporarily unavailable [1] 400 Service temporarily unavailable [1][2]
502 Service permanently unavailable [1] 502 Service permanently unavailable [1][2]
[1] These are the only valid response codes for the initial greeting;
These are the only valid response codes for the initial greeting;
the server MUST not return any other generic response code. the server MUST not return any other generic response code.
[2] 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.1.2 Description 5.1.2 Description
There is no command presented by the client upon initial connection There is no command presented by the client upon initial connection
to the server. The server MUST present an appropriate response code to the server. The server MUST present an appropriate response code
as a greeting to the client. This response informs the client whether as a greeting to the client. This response informs the client
service is available and whether the client is permitted to post. whether service is available and whether the client is permitted to
post.
If the server will accept further commands from the client including If the server will accept further commands from the client including
POST, the server MUST present a 200 greeting code. If the server will POST, the server MUST present a 200 greeting code. If the server
accept further commands from the client, but it is not authorized to will accept further commands from the client, but it is not
post articles using the POST command, the server MUST present a 201 authorized to post articles using the POST command, the server MUST
greeting code. present a 201 greeting code.
Otherwise the server MUST present a 400 or 502 greeting code and then Otherwise the server MUST present a 400 or 502 greeting code and then
immediately close the connection. 400 SHOULD be used if the issue is immediately close the connection. 400 SHOULD be used if the issue is
only temporary (for example, because of load) and the client can only temporary (for example, because of load) and the client can
expect to be able to connect successfully at some point in the future expect to be able to connect successfully at some point in the future
without making any changes. 502 MUST be used if the client is not without making any changes. 502 MUST be used if the client is not
permitted under any circumstances to interact with the server, and permitted under any circumstances to interact with the server, and
MAY be used if the server has insufficient information to determine MAY be used if the server has insufficient information to determine
whether the issue is temporary or permanent. whether the issue is temporary or permanent.
skipping to change at page 23, line 13 skipping to change at page 22, line 46
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 in this specification (including Section 8) other than IHAVE, command in this specification (including Section 8) other than IHAVE,
HEAD, STAT, LIST ACTIVE, or LIST EXTENSIONS; other extensions MAY HEAD, STAT, LIST ACTIVE, or LIST EXTENSIONS; other extensions MAY
also require MODE READER to be used. Servers MAY require that this also require MODE READER to be used. Servers MAY require that this
command be issued before any commands other than the above are sent command be issued before any commands other than the above are sent
and MAY reject such commands until after a MODE READER command has and MAY reject such commands until after a MODE READER command has
been sent. Such rejections SHOULD use response code 401 with argument been sent. Such rejections SHOULD use response code 401 with
"MODE-READER", but for historical reasons response code 502 MAY be argument "MODE-READER", but for historical reasons response code 502
used, even though this situation does not meet the conditions for MAY be used, even though this situation does not meet the conditions
that response. for that response.
Once MODE READER is sent, IHAVE (and any related extensions) MAY no Once MODE READER is sent, IHAVE (and any related extensions) MAY no
longer be permitted, even if it were permitted before the MODE READER longer be permitted, even if it were permitted before the MODE READER
command. The results of LIST EXTENSIONS MAY be different following a command. The results of LIST EXTENSIONS MAY be different following a
MODE READER command than prior to the issuing of that command. MODE READER command than prior to the issuing of that command.
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.
skipping to change at page 25, line 10 skipping to change at page 24, line 34
[C] MODE READER [C] MODE READER
[S] 200 Reader mode, posting permitted [S] 200 Reader mode, posting permitted
[C] IHAVE <i.am.an.article.you.have@example.com> [C] IHAVE <i.am.an.article.you.have@example.com>
[S] 502 Permission denied [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.
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
extensions are supported by the server at any given time. See Section extensions are supported by the server at any given time. See
8 for further discussion of extensions. Section 8 for further discussion of extensions.
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 registered extension, and is optional otherwise. A server MUST NOT
IANA registry, and is optional otherwise. generate the generic response 401, 480, 483, or 502 (all of which
indicate "not permitted") to this command.
This command MAY be issued at anytime during a session. It 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
change during a session because of other state information (which in MAY change during a session because of other state information (which
turn may be changed by the effects of other commands). An NNTP client in turn may be changed by the effects of other commands). An NNTP
is only able to get the current and correct information concerning client is only able to get the current and correct information
available extensions at any point during a session by issuing a LIST concerning available extensions at any point during a session by
EXTENSIONS command at that point of that session and processing the issuing a LIST EXTENSIONS command at that point of that session and
response, and the server MUST ensure that those extensions currently processing the response, and the server MUST ensure that those
listed in the returned information are available. Therefore, if an extensions currently listed in the returned information are
extension (including those in Section 8) is only available before or available. Therefore, if an extension (including those in Section 8)
after a MODE READER command, the LIST EXTENSIONS command MUST only is only available before or after a MODE READER command, the LIST
include the extension in that situation. Similarly, if only some of EXTENSIONS command MUST only include the extension in that situation.
the commands in an extension will be available, or if the behaviour Similarly, if only some of the commands in an extension will be
of the extension will change in some other manner, before or after a available, or if the behaviour of the extension will change in some
MODE READER command, this MUST be indicated by different arguments to other manner, before or after a MODE READER command, this MUST be
the extension-label in the results of LIST EXTENSIONS in each indicated by different arguments to the extension-label in the
situation. results of LIST EXTENSIONS in each situation.
While some extensions are likely to be always available or never While some extensions are likely to be always available or never
available, others will "appear" and "disappear" depending on server available, others will "appear" and "disappear" depending on server
state changes within the session or external events between sessions. state changes within the session or external events between sessions.
An NNTP client MAY cache the results of this command, but MUST NOT An NNTP client MAY cache the results of this command, but MUST NOT
rely on the correctness of any cached results, whether from earlier rely on the correctness of any cached results, whether from earlier
in this session or from a previous session, MUST cope gracefully with in this session or from a previous session, MUST cope gracefully with
the cached status being out of date, and SHOULD (if caching results) the cached status being out of date, and SHOULD (if caching results)
provide a way to force the cached information to be refreshed. provide a way to force the cached information to be refreshed.
Furthermore, a client MUST NOT use cached results in relation to Furthermore, a client MUST NOT use cached results in relation to
security, privacy, and authentication extensions. See Section 11.6 security, privacy, and authentication extensions. See Section 11.6
for further discussion of this topic. 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 arguments (separated by one or more spaces). The extension-label more arguments (separated by one or more spaces). The
and the meaning of the arguments are specified as part of the extension-label and the meaning of the arguments are specified as
definition of the extension. The extension-label is a string of 1 to part of the definition of the extension. The extension-label is a
12 US-ASCII letters and MUST be in uppercase. Arguments are strings string of 1 to 12 US-ASCII letters and MUST be in uppercase (that is,
of 1 or more printable UTF-8 characters (that is, either printable %x41-5A). Arguments are strings of 1 or more printable UTF-8
US-ASCII characters or any UTF-8 sequence outside the US-ASCII range, characters (that is, either printable US-ASCII characters or any
but not space or TAB). UTF-8 sequence outside the US-ASCII range, but not 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 MUST list all supported registered extensions, and SHOULD list all
extensions are listed is not significant. The server need not even supported private extensions. The order in which the extensions are
consistently return the same order. If the server does not support listed is not significant. The server need not even consistently
any extensions, it MUST return an empty list. The 402 response code return the same order. If the server does not support any
is documented for historic reasons only; clients SHOULD handle it extensions, it MUST return an empty list. The 402 response code is
documented for historic reasons only; clients SHOULD handle it
gracefully, but servers MUST NOT generate it. gracefully, but servers MUST NOT generate it.
Following a generic failure response, such as 403, an extension might Following a generic failure response, such as 403, an extension might
still be available, and the client MAY attempt to use it. still be available, and the client MAY attempt to use it.
5.3.3 Examples 5.3.3 Examples
Example of a successful response: Example of a successful response:
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 202 Extensions supported: [S] 202 Extensions supported:
[S] OVER MSGID [S] OVER MSGID
[S] HDR [S] HDR
[S] LISTGROUP [S] LISTGROUP
[S] . [S] .
The particular extensions shown here are simply examples of what The particular extensions shown here are simply examples of what
might be defined in other places, and no particular meaning should be might be defined in other places, and no particular meaning should be
attributed to them. attributed to them.
Example where no extensions are available: Example where no extensions are available:
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 202 Extensions supported: [S] 202 Extensions supported:
[S] . [S] .
Example from a non-conforming server which indicates "no extensions Example from a non-conforming server which indicates "no extensions
available" using the 402 response code: available" using the 402 response code:
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 402 Server has no extensions [S] 402 Server has no extensions
5.4 QUIT 5.4 QUIT
5.4.1 Usage 5.4.1 Usage
Syntax Syntax
QUIT QUIT
Responses Responses
205 Connection closing 205 Connection closing
5.4.2 Description 5.4.2 Description
The client uses the QUIT command to terminate the session. The server The client uses the QUIT command to terminate the session. The
MUST acknowledge the QUIT command and then close the connection to server MUST acknowledge the QUIT command and then close the
the client. This is the preferred method for a client to indicate connection to the client. This is the preferred method for a client
that it has finished all its transactions with the NNTP server. to indicate that it has finished all its transactions with the NNTP
server.
If a client simply disconnects (or the connection times out or some If a client simply disconnects (or the connection times out or some
other fault occurs), the server MUST gracefully cease its attempts to other fault occurs), the server MUST gracefully cease its attempts to
service the client, disconnecting from its end if necessary. service the client, disconnecting from its end if necessary.
The server MUST NOT generate any response code to the QUIT command
other than 205 or, if any arguments are provided, 501.
5.4.3 Examples 5.4.3 Examples
[C] QUIT [C] QUIT
[S] 205 closing connection [S] 205 closing connection
[Server closes connection.] [Server closes connection.]
6. Article posting and retrieval 6. Article posting and retrieval
News reading clients have available a variety of mechanisms to News reading clients have available a variety of mechanisms to
retrieve articles via NNTP. The news articles are stored and indexed retrieve articles via NNTP. The news articles are stored and indexed
using three types of keys. One key is the message-id of an article. using three types of keys. One key is the message-id of an article.
Another key is composed of the newsgroup name and the article number Another key is composed of the newsgroup name and the article number
within that newsgroup. That key MUST be unique to a particular server within that newsgroup. That key MUST be unique to a particular
(there will be only one article with that number within a particular server (there will be only one article with that number within a
newsgroup), but is not required to be globally unique. Additionally, particular newsgroup), but is not required to be globally unique.
because the same article can be cross-posted to multiple newsgroups, Additionally, because the same article can be cross-posted to
there may be multiple keys that point to the same article on the same multiple newsgroups, there may be multiple keys that point to the
server. The final key is the arrival timestamp, giving the time that same article on the same server. The final key is the arrival
the article arrived at the server. timestamp, giving the time that the article arrived at the server.
The server MUST ensure that article numbers are issued in order of The server MUST ensure that article numbers are issued in order of
arrival timestamp; that is, articles arriving later MUST have higher arrival timestamp; that is, articles arriving later MUST have higher
numbers than those that arrive earlier. The server SHOULD allocate numbers than those that arrive earlier. The server SHOULD allocate
the next sequential unused number to each new article. the next sequential unused number to each new article.
Article numbers MUST lie between 1 and 4,294,967,295 inclusive. The Article numbers MUST lie between 1 and 4,294,967,295 inclusive. The
client and server MAY use leading zeroes in specifying article client and server MAY use leading zeroes in specifying article
numbers, but MUST NOT use more than 16 digits. In some situations, numbers, but MUST NOT use more than 16 digits. In some situations,
the value zero replaces an article number to show some special the value zero replaces an article number to show some special
skipping to change at page 28, line 43 skipping to change at page 28, line 43
newsgroup" and the "current article number", which are used by newsgroup" and the "current article number", which are used by
various commands. At the start of an NNTP session, both of these various commands. At the start of an NNTP session, both of these
values are set to the special value "invalid". values are set to the special value "invalid".
6.1.1 GROUP 6.1.1 GROUP
6.1.1.1 Usage 6.1.1.1 Usage
Syntax Syntax
GROUP group GROUP group
Responses Responses
211 number low high group Group successfully selected 211 number low high group Group successfully selected
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 argument 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
by using the LIST ACTIVE command (see Section 7.6.1). obtained 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
number of articles available, and MUST be no greater than one more number of articles available, and MUST be no greater than one more
than the difference between the reported low and high water marks. than the difference between the reported low and high water marks.
skipping to change at page 29, line 27 skipping to change at page 29, line 27
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
number of articles available, and MUST be no greater than one more number of articles available, and MUST be no greater than one more
than the difference between the reported low and high water marks. than the difference between the reported low and high water marks.
(Some implementations will actually count the number of articles (Some implementations will actually count the number of articles
currently stored. Others will just subtract the low water mark from currently stored. Others will just subtract the low water mark from
the high water mark and add one to get an estimate.) the high water mark and add one to get an estimate.)
If the group is empty, one of the following three situations will If the group is empty, one of the following three situations will
occur. Clients MUST accept all three cases; servers MUST NOT occur. Clients MUST accept all three cases; servers MUST NOT
represent an empty group in any other way. represent an empty group in any other way.
o The high water mark will be one less than the low water mark, and o The high water mark will be one less than the low water mark, and
the estimated article count will be zero. Servers SHOULD use this the estimated article count will be zero. Servers SHOULD use this
method to show an empty group. This is the only time that the high method to show an empty group. This is the only time that the
water mark can be less than the low water mark. high water mark can be less than the low water mark.
o All three numbers will be zero. o All three numbers will be zero.
o The high water mark is greater than or equal to the low water o The high water mark is greater than or equal to the low water
mark. The estimated article count might be zero or non-zero; if mark. The estimated article count might be zero or non-zero; if
non-zero, the same requirements apply as for a non-empty group. non-zero, the same requirements apply as for a non-empty group.
The set of articles in a group may change after the GROUP command is The set of articles in a group may change after the GROUP command is
carried out. That is: carried out. That is:
o articles may be removed from the group o articles may be removed from the group
o articles may be reinstated in the group with the same article o articles may be reinstated in the group with the same article
number, but those articles MUST have numbers no less than the number, but those articles MUST have numbers no less than the
reported low water mark (note that this is a reinstatement of the reported low water mark (note that this is a reinstatement of the
previous article, not a new article reusing the number) previous article, not a new article reusing the number)
o new articles may be added with article numbers greater than the o new articles may be added with article numbers greater than the
reported high water mark (if an article that was the one with the reported high water mark (if an article that was the one with the
highest number has been removed and the high water mark adjusted highest number has been removed and the high water mark adjusted
accordingly, the next new article will not have the number one accordingly, the next new article will not have the number one
greater than the reported high water mark) greater than the reported high water mark)
Except when the group is empty and all three numbers are zero, Except when the group is empty and all three numbers are zero,
whenever a subsequent GROUP command for the same newsgroup is issued, whenever a subsequent GROUP command for the same newsgroup is issued,
either by the same client or a different client, the reported low either by the same client or a different client, the reported low
water mark in the response MUST be no less than that in any previous water mark in the response MUST be no less than that in any previous
skipping to change at page 30, line 16 skipping to change at page 30, line 10
Except when the group is empty and all three numbers are zero, Except when the group is empty and all three numbers are zero,
whenever a subsequent GROUP command for the same newsgroup is issued, whenever a subsequent GROUP command for the same newsgroup is issued,
either by the same client or a different client, the reported low either by the same client or a different client, the reported low
water mark in the response MUST be no less than that in any previous water mark in the response MUST be no less than that in any previous
response for that newsgroup in any session, and SHOULD be no less response for that newsgroup in any session, and SHOULD be no less
than that in any previous response for that newsgroup ever sent to than that in any previous response for that newsgroup ever sent to
any client. Any failure to meet the latter condition SHOULD be any client. Any failure to meet the latter condition SHOULD be
transient only. The client may make use of the low water mark to transient only. The client may make use of the low water mark to
remove all remembered information about articles with lower numbers, remove all remembered information about articles with lower numbers,
as these will never recur. This includes the situation when the high as these will never recur. This includes the situation when the high
water mark is one less than the low water mark. No similar assumption water mark is one less than the low water mark. No similar
can be made about the high water mark, as this can decrease if an assumption can be made about the high water mark, as this can
article is removed, and then increase again if it is reinstated or if decrease if an article is removed, and then increase again if it is
new articles arrive. reinstated or if new articles arrive.
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.
The GROUP command (or the LISTGROUP command, if implemented) MUST be The GROUP command (or the LISTGROUP command, if implemented) MUST be
used by a client and a successful response received before any other used by a client and a successful response received before any other
skipping to change at page 30, line 39 skipping to change at page 30, line 33
used by a client and a successful response received before any other used by a client and a successful response received before any other
command is used that depends on the value of the current selected command is used that depends on the value of the current selected
newsgroup or current article number. newsgroup or current article number.
If the group specified is not available on the server, a 411 response If the group specified is not available on the server, a 411 response
MUST be returned. MUST be returned.
6.1.1.3 Examples 6.1.1.3 Examples
Example for a group known to the server: Example for a group known to the server:
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
Example for a group unknown to the server: Example for a group unknown to the server:
[C] GROUP example.is.sob.bradner.or.barber [C] GROUP example.is.sob.bradner.or.barber
[S] 411 example.is.sob.bradner.or.barber is unknown [S] 411 example.is.sob.bradner.or.barber is unknown
Example of an empty group using the preferred response: Example of an empty group using the preferred response:
[C] GROUP example.currently.empty.newsgroup [C] GROUP example.currently.empty.newsgroup
[S] 211 0 4000 3999 example.currently.empty.newsgroup [S] 211 0 4000 3999 example.currently.empty.newsgroup
Example of an empty group using an alternative response:
Example of an empty group using an alternative response:
[C] GROUP example.currently.empty.newsgroup [C] GROUP example.currently.empty.newsgroup
[S] 211 0 0 0 example.currently.empty.newsgroup [S] 211 0 0 0 example.currently.empty.newsgroup
Example of an empty group using a different alternative response: Example of an empty group using a different alternative response:
[C] GROUP example.currently.empty.newsgroup [C] GROUP example.currently.empty.newsgroup
[S] 211 0 4000 4321 example.currently.empty.newsgroup [S] 211 0 4000 4321 example.currently.empty.newsgroup
6.1.2 LAST 6.1.2 LAST
6.1.2.1 Usage 6.1.2.1 Usage
Syntax Syntax
LAST LAST
Responses Responses
223 n message-id Article found 223 n message-id Article found
412 No newsgroup selected 412 No newsgroup selected
420 Current article number is invalid 420 Current article number is invalid
422 No previous article in this group 422 No previous article in this group
Parameters Parameters
n = article number n = article number
message-id = article message-id message-id = article message-id
6.1.2.2 Description 6.1.2.2 Description
If the current selected newsgroup is valid, the current article If the current selected newsgroup is valid, the current article
number MUST be set to the previous article in that newsgroup (that number MUST be set to the previous article in that newsgroup (that
is, the highest existing article number less than the current article is, the highest existing article number less than the current article
number). If successful, a response indicating the new current article number). If successful, a response indicating the new current
number and the message-id of that article MUST be returned. No article number and the message-id of that article MUST be returned.
article text is sent in response to this command. No article text is sent in response to this command.
There MAY be no previous article in the group, although the current There MAY be no previous article in the group, although the current
article number is not the reported low water mark. There MUST NOT be article number is not the reported low water mark. There MUST NOT be
a previous article when the current article number is the reported a previous article when the current article number is the reported
low water mark. low water mark.
Because articles can be removed and added, the results of multiple Because articles can be removed and added, the results of multiple
LAST and NEXT commands MAY not be consistent over the life of a LAST and NEXT commands MAY not be consistent over the life of a
particular NNTP session. particular NNTP session.
skipping to change at page 32, line 13 skipping to change at page 31, line 48
If the current article number is already the first article of the If the current article number is already the first article of the
newsgroup, a 422 response MUST be returned. If the current article newsgroup, a 422 response MUST be returned. If the current article
number is invalid, a 420 response MUST be returned. If the current number is invalid, a 420 response MUST be returned. If the current
selected newsgroup is invalid, a 412 response MUST be returned. In selected newsgroup is invalid, a 412 response MUST be returned. In
all three cases the current selected newsgroup and current article all three cases the current selected newsgroup and current article
number MUST NOT be altered. number MUST NOT be altered.
6.1.2.3 Examples 6.1.2.3 Examples
Example of a successful article retrieval using LAST: Example of a successful article retrieval using LAST:
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] NEXT [C] NEXT
[S] 223 3000237 <668929@example.org> retrieved [S] 223 3000237 <668929@example.org> retrieved
[C] LAST [C] LAST
[S] 223 3000234 <45223423@example.com> retrieved [S] 223 3000234 <45223423@example.com> retrieved
Example of an attempt to retrieve an article without having selected Example of an attempt to retrieve an article without having selected
a group (via the GROUP command) first: a group (via the GROUP command) first:
[Assumes current selected newsgroup is invalid.] [Assumes current selected newsgroup is invalid.]
[C] LAST [C] LAST
[S] 412 no newsgroup selected [S] 412 no newsgroup selected
Example of an attempt to retrieve an article using the LAST command Example of an attempt to retrieve an article using the LAST command
when the current article number is that of the first article in the when the current article number is that of the first article in the
group: group:
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] LAST [C] LAST
[S] 422 No previous article to retrieve [S] 422 No previous article to retrieve
Example of an attempt to retrieve an article using the LAST command Example of an attempt to retrieve an article using the LAST command
when the current selected newsgroup is empty: when the current selected newsgroup is empty:
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] LAST [C] LAST
[S] 420 No current article selected [S] 420 No current article selected
6.1.3 NEXT 6.1.3 NEXT
6.1.3.1 Usage 6.1.3.1 Usage
Syntax Syntax
NEXT NEXT
Responses Responses
223 n message-id Article found 223 n message-id Article found
412 No newsgroup selected 412 No newsgroup selected
420 Current article number is invalid 420 Current article number is invalid
421 No next article in this group 421 No next article in this group
Parameters Parameters
n = article number n = article number
message-id = article message-id message-id = article message-id
6.1.3.2 Description 6.1.3.2 Description
If the current selected newsgroup is valid, the current article If the current selected newsgroup is valid, the current article
number MUST be set to the next article in that newsgroup (that is, number MUST be set to the next article in that newsgroup (that is,
the lowest existing article number greater than the current article the lowest existing article number greater than the current article
number). If successful, a response indicating the new current article number). If successful, a response indicating the new current
number and the message-id of that article MUST be returned. No article number and the message-id of that article MUST be returned.
article text is sent in response to this command. No article text is sent in response to this command.
If the current article number is already the last article of the If the current article number is already the last article of the
newsgroup, a 421 response MUST be returned. In all other aspects newsgroup, a 421 response MUST be returned. In all other aspects
(apart, of course, from the lack of 422 response) this command is (apart, of course, from the lack of 422 response) this command is
identical to the LAST command (Section 6.1.2). identical to the LAST command (Section 6.1.2).
6.1.3.3 Examples 6.1.3.3 Examples
Example of a successful article retrieval using NEXT: Example of a successful article retrieval using NEXT:
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] NEXT [C] NEXT
[S] 223 3000237 <668929@example.org> retrieved [S] 223 3000237 <668929@example.org> retrieved
Example of an attempt to retrieve an article without having selected Example of an attempt to retrieve an article without having selected
a group (via the GROUP command) first: a group (via the GROUP command) first:
[Assumes current selected newsgroup is invalid.] [Assumes current selected newsgroup is invalid.]
[C] NEXT [C] NEXT
[S] 412 no newsgroup selected [S] 412 no newsgroup selected
Example of an attempt to retrieve an article using the NEXT command Example of an attempt to retrieve an article using the NEXT command
when the current article number is that of the last article in the when the current article number is that of the last article in the
group: group:
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] STAT 3002322 [C] STAT 3002322
[S] 223 3002322 <411@example.net> retrieved [S] 223 3002322 <411@example.net> retrieved
[C] NEXT [C] NEXT
[S] 421 No next article to retrieve [S] 421 No next article to retrieve
Example of an attempt to retrieve an article using the NEXT command Example of an attempt to retrieve an article using the NEXT command
when the current selected newsgroup is empty: when the current selected newsgroup is empty:
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] NEXT [C] NEXT
[S] 420 No current article selected [S] 420 No current article selected
6.2 Retrieval of articles and article sections 6.2 Retrieval of articles and article sections
The ARTICLE, BODY, HEAD, and STAT commands are very similar. They The ARTICLE, BODY, HEAD, and STAT commands are very similar. They
differ only in the parts of the article that are presented to the differ only in the parts of the article that are presented to the
client and in the successful response code. The ARTICLE command is client and in the successful response code. The ARTICLE command is
skipping to change at page 34, line 27 skipping to change at page 33, line 46
[C] NEXT [C] NEXT
[S] 420 No current article selected [S] 420 No current article selected
6.2 Retrieval of articles and article sections 6.2 Retrieval of articles and article sections
The ARTICLE, BODY, HEAD, and STAT commands are very similar. They The ARTICLE, BODY, HEAD, and STAT commands are very similar. They
differ only in the parts of the article that are presented to the differ only in the parts of the article that are presented to the
client and in the successful response code. The ARTICLE command is client and in the successful response code. The ARTICLE command is
described here in full, while the other commands are described in described here in full, while the other commands are described in
terms of the differences. As specified in Section 3.4, an article terms of the differences. As specified in Section 3.4, an article
consists of two parts: the article headers and the article body. When consists of two parts: the article headers and the article body.
responding to one of these commands, the server MUST present the When 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
skipping to change at page 34, line 40 skipping to change at page 34, line 13
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 ARTICLE
Responses Responses
First form (message-id specified) First form (message-id specified)
220 0|n message-id Article follows (multiline) 220 0|n message-id Article follows (multiline)
430 No article with that message-id 430 No article with that message-id
Second form (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
423 No articles in that range 423 No article with that number
Third form (current article number used) Third form (current article number used)
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 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
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 three forms. the body in that order). The command has three forms.
skipping to change at page 36, line 24 skipping to change at page 35, line 38
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 argument is a number or is omitted response MUST be returned. If the argument is a number or is omitted
and the current selected newsgroup is invalid, a 412 response MUST be and the current selected newsgroup is invalid, a 412 response MUST be
returned. If the argument is a number and that article does not exist returned. If the argument is a number and that article does not
in the current selected newsgroup, a 423 response MUST be returned. exist in the current selected newsgroup, a 423 response MUST be
If the argument is omitted and the current article number is invalid, returned. If the argument is omitted and the current article number
a 420 response MUST be returned. 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>
[S] Path: pathost!demo!whitehouse!not-for-mail [S] Path: pathost!demo!whitehouse!not-for-mail
[S] From: "Demo User" <nobody@example.net> [S] From: "Demo User" <nobody@example.net>
[S] Newsgroups: misc.test [S] Newsgroups: misc.test
[S] Subject: I am just a test article [S] Subject: I am just a test article
[S] Date: 6 Oct 1998 04:38:40 -0500 [S] Date: 6 Oct 1998 04:38:40 -0500
[S] Organization: An Example Net, Uncertain, Texas [S] Organization: An Example Net, Uncertain, Texas
skipping to change at page 37, line 17 skipping to change at page 36, line 29
[S] Newsgroups: misc.test [S] Newsgroups: misc.test
[S] Subject: I am just a test article [S] Subject: I am just a test article
[S] Date: 6 Oct 1998 04:38:40 -0500 [S] Date: 6 Oct 1998 04:38:40 -0500
[S] Organization: An Example Net, Uncertain, Texas [S] Organization: An Example Net, Uncertain, Texas
[S] Message-ID: <411@example.net> [S] Message-ID: <411@example.net>
[S] [S]
[S] This is just a test article. [S] This is just a test article.
[S] . [S] .
Example of an unsuccessful retrieval of an article by message-id: Example of an unsuccessful retrieval of an article by message-id:
[C] ARTICLE <i.am.not.there@example.com> [C] ARTICLE <i.am.not.there@example.com>
[S] 430 No Such Article Found [S] 430 No Such Article Found
Example of an unsuccessful retrieval of an article by number: Example of an unsuccessful retrieval of an article by number:
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 news.groups [S] 211 1234 3000234 3002322 news.groups
[C] ARTICLE 300256 [C] ARTICLE 300256
[S] 423 No such article number in this group [S] 423 No article with that number
Example of an unsuccessful retrieval of an article by number because Example of an unsuccessful retrieval of an article by number because
no newsgroup was selected first: no newsgroup was selected first:
[Assumes current selected newsgroup is invalid.] [Assumes current selected newsgroup is invalid.]
[C] ARTICLE 300256 [C] ARTICLE 300256
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Example of an attempt to retrieve an article when the current Example of an attempt to retrieve an article when the current
selected newsgroup is empty: selected newsgroup is empty:
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] ARTICLE [C] ARTICLE
[S] 420 No current article selected [S] 420 No current article selected
6.2.2 HEAD 6.2.2 HEAD
6.2.2.1 Usage 6.2.2.1 Usage
Syntax Syntax
skipping to change at page 38, line 5 skipping to change at page 37, line 14
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 HEAD
Responses Responses
First form (message-id specified) First form (message-id specified)
221 0|n message-id Headers follow (multiline) 221 0|n message-id Headers follow (multiline)
430 No article with that message-id 430 No article with that message-id
Second form (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
423 No articles in that range 423 No article with that number
Third form (current article number used) Third form (current article number used)
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 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
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
skipping to change at page 39, line 19 skipping to change at page 38, line 20
[S] From: "Demo User" <nobody@example.net> [S] From: "Demo User" <nobody@example.net>
[S] Newsgroups: misc.test [S] Newsgroups: misc.test
[S] Subject: I am just a test article [S] Subject: I am just a test article
[S] Date: 6 Oct 1998 04:38:40 -0500 [S] Date: 6 Oct 1998 04:38:40 -0500
[S] Organization: An Example Net, Uncertain, Texas [S] Organization: An Example Net, Uncertain, Texas
[S] Message-ID: <411@example.net> [S] Message-ID: <411@example.net>
[S] . [S] .
Example of an unsuccessful retrieval of the headers of an article by Example of an unsuccessful retrieval of the headers of an article by
message-id: message-id:
[C] HEAD <i.am.not.there@example.com> [C] HEAD <i.am.not.there@example.com>
[S] 430 No Such Article Found [S] 430 No Such Article Found
Example of an unsuccessful retrieval of the headers of an article by Example of an unsuccessful retrieval of the headers of an article by
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] HEAD 300256 [C] HEAD 300256
[S] 423 No such article number in this group [S] 423 No article with that number
Example of an unsuccessful retrieval of the headers of an article by Example of an unsuccessful retrieval of the headers of an article by
number because no newsgroup was selected first: number because no newsgroup was selected first:
[Assumes current selected newsgroup is invalid.] [Assumes current selected newsgroup is invalid.]
[C] HEAD 300256 [C] HEAD 300256
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Example of an attempt to retrieve the headers of an article when the Example of an attempt to retrieve the headers of an article when the
current selected newsgroup is empty: current selected newsgroup is empty:
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] 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 BODY
Responses Responses
First form (message-id specified) First form (message-id specified)
222 0|n message-id Body follows (multiline) 222 0|n message-id Body follows (multiline)
430 No article with that message-id 430 No article with that message-id
Second form (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
423 No articles in that range 423 No article with that number
Third form (current article number used) Third form (current article number used)
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 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
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
skipping to change at page 40, line 41 skipping to change at page 39, line 32
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
Example of a successful retrieval of the body of an article (using no Example of a successful retrieval of the body of an article (using no
article number): 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] BODY [C] BODY
[S] 222 3000234 <45223423@example.com> [S] 222 3000234 <45223423@example.com>
[S] This is just a test article. [S] This is just a test article.
[S] . [S] .
Example of a successful retrieval of the body of an article by Example of a successful retrieval of the body of an article by
message-id: message-id:
[C] BODY <45223423@example.com> [C] BODY <45223423@example.com>
[S] 222 0 <45223423@example.com> [S] 222 0 <45223423@example.com>
[S] This is just a test article. [S] This is just a test article.
[S] . [S] .
Example of an unsuccessful retrieval of the body of an article by Example of an unsuccessful retrieval of the body of an article by
message-id: message-id:
[C] BODY <i.am.not.there@example.com> [C] BODY <i.am.not.there@example.com>
[S] 430 No Such Article Found [S] 430 No Such Article Found
Example of an unsuccessful retrieval of the body of an article by Example of an unsuccessful retrieval of the body of an article by
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] BODY 300256 [C] BODY 300256
[S] 423 No such article number in this group [S] 423 No article with that number
Example of an unsuccessful retrieval of the body of an article by Example of an unsuccessful retrieval of the body of an article by
number because no newsgroup was selected first: number because no newsgroup was selected first:
[Assumes current selected newsgroup is invalid.] [Assumes current selected newsgroup is invalid.]
[C] BODY 300256 [C] BODY 300256
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Example of an attempt to retrieve the body of an article when the Example of an attempt to retrieve the body of an article when the
current selected newsgroup is empty: current selected newsgroup is empty:
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] BODY [C] BODY
[S] 420 No current article selected [S] 420 No current article selected
6.2.4 STAT 6.2.4 STAT
6.2.4.1 Usage 6.2.4.1 Usage
Syntax Syntax
skipping to change at page 41, line 47 skipping to change at page 40, line 31
[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 STAT
Responses Responses
First form (message-id specified) First form (message-id specified)
223 0|n message-id Article exists 223 0|n message-id Article exists
430 No article with that message-id 430 No article with that message-id
Second form (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
423 No articles in that range 423 No article with that number
Third form (current article number used) Third form (current article number used)
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 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
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
skipping to change at page 42, line 37 skipping to change at page 41, line 14
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 and third forms what its message-id is, exists, and in the second and third forms what its message-id is,
without having 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>
Example of STAT on an existing article by message-id: Example of STAT on an existing article by message-id:
[C] STAT <45223423@example.com> [C] STAT <45223423@example.com>
[S] 223 0 <45223423@example.com> [S] 223 0 <45223423@example.com>
Example of STAT on an article not on the server by message-id: Example of STAT on an article not on the server by message-id:
[C] STAT <i.am.not.there@example.com> [C] STAT <i.am.not.there@example.com>
[S] 430 No Such Article Found [S] 430 No Such Article Found
Example of STAT on an article not in the server by number: Example of STAT on an article not in the server by 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 300256 [C] STAT 300256
[S] 423 No such article number in this group [S] 423 No article with that number
Example of STAT on an article by number when no newsgroup was Example of STAT on an article by number when no newsgroup was
selected first: selected first:
[Assumes current selected newsgroup is invalid.] [Assumes current selected newsgroup is invalid.]
[C] STAT 300256 [C] STAT 300256
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Example of STAT on an article when the current selected newsgroup is Example of STAT on an article when the current selected newsgroup is
empty: empty:
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] STAT [C] STAT
[S] 420 No current article selected [S] 420 No current article selected
Example of STAT by message-id on a server which sometimes reports the Example of STAT by message-id on a server which sometimes reports the
actual article number: actual 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>
[C] STAT <45223423@example.com> [C] STAT <45223423@example.com>
[S] 223 0 <45223423@example.com> [S] 223 0 <45223423@example.com>
[C] STAT <45223423@example.com> [C] STAT <45223423@example.com>
[S] 223 3000234 <45223423@example.com> [S] 223 3000234 <45223423@example.com>
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
skipping to change at page 45, line 8 skipping to change at page 43, line 19
in Section 3.4 and MUST be sent by the client to the server in the in Section 3.4 and MUST be sent by the client to the server in the
manner specified (in Section 3.1) for multi-line responses (except manner specified (in Section 3.1) for multi-line responses (except
that there is no initial line containing a response code). Thus a that there is no initial line containing a response code). Thus a
single dot (".") on a line indicates the end of the text, and lines single dot (".") on a line indicates the end of the text, and lines
starting with a dot in the original text have that dot doubled during starting with a dot in the original text have that dot doubled during
transmission. transmission.
Following the presentation of the termination sequence by the client, Following the presentation of the termination sequence by the client,
the server MUST return a response indicating success or failure of the server MUST return a response indicating success or failure of
the article transfer. Note that response codes 340 and 440 are used the article transfer. Note that response codes 340 and 440 are used
in direct response to the POST command. Others are returned following in direct response to the POST command. Others are returned
the sending of the article. following the sending of the article.
A response of 240 SHOULD indicate that, barring unforeseen server A response of 240 SHOULD indicate that, barring unforeseen server
errors, the posted article will be made available on the server and/ errors, the posted article will be made available on the server and/
or transferred to other servers as appropriate, possibly following or transferred to other servers as appropriate, possibly following
further processing. In other words, articles not wanted by the server further processing. In other words, articles not wanted by the
SHOULD be rejected with a 441 response and not accepted and silently server SHOULD be rejected with a 441 response and not accepted and
discarded. However, the client SHOULD NOT assume that the article has silently discarded. However, the client SHOULD NOT assume that the
been successfully transferred unless it receives an affirmative article has been successfully transferred unless it receives an
response from the server, and SHOULD NOT assume that it is being made affirmative response from the server, and SHOULD NOT assume that it
available to other clients without explicitly checking (for example is being made available to other clients without explicitly checking
using the STAT command). (for example using the STAT command).
If the session is interrupted before the response is received, it is If the session is interrupted before the response is received, it is
possible that an affirmative response was sent but has been lost. possible that an affirmative response was sent but has been lost.
Therefore, in any subsequent session, the client SHOULD either check Therefore, in any subsequent session, the client SHOULD either check
whether the article was successfully posted before resending or whether the article was successfully posted before resending or
ensure that the server will allocate the same message-id to the new ensure that the server will allocate the same message-id to the new
attempt (see Appendix B.2) - the latter approach is preferred since attempt (see Appendix B.2) - the latter approach is preferred since
the article might not have been made available for reading yet (for the article might not have been made available for reading yet (for
example, it may have to go through a moderation process). example, it may have to go through a moderation process).
skipping to change at page 46, line 22 skipping to change at page 44, line 31
[C] MODE READER [C] MODE READER
[S] 201 NNTP Service Ready, posting prohibited [S] 201 NNTP Service Ready, posting prohibited
[C] POST [C] POST
[S] 440 Posting not permitted [S] 440 Posting not permitted
6.3.2 IHAVE 6.3.2 IHAVE
6.3.2.1 Usage 6.3.2.1 Usage
This command MUST NOT be pipelined. This command MUST NOT be pipelined.
Syntax Syntax
IHAVE message-id IHAVE message-id
Responses Responses
Initial responses Initial responses
335 Send article to be transferred 335 Send article to be transferred
435 Article not wanted 435 Article not wanted
436 Transfer not possible; try again later 436 Transfer not possible; try again later
Subsequent responses Subsequent responses
235 Article transferred OK 235 Article transferred OK
436 Transfer failed; try again later 436 Transfer failed; try again later
437 Transfer rejected; do not retry 437 Transfer rejected; do not retry
Parameters Parameters
message-id = Article message-id message-id = Article message-id
6.3.2.2 Description 6.3.2.2 Description
The IHAVE command informs the server that the client has an article The IHAVE command informs the server that the client has an article
with the specified message-id. If the server desires a copy of that with the specified message-id. If the server desires a copy of that
article a 335 response MUST be returned, instructing the client to article a 335 response MUST be returned, instructing the client to
send the entire article. If the server does not want the article (if, send the entire article. If the server does not want the article
for example, the server already has a copy of it), a 435 response (if, for example, the server already has a copy of it), a 435
MUST be returned, indicating that the article is not wanted. Finally, response MUST be returned, indicating that the article is not wanted.
if the article isn't wanted immediately but the client should retry Finally, if the article isn't wanted immediately but the client
later if possible (if, for example, another client is in the process should retry later if possible (if, for example, another client is in
of sending the same article to the server), a 436 response MUST be the process of sending the same article to the server), a 436
returned. response MUST be returned.
If transmission of the article is requested, the client MUST send the If transmission of the article is requested, the client MUST send the
entire article, including headers and body, in the format defined entire article, including headers and body, in the format defined
above (Section 3.1) for multi-line responses (except that there is no above (Section 3.1) for multi-line responses (except that there is no
initial line containing a response code). Thus a single dot (".") on initial line containing a response code). Thus a single dot (".") on
a line indicates the end of the text, and lines starting with a dot a line indicates the end of the text, and lines starting with a dot
in the original text have that dot doubled during transmission. The in the original text have that dot doubled during transmission. The
server MUST return either a 235 response, indicating that the article server MUST return either a 235 response, indicating that the article
was successfully transferred, a 436 response, indicating that the was successfully transferred, a 436 response, indicating that the
transfer failed but should be tried again later, or a 437 response, transfer failed but should be tried again later, or a 437 response,
indicating that the article was rejected. indicating that the article was rejected.
This function differs from the POST command in that it is intended This function differs from the POST command in that it is intended
for use in transferring already-posted articles between hosts. It for use in transferring already-posted articles between hosts. It
SHOULD NOT be used when the client is a personal news reading SHOULD NOT be used when the client is a personal news reading
program, since use of this command indicates that the article has program, since use of this command indicates that the article has
already been posted at another site and is simply being forwarded already been posted at another site and is simply being forwarded
from another host. However, despite this, the server MAY elect not to from another host. However, despite this, the server MAY elect not
post or forward the article if, after further examination of the to post or forward the article if, after further examination of the
article, it deems it inappropriate to do so. Reasons for such article, it deems it inappropriate to do so. Reasons for such
subsequent rejection of an article may include such problems as subsequent rejection of an article may include such problems as
inappropriate newsgroups or distributions, disc space limitations, inappropriate newsgroups or distributions, disc space limitations,
article lengths, garbled headers, and the like. These are typically article lengths, garbled headers, and the like. These are typically
restrictions enforced by the server host's news software and not restrictions enforced by the server host's news software and not
necessarily the NNTP server itself. necessarily the NNTP server itself.
The client SHOULD NOT assume that the article has been successfully The client SHOULD NOT assume that the article has been successfully
transferred unless it receives an affirmative response from the transferred unless it receives an affirmative response from the
server. A lack of response (such as a dropped network connection or a server. A lack of response (such as a dropped network connection or
network timeout) SHOULD be treated the same as a 436 response. a network timeout) SHOULD be treated the same as a 436 response.
Because some news server software may not be able immediately to Because some news server software may not be able immediately to
determine whether or not an article is suitable for posting or determine whether or not an article is suitable for posting or
forwarding, an NNTP server MAY acknowledge the successful transfer of forwarding, an NNTP server MAY acknowledge the successful transfer of
the article (with a 235 response) but later silently discard it. the article (with a 235 response) but later silently discard it.
6.3.2.3 Examples 6.3.2.3 Examples
Example of successfully sending an article to another site: Example of successfully sending an article to another site:
[C] IHAVE <i.am.an.article.you.will.want@example.com> [C] IHAVE <i.am.an.article.you.will.want@example.com>
[S] 335 Send it; end with <CR-LF>.<CR-LF> [S] 335 Send it; end with <CR-LF>.<CR-LF>
[C] Path: pathost!demo!somewhere!not-for-mail [C] Path: pathost!demo!somewhere!not-for-mail
[C] From: "Demo User" <nobody@example.com> [C] From: "Demo User" <nobody@example.com>
[C] Newsgroups: misc.test [C] Newsgroups: misc.test
[C] Subject: I am just a test article [C] Subject: I am just a test article
[C] Date: 6 Oct 1998 04:38:40 -0500 [C] Date: 6 Oct 1998 04:38:40 -0500
[C] Organization: An Example Com, San Jose, CA [C] Organization: An Example Com, San Jose, CA
[C] Message-ID: <i.am.an.article.you.will.want@example.com> [C] Message-ID: <i.am.an.article.you.will.want@example.com>
[C] [C]
skipping to change at page 50, line 18 skipping to change at page 48, line 18
between the beginning of a session and its termination. Using these between the beginning of a session and its termination. Using these
commands does not alter any state information, but the response commands does not alter any state information, but the response
generated from their use may provide useful information to clients. generated from their use may provide useful information to clients.
7.1 DATE 7.1 DATE
7.1.1 Usage 7.1.1 Usage
Syntax Syntax
DATE DATE
Responses Responses
111 yyyymmddhhmmss server date and time 111 yyyymmddhhmmss server date and time
Parameters Parameters
yyyymmddHHmmss = Current UTC date and time on server yyyymmddHHmmss = Current UTC date and time on server
7.1.2 Description 7.1.2 Description
This command exists to help clients find out the current Coordinated This command exists to help clients find out the current Coordinated
Universal Time [TF.686-1] from the server's perspective. This command Universal Time [TF.686-1] from the server's perspective. This
SHOULD NOT be used as a substitute for NTP [RFC1305] but to provide command SHOULD NOT be used as a substitute for NTP [RFC1305] but to
information that might be useful when using the NEWNEWS command (see provide information that might be useful when using the NEWNEWS
Section 7.4). A system providing NNTP service SHOULD keep the system command (see Section 7.4). A system providing NNTP service SHOULD
clock as accurate as possible, either with NTP or by some other keep the system clock as accurate as possible, either with NTP or by
method. some other method.
The server MUST return a 111 response specifying the date and time on The server MUST return a 111 response specifying the date and time on
the server in the form yyyymmddhhmmss. This date and time is in the server in the form yyyymmddhhmmss. This date and time is in
Coordinated Universal Time. Coordinated Universal Time.
7.1.3 Examples 7.1.3 Examples
[C] DATE [C] DATE
[S] 111 19990623135624 [S] 111 19990623135624
skipping to change at page 51, line 4 skipping to change at page 48, line 45
Coordinated Universal Time. Coordinated Universal Time.
7.1.3 Examples 7.1.3 Examples
[C] DATE [C] DATE
[S] 111 19990623135624 [S] 111 19990623135624
7.2 HELP 7.2 HELP
7.2.1 Usage 7.2.1 Usage
Syntax Syntax
HELP HELP
Responses Responses
100 Help text follows (multiline) 100 Help text follows (multiline)
7.2.2 Description 7.2.2 Description
This command provides a short summary of commands that are understood This command provides a short summary of commands that are understood
by this implementation of the server. The help text will be presented by this implementation of the server. The help text will be
as a multiline response following the 100 response code. presented as a multiline response following the 100 response code.
This text is not guaranteed to be in any particular format and MUST This text is not guaranteed to be in any particular format and MUST
NOT be used by clients as a replacement for the LIST EXTENSIONS NOT be used by clients as a replacement for the LIST EXTENSIONS
command described in Section 5.3 command described in Section 5.3
7.2.3 Examples 7.2.3 Examples
[C] HELP [C] HELP
[S] 100 Help text follows [S] 100 Help text follows
[S] This is some help text. There is no specific [S] This is some help text. There is no specific
skipping to change at page 53, line 11 skipping to change at page 50, line 44
[C] NEWGROUPS 19990624 000000 GMT [C] NEWGROUPS 19990624 000000 GMT
[S] 231 list of new newsgroups follows [S] 231 list of new newsgroups follows
[S] . [S] .
7.4 NEWNEWS 7.4 NEWNEWS
7.4.1 Usage 7.4.1 Usage
Syntax Syntax
NEWNEWS wildmat date time [GMT] NEWNEWS wildmat date time [GMT]
Responses Responses
230 List of new articles follows (multiline) 230 List of new articles follows (multiline)
Parameters Parameters
wildmat = Newsgroups of interest wildmat = Newsgroups of interest
date = Date in yymmdd or yyyymmdd format date = Date in yymmdd or yyyymmdd format
time = Time in hhmmss format time = Time in hhmmss format
7.4.2 Description 7.4.2 Description
This command returns a list of message-ids of articles posted or This command returns a list of message-ids of articles posted or
received on the server, in the newsgroups whose names match the received on the server, in the newsgroups whose names match the
wildmat, since the specified date and time. One message-id is sent on wildmat, since the specified date and time. One message-id is sent
each line; the order of the response has no specific significance and on each line; the order of the response has no specific significance
may vary from response to response in the same session. A message-id and may vary from response to response in the same session. A
MAY appear more than once; if it does so, it has the same meaning as message-id MAY appear more than once; if it does so, it has the same
if it appeared only once. meaning as 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" argument) when possible. by using the "GMT" argument) when possible.
skipping to change at page 56, line 16 skipping to change at page 53, line 28
Each field in the line is separated from its neighbouring fields by Each field in the line is separated from its neighbouring fields by
one or more spaces. one or more spaces.
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 currently no valid newsgroups. that there are currently no valid newsgroups.
The reported high and low water marks are as described in the GROUP The reported high and low water marks are as described in the GROUP
command (see Section 6.1.1). command (see Section 6.1.1).
The status field is typically one of: The status field is typically one of:
"y" posting is permitted "y" posting is permitted
"n" posting is not permitted "n" posting is not permitted
"m" postings will be forwarded to the newsgroup moderator "m" postings will be forwarded to the newsgroup moderator
The server SHOULD use these values when these meanings are required The server SHOULD use these values when these meanings are required
and MUST NOT use them with any other meaning. Other values for the and MUST NOT use them with any other meaning. Other values for the
status may exist; the definition of these other values and the status may exist; the definition of these other values and the
circumstances under which they are returned may be specified in an circumstances under which they are returned may be specified in an
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
unrecognized status as giving no information. unrecognized 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
posting, then this will apply equally to groups with status "y". from 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 argument 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.
no wildmat is specified, the keyword ACTIVE MAY be omitted without If 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
[S] misc.test 3002322 3000234 y [S] misc.test 3002322 3000234 y
[S] comp.risks 442001 441099 m [S] comp.risks 442001 441099 m
skipping to change at page 57, line 38 skipping to change at page 54, line 42
[S] 215 list of newsgroups follows [S] 215 list of newsgroups follows
[S] alt.rfc-writers.recovery 4 1 y [S] alt.rfc-writers.recovery 4 1 y
[S] tx.natives.recovery 89 56 y [S] tx.natives.recovery 89 56 y
[S] . [S] .
7.6.2 LIST ACTIVE.TIMES 7.6.2 LIST ACTIVE.TIMES
7.6.2.1 Usage 7.6.2.1 Usage
This command is optional. This command is optional.
Syntax Syntax
LIST ACTIVE.TIMES [wildmat] LIST ACTIVE.TIMES [wildmat]
Responses Responses
215 Information follows (multiline) 215 Information follows (multiline)
Parameters Parameters
wildmat = groups of interest wildmat = groups of interest
7.6.2.2 Description 7.6.2.2 Description
The active.times list is maintained by some news transport systems to The active.times list is maintained by some news transport systems to
contain information about who created a particular newsgroup and contain information about who created a particular newsgroup and
when. Each line of this list consists of three fields separated from when. Each line of this list consists of three fields separated from
each other by one or more spaces. The first field is the name of the each other by one or more spaces. The first field is the name of the
newsgroup. The second is the time when this group was created on this newsgroup. The second is the time when this group was created on
news server, measured in seconds since the start of January 1, 1970. this news server, measured in seconds since the start of January 1,
The third is plain text intended to describe the entity that created 1970. The third is plain text intended to describe the entity that
the newsgroup; it is often a mailbox as defined in RFC 2822 created the newsgroup; it is often a mailbox as defined in RFC 2822
[RFC2822]. [RFC2822].
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; in particular, it and MAY include groups not available on the server; in particular, it
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).
skipping to change at page 58, line 39 skipping to change at page 55, line 34
any) whose names match the wildmat and for which the information is any) whose names match the wildmat and for which the information is
available. available.
Note that an empty list is a possible valid response (whether or not Note that an empty list is a possible valid response (whether or not
a wildmat is specified) and indicates that there are no groups a wildmat is specified) and indicates that there are no groups
meeting the above criteria. meeting the above criteria.
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
[S] 215 information follows [S] 215 information follows
[S] misc.test 930445408 <creatme@isc.org> [S] misc.test 930445408 <creatme@isc.org>
[S] alt.rfc-writers.recovery 930562309 <m@example.com> [S] alt.rfc-writers.recovery 930562309 <m@example.com>
[S] tx.natives.recovery 930678923 <sob@academ.com> [S] tx.natives.recovery 930678923 <sob@academ.com>
[S] . [S] .
Example of LIST ACTIVE.TIMES returning an error where the command is Example of LIST ACTIVE.TIMES returning an error where the command is
recognized but the software does not maintain this information: recognized but the software does not maintain this information:
[C] LIST ACTIVE.TIMES [C] LIST ACTIVE.TIMES
[S] 503 program error, function not performed [S] 503 program error, function not performed
Example of LIST ACTIVE.TIMES sent to a server that does not recognize Example of LIST ACTIVE.TIMES sent to a server that does not recognize
this command: this command:
[C] LIST ACTIVE.TIMES [C] LIST ACTIVE.TIMES
[S] 501 Syntax Error [S] 501 Syntax Error
7.6.3 LIST DISTRIBUTIONS 7.6.3 LIST DISTRIBUTIONS
7.6.3.1 Usage 7.6.3.1 Usage
This command is optional. This command is optional.
Syntax Syntax
LIST DISTRIBUTIONS LIST DISTRIBUTIONS
Responses Responses
215 Information follows (multiline) 215 Information follows (multiline)
7.6.3.2 Description 7.6.3.2 Description
The distributions list is maintained by some news transport systems The distributions list is maintained by some news transport systems
to contain information about valid values for the content of the to contain information about valid values for the content of the
Distribution header in a news article and about what the various Distribution header in a news article and about what the various
values mean. Each line of this list consists of two fields separated values mean. Each line of this list consists of two fields separated
from each other by one or more spaces. The first field is a value and from each other by one or more spaces. The first field is a value
the second is a short explanation of the meaning of that value. and the second is a short explanation of the meaning of that value.
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.
7.6.3.3 Examples 7.6.3.3 Examples
Example of LIST DISTRIBUTIONS returning a list of distributions: Example of LIST DISTRIBUTIONS returning a list of distributions:
[C] LIST DISTRIBUTIONS [C] LIST DISTRIBUTIONS
[S] 215 information follows [S] 215 information follows
[S] usa United States of America [S] usa United States of America
[S] na North America [S] na North America
[S] world All over the World [S] world All over the World
[S] . [S] .
Example of LIST DISTRIBUTIONS returning an error where the command is Example of LIST DISTRIBUTIONS returning an error where the command is
recognized but the software does not maintain this information: recognized but the software does not maintain this information:
[C] LIST DISTRIBUTIONS [C] LIST DISTRIBUTIONS
[S] 503 program error, function not performed [S] 503 program error, function not performed
Example of LIST DISTRIBUTIONS sent to a server that does not Example of LIST DISTRIBUTIONS sent to a server that does not
recognize this command: recognize this command:
[C] LIST DISTRIBUTIONS [C] LIST DISTRIBUTIONS
[S] 501 Syntax Error [S] 501 Syntax Error
7.6.4 LIST DISTRIB.PATS 7.6.4 LIST DISTRIB.PATS
7.6.4.1 Usage 7.6.4.1 Usage
This command is optional. This command is optional.
Syntax Syntax
LIST DISTRIB.PATS LIST DISTRIB.PATS
Responses Responses
215 Information follows (multiline) 215 Information follows (multiline)
7.6.4.2 Description 7.6.4.2 Description
The distrib.pats list is maintained by some news transport systems to The distrib.pats list is maintained by some news transport systems to
choose a value for the content of the Distribution header of a news choose a value for the content of the Distribution header of a news
article being posted. Each line of this list consists of three fields article being posted. Each line of this list consists of three
separated from each other by a colon (":"). The first field is a fields separated from each other by a colon (":"). The first field
weight, the second field is a wildmat (which may be a simple group is a weight, the second field is a wildmat (which may be a simple
name), and the third field is a value for the Distribution header group name), and the third field is a value for the Distribution
content. header content.
The client MAY use this information to construct an appropriate The client MAY use this information to construct an appropriate
Distribution header given the name of a newsgroup. To do so, it Distribution header given the name of a newsgroup. To do so, it
should determine the lines whose second field matches the newsgroup should determine the lines whose second field matches the newsgroup
name, select from among them the line with the highest weight (with 0 name, select from among them the line with the highest weight (with 0
being the lowest), and use the value of the third field to construct being the lowest), and use the value of the third field to construct
the Distribution header. the Distribution header.
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.
skipping to change at page 63, line 48 skipping to change at page 60, line 44
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 (in which case it is a
on the standards track or must define an IESG-approved experimental "standard extension" or "registered extension"). Such RFCs either
protocol. must be on the standards track or must define an IESG-approved
experimental 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 arguments 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 arguments 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 arguments 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 arguments 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 behaviour of a server o how support for the extension affects the behaviour of a server
and NNTP client; and 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 o a specific statement about the circumstances when use of this
extension can alter the output from LIST EXTENSIONS; extension can alter the output from LIST EXTENSIONS;
o the circumstances under which the extension can cause any o the circumstances under which the extension can cause any
pre-existing command to produce a 401, 480, or 483 response; pre-existing command to produce a 401, 480, or 483 response;
o whether the extension can be used before or after the MODE READER o whether the extension can be used before or after the MODE READER
command, and what changes (if any) the latter has on the command, and what changes (if any) the latter has on the
extension. 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
commands or new variants of existing commands - as part of a private new commands or new variants of existing commands - as part of a
extension. To avoid the risk of a clash with a future registered private extension. To avoid the risk of a clash with a future
extension, the names of private extensions and commands defined by registered extension, the names of private extensions and commands
them SHOULD begin with "X". defined by them SHOULD begin with "X" and MUST NOT be the same as the
name of a registered extension.
If the server provides a registered extension (indicated by listing
it in the output of LIST EXTENSIONS), it MUST implement all of the
commands in the specification of the extension except for those
marked as optional. If it does not implement the extension as
specified, it MUST NOT list the extension in the output of LIST
EXTENSIONS under its registered name; in this case it MAY, but SHOULD
NOT, provide a private extension (not listed, or listed with a
different name) that implements part of the extension or implements
the commands of the extension with a different meaning.
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:
skipping to change at page 65, line 29 skipping to change at page 62, line 25
| numbers | | | | numbers | | |
| | | | | | | |
| Overview support | OVER | Defined in this document | | Overview support | OVER | Defined in this document |
| | | | | | | |
| Batched header | HDR | Defined in this document | | Batched header | HDR | Defined in this document |
| retrieval | | | | retrieval | | |
+-------------------------+--------------+--------------------------+ +-------------------------+--------------+--------------------------+
8.2 Standard extensions 8.2 Standard extensions
N.B. while these extensions are standard extensions, the term
includes all extensions in the IANA registry, not just these three.
Each 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 The formal definitions of these extensions are provided in Appendix
D. D.
If the server provides an extension, it MUST implement all of the
commands in the specification of the extension except for those
marked as optional. If it does not provide an extension, it MUST NOT
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.
8.3.1 LISTGROUP 8.3.1 LISTGROUP
8.3.1.1 Usage 8.3.1.1 Usage
Syntax Syntax
LISTGROUP [group] LISTGROUP [group]
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. As a side effect, it also selects
the group in the same way as the the GROUP command (see Section
6.1.1).
The optional argument 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 On success, the list of article numbers is returned as a multi-line
following the 211 response code (the arguments on the initial response following the 211 response code (the arguments on the
response line are the same as for the GROUP command (see Section initial response line are the same as for the GROUP command. The
6.1.1). The list contains one number per line, is in numerical order, list contains one number per line, is in numerical order, and lists
and lists precisely those articles that exist in the group. 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.
The LISTGROUP command MAY be used by a client as a replacement for The LISTGROUP command MAY be used by a client as a replacement for
the GROUP command in establishing a valid current selected newsgroup the GROUP command in establishing a valid current selected newsgroup
skipping to change at page 67, line 43 skipping to change at page 64, line 36
[C] LISTGROUP [C] LISTGROUP
[S] 412 no current group [S] 412 no current group
[C] GROUP example.is.sob.bradner.or.barber [C] GROUP example.is.sob.bradner.or.barber
[S] 411 no such group [S] 411 no such group
[C] LISTGROUP [C] LISTGROUP
[S] 412 no current group [S] 412 no current group
8.4 Article metadata 8.4 Article metadata
The OVER and HDR extensions refer to the concept of "article The OVER and HDR extensions refer to the concept of "article
metadata". This is data about articles that does not occur within the metadata". This is data about articles that does not occur within
article itself. Each metadata item has a name which MUST begin with a the article itself. Each metadata item has a name which MUST begin
colon (and which MUST NOT contain a colon elsewhere within it). As with a colon (and which MUST NOT contain a colon elsewhere within
with header names, metadata item names are not case-sensitive. it). As with header names, metadata item names are not
case-sensitive.
When generating a metadata item, the server MUST compute it for When generating a metadata item, the server MUST compute it for
itself and MUST NOT trust any related value provided in the article. itself and MUST NOT trust any related value provided in the article.
(In particular, a Lines or Bytes header in the article MUST NOT be (In particular, a Lines or Bytes header in the article MUST NOT be
assumed to specify the correct number of lines or bytes in the assumed to specify the correct number of lines or bytes in the
article.) If the server has access to several non-identical copies of article.) If the server has access to several non-identical copies of
an article, the value returned MUST be correct for any copy of that an article, the value returned MUST be correct for any copy of that
article retrieved during the same session. article retrieved during the same session.
This specification defines two metadata items: ":bytes" and ":lines". This specification defines two metadata items: ":bytes" and ":lines".
skipping to change at page 68, line 25 skipping to change at page 65, line 18
8.4.1 The :bytes metadata item 8.4.1 The :bytes metadata item
The :bytes metadata item for an article is a decimal integer. It The :bytes metadata item for an article is a decimal integer. It
SHOULD equal the number of octets in the entire article - headers, SHOULD equal the number of octets in the entire article - headers,
body, and separating empty line (counting a CRLF pair as two octets, body, and separating empty line (counting a CRLF pair as two octets,
and excluding both the "." CRLF terminating the response and any "." and excluding both the "." CRLF terminating the response and any "."
added for "byte-stuffing" purposes). added for "byte-stuffing" purposes).
Note to client implementers: some existing servers return a value Note to client implementers: some existing servers return a value
different to that above. The commonest reasons for this are: different to that above. The commonest reasons for this are:
o counting a CRLF pair as one octet; o counting a CRLF pair as one octet;
o including the "." character used for byte-stuffing in the number; o including the "." character used for byte-stuffing in the number;
o including the terminating "." CRLF in the number; o including the terminating "." CRLF in the number;
o using one copy of an article for counting the octets but then o using one copy of an article for counting the octets but then
returning another one that differs in some (permitted) manner. returning another one that differs in some (permitted) manner.
Implementations should be prepared for such variation and MUST NOT Implementations should be prepared for such variation and MUST NOT
rely on the value being accurate. rely on the value being accurate.
8.4.2 The :lines metadata item 8.4.2 The :lines metadata item
The :lines metadata item for an article is a decimal integer. It MUST The :lines metadata item for an article is a decimal integer. It
equal the number of lines in the article body (excluding the empty MUST equal the number of lines in the article body (excluding the
line separating headers and body); equivalently, it is two less than empty line separating headers and body); equivalently, it is two less
the number of CRLF pairs that the BODY command would return for that than the number of CRLF pairs that the BODY command would return for
article (the extra two are those following the response code and the that article (the extra two are those following the response code and
termination octet). the termination octet).
8.5 The OVER extension 8.5 The OVER extension
This extension provides two commands, OVER and LIST OVERVIEW.FMT. The This extension provides two commands, OVER and LIST OVERVIEW.FMT.
label for this extension is OVER. The label for this extension is OVER.
The OVER extension provides access to the "overview database", which The OVER extension provides access to the "overview database", which
is a database of headers extracted from incoming articles. Only is a database of headers extracted from incoming articles. Only
certain headers are included in the database. The database also certain headers are included in the database. The database also
includes some article metadata. includes some article metadata.
The information stored in the database may change over time. If the The information stored in the database may change over time. If the
database records the content or absence of a given field (that is, a database records the content or absence of a given field (that is, a
header or metadata item) for all articles, it is said to be header or metadata item) for all articles, it is said to be
"consistent" for that field. If it records the content of a header "consistent" for that field. If it records the content of a header
skipping to change at page 69, line 32 skipping to change at page 66, line 19
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 since the change. Therefore the articles remaining are those received since the change. Therefore
output from LIST OVERVIEW.FMT needs to be altered twice: before any the output from LIST OVERVIEW.FMT needs to be altered twice: before
fields stop being stored, they MUST be removed from the output, then any fields stop being stored, they MUST be removed from the output,
when the database is once more known to be consistent, the new fields then when the database is once more known to be consistent, the new
SHOULD be added to the output. fields SHOULD be added to the output.
Support for the message-id form of the OVER command is optional. If Support for the message-id form of the OVER command is optional. If
an implementation supports this form, it MUST use the argument an implementation supports this form, it MUST use the argument
"MSGID" following the extension label in the output of LIST "MSGID" following the extension label in the output of LIST
EXTENSIONS; if not, it MUST NOT use any argument. EXTENSIONS; if not, it MUST NOT use any argument.
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
skipping to change at page 71, line 37 skipping to change at page 68, line 13
command (Section 6.2.1) and STAT examples (Section 6.2.4.3) for more command (Section 6.2.1) and STAT examples (Section 6.2.4.3) for more
details). In the other two forms of the command, the article number details). In the other two forms of the command, the article number
MUST be returned. MUST be returned.
Any subsequent fields are the contents of the other headers and Any subsequent fields are the contents of the other headers and
metadata held in the database. metadata held in the database.
For the five mandatory headers, the content of each field MUST be For the five mandatory headers, the content of each field MUST be
based on the content of the header (that is, with the header name and based on the content of the header (that is, with the header name and
following colon and space removed). If the article does not contain following colon and space removed). If the article does not contain
that header, or if the content is empty, the field MUST be empty. For that header, or if the content is empty, the field MUST be empty.
the two mandatory metadata items, the content of the field MUST be For the two mandatory metadata items, the content of the field MUST
just the value, with no other text. be just the value, with no other text.
For all subsequent fields that contain headers, the content MUST be For all subsequent fields that contain headers, the content MUST be
the entire header line other than the trailing CRLF. For all the entire header line other than the trailing CRLF. For all
subsequent fields that contain metadata, the field consists of the subsequent fields that contain metadata, the field consists of the
metadata name, a single space, and then the value. metadata name, a single space, and then the value.
For all fields, the value is processed by first removing all CRLF For all fields, the value is processed by first removing all CRLF
pairs (that is, undoing any folding and removing the terminating pairs (that is, undoing any folding and removing the terminating
CRLF) and then replacing each TAB with a single space. If there is no CRLF) and then replacing each TAB with a single space. If there is
such header in the article, or no such metadata item, or no header or no such header in the article, or no such metadata item, or no header
item stored in the database for that article, the corresponding field or item stored in the database for that article, the corresponding
MUST be empty. field MUST be empty.
Note that, after unfolding, the characters NUL, LF, and CR cannot Note that, after unfolding, the characters NUL, LF, and CR cannot
occur in the header of an article offered by a conformant server. occur in the header of an article offered by a conformant server.
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 could permit these characters to appear in articles. specification could permit these characters to appear in articles.
skipping to change at page 73, line 39 skipping to change at page 70, line 11
<nobody@example.com>|6 Oct 1998 04:38:40 -0500| <nobody@example.com>|6 Oct 1998 04:38:40 -0500|
<45223423@example.com>|<45454@example.net>|1234| <45223423@example.com>|<45454@example.net>|1234|
17|Xref: news.example.com misc.test:3000363 17|Xref: news.example.com misc.test:3000363
[S] 3000235|Another test article|nobody@nowhere.to [S] 3000235|Another test article|nobody@nowhere.to
(Demo User)|6 Oct 1998 04:38:45 -0500|<45223425@to.to>|| (Demo User)|6 Oct 1998 04:38:45 -0500|<45223425@to.to>||
4818|37||Distribution: fi 4818|37||Distribution: fi
[S] 3000238|Re: I am just a test article|somebody@elsewhere.to| [S] 3000238|Re: I am just a test article|somebody@elsewhere.to|
7 Oct 1998 11:38:40 +1200|<kfwer3v@elsewhere.to>| 7 Oct 1998 11:38:40 +1200|<kfwer3v@elsewhere.to>|
<45223423@to.to>|9234|51 <45223423@to.to>|9234|51
[S] . [S] .
Note the missing "References" and Xref headers in the second line, Note the missing "References" and Xref headers in the second line,
the missing trailing field(s) in the first and last lines, and that the missing trailing field(s) in the first and last lines, and that
there are only results for those articles that still exist. there are only results for those articles that still exist.
Example of an unsuccessful retrieval of overview information on an Example of an unsuccessful retrieval of overview information on an
article by number: article by number:
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] OVER 300256 [C] OVER 300256
[S] 420 No such article in this group [S] 423 No such article in this group
Example of an unsuccessful retrieval of overview information by Example of an unsuccessful retrieval of overview information by
number because no newsgroup was selected first: number because no newsgroup was selected first:
[Assumes current selected newsgroup is invalid.] [Assumes current selected newsgroup is invalid.]
[C] OVER [C] OVER
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Example of an attempt to retrieve information when the current Example of an attempt to retrieve information when the current
selected newsgroup is empty: selected newsgroup is empty:
[C] GROUP example.empty.newsgroup [C] GROUP example.empty.newsgroup
[S] 211 0 0 0 example.empty.newsgroup [S] 211 0 0 0 example.empty.newsgroup
[C] OVER [C] OVER
[S] 420 No current article selected [S] 420 No current article selected
8.5.2 LIST OVERVIEW.FMT 8.5.2 LIST OVERVIEW.FMT
8.5.2.1 Usage 8.5.2.1 Usage
This command is optional. This command is optional.
skipping to change at page 76, line 32 skipping to change at page 72, line 40
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; it may behave differently when the HDR command is with any header; it may behave differently when the HDR command is
used with a message-id argument and when it is used with a range or used with a message-id argument and when it is used with a range or
no argument. no argument.
The HDR command may take information from a database rather than The HDR command may take information from a database rather than
directly from the articles. If so, the same issues of consistency and directly from the articles. If so, the same issues of consistency
inconsistency apply as with the OVER extension (Section 8.5) and the and inconsistency apply as with the OVER extension (Section 8.5) and
LIST HEADERS command SHOULD take the same approach as the LIST the LIST HEADERS command SHOULD take the same approach as the LIST
OVERVIEW.FMT command in resolving them. 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 message-id HDR header message-id
HDR header range HDR header range
HDR header HDR header
Responses Responses
First form (message-id specified) First 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) Second form (range specified)
225 Headers follow (multiline) 225 Headers follow (multiline)
412 No newsgroup selected 412 No newsgroup selected
423 No articles in that range 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 specified The HDR command retrieves specific headers from an article specified
by message-id, or from a specified article or range of articles in by message-id, or from a specified article or range of articles in
the current selected newsgroup. It can also return certain metadata the current selected newsgroup. It can also return certain metadata
skipping to change at page 77, line 26 skipping to change at page 73, line 32
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 specified The HDR command retrieves specific headers from an article specified
by message-id, or from a specified article or range of articles in by message-id, or from a specified article or range of articles in
the current selected newsgroup. It can also return certain metadata the current selected newsgroup. It can also return certain metadata
about the article or articles. about the article or articles.
The required header argument is the name of a header (e.g. "subject") The required header argument is the name of a header (e.g.
in an article, or the name of a metadata item, and is "subject") 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 message-id argument indicates a specific article. The range The message-id argument indicates a specific article. The range
argument may be any of the following: 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
If neither is specified, 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 225 response code and contains one line for response following the 225 response code and contains one line for
each article in the range that exists (note that unless the argument each article in the range that exists (note that unless the argument
is a range including a dash, there will be at most one line but it 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 will still be in multi-line format). The line consists of the
number, a space, and then the contents of the header or metadata article number, a space, and then the contents of the header or
item. In the case of a header, the header name, colon, and the first metadata item. In the case of a header, the header name, colon, and
space after the colon are all omitted. the first space after the colon are all omitted.
If the article is specified by message-id (the first form of the If the article is specified by message-id (the first form of the
command), the article number MUST be replaced with zero, except that command), the article number MUST be replaced with zero, except that
if there is a current selected group and the article is present in if there is a current selected group and the article is present in
that group, the server MAY use that article number (see the ARTICLE that group, the server MAY use that article number (see the ARTICLE
command (Section 6.2.1) and STAT examples (Section 6.2.4.3) for more command (Section 6.2.1) and STAT examples (Section 6.2.4.3) for more
details). In the other two forms of the command, the article number details). In the other two forms of the command, the article number
MUST be returned. MUST be returned.
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
that, for example, a request for the header "Lines" returns the means 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
the line count metadata or any other server-generated value. If the the line count metadata or any other server-generated value. If the
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
in the provided range does not exist in the group, no line for that number in the provided range does not exist in the group, no line for
article number is included in the output. that article number is included in the output.
If the second argument is a message-id and no such article exists, a If the second argument is a message-id and no such article exists, a
430 response MUST be returned. If the second argument is a range or 430 response MUST be returned. If the second argument is a range or
is omitted 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 second argument is a range and no response MUST be returned. If the second argument is a range and no
articles in that number range exist in the current selected articles in that number range exist in the current selected
newsgroup, a 423 response MUST be returned. If the second argument is newsgroup, a 423 response MUST be returned. If the second argument
omitted and the current article number is invalid, a 420 response is omitted and the 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; it may behave differently in this respect for the metadata items; it may behave differently in this respect for the
first (message-id) form than for the other forms. If so, it MUST first (message-id) form than for the other forms. If so, it MUST
respond with the generic 503 response to attempts to request other respond with the generic 503 response to attempts to request other
headers, rather than returning erroneous results such as a successful headers, rather than returning erroneous results such as a successful
empty response. empty response.
If HDR uses a separate database and it is inconsistent for the If HDR uses a separate database and it is inconsistent for the
skipping to change at page 83, line 19 skipping to change at page 78, line 50
[S] 215 headers and metadata items supported: [S] 215 headers and metadata items supported:
[S] Date [S] Date
[S] Distribution [S] Distribution
[S] From [S] From
[S] Message-ID [S] Message-ID
[S] References [S] References
[S] Subject [S] Subject
[S] :lines [S] :lines
[S] :bytes [S] :bytes
[S] . [S] .
Note how :x-article-number does not appear in the last set of output. Note how :x-article-number does not appear in the last set of output.
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
a separate section at the end. in a separate section at the end.
The non-terminals "command-line", "command-continuation", and
"response" between them specify the text that flows between client
and server. For each command, the sequence is:
o the client sends an instance of "command-line";
o the server sends an instance of "response";
o while the latest response is one that indicates more data is
required (in general, a 3xx response):
* the client sends an instance of "command-continuation";
* the server sends an instance of "response".
9.1 Commands 9.1 Commands
This syntax defines the non-terminal "command-line", which represents This syntax defines the non-terminal "command-line", which represents
what is sent from the client to the server. what is sent from the client to the server.
command-line = command EOL command-line = command EOL
command = article-command / command = article-command /
body-command / body-command /
date-command / date-command /
skipping to change at page 85, line 26 skipping to change at page 80, line 36
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-ref] 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)
; This is the generic syntax for an extension command.
; 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)
date = [2DIGIT] 6DIGIT date = date2y / date4y
date4y = 4DIGIT 2DIGIT 2DIGIT
date2y = 2DIGIT 2DIGIT 2DIGIT
date-time = date WS time [WS "GMT"] date-time = date WS time [WS "GMT"]
header-meta-name = header-name / metadata-name header-meta-name = header-name / metadata-name
metadata-name = ":" 1*A-NOTCOLON metadata-name = ":" 1*A-NOTCOLON
newsgroup-name = 1*wildmat-exact
range = article-number ["-" [article-number]] range = article-number ["-" [article-number]]
range-ref = WS (range / message-id) range-ref = WS (range / message-id)
time = 6DIGIT time = 2DIGIT 2DIGIT 2DIGIT
x-command-name = 3*12A-CHAR x-command-name = 3*12A-CHAR
x-argument = 1*P-CHAR x-argument = 1*P-CHAR
wildmat = wildmat-pattern *("," ["!"] wildmat-pattern) 9.2 Command continuation
wildmat-pattern = 1*wildmat-item
wildmat-item = wildmat-exact / wildmat-wild
wildmat-exact = %x21-29 / %x2B / %x2D-3E / %x40-5A / %x5E-7E /
UTF8-non-ascii ; exclude * , ? [ \ ]
wildmat-wild = "*" / "?"
9.2 Responses This syntax defines the further material sent by the client in the
case of multi-stage commands.
This syntax defines the non-terminal "response", which represents command-continuation = ihave-continuation /
what is sent from the server to the client in response to a command. post-continuation
ihave-continuation = encoded-article
post-continuation = encoded-article
encoded-article = content-lines termination
; after undoing the "byte-stuffing", this MUST match "article"
9.3 Responses
9.3.1 Generic responses
This syntax defines the non-terminal "response", which represents the
generic form of responses - that is, what is sent from the server to
the client in response to a command or a command-continuation.
response = simple-response / multiline-response response = simple-response / multiline-response
multiline-response = simple-response *content-line termination multiline-response = simple-response content-lines termination
termination = "." CRLF
content-line = [content-text] CRLF
content-text = (".." / B-NONDOT) *B-CHAR
simple-response = 3DIGIT arguments [ SP trailing-comment ] CRLF simple-response =
simple-response-content [SP trailing-comment] CRLF
simple-response-content = 3DIGIT arguments
trailing-comment = *U-CHAR trailing-comment = *U-CHAR
arguments = *(SP argument) ; How many depends on the response arguments = *(SP argument) ; How many depends on the response
argument = 1*A-CHAR argument = 1*A-CHAR
9.3 Multi-line response contents 9.3.2 Initial response line contents
This syntax defines the content of the various multi-line responses, This syntax defines the specific initial response lines for the
in each case after any "byte-stuffing" has been undone. various commands and extensions in this specification. Only those
response codes with arguments are listed.
multiline-response-content: article-response / simple-response-content =/ response-111-content
response-211-content
response-22x-content
response-401-content
response-111-content = "111" SP date4y time
response-211-content = "211" 3(SP article-number) SP newsgroup-name
response-22x-content = ("220" / "221" / "222" / "223")
SP article-number SP message-id
response-401-content = "401" SP extension-label
9.3.3 Multi-line response contents
This syntax defines the content of the various multi-line responses
(more precisely, the part of the response in "content-lines"), in
each case after any "byte-stuffing" has been undone.
multiline-response-content = article-response /
body-response / body-response /
hdr-response / hdr-response /
head-response / head-response /
help-response / help-response /
list-active-response / list-active-response /
list-active-times-response / list-active-times-response /
list-distrib-pats-response / list-distrib-pats-response /
list-distributions-response / list-distributions-response /
list-extensions-response / list-extensions-response /
list-headers-response / list-headers-response /
skipping to change at page 87, line 10 skipping to change at page 83, line 12
help-response = *(*B-CHAR CRLF) help-response = *(*B-CHAR CRLF)
list-active-response = *(newsgroup-name SPA article-number list-active-response = *(newsgroup-name SPA article-number
SPA article-number SPA newsgroup-status CRLF) SPA article-number SPA newsgroup-status CRLF)
list-active-times-response = list-active-times-response =
*(newsgroup-name SPA 1*DIGIT SPA newsgroup-creator CRLF) *(newsgroup-name SPA 1*DIGIT SPA newsgroup-creator CRLF)
list-distrib-pats-response = list-distrib-pats-response =
*(1*DIGIT ":" wildmat ":" distribution CRLF) *(1*DIGIT ":" wildmat ":" distribution CRLF)
list-distributions-response = list-distributions-response =
*(distribution SPA distribution-description CRLF) *(distribution SPA distribution-description CRLF)
list-extensions-response = list-extensions-response =
*(extension-label *(SPA extension-argument) CRLF) *(extension-descriptor CRLF)
list-headers-response = *(header-meta-name CRLF) / list-headers-response = *(header-meta-name CRLF) /
*((metadata-name / ":") CRLF) *((metadata-name / ":") CRLF)
list-newsgroups-response = list-newsgroups-response =
*(newsgroup-name WS newsgroup-description CRLF) *(newsgroup-name WS newsgroup-description CRLF)
list-overview-fmt-response = list-overview-fmt-text list-overview-fmt-response = list-overview-fmt-text
listgroup-response = *(article-number CRLF) listgroup-response = *(article-number CRLF)
newgroups-response = list-active-response newgroups-response = list-active-response
newnews-response = *(message-id CRLF) newnews-response = *(message-id CRLF)
over-response = *(article-number over-content CRLF) over-response = *(article-number over-content CRLF)
skipping to change at page 87, line 32 skipping to change at page 83, line 34
"Subject:" CRLF "Subject:" CRLF
"From:" CRLF "From:" CRLF
"Date:" CRLF "Date:" CRLF
"Message-ID:" CRLF "Message-ID:" CRLF
"References:" CRLF "References:" CRLF
( ":bytes" CRLF ":lines" / "Bytes:" CRLF "Lines:") CRLF ( ":bytes" CRLF ":lines" / "Bytes:" CRLF "Lines:") CRLF
*((header-name ":full" / metadata-name) CRLF) *((header-name ":full" / metadata-name) CRLF)
distribution = 1*P-CHAR distribution = 1*P-CHAR
distribution-description = U-TEXT distribution-description = U-TEXT
extension-argument = 1*P-CHAR
extension-label = 1*12UPPER
hdr-content = *S-NONTAB hdr-content = *S-NONTAB
hdr-n-content = [(header-name ":" / metadata-name) SP hdr-content] hdr-n-content = [(header-name ":" / metadata-name) SP hdr-content]
newsgroup-creator = U-TEXT newsgroup-creator = U-TEXT
newsgroup-description = S-TEXT newsgroup-description = S-TEXT
newsgroup-status = %x79 / %x6E / %x6D / private-status newsgroup-status = %x79 / %x6E / %x6D / private-status
over-content = 1*6(TAB hdr-content) / over-content = 1*6(TAB hdr-content) /
7(TAB hdr-content) *(TAB hdr-n-content) 7(TAB hdr-content) *(TAB hdr-n-content)
private-status = 1*P-CHAR ; except the values in newsgroup-status private-status = 1*P-CHAR ; except the values in newsgroup-status
9.4 Articles 9.4 LIST EXTENSIONS responses
This syntax defines the generic form of a LIST EXTENSIONS response
line.
extension-argument = 1*P-CHAR
extension-descriptor = extension-generic-descriptor
extension-generic-descriptor =
extension-label *(SPA extension-argument)
extension-label = 1*12UPPER
This syntax defines the specific LIST EXTENSIONS response lines for
the various extensions in this specification.
extension-descriptor =/ hdr-extension /
listgroup-extension /
over-extension
hdr-extension = %x48.44.52 ; "HDR"
listgroup-extension = %x4C.49.53.54.47.52.4F.55.50 ; "LISTGROUP"
over-extension = %x4F.56.45.52 [SPA "MSGID"] ; "OVER"
9.5 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 = *(S-CHAR / [CRLF] WS) header-content = *(S-CHAR / [CRLF] WS)
body = *(*B-CHAR CRLF) body = *(*B-CHAR CRLF)
9.5 General non-terminals 9.6 General non-terminals
These non-terminals are used at various places in the syntax and are
collected here for convenience. A few of these non-terminals are not
used in this specification but are provided for the consistency and
convenience of extension authors.
article-number = 1*16DIGIT article-number = 1*16DIGIT
content-lines = *([content-text] CRLF)
content-text = (".." / B-NONDOT) *B-CHAR
header-name = 1*A-NOTCOLON header-name = 1*A-NOTCOLON
message-id = "<" 1*248A-NOTGT ">" message-id = "<" 1*248A-NOTGT ">"
newsgroup-name = 1*wildmat-exact
termination = "." CRLF
wildmat = wildmat-pattern *("," ["!"] wildmat-pattern)
wildmat-pattern = 1*wildmat-item
wildmat-item = wildmat-exact / wildmat-wild
wildmat-exact = %x21-29 / %x2B / %x2D-3E / %x40-5A / %x5E-7E /
UTF8-non-ascii ; exclude * , ? [ \ ]
wildmat-wild = "*" / "?"
base64 = *(4base64-char) [base64-terminal]
base64-char = UPPER / LOWER / DIGIT / "+" / "/"
base64-terminal = 2base64-char "==" / 3base64-char "="
; Assorted special character sets ; Assorted special character sets
; A- means based on ASCII, excluding controls and SP ; A- means based on US-ASCII, excluding controls and SP
; P- means based on UTF-8, excluding controls and SP ; P- means based on UTF-8, excluding controls and SP
; U- means based on UTF-8, excluding NUL CR and LF ; U- means based on UTF-8, excluding NUL CR and LF
; B- means based on bytes, excluding NUL CR and LF ; B- means based on bytes, excluding NUL CR and LF
A-CHAR = %x21-7E A-CHAR = %x21-7E
A-NOTCOLON = %x21-39 / %x3B-7E ; exclude ":" A-NOTCOLON = %x21-39 / %x3B-7E ; exclude ":"
A-NOTGT = %x21-3D / %x3F-7E ; exclude ">" A-NOTGT = %x21-3D / %x3F-7E ; exclude ">"
P-CHAR = A-CHAR / UTF8-non-ascii P-CHAR = A-CHAR / UTF8-non-ascii
U-CHAR = CTRL / TAB / SP / A-CHAR / UTF8-non-ascii U-CHAR = CTRL / TAB / SP / A-CHAR / UTF8-non-ascii
U-NONTAB = CTRL / SP / A-CHAR / UTF8-non-ascii U-NONTAB = CTRL / SP / A-CHAR / UTF8-non-ascii
U-TEXT = P-CHAR *U-CHAR U-TEXT = P-CHAR *U-CHAR
B-CHAR = CTRL / TAB / SP / %x21-FF B-CHAR = CTRL / TAB / SP / %x21-FF
B-NONDOT = CTRL / TAB / SP / %x21-2D / %x2F-FF ; exclude "." B-NONDOT = CTRL / TAB / SP / %x21-2D / %x2F-FF ; exclude "."
ALPHA = UPPER / LOWER ; use only when case-insensitive
CR = %x0D CR = %x0D
CRLF = CR LF CRLF = CR LF
CTRL = %x01-08 / %x0B-0C / %x0E-1F CTRL = %x01-08 / %x0B-0C / %x0E-1F
DIGIT = %x30-39 DIGIT = %x30-39
EOL = *(SP / TAB) CRLF EOL = *(SP / TAB) CRLF
LF = %x0A LF = %x0A
LOWER = %x61-7A
SP = %x20 SP = %x20
SPA = 1*SP SPA = 1*SP
TAB = %x09 TAB = %x09
UPPER = %41-5A UPPER = %x41-5A
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 / TAB) WS = 1*(SP / TAB)
The following non-terminals require special consideration. They The following non-terminals require special consideration. They
represent situations where material SHOULD be restricted to UTF-8, represent situations where material SHOULD be restricted to UTF-8,
but implementations MUST be able to cope with other character but implementations MUST be able to cope with other character
encodings. Therefore there are two sets of definitions for them. encodings. Therefore there are two sets of definitions for them.
Implementations MUST accept any content that meets this syntax: Implementations MUST accept any content that meets this syntax:
S-CHAR = %x21-FF S-CHAR = %x21-FF
S-NONTAB = CTRL / SP / S-CHAR S-NONTAB = CTRL / SP / S-CHAR
S-TEXT = (CTRL / S-CHAR) *B-CHAR S-TEXT = (CTRL / S-CHAR) *B-CHAR
skipping to change at page 90, line 8 skipping to change at page 87, line 8
Implementations SHOULD only generate content that meets this syntax: Implementations SHOULD only generate content that meets this syntax:
S-CHAR = P-CHAR S-CHAR = P-CHAR
S-NONTAB = U-NONTAB S-NONTAB = U-NONTAB
S-TEXT = U-TEXT S-TEXT = U-TEXT
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
in Section 8.1. As described in Section 8, names beginning with X are specified in Section 8.1. As described in Section 8, names beginning
reserved for private use while all other names are to be associated with X are reserved for private use while all other names are
with a specification in an RFC on the standards-track or defining an expected to be associated with a specification in an RFC on the
IESG-approved experimental protocol. standards-track or defining an IESG-approved experimental protocol.
Different entries in the registry MUST use different
extension-labels.
Different entries in the registry MUST NOT use the same command name.
For this purpose, variants distinguished by a second or subsequent
keyword (e.g. "LIST HEADERS" and "LIST OVERVIEW.FMT") count as
different commands. If there is a need for two extensions to use the
same command, a single harmonised specification MUST be registered.
11. Security Considerations 11. Security Considerations
This section is meant to inform application developers, information This section is meant to inform application developers, information
providers, and users of the security limitations in NNTP as described providers, and users of the security limitations in NNTP as described
by this document. The discussion does not include definitive by this document. The discussion does not include definitive
solutions to the problems revealed, though it does make some solutions to the problems revealed, though it does make some
suggestions for reducing security risks. suggestions for reducing security risks.
11.1 Personal and Proprietary Information 11.1 Personal and Proprietary Information
NNTP, because it was created to distribute network news articles, NNTP, because it was created to distribute network news articles,
will forward whatever information is stored in those articles. will forward whatever information is stored in those articles.
Specification of that information is outside this scope of this Specification of that information is outside this scope of this
document, but it is likely that some personal and/or proprietary document, but it is likely that some personal and/or proprietary
information is available in some of those articles. It is very information is available in some of those articles. It is very
important that designers and implementers provide informative important that designers and implementers provide informative
warnings to users so personal and/or proprietary information in warnings to users so personal and/or proprietary information in
material that is added automatically to articles (e.g. in headers) is material that is added automatically to articles (e.g. in headers)
not disclosed inadvertently. Additionally, effective and easily is not disclosed inadvertently. Additionally, effective and easily
understood mechanisms to manage the distribution of news articles understood mechanisms to manage the distribution of news articles
SHOULD be provided to NNTP Server administrators, so that they are SHOULD be provided to NNTP Server administrators, so that they are
able to report with confidence the likely spread of any particular able to report with confidence the likely spread of any particular
set of news articles. set of news articles.
11.2 Abuse of Server Log Information 11.2 Abuse of Server Log Information
A server is in the position to save session data about a user's A server is in the position to save session data about a user's
requests that might identify their reading patterns or subjects of requests that might identify their reading patterns or subjects of
interest. This information is clearly confidential in nature and its interest. This information is clearly confidential in nature and its
handling can be constrained by law in certain countries. People using handling can be constrained by law in certain countries. People
the NNTP protocol to provide data are responsible for ensuring that using the NNTP protocol to provide data are responsible for ensuring
such material is not distributed without the permission of any that such material is not distributed without the permission of any
individuals that are identifiable by the published results. individuals that are identifiable by the published results.
11.3 Weak Authentication and Access Control 11.3 Weak Authentication and Access Control
There is no user-based or token-based authentication in the basic There is no user-based or token-based authentication in the basic
NNTP specification. Access is normally controlled by server NNTP specification. Access is normally controlled by server
configuration files. Those files specify access by using domain names configuration files. Those files specify access by using domain
or IP addresses. However, this specification does permit the creation names or IP addresses. However, this specification does permit the
of extensions to the NNTP protocol itself for such purposes. While creation of extensions to the NNTP protocol itself for such purposes;
including such mechanisms is optional, doing so is strongly one such extension is [NNTP-AUTH]. While including such mechanisms
encouraged. is optional, doing so is strongly encouraged.
Other mechanisms are also available. For example, a proxy server Other mechanisms are also available. For example, a proxy server
could be put in place that requires authentication before connecting could be put in place that requires authentication before connecting
via the proxy to the NNTP server. via the proxy to the NNTP server.
11.4 DNS Spoofing 11.4 DNS Spoofing
Many existing NNTP implementations authorize incoming connections by Many existing NNTP implementations authorize incoming connections by
checking the IP address of that connection against the IP addresses checking the IP address of that connection against the IP addresses
obtained via DNS lookups of lists of domain names given in local obtained via DNS lookups of lists of domain names given in local
skipping to change at page 92, line 22 skipping to change at page 89, line 22
name, rely very heavily on the Domain Name Service, and are thus name, rely very heavily on the Domain Name Service, and are thus
generally prone to security attacks based on the deliberate generally prone to security attacks based on the deliberate
misassociation of IP addresses and DNS names. Clients and servers misassociation of IP addresses and DNS names. Clients and servers
need to be cautious in assuming the continuing validity of an IP need to be cautious in assuming the continuing validity of an IP
number/DNS name association. number/DNS name association.
In particular, NNTP clients and servers SHOULD rely on their name In particular, NNTP clients and servers SHOULD rely on their name
resolver for confirmation of an IP number/DNS name association, resolver for confirmation of an IP number/DNS name association,
rather than caching the result of previous host name lookups. Many rather than caching the result of previous host name lookups. Many
platforms already can cache host name lookups locally when platforms already can cache host name lookups locally when
appropriate, and they SHOULD be configured to do so. It is proper for appropriate, and they SHOULD be configured to do so. It is proper
these lookups to be cached, however, only when the TTL (Time To Live) for these lookups to be cached, however, only when the TTL (Time To
information reported by the name server makes it likely that the Live) information reported by the name server makes it likely that
cached information will remain useful. the cached information will remain useful.
If NNTP clients or servers cache the results of host name lookups in If NNTP clients or servers cache the results of host name lookups in
order to achieve a performance improvement, they MUST observe the TTL order to achieve a performance improvement, they MUST observe the TTL
information reported by DNS. If NNTP clients or servers do not information reported by DNS. If NNTP clients or servers do not
observe this rule, they could be spoofed when a previously accessed observe this rule, they could be spoofed when a previously accessed
server's IP address changes. As network renumbering is expected to server's IP address changes. As network renumbering is expected to
become increasingly common, the possibility of this form of attack become increasingly common, the possibility of this form of attack
will grow. Observing this requirement thus reduces this potential will grow. Observing this requirement thus reduces this potential
security vulnerability. security vulnerability.
skipping to change at page 92, line 51 skipping to change at page 89, line 51
11.5 UTF-8 issues 11.5 UTF-8 issues
UTF-8 [RFC3629] permits only certain sequences of octets and UTF-8 [RFC3629] 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 generating a 501 response code. o generating a 501 response code.
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 replacing such sequences by a "guessed" valid sequence (based on o replacing such sequences by a "guessed" valid sequence (based on
properties of the UTF-8 encoding); properties of the UTF-8 encoding);
In the last case, the implementation MUST ensure that any replacement In the last case, the implementation MUST ensure that any replacement
cannot be used to bypass validity or security checks. For example, cannot be used to bypass validity or security checks. For example,
the illegal sequence %xC0.A0 is an over-long encoding for space the illegal sequence %xC0.A0 is an over-long encoding for space
(%x20). If it is replaced by the latter in a command line, this needs (%x20). If it is replaced by the latter in a command line, this
to happen before the command line is parsed into individual needs 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 Implementations SHOULD use one of the first two solutions where the
general structure of the NNTP stream remains intact, and close the general structure of the NNTP stream remains intact, and close the
connection if it is no longer possible to parse it sensibly. connection if it is no longer possible to parse it sensibly.
11.6 Caching of LIST EXTENSIONS results 11.6 Caching of LIST EXTENSIONS results
The LIST EXTENSIONS command provides information about the extensions The LIST EXTENSIONS command provides information about the extensions
currently available from the server. Whenever there is a relevant currently available from the server. Whenever there is a relevant
change to the server state, the results of this command are required change to the server state, the results of this command are required
to change accordingly. to change accordingly.
In most situations the results from this command in a given server In most situations the results from this command in a given server
state will not change from session to session; a given extension will state will not change from session to session; a given extension will
be installed permanently on a server. Some clients may therefore wish be installed permanently on a server. Some clients may therefore
to remember which extensions a server supports to avoid the delay of wish to remember which extensions a server supports to avoid the
an additional command and response, particularly if they open delay of an additional command and response, particularly if they
multiple connections in the same session. open multiple connections in the same session.
However, information about extensions related to security and privacy However, information about extensions related to security and privacy
MUST NOT be cached, since this could allow a variety of attacks. MUST NOT be cached, since this could allow a variety of attacks.
For example, consider a server which permits the use of cleartext For example, consider a server which permits the use of cleartext
passwords on links that are encrypted but not otherwise: passwords on links that are encrypted but not otherwise:
[Initial TCP connection set-up completed.] [Initial TCP connection set-up completed.]
[S] 200 NNTP Service Ready, posting permitted [S] 200 NNTP Service Ready, posting permitted
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 202 Extensions supported: [S] 202 Extensions supported:
[S] XENCRYPT [S] XENCRYPT
[S] . [S] .
[C] XENCRYPT [C] XENCRYPT
[Client and server negotiate encryption on the link] [Client and server negotiate encryption on the link]
[S] 283 Encrypted link established [S] 283 Encrypted link established
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
skipping to change at page 94, line 8 skipping to change at page 91, line 4
[S] 200 NNTP Service Ready, posting permitted [S] 200 NNTP Service Ready, posting permitted
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 202 Extensions supported: [S] 202 Extensions supported:
[S] XENCRYPT [S] XENCRYPT
[S] . [S] .
[C] XENCRYPT [C] XENCRYPT
[Client and server negotiate encryption on the link] [Client and server negotiate encryption on the link]
[S] 283 Encrypted link established [S] 283 Encrypted link established
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 202 Extensions supported: [S] 202 Extensions supported:
[S] XSECRET [S] XSECRET
[S] . [S] .
[C] XSECRET fred flintstone [C] XSECRET fred flintstone
[S] 290 Password for fred accepted [S] 290 Password for fred accepted
If the client caches the last LIST EXTENSIONS result, then on the If the client caches the last LIST EXTENSIONS result, then on the
next session it will attempt to use XSECRET on an unencrypted link: next session it will attempt to use XSECRET on an unencrypted link:
[Initial TCP connection set-up completed.] [Initial TCP connection set-up completed.]
[S] 200 NNTP Service Ready, posting permitted [S] 200 NNTP Service Ready, posting permitted
[C] XSECRET fred flintstone [C] XSECRET fred flintstone
[S] 483 Only permitted on secure links [S] 483 Only permitted on secure links
exposing the password to any eavesdropper. While the primary cause
exposing the password to any eavesdropper. While the primary cause of of this is passing a secret without first checking the security of
this is passing a secret without first checking the security of the the link, caching of LIST EXTENSIONS results can increase the risk.
link, caching of LIST EXTENSIONS results can increase the risk.
Any security extension should include requirements to check the Any security extension should include requirements to check the
security state of the link in a manner appropriate to that extension. security state of the link in a manner appropriate to that extension.
Caching should normally only be considered for anonymous clients that Caching should normally only be considered for anonymous clients that
do not use any security or privacy extensions and for which the time do not use any security or privacy extensions and for which the time
required for an additional command and response is a noticeable required for an additional command and response is a noticeable
issue. issue.
12. Acknowledgements 12. Acknowledgements
This document is the result of much effort by the present and past
members of the NNTP Working Group, chaired by Russ Allbery and Ned
Freed. It could not have been produced without them.
The author acknowledges the original authors of NNTP as documented in 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:
chaired by Eliot Lear. The organization of this document was o The work of the NNTP committee chaired by Eliot Lear. The
influenced by the last available draft from this working group. A organization of this document was influenced by the last available
special thanks to Eliot for generously providing the original draft from this working group. A special thanks to Eliot for
machine-readable sources for that document. generously providing the original machine-readable sources for
that document.
The author gratefully acknowledges the work of the DRUMS working o The work of the DRUMS working group, specifically RFC 1869
group, specifically RFC 1869 [RFC1869], which is the basis of the [RFC1869], which is the basis of the NNTP extensions mechanism
NNTP extensions mechanism detailed in this document. detailed in this document.
o The authors of RFC 2616 [RFC2616] for providing specific and
The author gratefully acknowledges the authors of RFC 2616 [RFC2616] relevant examples of security issues that should be considered for
for providing specific and relevant examples of security issues that HTTP. Since many of the same considerations exist for NNTP, those
should be considered for HTTP. Since many of the same considerations examples that are relevant have been included here with some minor
exist for NNTP, those examples that are relevant have been included rewrites.
here with some minor rewrites. o The comments and additional information provided by the following
individuals in preparing one or more of the progenitors of this
The author gratefully acknowledges the comments and additional document:
information provided by the following individuals in preparing one or
more of the progenitors of this document:
Russ Allbery <rra@stanford.edu> Russ Allbery <rra@stanford.edu>
Wayne Davison <davison@armory.com> Wayne Davison <davison@armory.com>
Chris Lewis <clewis@bnr.ca> Chris Lewis <clewis@bnr.ca>
Tom Limoncelli <tal@mars.superlink.net> Tom Limoncelli <tal@mars.superlink.net>
Eric Schnoebelen <eric@egsner.cirr.com> Eric Schnoebelen <eric@egsner.cirr.com>
Rich Salz <rsalz@osf.org> Rich Salz <rsalz@osf.org>
This work was motivated by the work of various news reader authors This work was motivated by the work of various news reader authors
and news server authors, which includes those listed below: and news server authors, which includes those listed below:
Rick Adams Rick Adams
Original author of the NNTP extensions to the RN news reader and Original author of the NNTP extensions to the RN news reader and
last maintainer of Bnews last maintainer of Bnews
Stan Barber Stan Barber
Original author of the NNTP extensions to the news readers that Original author of the NNTP extensions to the news readers that
are part of Bnews are part of Bnews
Geoff Collyer Geoff Collyer
Original author of the OVERVIEW database proposal and one of the Original author of the OVERVIEW database proposal and one of the
original authors of CNEWS original authors of CNEWS
Dan Curry Dan Curry
Original author of the xvnews news reader Original author of the xvnews news reader
Wayne Davison Wayne Davison
Author of the first threading extensions to the RN news reader Author of the first threading extensions to the RN news reader
(commonly called TRN) (commonly called TRN)
Geoff Huston Geoff Huston
Original author of ANU NEWS Original author of ANU NEWS
Phil Lapsey Phil Lapsey
Original author of the UNIX reference implementation for NNTP Original author of the UNIX reference implementation for NNTP
Iain Lea Iain Lea
Original maintainer of the TIN news reader Original maintainer of the TIN news reader
Chris Lewis Chris Lewis
First known implementer of the AUTHINFO GENERIC extension First known implementer of the AUTHINFO GENERIC extension
Rich Salz Rich Salz
Original author of INN Original author of INN
Henry Spencer Henry Spencer
One of the original authors of CNEWS One of the original authors of CNEWS
Kim Storm Kim Storm
Original author of the NN news reader Original author of the NN news reader
Other people who contributed to this document include:
Matthias Andree
Greg Andruk
Maurizio Codogno
Andrew Gierth
Juergen Helbing
Scott Hollenbeck
Charles Lindsey
Ade Lovett
Ken Murchinson
Francois Petillon
Peter Robinson
Rob Siemborski
Howard Swinehart
Ruud van Tol
Jeffrey Vinocur
The author thanks them all and apologises to anyone omitted.
Finally, the present author gratefully acknowledges the vast amount Finally, the present author gratefully acknowledges the vast amount
of work put into previous drafts by the previous author: of work put into previous drafts by the previous author:
Stan Barber <sob@academ.com> Stan Barber <sob@academ.com>
Normative References 13. References
13.1 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.
[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.
[RFC3548] Josefsson, S., "The Base16, Base32, and Base64 Data
Encodings", RFC 3548, July 2003.
[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO
10646", STD 63, RFC 3629, November 2003. 10646", STD 63, RFC 3629, November 2003.
[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.
[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 13.2 Informative References
[NNTP-AUTH]
Vinocur, J., Newman, C. and K. Murchinson, "NNTP
Authentication", draft-ietf-nntpext-authinfo-02 (work in
progress), July 2004.
[NNTP-TLS]
Vinocur, J. and C. Newman, "Using TLS with NNTP",
draft-ietf-nntpext-tls-nntp-01 (work in progress), October
2003.
[RFC1036] Horton, M. and R. Adams, "Standard for interchange of [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) [RFC1305] Mills, D., "Network Time Protocol (Version 3)
Specification, Implementation", RFC 1305, March 1992. 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.
skipping to change at page 98, line 34 skipping to change at page 95, line 25
[RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April
2001. 2001.
[RFC2980] Barber, S., "Common NNTP Extensions", RFC 2980, October [RFC2980] Barber, S., "Common NNTP Extensions", RFC 2980, October
2000. 2000.
[ROBE1995] [ROBE1995]
Robertson, R., "FAQ: Overview database / NOV General Robertson, R., "FAQ: Overview database / NOV General
Information", January 1995. Information", January 1995.
There is no definitive copy of this document known to the
author. It was previously posted as the Usenet article
<news:nov-faq-1-930909720@agate.Berkeley.EDU>
[SALZ1992] [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.
There is no definitive copy of this document known to the
author.
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
skipping to change at page 100, line 8 skipping to change at page 97, line 8
Appendix A. Future Directions Appendix A. Future Directions
It has been proposed that the response code range 6xx be used for It has been proposed that the response code range 6xx be 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
NNTP is most often used for transferring articles that conform to RFC NNTP is most often used for transferring articles that conform to RFC
1036 [RFC1036] (such articles are called "Netnews articles" here). It 1036 [RFC1036] (such articles are called "Netnews articles" here).
is also sometimes used for transferring email messages that conform It is also sometimes used for transferring email messages that
to RFC 2822 [RFC2822] (such articles are called "email articles" conform to RFC 2822 [RFC2822] (such articles are called "email
here). In this situation, articles must conform both to this articles" here). In this situation, articles must conform both to
specification and to that other one; this appendix describes some this specification and to that other one; this appendix describes
relevant issues. some relevant issues.
B.1 Header folding B.1 Header folding
NNTP allows a header line to be folded (by inserting a CRLF pair) NNTP allows a header line to be folded (by inserting a CRLF pair)
before any space or TAB character. before any space or TAB character.
Both email and Netnews articles are required to have at least one Both email and Netnews articles are required to have at least one
octet other than space or TAB on each header line. Thus folding can octet other than space or TAB on each header line. Thus folding can
only happen at one point in each sequence of consecutive spaces or only happen at one point in each sequence of consecutive spaces or
TABs. Netnews articles are further required to have the header name, TABs. Netnews articles are further required to have the header name,
colon, and following space all on the first line; folding may only colon, and following space all on the first line; folding may only
happen beyond that space. Finally, some non-conforming software will happen beyond that space. Finally, some non-conforming software will
remove trailing spaces and TABs from a line. Therefore it might be remove trailing spaces and TABs from a line. Therefore it might be
inadvisable to fold a header after a space or TAB. inadvisable to fold a header after a space or TAB.
For maximum safety, header lines SHOULD conform to the following For maximum safety, header lines SHOULD conform to the following
syntax rather than that in Section 9.4. syntax rather than that in Section 9.5.
header = header-name ":" SP [header-content] CRLF header = header-name ":" SP [header-content] CRLF
header-content = [WS] 1*P-CHAR *( [CRLF] WS 1*P-CHAR ) header-content = [WS] 1*P-CHAR *( [CRLF] WS 1*P-CHAR )
B.2 Message-IDs B.2 Message-IDs
Every article handled by an NNTP server MUST have a unique Every article handled by an NNTP server MUST have a unique
message-id. For the purposes of this specification, a message-id is message-id. For the purposes of this specification, a message-id is
an arbitrary opaque string that merely needs to meet certain an arbitrary opaque string that merely needs to meet certain
syntactic requirements and is just a way to refer to the article. syntactic requirements and is just a way to refer to the article.
skipping to change at page 101, line 32 skipping to change at page 98, line 31
to another specification that contains a definition of message-id to another specification that contains a definition of message-id
compatible with this one, the server SHOULD use those message-ids. A compatible with this one, the server SHOULD use those message-ids. A
common approach, and one that SHOULD be used for email and Netnews common approach, and one that SHOULD be used for email and Netnews
articles, is to extract the message-id from the contents of a header articles, is to extract the message-id from the contents of a header
with name "Message-ID". This may not be as simple as copying the with name "Message-ID". This may not be as simple as copying the
entire header contents; it may be necessary to strip off comments and entire header contents; it may be necessary to strip off comments and
undo quoting, or to reduce "equivalent" message-ids to a canonical undo quoting, or to reduce "equivalent" message-ids to a canonical
form. form.
If an article is obtained through the IHAVE command, there will be a If an article is obtained through the IHAVE command, there will be a
message-id provided with the command. The server MAY either use it or message-id provided with the command. The server MAY either use it
determine one from the article contents. However, whichever it does or determine one from the article contents. However, whichever it
it SHOULD ensure that, if the IHAVE command is repeated with the same does it SHOULD ensure that, if the IHAVE command is repeated with the
argument and article, it will be recognized as a duplicate. same argument and article, it will be recognized as a duplicate.
If an article does not contain a message-id that the server can If an article does not contain a message-id that the server can
identify, it MUST synthesize one. This could, for example, be a identify, it MUST synthesize one. This could, for example, be a
simple sequence number or based on the date and time that the article simple sequence number or based on the date and time that the article
arrived. When handling email or Netnews articles, a Message-ID header arrived. When handling email or Netnews articles, a Message-ID
SHOULD be added to ensure global consistency and uniqueness. header SHOULD be added to ensure global consistency and uniqueness.
B.3 Article posting B.3 Article posting
As far as NNTP is concerned, the POST and IHAVE commands provide the As far as NNTP is concerned, the POST and IHAVE commands provide the
same basic facilities in a slightly different way. However they have same basic facilities in a slightly different way. However they have
rather different intentions. rather different intentions.
The IHAVE command is intended for transmitting conforming articles The IHAVE command is intended for transmitting conforming articles
between a system of NNTP servers, with all articles perhaps also between a system of NNTP servers, with all articles perhaps also
conforming to another specification (e.g. all articles are Netnews conforming to another specification (e.g. all articles are Netnews
skipping to change at page 102, line 14 skipping to change at page 99, line 13
necessary validation (or has in turn obtained the article from a necessary validation (or has in turn obtained the article from a
third party which has done so); therefore the contents SHOULD be left third party which has done so); therefore the contents SHOULD be left
unchanged. unchanged.
In contrast, the POST command is intended for use when an end-user is In contrast, the POST command is intended for use when an end-user is
injecting a newly-created article into a such a system. The article injecting a newly-created article into a such a system. The article
being transferred might not be a conforming email or Netnews article, being transferred might not be a conforming email or Netnews article,
and the server is expected to validate it and, if necessary, convert and the server is expected to validate it and, if necessary, convert
it to the right form for onward distribution. It is often the case it to the right form for onward distribution. It is often the case
that this is done by a separate piece of software on the server that this is done by a separate piece of software on the server
installation. If so, the NNTP server SHOULD pass the incoming article installation. If so, the NNTP server SHOULD pass the incoming
to that software unaltered, making no attempt to filter characters, article to that software unaltered, making no attempt to filter
fold or limit lines, or otherwise process the incoming text. characters, fold or limit lines, or otherwise process the incoming
text.
The POST command can fail in various ways and clients should be The POST command can fail in various ways and clients should be
prepared to re-send an article. When doing so, however, it is often prepared to re-send an article. When doing so, however, it is often
important to ensure - as far as possible - that the same message-id 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 recognize the two articles as being duplicates. In the case of can recognize the two articles as being duplicates. In the case of
email or Netnews articles, therefore, the posted article SHOULD email or Netnews 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
skipping to change at page 103, line 14 skipping to change at page 100, line 14
Appendix C. Summary of Response Codes Appendix C. Summary of Response Codes
This section contains a list of every response code defined in this This section contains a list of every response code defined in this
document, whether it is multi-line, which commands can generate it, document, whether it is multi-line, which commands can generate it,
what arguments it has, and what its meaning is. what arguments it has, and what its meaning is.
Response code 100 (multi-line) Response code 100 (multi-line)
Generated by: HELP Generated by: HELP
Meaning: help text follows. Meaning: help text follows.
Response code 111 Response code 111
Generated by: DATE Generated by: DATE
1 argument: yyyymmddhhmmss 1 argument: yyyymmddhhmmss
Meaning: server date and time. Meaning: server date and time.
Response code 200 Response code 200
Generated by: initial connection, MODE READER Generated by: initial connection, MODE READER
Meaning: service available, posting allowed. Meaning: service available, posting allowed.
Response code 201 Response code 201
Generated by: initial connection, MODE READER Generated by: initial connection, MODE READER
Meaning: service available, posting prohibited. Meaning: service available, posting prohibited.
Response code 202 (multi-line) Response code 202 (multi-line)
Generated by: LIST EXTENSIONS Generated by: LIST EXTENSIONS
Meaning: extension list follows. Meaning: extension list follows.
Response code 205 Response code 205
Generated by: QUIT Generated by: QUIT
Meaning: connection closing (the server immediately closes the Meaning: connection closing (the server immediately closes the
connection). connection).
Response code 211 Response code 211
The 211 response code has two completely different forms depending The 211 response code has two completely different forms depending
on which command generated it: on which command generated it:
Generated by: GROUP Generated by: GROUP
4 arguments: number low high group 4 arguments: number low high group
Meaning: group selected. Meaning: group selected.
(multi-line) (multi-line)
Generated by: LISTGROUP Generated by: LISTGROUP
4 arguments: number low high group
Meaning: article numbers follow. Meaning: article numbers follow.
Response code 215 (multi-line) Response code 215 (multi-line)
Generated by: LIST ACTIVE, LIST ACTIVE.TIMES, LIST DISTRIB.PATS, Generated by: LIST ACTIVE, LIST ACTIVE.TIMES, LIST DISTRIB.PATS,
LIST DISTRIBUTIONS, LIST HEADERS, LIST NEWSGROUPS, LIST DISTRIBUTIONS, LIST HEADERS, LIST NEWSGROUPS,
LIST OVERVIEW.FMT LIST OVERVIEW.FMT
Meaning: information follows. Meaning: information follows.
Response code 220 (multi-line) Response code 220 (multi-line)
Generated by: ARTICLE Generated by: ARTICLE
2 arguments: n message-id 2 arguments: n message-id
Meaning: article follows. Meaning: article follows.
Response code 221 (multi-line) Response code 221 (multi-line)
Generated by: HEAD Generated by: HEAD
2 arguments: n message-id 2 arguments: n message-id
Meaning: article headers follow. Meaning: article headers follow.
Response code 222 (multi-line) Response code 222 (multi-line)
Generated by: BODY Generated by: BODY
2 arguments: n message-id 2 arguments: n message-id
Meaning: article body follows. Meaning: article body follows.
Response code 223 Response code 223
Generated by: LAST, NEXT, STAT Generated by: LAST, NEXT, STAT
2 arguments: n message-id 2 arguments: n message-id
Meaning: article exists and selected. Meaning: article exists and selected.
Response code 224 (multi-line) Response code 224 (multi-line)
Generated by: OVER Generated by: OVER
Meaning: overview information follows. Meaning: overview information follows.
Response code 225 (multi-line) Response code 225 (multi-line)
Generated by: HDR Generated by: HDR
Meaning: headers follow. Meaning: headers follow.
Response code 230 (multi-line) Response code 230 (multi-line)
Generated by: NEWNEWS Generated by: NEWNEWS
Meaning: list of new articles follows. Meaning: list of new articles follows.
Response code 231 (multi-line) Response code 231 (multi-line)
Generated by: NEWGROUPS Generated by: NEWGROUPS
Meaning: list of new newsgroups follows. Meaning: list of new newsgroups follows.
Response code 235 Response code 235
Generated by: IHAVE (second stage) Generated by: IHAVE (second stage)
Meaning: article transferred OK. Meaning: article transferred OK.
Response code 240 Response code 240
Generated by: POST (second stage) Generated by: POST (second stage)
Meaning: article received OK. Meaning: article received OK.
Response code 335 Response code 335
Generated by: IHAVE (first stage) Generated by: IHAVE (first stage)
Meaning: send article to be transferred. Meaning: send article to be transferred.
Response code 340 Response code 340
Generated by: POST (first stage) Generated by: POST (first stage)
Meaning: send article to be posted. Meaning: send article to be posted.
Response code 400 Response code 400
Generic response and generated by initial connection Generic response and generated by initial connection
Meaning: service not available or no longer available (the server Meaning: service not available or no longer available (the server
immediately closes the connection). immediately closes the connection).
Response code 401 Response code 401
Generic response Generic response
1 argument: extension-label 1 argument: extension-label
Meaning: the server is in the wrong mode; the indicated extension Meaning: the server is in the wrong mode; the indicated extension
should be used to change the mode. should be used to change the mode.
Response code 402 Response code 402
Generated by: LIST EXTENSIONS Generated by: LIST EXTENSIONS
Meaning: server has no extensions. Meaning: server has no extensions.
Response code 403 Response code 403
Generic response Generic response
Meaning: internal fault or problem preventing action being taken. Meaning: internal fault or problem preventing action being taken.
Response code 411 Response code 411
Generated by: GROUP, LISTGROUP Generated by: GROUP, LISTGROUP
Meaning: no such newsgroup. Meaning: no such newsgroup.
Response code 412 Response code 412
Generated by: ARTICLE, BODY, HDR, HEAD, LAST, LISTGROUP, NEXT, Generated by: ARTICLE, BODY, HDR, HEAD, LAST, LISTGROUP, NEXT,
OVER, STAT OVER, STAT
Meaning: no newsgroup selected. Meaning: no newsgroup selected.
Response code 420 Response code 420
Generated by: ARTICLE, BODY, HDR, HEAD, LAST, NEXT, OVER, STAT Generated by: ARTICLE, BODY, HDR, HEAD, LAST, NEXT, OVER, STAT
Meaning: current article number is invalid. Meaning: current article number is invalid.
Response code 421 Response code 421
Generated by: NEXT Generated by: NEXT
Meaning: no next article in this group. Meaning: no next article in this group.
Response code 422 Response code 422
Generated by: LAST Generated by: LAST
Meaning: no previous article in this group. Meaning: no previous article in this group.
Response code 423 Response code 423
Generated by: ARTICLE, BODY, HDR, HEAD, OVER, STAT Generated by: ARTICLE, BODY, HDR, HEAD, OVER, STAT
Meaning: no articles in that range. Meaning: no article with that number or in that range.
Response code 430 Response code 430
Generated by: ARTICLE, BODY, HDR, HEAD, OVER, STAT Generated by: ARTICLE, BODY, HDR, HEAD, OVER, STAT
Meaning: no article with that message-id. Meaning: no article with that message-id.
Response code 435 Response code 435
Generated by: IHAVE (first stage) Generated by: IHAVE (first stage)
Meaning: article not wanted. Meaning: article not wanted.
Response code 436 Response code 436
Generated by: IHAVE (either stage) Generated by: IHAVE (either stage)
Meaning: transfer not possible (first stage) or failed (second Meaning: transfer not possible (first stage) or failed (second
stage); try again later. stage); try again later.
Response code 437 Response code 437
Generated by: IHAVE (second stage) Generated by: IHAVE (second stage)
Meaning: transfer rejected; do not retry. Meaning: transfer rejected; do not retry.
Response code 440 Response code 440
Generated by: POST (first stage) Generated by: POST (first stage)
Meaning: posting not permitted. Meaning: posting not permitted.
Response code 441 Response code 441
Generated by: POST (second stage) Generated by: POST (second stage)
Meaning: posting failed. Meaning: posting failed.
Response code 480 Response code 480
Generic response Generic response
Meaning: command unavailable until the client has authenticated Meaning: command unavailable until the client has authenticated
itself. itself.
Response code 483 Response code 483
Generic response Generic response
Meaning: command unavailable until suitable privacy has been Meaning: command unavailable until suitable privacy has been
arranged. arranged.
Response code 500 Response code 500
Generic response Generic response
Meaning: unknown command. Meaning: unknown command.
Response code 501 Response code 501
Generic response Generic response
Meaning: syntax error in command. Meaning: syntax error in command.
Response code 502 Response code 502
Generic response and generated by initial connection Generic response and generated by initial connection
Meaning for the initial connection and the MODE READER command: Meaning for the initial connection and the MODE READER command:
service permanently unavailable (the server immediately closes the service permanently unavailable (the server immediately closes the
connection). connection).
Meaning for all other commands: command not permitted (and there Meaning for all other commands: command not permitted (and there
is no way for the client to change this). is no way for the client to change this).
Response code 503 Response code 503
Generic response Generic response
Meaning: feature not supported. Meaning: feature not supported.
Response code 504
Generic response
Meaning: error in base64-encoding [RFC3548] of an argument
Appendix D. Formal specification of the standard extensions Appendix D. Formal specification of the standard extensions
This section gives a formal definition of each of the extensions in This section gives a formal definition of each of the extensions in
Section 8.2 as required by Section 8 for the IANA registry. Section 8.2 as required by Section 8 for the IANA registry.
D.1 The LISTGROUP extension D.1 The LISTGROUP extension
o This extension provides information about specific article o This extension provides information about specific article
numbers. numbers.
skipping to change at page 111, line 13 skipping to change at page 106, line 13
READER command. 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 Rights or other rights that might be claimed to Intellectual Property Rights 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; nor does it represent that it has might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information made any independent effort to identify any such rights. Information
on the IETF's procedures with respect to rights in IETF Documents can on the procedures with respect to rights in RFC documents can be
be found in BCP 78 and BCP 79. found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr. http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
 End of changes. 

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