draft-ietf-nntpext-base-17.txt   draft-ietf-nntpext-base-18.txt 
NNTP C. Feather NNTP C. Feather
Internet-Draft Thus plc Internet-Draft Thus plc
Expires: August 30, 2003 March 1, 2003 Expires: October 24, 2003 April 25, 2003
Network News Transport Protocol Network News Transport Protocol
draft-ietf-nntpext-base-17 draft-ietf-nntpext-base-18
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC2026. all provisions of Section 10 of RFC2026.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that other
other groups may also distribute working documents as groups may also distribute working documents as Internet-Drafts.
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 http://
www.ietf.org/ietf/1id-abstracts.txt. www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on August 30, 2003. This Internet-Draft will expire on October 24, 2003.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2003). All Rights Reserved. Copyright (C) The Internet Society (2003). All Rights Reserved.
Abstract Abstract
The Network News Transport Protocol has been in use in the Internet The Network News Transport Protocol (NNTP) has been in use in the
for a decade and remains one of the most popular protocols (by Internet for a decade and remains one of the most popular protocols
volume) in use today. This document is a replacement for RFC 977 and (by volume) in use today. This document is a replacement for RFC 977
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. Allbery and Ned Freed.
This is draft 17 pre-publication version 2.
Outstanding issues Outstanding issues
Outstanding substantive (as opposed to editorial) issues in the text
are shown as in the following case.
OUTSTANDING ISSUE OUTSTANDING ISSUE
Reference consistency: should every RFC that is mentioned be Outstanding substantive (as opposed to editorial) issues in the
included in the references? Where the same document is referred to text are shown thus.
in more than one place, should every occasion have a reference
number (that is, "RFC 977 [3]" or similar), or only the first one,
or only the first one in each section?
Author's Note Author's Note
This draft is the first produced using a new formatting process. It
therefore may contain unintentional layout or formatting changes
compared with previous drafts. The author would appreciate being
informed of any problems this has caused.
This draft is written in XML using an NNTP-specific DTD. Custom This draft is written in XML using an NNTP-specific DTD. Custom
software is used to convert this to RFC 2629 [12] format, and then software is used to convert this to RFC 2629 [RFC2629] format, and
the public "xml2rfc" package to further reduce this to text, nroff then the public "xml2rfc" package to further reduce this to text,
source, and HTML. nroff source, and HTML.
No perl was used in producing this draft. No perl was used in producing this draft.
Rights Rights
UNIX is a registered trademark of the X/Open Company Ltd. UNIX is a registered trademark of the X/Open Company Ltd.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . 7 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 7
2. Notation . . . . . . . . . . . . . . . . . . . . . . . . 8 2. Notation . . . . . . . . . . . . . . . . . . . . . . . . . 8
3. Basic Operation . . . . . . . . . . . . . . . . . . . . 9 3. Basic Concepts . . . . . . . . . . . . . . . . . . . . . . 9
3.1 Response Codes . . . . . . . . . . . . . . . . . . . . . 11 3.1 Commands and Responses . . . . . . . . . . . . . . . . . . 9
3.1.1 Generic Response Codes . . . . . . . . . . . . . . . . . 13 3.2 Response Codes . . . . . . . . . . . . . . . . . . . . . . 11
3.1.1.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 15 3.2.1 Generic Response Codes . . . . . . . . . . . . . . . . . . 13
3.2 Pipelining . . . . . . . . . . . . . . . . . . . . . . . 16 3.2.1.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 17 3.3 Pipelining . . . . . . . . . . . . . . . . . . . . . . . . 16
4. The WILDMAT format . . . . . . . . . . . . . . . . . . . 18 3.3.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.1 Wildmat syntax . . . . . . . . . . . . . . . . . . . . . 18 3.4 Articles . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Wildmat semantics . . . . . . . . . . . . . . . . . . . 18 4. The WILDMAT format . . . . . . . . . . . . . . . . . . . . 20
4.3 Extensions . . . . . . . . . . . . . . . . . . . . . . . 19 4.1 Wildmat syntax . . . . . . . . . . . . . . . . . . . . . . 20
4.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . 20 4.2 Wildmat semantics . . . . . . . . . . . . . . . . . . . . 20
5. The GREETING Step . . . . . . . . . . . . . . . . . . . 21 4.3 Extensions . . . . . . . . . . . . . . . . . . . . . . . . 21
5.1 Initial Connection . . . . . . . . . . . . . . . . . . . 21 4.4 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 21 5. Session administration commands . . . . . . . . . . . . . 23
5.1.2 Description . . . . . . . . . . . . . . . . . . . . . . 21 5.1 Initial Connection . . . . . . . . . . . . . . . . . . . . 23
5.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 21 5.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2 MODE READER . . . . . . . . . . . . . . . . . . . . . . 22 5.1.2 Description . . . . . . . . . . . . . . . . . . . . . . . 23
5.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 22 5.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.2.2 Description . . . . . . . . . . . . . . . . . . . . . . 22 5.2 MODE READER . . . . . . . . . . . . . . . . . . . . . . . 24
5.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 23 5.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 24
6. The CAPABILITIES DISCOVERY step . . . . . . . . . . . . 25 5.2.2 Description . . . . . . . . . . . . . . . . . . . . . . . 24
6.1 LIST EXTENSIONS . . . . . . . . . . . . . . . . . . . . 25 5.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 25
6.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.3 LIST EXTENSIONS . . . . . . . . . . . . . . . . . . . . . 26
6.1.2 Description . . . . . . . . . . . . . . . . . . . . . . 25 5.3.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 26
6.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 26 5.3.2 Description . . . . . . . . . . . . . . . . . . . . . . . 26
7. Article posting and retrieval . . . . . . . . . . . . . 27 5.3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 27
7.1 Group and article selection . . . . . . . . . . . . . . 27 5.4 QUIT . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.1.1 GROUP . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.4.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.1.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 28 5.4.2 Description . . . . . . . . . . . . . . . . . . . . . . . 28
7.1.1.2 Description . . . . . . . . . . . . . . . . . . . . . . 28 5.4.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.1.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 29 6. Article posting and retrieval . . . . . . . . . . . . . . 29
7.1.2 LAST . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.1 Group and article selection . . . . . . . . . . . . . . . 29
7.1.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.1.1 GROUP . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.1.2.2 Description . . . . . . . . . . . . . . . . . . . . . . 30 6.1.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 29
7.1.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 31 6.1.1.2 Description . . . . . . . . . . . . . . . . . . . . . . . 30
7.1.3 NEXT . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.1.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 31
7.1.3.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.1.2 LAST . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.1.3.2 Description . . . . . . . . . . . . . . . . . . . . . . 32 6.1.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.1.3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 32 6.1.2.2 Description . . . . . . . . . . . . . . . . . . . . . . . 32
7.2 Retrieval of articles and article sections . . . . . . . 33 6.1.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 33
7.2.1 ARTICLE . . . . . . . . . . . . . . . . . . . . . . . . 33 6.1.3 NEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
7.2.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 33 6.1.3.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 33
7.2.1.2 Description . . . . . . . . . . . . . . . . . . . . . . 34 6.1.3.2 Description . . . . . . . . . . . . . . . . . . . . . . . 34
7.2.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 35 6.1.3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 34
7.2.2 HEAD . . . . . . . . . . . . . . . . . . . . . . . . . . 36 6.2 Retrieval of articles and article sections . . . . . . . . 35
7.2.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 36 6.2.1 ARTICLE . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.2.2.2 Description . . . . . . . . . . . . . . . . . . . . . . 37 6.2.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.2.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 37 6.2.1.2 Description . . . . . . . . . . . . . . . . . . . . . . . 36
7.2.3 BODY . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.2.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 37
7.2.3.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 39 6.2.2 HEAD . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.2.3.2 Description . . . . . . . . . . . . . . . . . . . . . . 39 6.2.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.2.3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 39 6.2.2.2 Description . . . . . . . . . . . . . . . . . . . . . . . 39
7.2.4 STAT . . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.2.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.2.4.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 40 6.2.3 BODY . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.2.4.2 Description . . . . . . . . . . . . . . . . . . . . . . 41 6.2.3.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.2.4.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 41 6.2.3.2 Description . . . . . . . . . . . . . . . . . . . . . . . 41
7.3 Article posting . . . . . . . . . . . . . . . . . . . . 42 6.2.3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 41
7.3.1 POST . . . . . . . . . . . . . . . . . . . . . . . . . . 42 6.2.4 STAT . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.3.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 42 6.2.4.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 42
7.3.1.2 Description . . . . . . . . . . . . . . . . . . . . . . 43 6.2.4.2 Description . . . . . . . . . . . . . . . . . . . . . . . 42
7.3.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 44 6.2.4.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 43
7.3.2 IHAVE . . . . . . . . . . . . . . . . . . . . . . . . . 44 6.3 Article posting . . . . . . . . . . . . . . . . . . . . . 44
7.3.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 44 6.3.1 POST . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.3.2.2 Description . . . . . . . . . . . . . . . . . . . . . . 45 6.3.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 44
7.3.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 46 6.3.1.2 Description . . . . . . . . . . . . . . . . . . . . . . . 44
8. Information commands . . . . . . . . . . . . . . . . . . 48 6.3.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 45
8.1 DATE . . . . . . . . . . . . . . . . . . . . . . . . . . 48 6.3.2 IHAVE . . . . . . . . . . . . . . . . . . . . . . . . . . 46
8.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 48 6.3.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 46
8.1.2 Description . . . . . . . . . . . . . . . . . . . . . . 48 6.3.2.2 Description . . . . . . . . . . . . . . . . . . . . . . . 46
8.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 48 6.3.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 47
8.2 HELP . . . . . . . . . . . . . . . . . . . . . . . . . . 48 7. Information commands . . . . . . . . . . . . . . . . . . . 50
8.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 48 7.1 DATE . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
8.2.2 Description . . . . . . . . . . . . . . . . . . . . . . 49 7.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 50
8.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 49 7.1.2 Description . . . . . . . . . . . . . . . . . . . . . . . 50
8.3 NEWGROUPS . . . . . . . . . . . . . . . . . . . . . . . 49 7.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 50
8.3.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 49 7.2 HELP . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
8.3.2 Description . . . . . . . . . . . . . . . . . . . . . . 49 7.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 50
8.3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 50 7.2.2 Description . . . . . . . . . . . . . . . . . . . . . . . 51
8.4 NEWNEWS . . . . . . . . . . . . . . . . . . . . . . . . 50 7.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.4.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 51 7.3 NEWGROUPS . . . . . . . . . . . . . . . . . . . . . . . . 51
8.4.2 Description . . . . . . . . . . . . . . . . . . . . . . 51 7.3.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 51
8.4.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 51 7.3.2 Description . . . . . . . . . . . . . . . . . . . . . . . 51
8.5 Time . . . . . . . . . . . . . . . . . . . . . . . . . . 52 7.3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 52
8.5.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 52 7.4 NEWNEWS . . . . . . . . . . . . . . . . . . . . . . . . . 53
8.6 The LIST commands . . . . . . . . . . . . . . . . . . . 53 7.4.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 53
8.6.1 LIST ACTIVE . . . . . . . . . . . . . . . . . . . . . . 53 7.4.2 Description . . . . . . . . . . . . . . . . . . . . . . . 53
8.6.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 53 7.4.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 53
8.6.1.2 Description . . . . . . . . . . . . . . . . . . . . . . 53 7.5 Time . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.6.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 54 7.5.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 54
8.6.2 LIST ACTIVE.TIMES . . . . . . . . . . . . . . . . . . . 55 7.6 The LIST commands . . . . . . . . . . . . . . . . . . . . 55
8.6.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 55 7.6.1 LIST ACTIVE . . . . . . . . . . . . . . . . . . . . . . . 55
8.6.2.2 Description . . . . . . . . . . . . . . . . . . . . . . 55 7.6.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 55
8.6.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 55 7.6.1.2 Description . . . . . . . . . . . . . . . . . . . . . . . 55
8.6.3 LIST DISTRIBUTIONS . . . . . . . . . . . . . . . . . . . 56 7.6.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 56
8.6.3.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 56 7.6.2 LIST ACTIVE.TIMES . . . . . . . . . . . . . . . . . . . . 57
8.6.3.2 Description . . . . . . . . . . . . . . . . . . . . . . 56 7.6.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 57
8.6.3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 57 7.6.2.2 Description . . . . . . . . . . . . . . . . . . . . . . . 57
8.6.4 LIST DISTRIB.PATS . . . . . . . . . . . . . . . . . . . 57 7.6.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.6.4.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 57 7.6.3 LIST DISTRIBUTIONS . . . . . . . . . . . . . . . . . . . . 58
8.6.4.2 Description . . . . . . . . . . . . . . . . . . . . . . 57 7.6.3.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 59
8.6.4.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 58 7.6.3.2 Description . . . . . . . . . . . . . . . . . . . . . . . 59
8.6.5 LIST NEWSGROUPS . . . . . . . . . . . . . . . . . . . . 58 7.6.3.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 59
8.6.5.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 58 7.6.4 LIST DISTRIB.PATS . . . . . . . . . . . . . . . . . . . . 60
8.6.5.2 Description . . . . . . . . . . . . . . . . . . . . . . 59 7.6.4.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.6.5.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 59 7.6.4.2 Description . . . . . . . . . . . . . . . . . . . . . . . 60
9. The CONCLUSION step . . . . . . . . . . . . . . . . . . 60 7.6.4.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 60
9.1 QUIT . . . . . . . . . . . . . . . . . . . . . . . . . . 60 7.6.5 LIST NEWSGROUPS . . . . . . . . . . . . . . . . . . . . . 61
9.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 60 7.6.5.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 61
9.1.2 Description . . . . . . . . . . . . . . . . . . . . . . 60 7.6.5.2 Description . . . . . . . . . . . . . . . . . . . . . . . 61
9.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 60 7.6.5.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 62
10. Framework for NNTP extensions . . . . . . . . . . . . . 61 8. Framework for NNTP extensions . . . . . . . . . . . . . . 63
10.1 Initial IANA registry . . . . . . . . . . . . . . . . . 63 8.1 Initial IANA registry . . . . . . . . . . . . . . . . . . 65
10.2 Standard extensions . . . . . . . . . . . . . . . . . . 63 8.2 Standard extensions . . . . . . . . . . . . . . . . . . . 65
10.3 The LISTGROUP extension . . . . . . . . . . . . . . . . 63 8.3 The LISTGROUP extension . . . . . . . . . . . . . . . . . 65
10.3.1 LISTGROUP . . . . . . . . . . . . . . . . . . . . . . . 63 8.3.1 LISTGROUP . . . . . . . . . . . . . . . . . . . . . . . . 65
10.3.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 63 8.3.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 65
10.3.1.2 Description . . . . . . . . . . . . . . . . . . . . . . 64 8.3.1.2 Description . . . . . . . . . . . . . . . . . . . . . . . 66
10.3.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 64 8.3.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 66
10.4 Article metadata . . . . . . . . . . . . . . . . . . . . 65 8.4 Article metadata . . . . . . . . . . . . . . . . . . . . . 67
10.4.1 The :bytes metadata item . . . . . . . . . . . . . . . . 65 8.4.1 The :bytes metadata item . . . . . . . . . . . . . . . . . 68
10.4.2 The :lines metadata item . . . . . . . . . . . . . . . . 66 8.4.2 The :lines metadata item . . . . . . . . . . . . . . . . . 68
10.5 The OVER extension . . . . . . . . . . . . . . . . . . . 66 8.5 The OVER extension . . . . . . . . . . . . . . . . . . . . 68
10.5.1 OVER . . . . . . . . . . . . . . . . . . . . . . . . . . 66 8.5.1 OVER . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
10.5.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 66 8.5.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 68
10.5.1.2 Description . . . . . . . . . . . . . . . . . . . . . . 67 8.5.1.2 Description . . . . . . . . . . . . . . . . . . . . . . . 69
10.5.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 68 8.5.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 70
10.5.2 LIST OVERVIEW.FMT . . . . . . . . . . . . . . . . . . . 69 8.5.2 LIST OVERVIEW.FMT . . . . . . . . . . . . . . . . . . . . 72
10.5.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 69 8.5.2.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 72
10.5.2.2 Description . . . . . . . . . . . . . . . . . . . . . . 70 8.5.2.2 Description . . . . . . . . . . . . . . . . . . . . . . . 72
10.5.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 71 8.5.2.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 73
10.6 The HDR extension . . . . . . . . . . . . . . . . . . . 72 8.6 The HDR extension . . . . . . . . . . . . . . . . . . . . 74
10.6.1 HDR . . . . . . . . . . . . . . . . . . . . . . . . . . 72 8.6.1 HDR . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
10.6.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . 72 8.6.1.1 Usage . . . . . . . . . . . . . . . . . . . . . . . . . . 74
10.6.1.2 Description . . . . . . . . . . . . . . . . . . . . . . 72 8.6.1.2 Description . . . . . . . . . . . . . . . . . . . . . . . 74
10.6.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . 74 8.6.1.3 Examples . . . . . . . . . . . . . . . . . . . . . . . . . 76
11. Augmented BNF Syntax for NNTP Commands . . . . . . . . . 76 9. Augmented BNF Syntax for NNTP . . . . . . . . . . . . . . 78
12. Security Considerations . . . . . . . . . . . . . . . . 79 9.1 Commands . . . . . . . . . . . . . . . . . . . . . . . . . 78
12.1 Personal and Proprietary Information . . . . . . . . . . 79 9.2 Responses . . . . . . . . . . . . . . . . . . . . . . . . 80
12.2 Abuse of Server Log Information . . . . . . . . . . . . 79 9.3 Articles . . . . . . . . . . . . . . . . . . . . . . . . . 80
12.3 Weak Authentication and Access Control . . . . . . . . . 79 9.4 General non-terminals . . . . . . . . . . . . . . . . . . 80
12.4 DNS Spoofing . . . . . . . . . . . . . . . . . . . . . . 80 10. IANA Considerations . . . . . . . . . . . . . . . . . . . 82
12.5 UTF-8 issues . . . . . . . . . . . . . . . . . . . . . . 80 11. Security Considerations . . . . . . . . . . . . . . . . . 83
13. Acknowledgments . . . . . . . . . . . . . . . . . . . . 82 11.1 Personal and Proprietary Information . . . . . . . . . . . 83
Normative References . . . . . . . . . . . . . . . . . . 84 11.2 Abuse of Server Log Information . . . . . . . . . . . . . 83
Informative References . . . . . . . . . . . . . . . . . 85 11.3 Weak Authentication and Access Control . . . . . . . . . . 83
Author's Address . . . . . . . . . . . . . . . . . . . . 85 11.4 DNS Spoofing . . . . . . . . . . . . . . . . . . . . . . . 84
Intellectual Property and Copyright Statements . . . . . 86 11.5 UTF-8 issues . . . . . . . . . . . . . . . . . . . . . . . 84
12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . 86
Normative References . . . . . . . . . . . . . . . . . . . 88
Informative References . . . . . . . . . . . . . . . . . . 89
Author's Address . . . . . . . . . . . . . . . . . . . . . 89
Intellectual Property and Copyright Statements . . . . . . 90
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 net news articles using a reliable stream-based mechanism. For of Netnews articles using a reliable stream-based mechanism. For news
news reading clients, NNTP enables retrieval of news articles that reading clients, NNTP enables retrieval of news articles that are
are stored in a central database, giving subscribers the ability to stored in a central database, giving subscribers the ability to
select only those articles they wish to read. select only those articles they wish to read.
The net news 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 net news 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
[1]. However, this version does not support the ill-defined SLAVE [RFC977]. However, this version does not support the ill-defined
command and permits four digit years to be specified in the NEWNEWS SLAVE command and permits four digit years to be specified in the
and NEWGROUPS commands. It changes the default character set to NEWNEWS and NEWGROUPS commands. It changes the default character set
UTF-8 [2] instead of US-ASCII [3]. It also extends the newsgroup to UTF-8 [RFC2279] instead of US-ASCII [ANSI1986]. It now requires
name matching capabilities already documented in RFC 977. all articles to have a message-id, eliminating the "<0>" placeholder
used in RFC 977. It also extends the newsgroup name matching
capabilities already documented in RFC 977.
Generally, new functionality is made available using new commands. Generally, new functionality is made available using new commands.
Part of that new functionality involves a mechanism to discover what Part of that new functionality involves a mechanism to discover what
new functionality is available to clients from a server. new functionality is available to clients from a server. This
mechanism can also be used to add more functionality as needs merit
This mechanism can also be used to add more functionality as needs such additions.
merit such additions.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [4]. document are to be interpreted as described in RFC 2119 [RFC2119].
An implementation is not compliant if it fails to satisfy one or more An implementation is not compliant if it fails to satisfy one or more
of the MUST requirements for this protocol. An implementation that of the MUST requirements for this protocol. An implementation that
satisfies all the MUST and all the SHOULD requirements for its satisfies all the MUST and all the SHOULD requirements for its
protocols is said to be "unconditionally compliant"; one that protocols is said to be "unconditionally compliant"; one that
satisfies all the MUST requirements but not all the SHOULD satisfies all the MUST requirements but not all the SHOULD
requirements for NNTP is said to be "conditionally compliant". requirements for NNTP is said to be "conditionally compliant".
For the remainder of this document, the term "client host" refers to For the remainder of this document, the term "client" or "client
a host making use of the NNTP service, while the term "server host" host" refers to a host making use of the NNTP service, while the term
refers to a host that offers the NNTP service. "server" or "server host" refers to a host that offers the NNTP
service.
2. Notation 2. Notation
The following notational conventions are used in this document. The following notational conventions are used in this document.
UPPERCASE indicates literal text to be included in the UPPERCASE indicates literal text to be included in the
command; command;
lowercase indicates a token described elsewhere; lowercase indicates a token described elsewhere;
[brackets] indicate that the parameter is optional; [brackets] indicate that the parameter is optional;
ellipsis... indicates that the parameter may be repeated any ellipsis... indicates that the parameter may be repeated any
number of times (it must occur at least once); number of times (it must occur at least once);
vertical|bar indicates a choice of two mutually exclusive vertical|bar indicates a choice of two mutually exclusive
parameters (exactly one must be provided). parameters (exactly one must be provided).
The name "message-id" for a command or response parameter indicates The name "message-id" for a command or response parameter indicates
that it is the message-id of an article as described in Section 7. that it is the message-id of an article as described in Section 3.4,
The actual parameter MUST include the angle brackets. including the angle brackets.
The name "wildmat" for a parameter indicates that it is a wildmat as The name "wildmat" for a parameter indicates that it is a wildmat as
defined in Section 4. If the parameter does not meet the defined in Section 4. If the parameter does not meet the requirements
requirements of that section (for example, if it does not fit the of that section (for example, if it does not fit the grammar of
grammar of Section 4.1) the NNTP server MAY place some interpretation Section 4.1) the NNTP server MAY place some interpretation on it (not
on it (not specified by this document) or otherwise MUST treat it as specified by this document) or otherwise MUST treat it as a syntax
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
with those codes in US-ASCII [ANSI1986] (that is, %x00, %x09, %x0A,
%x0D, and %x20 respectively), as do quoted characters (so "." and "<"
refer to %x2E and %x3C). The term "CRLF" or "CRLF pair" means the
sequence CR immediately followed by LF (that is, %x0D.0A). A
"printable US-ASCII character" is an octet in the range %x21-7E.
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
7.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.
3. Basic Operation 3. Basic Concepts
Every NNTP session MUST involve the following in this order:
CONNECTION
GREETING
DISCONNECTION
Other steps may occur between the GREETING and DISCONNECTION step.
They are:
CAPABILITIES DISCOVERY 3.1 Commands and Responses
NEWS EXCHANGE
CONCLUSION
NNTP operates over any reliable data stream 8-bit-wide channel. When NNTP operates over any reliable data stream 8-bit-wide channel.
running over TCP/IP, the official port for the NNTP service is 119.
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 a client host wishes to make use of the service, it TCP port; when running over TCP/IP, the official port for the NNTP
MUST establish a TCP connection with the server host by connecting to service is 119. When a client host wishes to make use of the service,
that host on the same port on which the server is listening. This is it MUST establish a TCP connection with the server host by connecting
the CONNECTION step. When the connection is established, the NNTP to that host on the same port on which the server is listening. When
server host MUST send a greeting. This is the GREETING step. The the connection is established, the NNTP server host MUST send a
client host and server host SHOULD then exchange commands and greeting. The client host and server host then exchange commands and
responses (respectively) until the connection is closed or aborted. responses (respectively) until the connection is closed or aborted.
This final step is called the DISCONNECTION step.
If there is a CONCLUSION step, it MUST immediately precede the The character set for all NNTP commands is UTF-8 [RFC2279]. Commands
DISCONNECTION step. There MUST be only one CONNECTION, CONCLUSION in NNTP MUST consist of a keyword, which MAY be followed by one or
and DISCONNECTION step for each NNTP session. All other steps MAY be more arguments. A CRLF pair MUST terminate all commands. Multiple
repeated as needed. For example, the GREETING step may be repeated commands MUST NOT be on the same line. Keywords MUST consist of
if the client makes use of the MODE READER command (see Section 5.2 printable US-ASCII characters. Unless otherwise noted elsewhere in
for more on the MODE READER command). this document, arguments SHOULD consist of printable US-ASCII
characters. Keywords and arguments MUST be each separated by one or
OUTSTANDING ISSUE more space or TAB characters. Keywords MUST be at least three
characters and MUST NOT exceed 12 characters. Command lines MUST NOT
Do we actually need this GREETING / NEWS EXCHANGE / DISCONNECTION exceed 512 octets, which includes the terminating CRLF pair. The
type stuff? I don't see that it buys us anything compared with arguments MUST NOT exceed 497 octets.
simply saying that there's the initial greeting and a set of
commands.
The character set for all NNTP commands is UTF-8. Commands in the Where this specification permits UTF-8 characters outside the range
NNTP MUST consist of a keyword, which MAY be followed by one or more U+0000 to U+007F, implementations MUST NOT use the Byte Order Mark
arguments. An US-ASCII CRLF pair MUST terminate all commands. (U+FEFF, encoding %xEF.BB.BF), and MUST use the Word Joiner (U+2060,
Multiple commands MUST NOT be on the same line. Keywords MUST encoding %xE2.91.A0) for the meaning Zero Width No-Break Space, in
consist of printable US-ASCII characters. Unless otherwise noted command lines and the initial lines of responses, and SHOULD apply
elsewhere in this document, arguments SHOULD consist of printable these same principles throughout.
US-ASCII characters. Keywords and arguments MUST be each separated
by one or more US-ASCII SPACE or US-ASCII TAB characters. Keywords
MUST be at least three US-ASCII characters and MUST NOT exceed 12
US-ASCII characters. Command lines MUST NOT exceed 512 octets, which
includes the terminating US-ASCII CRLF pair. The arguments MUST NOT
exceed 497 octets.
Commands may have variants, using a second keyword immediately after Commands may have variants, using a second keyword immediately after
the first to indicate which variant is required. The only such the first to indicate which variant is required. The only such
commands in this specification are LIST and MODE. commands in this specification are LIST and MODE.
Keywords are case-insensitive; the case of keywords for commands MUST Keywords are case-insensitive; the case of keywords for commands MUST
be ignored by the server. Command and response parameters are case be ignored by the server. Command and response parameters are case or
or language specific only when specified (either in this document or language specific only when stated, either in this document or in
in RFC 1036 [6]). 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. in a single line.
OUTSTANDING ISSUE OUTSTANDING ISSUE
Should the initial response line be limited to 512 octets as well? Should the initial response line be limited to 512 octets as well?
Possible text: Possible text:
The first or only line of the response MUST NOT exceed 512 octets, The first or only line of the response MUST NOT exceed 512 octets,
which includes the response code and the terminating US-ASCII CRLF which includes the response code and the terminating CRLF pair.
pair.
The text further down about "does not place any limit on the The text further down about "does not place any limit on the
length" would need equivalent edits. length" would need equivalent edits.
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 0x0D 0x0A (US-ASCII CRLF). being a stream of octets ending with a CRLF pair. Apart from
Apart from those line endings, the stream MUST NOT include the those line endings, the stream MUST NOT include the octets NUL,
octets 0x00, 0x0A, or 0x0D (US-ASCII NUL, LF, and 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" (0x2E 3. If any subsequent line begins with the "termination octet" ("."
or US_ASCII "."), that line MUST be "byte-stuffed" by pre-pending or %x2E), that line MUST be "byte-stuffed" by pre-pending an
an additional termination octet (0x2E) to that line of the additional termination octet to that line of the response.
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 (0x2E or US_ASCII ".") consisting of a single termination octet followed by a CRLF pair
followed by CRLF in the normal way. Thus a multi-line response in the normal way. Thus a multi-line response is always
is always terminated with the five octets CRLF "." CRLF (in terminated with the five octets CRLF "." CRLF (%x0D.0A.2E.0D.0A).
US-ASCII).
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 US-ASCII CRLF, that initial termination octet is than a CRLF pair, that initial termination octet is disregarded.
disregarded.
6. Likewise, the terminating line "." CRLF (in US-ASCII) MUST NOT be 6. Likewise, the terminating line ("." CRLF or %x2E.0D.0A) MUST NOT
considered part of the multi-line response; i.e. the client MUST be considered part of the multi-line response; i.e. the client
ensure that any line beginning with the termination octet MUST ensure that any line beginning with the termination octet
followed immediately by US-ASCII CRLF is disregarded; (the first followed immediately by a CRLF pair is disregarded; (the first
CRLF of the terminating CRLF "." CRLF is, of course, part of the CRLF pair of the terminating CRLF "." CRLF is, of course, part of
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 NUL octet or the CR or LF octets in contexts other than contain the octets NUL, LF, or CR other than a CRLF pair cannot be
the CRLF line ending cannot be reliably conveyed in the above format. reliably conveyed in the above format. However, except when stated
otherwise, this specification does not require the content to be
UTF-8 and it is possible for octets above and below 128 to be mixed
arbitrarily.
This document does not place any limit on the length of a line. This document does not place any limit on the length of a line.
However, the standards that define the format of articles may do so. However, the standards that define 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 reset the autologout timer. Similarly, the receipt of any significant
significant amount of data from the client while in the midst of amount of data from the client while in the midst of sending a
sending a multi-line message to the server (such as during a POST or multi-line message to the server (such as during a POST or IHAVE
IHAVE command) SHOULD suffice to reset the autologout timer. When command) SHOULD suffice to reset the autologout timer. When the timer
the timer expires, the server SHOULD close the TCP connection without expires, the server SHOULD close the TCP connection without sending
sending any response to the client, including when the client is in any response to the client.
the middle of sending a multi-line message to the server.
3.1 Response Codes 3.2 Response Codes
Each response MUST begin with a three-digit status indicator. These Each response MUST begin with a three-digit status indicator. These
are status reports from the server and indicate the response to the are status reports from the server and indicate the response to the
last command received from the client. last command received from the client.
The first digit of the response broadly indicates the success, The first digit of the response broadly indicates the success,
failure, or progress of the previous command. failure, or progress of the previous command.
1xx - Informative message. 1xx - Informative message.
2xx - Command completed OK. 2xx - Command completed OK.
3xx - Command OK so far; send the rest of it. 3xx - Command OK so far; send the rest of it.
4xx - Command was correct, but couldn't be performed for some 4xx - Command was correct, but couldn't be performed for some
reason. reason.
5xx - Command unimplemented, or incorrect, or a serious program 5xx - Command unimplemented, or incorrect, or a serious program
error occurred. error occurred.
OUTSTANDING ISSUE
I proposed that we assign 6xx for extensions and future commands
to use for multiline responses, thus at least limiting (if not
eliminating) the problem clients have of working out whether one
is coming up. Nobody was violently against the idea, but nobody
was particularly in favour either.
The next digit in the code indicates the function response category. The next digit in the code indicates the function response category.
x0x - Connection, setup, and miscellaneous messages x0x - Connection, setup, and miscellaneous messages
x1x - Newsgroup selection x1x - Newsgroup selection
x2x - Article selection x2x - Article selection
x3x - Distribution functions x3x - Distribution functions
x4x - Posting x4x - Posting
x8x - Reserved for authentication and authorization extensions x8x - Reserved for authentication and authorization extensions
x9x - Reserved for private use (non-standard extensions) x9x - Reserved for private use (non-standard extensions)
Certain responses contain parameters such as numbers and names in Certain responses contain parameters such as numbers and names in
addition to the status indicator. In those cases, to simplify addition to the status indicator. In those cases, to simplify
interpretation by the client the number and type of such parameters interpretation by the client the number and type of such parameters
is fixed for each response code, as is whether or not the code is 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 response code is an exception to this. In all other cases, the client
client MUST only use the status indicator itself to determine the MUST only use the status indicator itself to determine the nature of
nature of the response. The exact response codes that can be the response. The exact response codes that can be returned by any
returned by any given command are detailed in the description of that given command are detailed in the description of that command.
command.
Parameters MUST be separated from the numeric status indicator and Parameters MUST be separated from the numeric status indicator and
from each other by a single US-ASCII space. All numeric parameters from each other by a single space. All numeric parameters MUST be in
MUST be in base 10 (decimal) format, and MAY have leading zeros. base 10 (decimal) format, and MAY have leading zeros. String
String parameters MUST contain at least one character and MUST NOT parameters MUST contain at least one character and MUST NOT contain
contain US-ASCII spaces, CR, LF, or tab. The server MAY add any text TAB, LF, CR, or space. The server MAY add any text after the response
after the response code or last parameter as appropriate, and the code or last parameter as appropriate, and the client MUST NOT make
client MUST NOT make decisions based on this text. Such text MUST be decisions based on this text. Such text MUST be separated from the
separated from the numeric status indicator or the last parameter by numeric status indicator or the last parameter by at least one space.
at least one US-ASCII 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.1.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
restricts itself to this specification will only receive the restricts itself to this specification will only receive the
responses that are listed.) responses that are listed.)
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 extension registered with IANA (see
Section 10) will specify any response codes of the x9x pattern. Section 8) will specify any response codes of the x9x pattern.
(Implementers of extensions are accordingly cautioned not to use such (Implementers of extensions are accordingly cautioned not to use such
responses for extensions that may subsequently be submitted for responses for extensions that may subsequently be submitted for
registration.) registration.)
3.1.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, the response code 501 MUST be returned. Note that where a specifies, the response code 501 MUST be returned. Note that where a
command has variants depending on a second keyword (e.g. LIST ACTIVE command has variants depending on a second keyword (e.g. LIST ACTIVE
and LIST NEWSGROUPS), then 501 MUST be used when the requested and LIST NEWSGROUPS), then 501 MUST be used when the requested
variant is not implemented but the base command is. variant is not implemented but the base command is.
If the client is not authorized to use the specified facility when If the server experiences an internal fault or problem that means it
the server is in its current state, the response code 502 MUST be is unable to carry out the command (for example, a necessary file is
returned. A different command might change the server state and missing or a necessary service could not be contacted), the response
permit the command if it is retried. code 403 MUST be returned. If the server recognises the command but
does not provide an optional feature (for example because it does not
If the server does not provide an optional feature, then the response store the required information), or only handles a subset of
code 403 MUST be returned if the omission is temporary (e.g. because legitimate cases (see the HDR command (Section 8.6.1) for an
a necessary facility is unavailable) and the code 503 if it is example), the response code 503 MUST be returned. Note that where a
permanent (e.g. because the server does not store the required command is optional (e.g. LIST ACTIVE.TIMES) and is not provided by a
information). server, this MAY be treated as an unimplemented command (response
code 500 or 501) or as a working command where the information is not
available (response code 503).
OUTSTANDING ISSUE OUTSTANDING ISSUE
Is anyone aware of a server that implements 403, or is it an Do we need to add text like:
invention of our own? If the latter, do we want to keep it? INN
apparently uses 503 for temporary errors; someone suggested adding
the text:
If the server encounters an unexpected internal error that For backwards compatibility a server MAY return the response
prevents it from completing a command, the response code 503 code 503 where this specification requires the response code
MAY be returned. 403, and a client SHOULD be prepared for this. This waiver may
be removed in a future revision of this specification.
Some servers return 503 for things like "can't contact a posting If the client is not authorized to use the specified facility when
server" or "can't execute external authenticator". the server is in its current state, then either the response code 480
or the response code 502 MUST be returned. The response code 480
SHOULD be used if a different command (for example, an extension used
to present credentials) might change the server state so that the
command is permitted. The response code 502 SHOULD be used if the
server wishes to indicate that it is necessary to terminate the
connection and start a new one with the appropriate authority before
the command can be used. Since it is not always possible to clearly
distinguish these two cases, a server MAY issue either of these
response codes for either case. (Note that the server MUST NOT close
the TCP connection immediately after a 502 response except at the
initial connection (Section 5.1) and with the MODE READER (Section
5.2) command.)
OUTSTANDING ISSUE OUTSTANDING ISSUE
The 503 response seems to have three separate meanings: This isn't a complete solution to the 480 issue; what about the
TLS extension, which uses 483 to mean "you need encryption".
1. LIST ACTIVE.TIMES etc. use it for "this data isn't stored". Should 480 be used for other than "you need authentication"? What
HDR uses it for "this header can't be requested", which is code should be used to mean "can't do AUTH until after MODE
consistent. Are there other commands that can reasonably READER"?
return such a thing? If not, is this kind of 503 really a
generic response?
2. Temporary errors, the kind that 403 is supposed to represent. Do we need a more generic mechanism for "you must invoke extension
X to do Y"?
3. It's apparently returned by LIST EXTENSIONS, but what does it The best proposal made so far is that all 48x codes, if returned
mean in this case? Not "there are no extensions", because from an existing command, mean "unavailable unless some
that's 402. Is this also an invention of our own? Again, authentication or privacy extension is invoked". Does this tie in
would a different code be better? with the issue of permitting existing commands not listed in an
extension?
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. It MAY give a 401 response immediately close the TCP connection. It MAY give a 401 response code
code to any command to indicate that termination is imminent to any command to indicate that termination is imminent (following a
(following a 401 response, it MUST NOT close the TCP connection 401 response, it MUST NOT close the TCP connection immediately).
immediately).
OUTSTANDING ISSUE OUTSTANDING ISSUE
Since the 401 doesn't terminate the session, what about commands It's not clear that we need 401; it appears to have been an
that change the status? For example, if GROUP returns 401 what invention. If we do keep it, then text is needed to indicate what
happens to the current selected newsgroup. happens with commands that change the status (for example, if
GROUP returns 401 what happens to the current selected newsgroup),
and how to make those commands work.
With the exception of mandatory commands and the 500 response, the With the exception of mandatory commands and the 500 response, the
client MUST be prepared to receive any of these responses for any client MUST be prepared to receive any of these responses for any
command. command.
3.1.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:
skipping to change at page 15, line 44 skipping to change at page 15, line 40
[S] 501 Too many arguments [S] 501 Too many arguments
Example of a bad wildmat: Example of a bad wildmat:
[C] LIST ACTIVE u[ks].* [C] LIST ACTIVE u[ks].*
[S] 501 Syntax error [S] 501 Syntax error
Example of an attempt to access a restricted facility: Example of an attempt to access a restricted facility:
[C] GROUP secret.group [C] GROUP secret.group
[S] 502 Permission denied [S] 480 Permission denied
followed by a successful attempt following authentication: followed by a successful attempt following authentication:
[C] XSECRET fred flintstone [C] XSECRET fred flintstone
[S] 290 Password for fred accepted. [S] 290 Password for fred accepted.
[C] GROUP secret.group [C] GROUP secret.group
[S] 211 5 1 20 secret.group selected [S] 211 5 1 20 secret.group selected
Example of an attempt to access a facility not available to this
connection:
[C] MODE READER
[S] 200 Reader mode, posting permitted
[C] IHAVE <i.am.an.article.you.will.want@example.com>
[S] 502 Permission denied
Example of 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.]
skipping to change at page 16, line 25 skipping to change at page 16, line 29
Example of imminent termination of the server: Example of imminent termination of the server:
[C] STAT 123 [C] STAT 123
[S] 401 Pre-payment expired, you have 10 seconds [S] 401 Pre-payment expired, you have 10 seconds
[C] STAT 123 [C] STAT 123
[S] 423 No such article number in this group [S] 423 No such article number in this group
[C] NEXT [C] NEXT
[S] 400 Time expired [S] 400 Time expired
[Server closes connection.] [Server closes connection.]
3.2 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 will be matching the wrong responses to each command. Since there are
are significant benefits to pipelining, but also circumstances where significant benefits to pipelining, but also circumstances where it
it is reasonable or common for servers to behave in the above manner, 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 command. The server MUST allow pipelining and MUST NOT throw away any
any text received after a command. Irrespective of whether or not 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 say 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.
The initial connection must not be part of a pipeline; that is, the The initial connection must not be part of a pipeline; that is, the
client MUST NOT send any command until receiving the CRLF at the end client MUST NOT send any command until receiving the CRLF at the end
of the greeting. of the greeting.
If the client uses blocking system calls to send commands, it MUST If the client uses blocking system calls to send commands, it MUST
ensure that the amount of text sent in pipelining does not cause a ensure that the amount of text sent in pipelining does not cause a
deadlock between transmission and reception. The amount of text deadlock between transmission and reception. The amount of text
involved will depend on window sizes in the transmission layer, and involved will depend on window sizes in the transmission layer, and
is typically 4k octets for TCP. is typically 4k octets for TCP.
3.2.1 Examples 3.3.1 Examples
Example of correct use of pipelining: Example of correct use of pipelining:
[C] GROUP misc.test [C] GROUP misc.test
[C] STAT [C] STAT
[C] NEXT [C] NEXT
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[S] 223 3000234 <45223423@example.com> retrieved [S] 223 3000234 <45223423@example.com> retrieved
[S] 223 3000237 <668929@example.org> retrieved [S] 223 3000237 <668929@example.org> retrieved
Example of incorrect use of pipelining (the LIST EXTENSIONS command Example of incorrect use of pipelining (the MODE READER command may
may not be pipelined): not be pipelined):
[C] GROUP misc.test [C] GROUP misc.test
[C] LIST EXTENSIONS [C] MODE READER
[C] DATE [C] DATE
[C] NEXT [C] NEXT
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[S] 402 server has no extensions [S] 200 Server ready, posting allowed
[S] 223 3000237 <668929@example.org> retrieved [S] 223 3000237 <668929@example.org> retrieved
The DATE command has been thrown away by the server and so there is The DATE command has been thrown away by the server and so there is
no 111 response to match it. no 111 response to match it.
3.4 Articles
OUTSTANDING ISSUE
This section is new. If anyone has better wording, I won't
complain.
NNTP is intended to transfer articles between clients and servers.
For the purposes of this specification, articles are required to
conform to the rules in this section and clients and servers MUST
correctly process any article received from the other that does so.
Note that this requirement applies only to the contents of
communications over NNTP; it does not prevent the client or server
from subsequently rejecting an article for reasons of local policy.
In particular, where NNTP is used to transport articles that conform
to other specifications such as RFC 1036 [RFC1036] or RFC 2822
[RFC2822], articles must meet both this specification and that other.
OUTSTANDING ISSUE
Need to add an appendix that spells out how this document
interacts with RFC 1036. That would allow us to remove some of the
convoluted wording about "other specifications".
An article consists of two parts: the headers and the body. They are
separated by a single empty line, or in other words by two
consecutive CRLF pairs (if there is more than one empty line, the
second and subsequent ones are part of the body). In order to meet
the general requirements of NNTP, an article MUST NOT include the
octet NUL, MUST NOT contain the octets LF and CR other than as part
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
empty.
The headers of an article consist of one or more header lines. Each
header line consists of a header name, a colon, a space, the header
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
of this specification, is not case sensitive. There MAY be more than
one header line with the same name. The content MUST NOT contain CRLF
but is otherwise unrestricted; in particular, it MAY be empty. A
header may be "folded"; that is, a CRLF pair may be placed before any
TAB or space in the line (including the space after the colon after
the header name), except that there MUST be at least one octet other
than %x09 or %x20 between any two CRLF pairs in a header line. (Note
that folding means that the header line occupies more than one line
when displayed or transmitted; nevertheless it is still referred to
as "a" header line.) The presence or absence of folding does not
affect the meaning of the header line; that is, the CRLF pairs
introduced by folding are not considered part of the header value.
Each article MUST have a unique message-id; two articles offered by
an NNTP server MUST NOT have the same message-id. Note that RFC 1036
[RFC1036] further requires that message-ids are globally unique for
all time.
For the purposes of this specification, message-ids are opaque
strings that MUST meet the following requirements:
o A message-id MUST begin with "<" and end with ">", and MUST NOT
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 NOT contain octets other than printable US-ASCII
characters.
Two message-ids are the same if and only if they consist of the same
sequence of octets. Other specifications may define two different
sequences as being equal; an NNTP server that also conforms to such a
specification must consistently use only one or the other. As an
example, the message-ids:
<abcd@example.com>
<"abcd"@example.com>
<"ab\cd"@example.com>
are considered distinct by this specification even though they would
be considered semantically identical according to the specification
in RFC 2822 [RFC2822].
This specification does not describe how the message-id of an article
is determined (if the server is also conforming to another
specification that contains a definition of message-id compatible
with this one, the server SHOULD use those message-ids). Many servers
will extract the message-id from the contents of a header with name
"Message-ID", but this is not required by this document. If the
server does not have any way to determine a message-id from the
article itself, it MUST synthesise one (it need not modify the
article to add such a header unless required to by another
specification).
4. The WILDMAT format 4. The WILDMAT format
The WILDMAT format described here is based on the version first The WILDMAT format described here is based on the version first
developed by Rich Salz [11], which in turn was derived from the developed by Rich Salz [SALZ1992], which in turn was derived from the
format used in the UNIX "find" command to articulate file names. It format used in the UNIX "find" command to articulate file names. It
was developed to provide a uniform mechanism for matching patterns in was developed to provide a uniform mechanism for matching patterns in
the same manner that the UNIX shell matches filenames. the same manner that the UNIX shell matches filenames.
4.1 Wildmat syntax 4.1 Wildmat syntax
A wildmat is described by the following augmented BNF [5] syntax A wildmat is described by the following ABNF [RFC2234] syntax (note
(note that this syntax contains ambiguities and special cases that this syntax contains ambiguities and special cases described at
described at the end): the end):
wildmat = wildmat-pattern *("," ["!"] wildmat-pattern) wildmat = wildmat-pattern *("," ["!"] wildmat-pattern)
wildmat-pattern = 1*wildmat-item wildmat-pattern = 1*wildmat-item
wildmat-item = wildmat-exact / wildmat-wild wildmat-item = wildmat-exact / wildmat-wild
wildmat-exact = %x21-29 / %x2B / %x2D-3E / %x40-5A / %x5E-7E / wildmat-exact = %x21-29 / %x2B / %x2D-3E / %x40-5A / %x5E-7E /
UTF-8-non-ascii ; exclude * , ? [ \ ] UTF8-non-ascii ; exclude * , ? [ \ ]
wildmat-wild = "*" / "?" wildmat-wild = "*" / "?"
UTF-8-non-ascii is defined in Section 11 UTF8-non-ascii is defined in Section 9.
This syntax must be interpreted subject to the following rule: This syntax must be interpreted subject to the following rule:
Where a wildmat-pattern is not immediately preceded by "!", it shall Where a wildmat-pattern is not immediately preceded by "!", it shall
not begin with a "!". not begin with a "!".
Note: the characters \ , [ and ] are not allowed in wildmats, while * Note: the characters \ , [ and ] are not allowed in wildmats, while *
and ? are always wildcards. This should not be a problem since these and ? are always wildcards. This should not be a problem since these
characters cannot occur in newsgroup names, which is the only current characters cannot occur in newsgroup names, which is the only current
use of wildmats. Backslash is commonly used to supress the special use of wildmats. Backslash is commonly used to suppress the special
meaning of characters and brackets to introduce sets, but there is no meaning of characters while brackets are used to introduce sets.
existing standard practice for these in wildmats and so they were However, these usages are not universal and interpretation of these
omitted from this specification. A future extension to this characters in the context of UTF-8 strings is both potentially
specification may provide semantics for these characters. complex and differs from existing practice, so they were omitted from
this specification. A future extension to this specification may
provide semantics for these characters.
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.
skipping to change at page 19, line 20 skipping to change at page 21, line 22
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 string must be used in the match. The pattern is "anchored"; that is,
is, the first and last characters in the string must match the first the first and last characters in the string must match the first and
and last item respectively (unless that item is an asterisk matching last item respectively (unless that item is an asterisk matching zero
zero characters). 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.
4.3 Extensions 4.3 Extensions
An NNTP server or extension MAY extend the syntax or semantics of An NNTP server or extension MAY extend the syntax or semantics of
wildmats provided that all wildmats that meet the requirements of wildmats provided that all wildmats that meet the requirements of
Section 4.1 have the meaning ascribed to them by Section 4.2. Future Section 4.1 have the meaning ascribed to them by Section 4.2. Future
editions of this document may also extend wildmats. editions of this document may also extend wildmats.
4.4 Examples 4.4 Examples
In these examples, $ and @ are used to represent the two octets 0xC2 In these examples, $ and @ are used to represent the two octets %xC2
and 0xA3 respectively; $@ is thus the UTF-8 encoding for the pound and %xA3 respectively; $@ is thus the UTF-8 encoding for the pound
sterling symbol, shown as # in the descriptions. sterling symbol, shown as # in the descriptions.
Wildmat Description of strings that match Wildmat Description of strings that match
abc the one string "abc" abc the one string "abc"
abc,def the two strings "abc" and "def" abc,def the two strings "abc" and "def"
$@ the one character string "#" $@ the one character string "#"
a* any string that begins with "a" a* any string that begins with "a"
a*b any string that begins with "a" and ends with "b" a*b any string that begins with "a" and ends with "b"
a*,*b any string that begins with "a" or ends with "b" a*,*b any string that begins with "a" or ends with "b"
a*,!*b any string that begins with "a" and does not end with a*,!*b any string that begins with "a" and does not end with
skipping to change at page 21, line 5 skipping to change at page 23, line 5
a*,!*b,c* any string that begins with "a" and does not end with a*,!*b,c* any string that begins with "a" and does not end with
"b", and any string that begins with "c" no matter "b", and any string that begins with "c" no matter
what it ends with what it ends with
a*,c*,!*b any string that begins with "a" or "c" and does not a*,c*,!*b any string that begins with "a" or "c" and does not
end with "b" end with "b"
?a* any string with "a" as its second character ?a* any string with "a" as its second character
??a* any string with "a" as its third character ??a* any string with "a" as its third character
*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. The GREETING Step 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
201 Service available, posting prohibited 201 Service available, posting prohibited
400 Service temporarily unavailable [1] 400 Service temporarily unavailable [1]
502 Service permanently unavailable [1] 502 Service permanently unavailable [1]
skipping to change at page 21, line 27 skipping to change at page 23, line 27
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.
[1] Following a 400 or 502 response the server MUST immediately close [1] Following a 400 or 502 response the server MUST immediately close
the connection. the connection.
5.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 about as a greeting to the client. This response informs the client whether
what steps the client should take to reach the news exchange step. 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 POST, the server MUST present a 200 greeting code. If the server will
will accept further commands from the client, but it is not accept further commands from the client, but it is not authorized to
authorized to post articles using the POST command, the server MUST post articles using the POST command, the server MUST present a 201
present a 201 greeting code. 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. 502 MUST be used if the client is immediately close the connection. 502 MUST be used if the client is
not permitted under any circumstances to interact with the server and not permitted under any circumstances to interact with the server and
400 otherwise. 400 otherwise.
5.1.3 Examples 5.1.3 Examples
Example of a normal connection from an authorized client which then Example of a normal connection from an authorized client which then
jumps directly to the conclusion step (see Section 9): terminates the session (see Section 5.4):
[Initial TCP connection setup completed.] [Initial TCP connection setup completed.]
[S] 200 NNTP Service Ready, posting permitted [S] 200 NNTP Service Ready, posting permitted
[C] QUIT [C] QUIT
[S] 205 NNTP Service exits normally [S] 205 NNTP Service exits normally
[Server closes connection.] [Server closes connection.]
Example of a normal connection from an authorized client that is not Example of a normal connection from an authorized client that is not
permitted to post; it also jumps directly to the conclusion step: permitted to post; it also immediately terminates the session:
[Initial TCP connection setup completed.] [Initial TCP connection setup completed.]
[S] 201 NNTP Service Ready, posting prohibited [S] 201 NNTP Service Ready, posting prohibited
[C] QUIT [C] QUIT
[S] 205 NNTP Service exits normally [S] 205 NNTP Service exits normally
[Server closes connection.] [Server closes connection.]
Example of a normal connection from an unauthorized client: Example of a normal connection from an unauthorized client:
[Initial TCP connection setup completed.] [Initial TCP connection setup completed.]
skipping to change at page 22, line 48 skipping to change at page 24, line 48
400 Service temporarily unavailable [1] 400 Service temporarily unavailable [1]
502 Service permanently unavailable [1] 502 Service permanently unavailable [1]
[1] Following a 400 or 502 response the server MUST immediately close [1] Following a 400 or 502 response the server MUST immediately close
the connection. the connection.
5.2.2 Description 5.2.2 Description
MODE READER SHOULD be sent by any client that intends to use any MODE READER SHOULD be sent by any client that intends to use any
command other than IHAVE, HEAD, STAT, LIST ACTIVE, LIST EXTENSIONS, command other than IHAVE, HEAD, STAT, LIST ACTIVE, LIST EXTENSIONS,
or commands advertised by the server as available via LIST or a command advertised by the server as available via LIST
EXTENSIONS. EXTENSIONS.
Servers MAY require that this command be issued before any other Servers MAY require that this command be issued before any commands
commands are sent and MAY reject any other commands until after a other than the above are sent and MAY reject such commands until
MODE READER command has been sent. after a MODE READER command has been sent. Where an extension is only
available after a MODE READER command, or where the effects of the
extension will change, the LIST EXTENSIONS command MUST produce
different results that indicate the change.
The server MUST return a response using the same codes as the initial The server MUST return a response using the same codes as the initial
greeting (as described in Section 5.1.1) to indicate its ability to greeting (as described in Section 5.1.1) to indicate its ability to
provide reading service to the client. Note that the response need provide reading service to the client. Note that the response need
not be the same as the one presented during the initial greeting. not be the same as the one presented during the initial greeting.
Once MODE READER is sent, IHAVE (and any extensions intended for Once MODE READER is sent, IHAVE (and any extensions intended for
peer-to-peer article transfer) MAY no longer be permitted, even if it peer-to-peer article transfer) MAY no longer be permitted, even if it
were permitted before the MODE READER command. The results of LIST were permitted before the MODE READER command. The results of LIST
EXTENSIONS MAY be different following a MODE READER command than EXTENSIONS MAY be different following a MODE READER command than
skipping to change at page 23, line 29 skipping to change at page 25, line 32
Servers are encouraged to not require this command even though Servers are encouraged to not require this command even though
clients SHOULD send it when appropriate. It is present to support clients SHOULD send it when appropriate. It is present to support
some news architectures that switch between modes based on whether a some news architectures that switch between modes based on whether a
given connection is a peer-to-peer connection with another server or given connection is a peer-to-peer connection with another server or
a news reading client. a news reading client.
5.2.3 Examples 5.2.3 Examples
Example of use of the MODE READER command by an authorized client Example of use of the MODE READER command by an authorized client
which then jumps directly to the conclusion step (see Section 9): which then terminates the session (see Section 5.4):
[C] MODE READER [C] MODE READER
[S] 200 NNTP Service Ready, posting permitted [S] 200 NNTP Service Ready, posting permitted
[C] QUIT [C] QUIT
[S] 205 NNTP Service exits normally [S] 205 NNTP Service exits normally
[Server closes connection.] [Server closes connection.]
Example of use of the MODE READER command by an authorized client Example of use of the MODE READER command by an authorized client
that is not permitted to post; it also jumps directly to the that is not permitted to post; it also immediately terminates the
conclusion step: session:
[C] MODE READER [C] MODE READER
[S] 201 NNTP Service Ready, posting prohibited [S] 201 NNTP Service Ready, posting prohibited
[C] QUIT [C] QUIT
[S] 205 NNTP Service exits normally [S] 205 NNTP Service exits normally
[Server closes connection.] [Server closes connection.]
Example of use of MODE READER by a client not authorized to receive Example of use of MODE READER by a client not authorized to receive
service from the server as a news reader: service from the server as a news reader:
[C] MODE READER [C] MODE READER
[S] 502 NNTP Service permanently unavailable [S] 502 NNTP Service permanently unavailable
[Server closes connection.] [Server closes connection.]
Example of a connection from any client where the server is unable to
provide news reader service:
[C] QUIT Example of a connection from any client where the server is
temporarily unable to provide news reader service:
[C] MODE READER
[S] 400 NNTP Service temporarily unavailable [S] 400 NNTP Service temporarily unavailable
[Server closes connection.] [Server closes connection.]
6. The CAPABILITIES DISCOVERY step 5.3 LIST EXTENSIONS
To discover what extensions are available, an NNTP client can query
the server with the LIST EXTENSIONS command. If a particular
extension is unavailable, the client can attempt to work around it or
it may wish to terminate the session.
See Section 10 for further discussion of extensions.
6.1 LIST EXTENSIONS
6.1.1 Usage 5.3.1 Usage
This command is optional. This command is optional.
This command MUST NOT be pipelined. This command MUST NOT be pipelined.
Syntax Syntax
LIST EXTENSIONS LIST EXTENSIONS
Responses Responses
202 Extension list follows (multiline) 202 Extension list follows (multiline)
402 Server has no extensions 402 Server has no extensions
503 Extension information not available
6.1.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. This command MUST be extensions are supported by the server at any given time. See Section
implemented by any server that implements any extensions defined in 8 for further discussion of extensions.
this document.
To discover what extensions are available, an NNTP client SHOULD This command MUST be implemented by any server that implements any
query the server early in the session for extensions information by extensions defined in this document or any other extension in the
issuing the LIST EXTENSIONS command. This command MAY be issued at IANA registry, and is optional otherwise.
anytime during a session. It is not required that the client issues
this command before attempting to make use of any extension. The This command MAY be issued at anytime during a session. It is not
response generated by this command MAY change during a session required that the client issues this command before attempting to
because of other state information. However, an NNTP client MUST NOT make use of any extension. The response generated by this command MAY
cache (for use in another session) any information returned if the change during a session because of other state information (which in
LIST EXTENSIONS command succeeds. That is, an NNTP client is only turn may be changed by the effects of other commands). An NNTP client
able to get the current and correct information concerning available MUST NOT cache (for use in another session) any information returned
extensions during a session by issuing a LIST EXTENSIONS command if the LIST EXTENSIONS command succeeds. That is, an NNTP client is
during that session and processing that response. only able to get the current and correct information concerning
available extensions at any point during a session by issuing a LIST
EXTENSIONS command at that point of that session and processing the
response.
The list of extensions is returned as a multi-line response following The list of extensions is returned as a multi-line response following
the 202 response code. Each extension is listed on a separate line; the 202 response code. Each extension is listed on a separate line;
the line MUST begin with an extension-label and optionally one or the line MUST begin with an extension-label and optionally one or
more parameters (separated by single spaces). The extension-label more parameters (separated by single spaces). The extension-label and
and the meaning of the parameters are specified as part of the the meaning of the parameters are specified as part of the definition
definition of the extension. The extension-label MUST be in of the extension. The extension-label is a string of 1 to 12 US-ASCII
uppercase. letters and MUST be in uppercase. Parameters are strings of 1 or more
printable UTF-8 characters (that is, either printable US-ASCII
characters or any 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 and MUST list all supported extensions. The order in which the
extensions are listed is not significant. The server need not even extensions are listed is not significant. The server need not even
consistently return the same order. If the server does not support consistently return the same order. If the server does not support
any extensions, a 402 response SHOULD be returned, but it MAY instead any extensions, it MUST return an empty list. The 402 response code
return an empty list. is documented for historic reasons only; clients SHOULD handle it
gracefully, but servers MUST NOT generate it.
Following a 503 response an extension might still be available, and Following a generic failure response, such as 403, an extension might
the client MAY attempt to use it. still be available, and the client MAY attempt to use it.
6.1.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 [S] OVER
[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, using preferred format: Example where no extensions are available:
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 402 Server has no extensions [S] 202 Extensions supported:
[S] .
Example where no extensions are available, using an empty list: Example from a non-conforming server which indicates "no extensions
available" using the 402 response code:
[C] LIST EXTENSIONS [C] LIST EXTENSIONS
[S] 202 Extensions supported: [S] 402 Server has no extensions
[S] .
7. Article posting and retrieval 5.4 QUIT
5.4.1 Usage
Syntax
QUIT
Responses
205 Connection closing
5.4.2 Description
The client uses the QUIT command to terminate the session. The server
MUST acknowledge the QUIT command and then close the connection to
the client. This is the preferred method for a client to indicate
that it has finished all its transactions with the NNTP server.
If a client simply disconnects (or the connection times out or some
other fault occurs), the server MUST gracefully cease its attempts to
service the client, disconnecting from its end if necessary.
5.4.3 Examples
[C] QUIT
[S] 205 closing connection
[Server closes connection.]
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.
According to RFC 1036, this identifier should be globally unique.
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 within that newsgroup. That key MUST be unique to a particular server
server (there will be only one article with that number within a (there will be only one article with that number within a particular
particular newsgroup), but is not required to be globally unique. newsgroup), but is not required to be globally unique. Additionally,
Additionally, because the same article can be cross-posted to because the same article can be cross-posted to multiple newsgroups,
multiple newsgroups, there may be multiple keys that point to the there may be multiple keys that point to the same article on the same
same article on the same server. The final key is the arrival server. The final key is the arrival timestamp, giving the time that
timestamp, giving the time that the article arrived at the server. 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 SHOULD NOT use leading zeroes in specifying article client and server SHOULD NOT use leading zeroes in specifying article
numbers, and MUST NOT use more than 16 digits. In some situations, numbers, and 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
situation. situation.
Message-ids are as defined in RFC 2822 [7] with the following 6.1 Group and article selection
modifications:
o A message-id MUST NOT contain a US-ASCII space within any
quoted-pair.
o A message-id MUST NOT be longer than 250 octets.
o RFC 2822 obsolete syntax for message-ids is not supported by the
protocol specified in this document.
7.1 Group and article selection
The following commands are used to set the "current selected The following commands are used to set the "current selected
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".
7.1.1 GROUP 6.1.1 GROUP
7.1.1.1 Usage 6.1.1.1 Usage
Syntax Syntax
GROUP ggg GROUP group
Responses Responses
211 n l h ggg Group successfully selected 211 number low high group Group successfully selected
411 No such newsgroup 411 No such newsgroup
Parameters Parameters
ggg = name of newsgroup group = name of newsgroup
n = estimated number of articles in the group number = estimated number of articles in the group
l = reported low water mark low = reported low water mark
h = reported high water mark high = reported high water mark
7.1.1.2 Description 6.1.1.2 Description
The required parameter ggg is the name of the newsgroup to be The required parameter is the name of the newsgroup to be selected
selected (e.g. "news.software.b"). A list of valid newsgroups may (e.g. "news.software.b"). A list of valid newsgroups may be obtained
be obtained by using the LIST ACTIVE command (see Section 8.6.1). by using the LIST ACTIVE command (see Section 7.6.1).
The successful selection response will return the article numbers of The successful selection response will return the article numbers of
the first and last articles in the group at the moment of selection the first and last articles in the group at the moment of selection
(these numbers are referred to as the "reported low water mark" and (these numbers are referred to as the "reported low water mark" and
the "reported high water mark"), and an estimate of the number of the "reported high water mark"), and an estimate of the number of
articles on file in the group. articles on file in the group.
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 on (Some implementations will actually count the number of articles on
file. Others will just subtract the low water mark from the high file. Others will just subtract the low water mark from the high
water mark and add one to get an estimate.) 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 method to show an empty group. This is the only time that the high
high water mark can be less than the low water mark. 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:
skipping to change at page 29, line 20 skipping to change at page 31, line 4
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, the next new article will not highest number has been removed, the next new article will not
have the number one greater than the reported high water mark) have the number one 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
response for that newsgroup sent to any client. The client may make response for that newsgroup sent to any client. The client may make
use of the low water mark to remove all remembered information about use of the low water mark to remove all remembered information about
articles with lower numbers, as these will never recur. This articles with lower numbers, as these will never recur. This includes
includes the situation when the high water mark is one less than the the situation when the high water mark is one less than the low water
low water mark. mark. No similar assumption can be made about the high water mark, as
this can decrease if an article is removed, and then increase again
if it is reinstated or if new articles arrive.
No similar assumption can be made about the high water mark, as this When a valid group is selected by means of this command, the current
can decrease if an article is removed, and then increase again if it selected newsgroup MUST be set to that group and the current article
is reinstated or if new articles arrive. When a valid group is number MUST be set to the first article in the group. If an empty
selected by means of this command, the current selected newsgroup newsgroup is selected, the current article pointer is made invalid.
MUST be set to that group and the current article number MUST be set If an invalid group is specified, the current selected newsgroup and
to the first article in the group. If an empty newsgroup is current article number MUST NOT be changed.
selected, the current article pointer is made invalid. If an invalid
group is specified, the current selected newsgroup and 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 the any used by a client and a successful response received before any other
other command is used that depends on the value of the current command is used that depends on the value of the current selected
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.
7.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
skipping to change at page 30, line 22 skipping to change at page 32, line 4
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
7.1.2 LAST 6.1.2 LAST
7.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
7.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 number). If successful, a response indicating the new current article
article number and the message-id of that article MUST be returned. number and the message-id of that article MUST be returned. No
No article text is sent in response to this command. 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.
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.
7.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
skipping to change at page 32, line 10 skipping to change at page 33, line 40
[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
7.1.3 NEXT 6.1.3 NEXT
7.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
7.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 number). If successful, a response indicating the new current article
article number and the message-id of that article MUST be returned. number and the message-id of that article MUST be returned. No
No article text is sent in response to this command. 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 7.1.2). identical to the LAST command (Section 6.1.2).
7.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:
skipping to change at page 33, line 29 skipping to change at page 35, line 10
[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
7.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. An article, as defined by RFC 1036, terms of the differences. As specified in Section 3.4, an article
consists of two parts: the article headers and the article body. consists of two parts: the article headers and the article body. When
When responding to one of these commands, the server presents the responding to one of these commands, the server MUST present the
entire article or appropriate part and does 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.
7.2.1 ARTICLE 6.2.1 ARTICLE
7.2.1.1 Usage 6.2.1.1 Usage
Syntax Syntax
ARTICLE message-id ARTICLE message-id
ARTICLE [number] ARTICLE [number]
Responses Responses
First form (message-id specified) First form (message-id specified)
220 0 message-id Article follows (multiline) 220 0 message-id Article follows (multiline)
430 No article found with that message-id 430 No article found with that message-id
Second form (optional article number specified) Second form (optional article number specified)
220 n message-id Article follows (multiline) 220 n message-id Article follows (multiline)
412 No newsgroup selected 412 No newsgroup selected
420 Current article number is invalid [1] 420 Current article number is invalid [1]
skipping to change at page 34, line 24 skipping to change at page 36, line 5
423 No such article in this newsgroup 423 No such article in this newsgroup
Parameters Parameters
number = Requested article number number = Requested article number
n = Returned article number n = Returned article number
message-id = Article message-id message-id = Article message-id
[1] The 420 response can only occur if no article number has been [1] The 420 response can only occur if no article number has been
specified. specified.
7.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 header, a blank line, and the body of that article. The presents the entire article (that is, the headers, an empty line, and
command has two forms. the body in that order). The command has two forms.
In the first form, a message-id is specified (including the angle In the first form, a message-id is specified (including the angle
brackets), and the server presents the article with that message-id brackets), and the server presents the article with that message-id.
in its headers. In this case, the server MUST NOT alter the current In this case, the server MUST NOT alter the current selected
selected newsgroup or current article number. This is both to newsgroup or current article number. This is both to facilitate the
facilitate the presentation of articles that may be referenced within presentation of articles that may be referenced within another
another article being read, and because of the semantic difficulties article being read, and because of the semantic difficulties of
of determining the proper sequence and membership of an article that determining the proper sequence and membership of an article that may
may have been crossposted to more than one newsgroup. have been crossposted to more than one newsgroup.
In the response, the article number is replaced with zero (that is, In the response, the article number is replaced with zero (that is,
the server is not required to determine whether the article is in the the server is not required to determine whether the article is in the
current group or what article number(s) it has). current group or what article number(s) it has).
In the second form, an article number may be specified. If so, and In the second form, an article number may be specified. If so, and if
if there is an article with that number in the currently selected there is an article with that number in the currently selected
newsgroup, the server MUST set the current article number to that newsgroup, the server MUST set the current article number to that
number. number.
Then, whether or not a number was specified, the article indicated by Then, whether or not a number was specified, the article indicated by
the current article number is presented to the client. the current article number is presented to the client.
Note that a previously valid article number MAY become invalid if the Note that a previously valid article number MAY become invalid if the
article has been removed. A previously invalid article number MAY article has been removed. A previously invalid article number MAY
become valid if the article has been reinstated, but such an article become valid if the article has been reinstated, but such an article
number MUST be no less than the reported low water mark for that number MUST be no less than the reported low water mark for that
group. group.
The server MUST NOT change the current selected newsgroup as a result The server MUST NOT change the current selected newsgroup as a result
of this command. The server MUST NOT change the current article of this command. The server MUST NOT change the current article
number except when an article number argument was provided and the number except when an article number argument was provided and the
article exists; in particular, it MUST NOT change it following an article exists; in particular, it MUST NOT change it following an
unsuccessful response. unsuccessful response.
The message-id of the article is taken from the message-id header Since the message-id is unique for each article, it may be used by a
line of the article (required by RFC 1036). If there is no such client to skip duplicate displays of articles that have been posted
line, the message-id "<0>" MUST be used instead (without the double more than once, or to more than one newsgroup.
quotes).
Since the message-id field is unique for each article, it may be used
by a client to skip duplicate displays of articles that have been
posted more than once, or to more than one newsgroup.
The article headers and body are returned as a multi-line response The article is returned as a multi-line response following the 220
following the 220 response code. response code.
If the current article number is invalid, a 420 response MUST be If the current article number is invalid, a 420 response MUST be
returned. If there is no article with the specified number, a 423 returned. If there is no article with the specified number, a 423
response MUST be returned. If the current selected newsgroup is response MUST be returned. If the current selected newsgroup is
invalid, a 412 response MUST be returned. invalid, a 412 response MUST be returned.
7.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>
skipping to change at page 36, line 47 skipping to change at page 38, line 21
[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
7.2.2 HEAD 6.2.2 HEAD
6.2.2.1 Usage
7.2.2.1 Usage
Syntax Syntax
HEAD message-id HEAD message-id
HEAD [number] HEAD [number]
Responses Responses
First form (message-id specified) First form (message-id specified)
221 0 message-id Headers follow (multiline) 221 0 message-id Headers follow (multiline)
430 No article found with that message-id 430 No article found with that message-id
skipping to change at page 37, line 28 skipping to change at page 39, line 5
423 No such article in this newsgroup 423 No such article in this newsgroup
Parameters Parameters
number = Requested article number number = Requested article number
n = Returned article number n = Returned article number
message-id = Article message-id message-id = Article message-id
[1] The 420 response can only occur if no article number has been [1] The 420 response can only occur if no article number has been
specified. specified.
7.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 blank line separating the and only the headers are presented (the empty line separating the
headers and body MUST NOT be included). headers and body MUST NOT be included).
7.2.2.3 Examples 6.2.2.3 Examples
Example of a successful retrieval of the headers in an article (using Example of a successful retrieval of the headers of an article (using
no article number): 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] HEAD [C] HEAD
[S] 221 3000234 <45223423@example.com> [S] 221 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
[S] Message-ID: <411@example.net> [S] Message-ID: <411@example.net>
[S] . [S] .
Example of a successful retrieval of the headers in an article by Example of a successful retrieval of the headers of an article by
message-id: message-id:
[C] HEAD <45223423@example.com> [C] HEAD <45223423@example.com>
[S] 221 0 <45223423@example.com> [S] 221 0 <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
[S] Message-ID: <411@example.net> [S] Message-ID: <411@example.net>
[S] . [S] .
Example of an unsuccessful retrieval of the header 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 header 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 such article number in this group
Example of an unsuccessful retrieval the header of an article by Example of an unsuccessful retrieval 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 header 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
7.2.3 BODY 6.2.3 BODY
7.2.3.1 Usage 6.2.3.1 Usage
Syntax Syntax
BODY message-id BODY message-id
BODY [number] BODY [number]
Responses Responses
First form (message-id specified) First form (message-id specified)
222 0 message-id Body follows (multiline) 222 0 message-id Body follows (multiline)
430 No article found with that message-id 430 No article found with that message-id
skipping to change at page 39, line 29 skipping to change at page 41, line 4
Second form (optional article number specified) Second form (optional article number specified)
222 n message-id Body follows (multiline) 222 n message-id Body follows (multiline)
412 No newsgroup selected 412 No newsgroup selected
420 Current article number is invalid [1] 420 Current article number is invalid [1]
423 No such article in this newsgroup 423 No such article in this newsgroup
Parameters Parameters
number = Requested article number number = Requested article number
n = Returned article number n = Returned article number
message-id = Article message-id message-id = Article message-id
[1] The 420 response can only occur if no article number has been [1] The 420 response can only occur if no article number has been
specified. specified.
7.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 blank 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).
7.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] .
skipping to change at page 40, line 42 skipping to change at page 42, line 17
[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
7.2.4 STAT 6.2.4 STAT
7.2.4.1 Usage 6.2.4.1 Usage
Syntax Syntax
STAT message-id STAT message-id
STAT [number] STAT [number]
Responses Responses
First form (message-id specified) First form (message-id specified)
223 0 message-id Article exists 223 0 message-id Article exists
430 No article found with that message-id 430 No article found with that message-id
Second form (optional article number specified) Second form (optional article number specified)
223 n message-id Article exists 223 n message-id Article exists
412 No newsgroup selected 412 No newsgroup selected
420 Current article number is invalid [1] 420 Current article number is invalid [1]
skipping to change at page 41, line 24 skipping to change at page 42, line 45
423 No such article in this newsgroup 423 No such article in this newsgroup
Parameters Parameters
number = Requested article number number = Requested article number
n = Returned article number n = Returned article number
message-id = Article message-id message-id = Article message-id
[1] The 420 response can only occur if no article number has been [1] The 420 response can only occur if no article number has been
specified. specified.
7.2.4.2 Description 6.2.4.2 Description
The STAT command behaves identically to the ARTICLE command except The STAT command behaves identically to the ARTICLE command except
that, if the article exists, it is NOT presented to the client and that, if the article exists, it is NOT presented to the client and
the response code is 223 instead of 220. Note that the response is the response code is 223 instead of 220. Note that the response is
NOT multi-line. NOT multi-line.
This command allows the client to determine whether an article This command allows the client to determine whether an article
exists, and in the second form what its message-id is, without having exists, and in the second form what its message-id is, without having
to process an arbitrary amount of text. to process an arbitrary amount of text.
7.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 a STAT of an existing article by message-id: Example of a STAT of an existing article by message-id:
skipping to change at page 42, line 30 skipping to change at page 44, line 5
[S] 412 No newsgroup selected [S] 412 No newsgroup selected
Example of STAT of an article when the current selected newsgroup is Example of STAT of 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
7.3 Article posting 6.3 Article posting
Article posting is done in one of two modes: individual article Article posting is done in one of two modes: individual article
posting from news reading clients using POST, and article transfer posting from news reading clients using POST, and article transfer
from other news servers using IHAVE. from other news servers using IHAVE.
7.3.1 POST 6.3.1 POST
7.3.1.1 Usage 6.3.1.1 Usage
This command MUST NOT be pipelined. This command MUST NOT be pipelined.
Syntax Syntax
POST POST
Responses Responses
Initial responses Initial responses
340 Send article to be posted 340 Send article to be posted
skipping to change at page 43, line 4 skipping to change at page 44, line 25
This command MUST NOT be pipelined. This command MUST NOT be pipelined.
Syntax Syntax
POST POST
Responses Responses
Initial responses Initial responses
340 Send article to be posted 340 Send article to be posted
440 Posting not permitted 440 Posting not permitted
Subsequent responses Subsequent responses
240 Article received OK 240 Article received OK
441 Posting failed 441 Posting failed
7.3.1.2 Description 6.3.1.2 Description
If posting is allowed, a 340 response MUST be returned to indicate If posting is allowed, a 340 response MUST be returned to indicate
that the article to be posted should be sent. If posting is that the article to be posted should be sent. If posting is
prohibited for some installation-dependent reason, a 440 response prohibited for some installation-dependent reason, a 440 response
MUST be returned. MUST be returned.
If posting is permitted, the article MUST be presented to the server If posting is permitted, the article MUST be in the format specified
by the client in the format specified by RFC 1036 (or by any of its in Section 3.4 and MUST be sent by the client to the server in the
successors or extensions). The text forming the header and body of manner specified in (Section 3.1) for multi-line responses (except
the message to be posted MUST be sent by the client in the format that there is no initial line containing a response code). Thus a
defined above (Section 3) for multi-line responses (except that there single dot (".") on a line indicates the end of the text, and lines
is no initial line containing a response code). Thus a single dot starting with a dot in the original text have that dot doubled during
(".") on a line indicates the end of the text, and lines 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 in direct response to the POST command. Others are returned following
following the sending of the article. the sending of the article.
A response of 240 SHOULD indicate that, barring unforseen server A response of 240 SHOULD indicate that, barring unforseen 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. In other words, or transferred to other servers as appropriate. In other words,
articles not wanted by the server SHOULD be rejected with a 411 articles not wanted by the server SHOULD be rejected with a 441
response and not accepted and silently discarded. response and not accepted and silently discarded.
No attempt shall be made by the server to filter characters, fold or No attempt shall be made by the server to filter characters, fold or
limit lines, or otherwise process incoming text. The intent is that limit lines, or otherwise process incoming text. The intent is that
the server just passes the incoming message to be posted to the the server just passes the incoming message to be posted to the
server installation's news posting software, which is not defined by server installation's news posting software, which is not defined by
this document. this document.
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. If the session is interrupted before the response is server. If the session is interrupted before the response is
received, it is possible that an affirmative response was sent but received, it is possible that an affirmative response was sent but
has been lost. Therefore, in any subsequent session the client has been lost. Therefore, in any subsequent session, the client
SHOULD use the same message-id in the article when resending it or SHOULD either check whether the article was successfully posted
check whether the article was successfully posted before resending it before resending or, if the client supplied a message-id in the
to ensure that the resend will not result in a duplicate article. original article, ensure it supplies the same message-id - the latter
approach is preferred since the article might not have been made
available for reading yet (for example, it may have to go through a
moderation process). In particular, if the article contained a header
with name "Message-ID", the client SHOULD ensure that the contents of
this header are identical when resending it and the server SHOULD
ensure that the re-sent article is recognised as a duplicate and not
assigned a different message-id to the original.
7.3.1.3 Examples 6.3.1.3 Examples
Example of a successful posting: Example of a successful posting:
[C] POST [C] POST
[S] 340 Input article; end with <CR-LF>.<CR-LF> [S] 340 Input article; end with <CR-LF>.<CR-LF>
[C] From: "Demo User" <nobody@example.net> [C] From: "Demo User" <nobody@example.net>
[C] Newsgroups: misc.test [C] Newsgroups: misc.test
[C] Subject: I am just a test article [C] Subject: I am just a test article
[C] Organization: An Example Net [C] Organization: An Example Net
[C] [C]
skipping to change at page 44, line 40 skipping to change at page 46, line 18
[C] . [C] .
[S] 441 Posting failed [S] 441 Posting failed
Example of an attempt to post when posting is not allowed: Example of an attempt to post when posting is not allowed:
[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
7.3.2 IHAVE 6.3.2 IHAVE
7.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
skipping to change at page 45, line 17 skipping to change at page 46, line 42
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
7.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 send the entire article. If the server does not want the article (if,
(if, for example, the server already has a copy of it), a 435 for example, the server already has a copy of it), a 435 response
response MUST be returned, indicating that the article is not wanted. MUST be returned, indicating that the article is not wanted. Finally,
Finally, if the article isn't wanted immediately but the client if the article isn't wanted immediately but the client should retry
should retry later if possible (if, for example, another client is in later if possible (if, for example, another client is in the process
the process of sending the same article to the server), a 436 of sending the same article to the server), a 436 response MUST be
response MUST be returned. 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 header and body, in the format defined entire article, including headers and body, in the format defined
above (Section 3) 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 this command indicates that the forthcoming article program, since use of this command indicates that the article has
has already been posted at another site and is being forwarded from already been posted at another site and is simply being forwarded
another host. However, the server MAY elect not to post or forward from another host. However, despite this, the server MAY elect not to
the article if after further examination of the article it deems it post or forward the article if, after further examination of the
inappropriate to do so. Reasons for such subsequent rejection of an article, it deems it inappropriate to do so. Reasons for such
article may include such problems as inappropriate newsgroups or subsequent rejection of an article may include such problems as
distributions, disc space limitations, article lengths, garbled inappropriate newsgroups or distributions, disc space limitations,
headers, and the like. These are typically restrictions enforced by article lengths, garbled headers, and the like. These are typically
the server host's news software and not necessarily the NNTP server restrictions enforced by the server host's news software and not
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 server. A lack of response (such as a dropped network connection or a
a network timeout) SHOULD be treated the same as a 436 response. 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.
7.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
skipping to change at page 47, line 25 skipping to change at page 49, line 4
[C] Message-ID: <i.am.a.test.article@example.com> [C] Message-ID: <i.am.a.test.article@example.com>
[C] [C]
[C] This is just a test article. [C] This is just a test article.
[C] . [C] .
[S] 436 Transfer failed [S] 436 Transfer failed
Example of sending an article to a site that already has it: Example of sending an article to a site that already has it:
[C] IHAVE <i.am.an.article.you.have@example.com> [C] IHAVE <i.am.an.article.you.have@example.com>
[S] 435 Duplicate [S] 435 Duplicate
Example of sending an article to a site that requests the article be Example of sending an article to a site that requests the article be
tried again later: tried again later:
[C] IHAVE <i.am.an.article.you.defer@example.com> [C] IHAVE <i.am.an.article.you.defer@example.com>
[S] 436 Retry later [S] 436 Retry later
8. Information commands 7. Information commands
This section lists other commands that may be used at any time This section lists other commands that may be used at any time
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.
All servers MUST implement these commands. 7.1 DATE
8.1 DATE
8.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
8.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 [9] from the server's perspective. This command MUST Universal Time [TF.686-1] from the server's perspective. This command
NOT be used as a substitute for NTP [10], but to provide information SHOULD NOT be used as a substitute for NTP [RFC1305] but to provide
that might be useful when using the NEWNEWS command (see Section information that might be useful when using the NEWNEWS command (see
8.4). A system providing NNTP service SHOULD implement NTP for the Section 7.4). A system providing NNTP service SHOULD keep the system
purposes of keeping the system clock as accurate as possible. clock as accurate as possible, either with NTP or by 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.
8.1.3 Examples 7.1.3 Examples
[C] DATE [C] DATE
[S] 111 19990623135624 [S] 111 19990623135624
8.2 HELP 7.2 HELP
8.2.1 Usage 7.2.1 Usage
Syntax Syntax
HELP HELP
Responses Responses
100 Help text follows (multiline) 100 Help text follows (multiline)
8.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 by this implementation of the server. The help text will be presented
presented as a multiline response following the 100 response code. 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 6.1 command described in Section 5.3
8.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
[S] formatting requirement for this test, though [S] formatting requirement for this test, though
[S] it is customary for it to list the valid commands [S] it is customary for it to list the valid commands
[S] and give a brief definition of what they do [S] and give a brief definition of what they do
[S] . [S] .
8.3 NEWGROUPS 7.3 NEWGROUPS
8.3.1 Usage 7.3.1 Usage
Syntax Syntax
NEWGROUPS date time [GMT] NEWGROUPS date time [GMT]
Responses Responses
231 List of new newsgroups follows (multiline) 231 List of new newsgroups follows (multiline)
Parameters Parameters
date = Date in yymmdd or yyyymmdd format date = Date in yymmdd or yyyymmdd format
time = Time in hhmmss format time = Time in hhmmss format
8.3.2 Description 7.3.2 Description
This command returns a list of newsgroups created on the server since This command returns a list of newsgroups created on the server since
the specified date and time. The results are in the same format as the specified date and time. The results are in the same format as
the LIST ACTIVE command (see Section 8.6.1). the LIST ACTIVE command (see Section 7.6.1). However, they MAY
include groups not available on the server (and so not returned by
OUTSTANDING ISSUE LIST ACTIVE) and MAY omit groups for which the creation date is not
available. The results SHOULD be consistent with those of the LIST
Does the output include high/low/status or not? If so, the ACTIVE.TIMES command (Section 7.6.2), except that if the specified
examples are wrong. If not, the above text is wrong. date and time is earlier than the oldest entry in the latter then the
results of this command may include extra groups.
The date is specified as 6 or 8 digits in the format [xx]yymmdd, The date is specified as 6 or 8 digits in the format [xx]yymmdd,
where xx is the first two digits of the year (19-99), yy is the last where xx is the first two digits of the year (19-99), yy is the last
two digits of the year (00-99), mm is the month (01-12), and dd is two digits of the year (00-99), mm is the month (01-12), and dd is
the day of the month (01-31). If the first two digits of the year the day of the month (01-31). Clients SHOULD specify all four digits
are not specified, the year is to be taken from the current century of the year. If the first two digits of the year are not specified
if yy is smaller than or equal to the current year, otherwise the (this is supported only for backwards compatibility), the year is to
year is from the previous century. be taken from the current century if yy is smaller than or equal to
the current year, otherwise the year is from the previous century.
The time is specified as 6 digits in the format hhmmss, where hh is The time is specified as 6 digits in the format hhmmss, where hh is
the hours in the 24-hour clock (00-23), mm is the minutes (00-59), the hours in the 24-hour clock (00-23), mm is the minutes (00-59),
and ss is the seconds (00-60, to allow for leap seconds). The token and ss is the seconds (00-60, to allow for leap seconds). The token
"GMT" specifies that the date and time are given in Coordinated "GMT" specifies that the date and time are given in Coordinated
Universal Time; if it is omitted then the date and time are specified Universal Time [TF.686-1]; if it is omitted then the date and time
in the server's local timezone. Note that there is no way using the are specified in the server's local timezone. Note that there is no
protocol specified in this document to establish the server's local way using the protocol specified in this document to establish the
timezone. server's local timezone.
Note that an empty list is a possible valid response and indicates Note that an empty list is a possible valid response and indicates
that there are no new newsgroups since that date-time. that there are no new newsgroups since that date-time.
Clients SHOULD make all queries using Coordinated Universal Time Clients SHOULD make all queries using Coordinated Universal Time
(i.e. by including the "GMT" parameter) when possible. (i.e. by including the "GMT" parameter) when possible.
8.3.3 Examples 7.3.3 Examples
Example where there are new groups: Example where there are new groups:
[C] NEWGROUPS 19990624 000000 GMT [C] NEWGROUPS 19990624 000000 GMT
[S] 231 list of new newsgroups follows [S] 231 list of new newsgroups follows
[S] alt.rfc-writers.recovery [S] alt.fc-writers.recovery 4 1 y
[S] tx.natives.recovery [S] tx.natives.recovery 89 56 y
[S] . [S] .
Example where there are no new groups: Example where there are no new groups:
[C] NEWGROUPS 19990624 000000 GMT [C] NEWGROUPS 19990624 000000 GMT
[S] 231 list of new newsgroups follows [S] 231 list of new newsgroups follows
[S] . [S] .
8.4 NEWNEWS 7.4 NEWNEWS
8.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
8.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 wildmat, since the specified date and time. One message-id is sent on
on each line; the order of the response has no specific significance each line; the order of the response has no specific significance and
and may vary from response to response in the same session. A may vary from response to response in the same session. A message-id
message-id MAY appear more than once; if it does so, it has the same MAY appear more than once; if it does so, it has the same meaning as
meaning as if it appeared only once. if it appeared only once.
Date and time are in the same format as the NEWGROUPS command (see Date and time are in the same format as the NEWGROUPS command (see
Section 8.3). Section 7.3).
Note that an empty list is a possible valid response and indicates Note that an empty list is a possible valid response and indicates
that there is currently no new news in the relevant groups. that there is currently no new news in the relevant groups.
Clients SHOULD make all queries in Coordinated Universal Time (i.e. Clients SHOULD make all queries in Coordinated Universal Time (i.e.
by using the "GMT" parameter) when possible. by using the "GMT" parameter) when possible.
8.4.3 Examples 7.4.3 Examples
Example where there are new articles: Example where there are new articles:
[C] NEWNEWS news.*,sci.* 19990624 000000 GMT [C] NEWNEWS news.*,sci.* 19990624 000000 GMT
[S] 230 list of new articles by message-id follows [S] 230 list of new articles by message-id follows
[S] <i.am.a.new.article@example.com> [S] <i.am.a.new.article@example.com>
[S] <i.am.another.new.article@example.com> [S] <i.am.another.new.article@example.com>
[S] . [S] .
Example where there are no new articles: Example where there are no new articles:
[C] NEWNEWS alt.* 19990624 000000 GMT [C] NEWNEWS alt.* 19990624 000000 GMT
[S] 230 list of new articles by message-id follows [S] 230 list of new articles by message-id follows
[S] . [S] .
8.5 Time 7.5 Time
As described in Section 7, each article has an arrival timestamp. As described in Section 6, each article has an arrival timestamp.
Each newsgroup also has a creation timestamp. These timestamps are Each newsgroup also has a creation timestamp. These timestamps are
used by the NEWNEWS and NEWGROUP commands to construct their used by the NEWNEWS and NEWGROUP commands to construct their
reponses. reponses.
The DATE command MUST return a timestamp from the same clock as is The DATE command MUST return a timestamp from the same clock as is
used for determining article arrival and group creation times. This used for determining article arrival and group creation times. This
clock SHOULD be monotonic, and adjustments SHOULD be made by running clock SHOULD be monotonic, and adjustments SHOULD be made by running
it fast or slow compared to "real" time rather than by making sudden it fast or slow compared to "real" time rather than by making sudden
jumps. jumps.
skipping to change at page 52, line 33 skipping to change at page 54, line 35
Issue NEWNEWS command using a previously chosen timestamp Issue NEWNEWS command using a previously chosen timestamp
Subsequent sessions: Subsequent sessions:
Issue DATE command and hold result in temporary storage Issue DATE command and hold result in temporary storage
Issue NEWNEWS command using timestamp saved from previous session Issue NEWNEWS command using timestamp saved from previous session
Overwrite saved timestamp with that currently in temporary storage Overwrite saved timestamp with that currently in temporary storage
In order to allow for minor errors, clients MAY want to adjust the In order to allow for minor errors, clients MAY want to adjust the
timestamp back by two or three minutes before using it in NEWNEWS. timestamp back by two or three minutes before using it in NEWNEWS.
8.5.1 Examples 7.5.1 Examples
First session: First session:
[C] DATE [C] DATE
[S] 111 20010203112233 [S] 111 20010203112233
[C] NEWNEWS local.chat 20001231 235959 GMT [C] NEWNEWS local.chat 20001231 235959 GMT
[S] 230 list follows [S] 230 list follows
[S] <article.1@local.service> [S] <article.1@local.service>
[S] <article.2@local.service> [S] <article.2@local.service>
[S] <article.3@local.service> [S] <article.3@local.service>
skipping to change at page 53, line 12 skipping to change at page 55, line 17
[C] NEWNEWS local.chat 20010203 111933 GMT [C] NEWNEWS local.chat 20010203 111933 GMT
[S] 230 list follows [S] 230 list follows
[S] <article.3@local.service> [S] <article.3@local.service>
[S] <article.4@local.service> [S] <article.4@local.service>
[S] <article.5@local.service> [S] <article.5@local.service>
[S] . [S] .
Note how <article.3@local.service> arrived in the 3 minute gap and so Note how <article.3@local.service> arrived in the 3 minute gap and so
is listed in both responses. is listed in both responses.
8.6 The LIST commands 7.6 The LIST commands
8.6.1 LIST ACTIVE 7.6.1 LIST ACTIVE
8.6.1.1 Usage 7.6.1.1 Usage
Syntax Syntax
LIST ACTIVE [wildmat] LIST ACTIVE [wildmat]
Responses Responses
215 Information follows (multiline) 215 Information follows (multiline)
Parameters Parameters
wildmat = groups of interest wildmat = groups of interest
8.6.1.2 Description 7.6.1.2 Description
The LIST ACTIVE command with no parameters returns a list of valid The LIST ACTIVE command with no parameters returns a list of valid
newsgroups and associated information. Each newsgroup is sent as a newsgroups and associated information. The server MUST include every
line of text in the following format: group that the client is permitted to select with the GROUP (Section
6.1.1) command. Each newsgroup is sent as a line of text in the
following format:
group first last status group high low status
where: where:
"group" is the name of the newsgroup; "group" is the name of the newsgroup;
"first" is the current low water mark for the group; "high" is the reported high water mark for the group;
"last" is the current high water mark for the group;
"status" is the current status of the group on this server; typically "low" is the reported low water mark for the group;
this is one of: "status" is the current status of the group on this server.
"y" posting is permitted Each field in the line is separated from its neighboring fields by
one or more spaces. Note that an empty list is a possible valid
response, and indicates that there are currently no valid newsgroups.
"n" posting is not permitted The reported high and low water marks are as described in the GROUP
"m" postings will be forwarded to the newsgroup moderator command (see Section 6.1.1).
Other status strings may exist. The definition of these other The status field is typically one of:
values and the circumstances under which they are returned is
covered in other specifications.
OUTSTANDING ISSUE "y" posting is permitted
Is the order "group first last status" or "group last first "n" posting is not permitted
status"? The examples match the description above, but they
don't match the news server I have tested.
Each field in the line is separated from its neighboring fields by "m" postings will be forwarded to the newsgroup moderator
one or more US-ASCII spaces.
The "first" and "last" fields correspond to the high and low water The server SHOULD use these values when these meanings are required
marks described in the GROUP command (see Section 7.1.1). and MUST NOT use them with any other meaning. Other values for the
status may exist; the definition of these other values and the
circumstances under which they are returned may be specified in an
extension or may be private to the server. A client SHOULD treat an
unrecognised status as giving no information.
The status of a newsgroup only indicates how posts to that newsgroup The status of a newsgroup only indicates how posts to that newsgroup
are processed. It does not indicate if the current client is are normally processed and is not necessarily customised to the
permitted to post. That is indicated by the status code returned as specific client. For example, if the current client is forbidden from
part of the greeting. Note that an empty list is a possible valid posting, then this will apply equally to groups with status "y".
response, and indicates that there are currently no valid newsgroups. Conversely, a client with special privileges (not defined by this
specification) might be able to post to a group with status "n".
If the optional wildmat parameter is specified, the list is limited If the optional wildmat parameter is specified, the list is limited
to only the groups whose names match the wildmat. If no wildmat is to only the groups whose names match the wildmat. If no wildmat is
specified, the keyword ACTIVE MAY be omitted without altering the specified, the keyword ACTIVE MAY be omitted without altering the
effect of the command. effect of the command.
8.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 3000234 3002322 y [S] misc.test 3002322 3000234 y
[S] alt.fc-writers.recovery 1 4 y [S] comp.risks 442001 441099 m
[S] tx.natives.recovery 56 89 y [S] alt.fc-writers.recovery 4 1 y
[S] tx.natives.recovery 89 56 y
[S] tx.natives.recovery.d 11 9 n
[S] . [S] .
Example of LIST ACTIVE omitting the second keyword and returning no Example of LIST ACTIVE omitting the second keyword and returning no
newsgroups: newsgroups:
[C] LIST [C] LIST
[S] 215 list of newsgroups follows [S] 215 list of newsgroups follows
[S] . [S] .
Example of LIST ACTIVE with a wildmat: Example of LIST ACTIVE with a wildmat:
[C] LIST ACTIVE *.recovery [C] LIST ACTIVE *.recovery
[S] 215 list of newsgroups follows [S] 215 list of newsgroups follows
[S] alt.fc-writers.recovery 1 4 y [S] alt.fc-writers.recovery 4 1 y
[S] tx.natives.recovery 56 89 y [S] tx.natives.recovery 89 56 y
[S] . [S] .
8.6.2 LIST ACTIVE.TIMES 7.6.2 LIST ACTIVE.TIMES
8.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)
503 Facility not available
Parameters Parameters
wildmat = groups of interest wildmat = groups of interest
8.6.2.2 Description 7.6.2.2 Description
The active.times file is maintained by some news transport systems to The active.times file 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 file consists of three fields separated from when. Each line of this file consists of three fields separated from
each other by one or more US-ASCII space characters. The first field each other by one or more spaces. The first field is the name of the
is the name of the newsgroup. The second is the time when this group newsgroup. The second is the time when this group was created on this
was created on this news server, measured in seconds since the start news server, measured in seconds since the start of January 1, 1970.
of January 1, 1970. The third is the email address of the entity The third is the email address of the entity that created the
that created the newsgroup, and must be a mailbox as defined in RFC newsgroup, and must be a mailbox as defined in RFC 2822 [RFC2822].
2822 [7].
OUTSTANDING ISSUE
Should the third field simply be free-form, or should it be
recommended usage rather than mandatory? The problem with
"mailbox" is that mailbox requires that it be fully qualified, and
unqualified addresses are apparently very common for groups
created directly by the administrator.
The file MAY omit newsgroups for which the information is unavailable
and MAY include groups not available on the server; in particular,
the file 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 it matches the list returned by LIST ACTIVE. The NEWGROUPS
command (Section 7.3) may provide a better way to access this
information and the results of the two commands SHOULD be consistent
(subject to the caveats in the description of that command).
If the information is available, it is returned as a multi-line If the information is available, it is returned as a multi-line
response following the 215 response code. If the information is not response following the 215 response code.
available, a 503 response MUST be returned. If the server does not
recognize the command, a 501 response MUST be returned.
If the optional wildmat parameter is specified, the list is limited If the optional wildmat parameter is specified, the list is limited
to only the groups whose names match the wildmat (and therefore may to only the groups in the file whose names match the wildmat. Note
be empty). that an empty list is a possible valid response, and indicates that
there are no groups in the file, or that match the wildmat.
8.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] .
skipping to change at page 56, line 24 skipping to change at page 58, line 47
[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
8.6.3 LIST DISTRIBUTIONS 7.6.3 LIST DISTRIBUTIONS
8.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)
503 Facility not available
8.6.3.2 Description 7.6.3.2 Description
The distributions file is maintained by some news transport systems The distributions file is maintained by some news transport systems
to contain information about valid values for the Distribution: line to contain information about valid values for the content of the
in a news article header and about what the values mean. Each line Distribution header in a news article and about what the various
of this file consists of two fields separated from each other by one values mean. Each line of this file consists of two fields separated
or more US-ASCII space characters. The first field is a value and from each other by one or more spaces. The first field is a value and
the second is a short explanation of the meaning of that value. 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. If the information is not response following the 215 response code.
available, a 503 response MUST be returned. If the server does not
recognize the command, a 501 response MUST be returned.
8.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] .
skipping to change at page 57, line 28 skipping to change at page 60, line 5
[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
8.6.4 LIST DISTRIB.PATS 7.6.4 LIST DISTRIB.PATS
8.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)
503 Facility not available
8.6.4.2 Description 7.6.4.2 Description
The distrib.pats file is maintained by some news transport systems to The distrib.pats file is maintained by some news transport systems to
choose a value for the Distribution: line in the header of a news choose a value for the content of the Distribution header of a news
article being posted. Each line of this file consists of three article being posted. Each line of this file consists of three fields
fields separated from each other by a US-ASCII colon. The first separated from each other by a colon (":"). The first field is a
field is a weight, the second field is a wildmat (which may be a weight, the second field is a wildmat (which may be a simple group
simple group name), and the third field is a value for the name), and the third field is a value for the Distribution header
Distribution: header. content.
The client MAY use this information to select a Distribution: value The client MAY use this information to construct an appropriate
based on the name of a newsgroup. To do so, it should determine the Distribution header given the name of a newsgroup. To do so, it
lines whose second field matches the newsgroup name, select from should determine the lines whose second field matches the newsgroup
among them the line with the highest weight (with 0 being the name, select from among them the line with the highest weight (with 0
lowest), and use the value of the third field to construct the being the lowest), and use the value of the third field to construct
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. If the information is not response following the 215 response code.
available, a 503 response MUST be returned. If the server does not
recognize the command, a 501 response MUST be returned.
8.6.4.3 Examples 7.6.4.3 Examples
Example of LIST DISTRIB.PATS returning a list of newsgroups: Example of LIST DISTRIB.PATS returning a list of newsgroups:
[C] LIST DISTRIB.PATS [C] LIST DISTRIB.PATS
[S] 215 information follows [S] 215 information follows
[S] 10:local.*:local [S] 10:local.*:local
[S] 5:*:world [S] 5:*:world
[S] 20:local.here.*:thissite [S] 20:local.here.*:thissite
[S] . [S] .
skipping to change at page 58, line 40 skipping to change at page 61, line 12
[C] LIST DISTRIB.PATS [C] LIST DISTRIB.PATS
[S] 503 program error, function not performed [S] 503 program error, function not performed
Example of LIST DISTRIB.PATS sent to a server that does not recognize Example of LIST DISTRIB.PATS sent to a server that does not recognize
this command: this command:
[C] LIST DISTRIB.PATS [C] LIST DISTRIB.PATS
[S] 501 Syntax Error [S] 501 Syntax Error
8.6.5 LIST NEWSGROUPS 7.6.5 LIST NEWSGROUPS
8.6.5.1 Usage 7.6.5.1 Usage
This command is optional. This command is optional.
Syntax Syntax
LIST NEWSGROUPS [wildmat] LIST NEWSGROUPS [wildmat]
Responses Responses
215 Information follows (multiline) 215 Information follows (multiline)
503 Facility not available
Parameters Parameters
wildmat = groups of interest wildmat = groups of interest
8.6.5.2 Description 7.6.5.2 Description
The newsgroups file is maintained by some news transport systems to The newsgroups file is maintained by some news transport systems to
contain the name of each newsgroup that is available on the server contain the name of each newsgroup that is available on the server
and a short description about the purpose of the group. Each line of and a short description about the purpose of the group. Each line of
this file consists of two fields separated from each other by one or this file consists of two fields separated from each other by one or
more US-ASCII space characters. The first field is the name of the more space or TAB characters (usual practice is a single TAB). The
newsgroup and the second is a short description of the group. Note first field is the name of the newsgroup and the second is a short
that an empty list is a possible valid response, and indicates that description of the group. Note that an empty list is a possible valid
there are currently no valid newsgroups. response, and indicates that there are currently no valid newsgroups.
The file MAY omit newsgroups for which the information is unavailable
and MAY include groups not available on the server. The client MUST
NOT assume that the list is complete or that it matches the list
returned by LIST ACTIVE.
If the information is available, it is returned as a multi-line If the information is available, it is returned as a multi-line
response following the 215 response code. If the information is not response following the 215 response code.
available, a 503 response MUST be returned. If the server does not
recognize the command, a 501 response MUST be returned.
If the optional wildmat parameter is specified, the list is limited If the optional wildmat parameter is specified, the list is limited
to only the groups whose names match the wildmat. to only the groups in the file whose names match the wildmat. Note
that an empty list is a possible valid response, and indicates that
there are no groups in the file, or that match the wildmat.
8.6.5.3 Examples 7.6.5.3 Examples
Example of LIST NEWSGROUPS returning a list of newsgroups: Example of LIST NEWSGROUPS returning a list of newsgroups:
[C] LIST NEWSGROUPS [C] LIST NEWSGROUPS
[S] 215 information follows [S] 215 information follows
[S] misc.test General Usenet testing [S] misc.test General Usenet testing
[S] alt.rfc-writers.recovery RFC Writers Recovery [S] alt.rfc-writers.recovery RFC Writers Recovery
[S] tx.natives.recovery Texas Natives Recovery [S] tx.natives.recovery Texas Natives Recovery
[S] . [S] .
skipping to change at page 60, line 5 skipping to change at page 63, line 5
[C] LIST NEWSGROUPS [C] LIST NEWSGROUPS
[S] 503 program error, function not performed [S] 503 program error, function not performed
Example of LIST NEWSGROUPS sent to a server that does not recognize Example of LIST NEWSGROUPS sent to a server that does not recognize
this command: this command:
[C] LIST NEWSGROUPS [C] LIST NEWSGROUPS
[S] 501 Syntax error [S] 501 Syntax error
9. The CONCLUSION step 8. Framework for NNTP extensions
9.1 QUIT
9.1.1 Usage
Syntax
QUIT
Responses
205 Connection closing
9.1.2 Description
The server process MUST acknowledge the QUIT command and then close
the connection to the client. This is the preferred method for a
client to indicate that it has finished all its transactions with the
NNTP server.
If a client simply disconnects (or the connection times out or some
other fault occurs), the server MUST gracefully cease its attempts to
service the client, disconnecting from its end if necessary.
9.1.3 Examples
[C] QUIT
[S] 205 closing connection
[Server closes connection.]
10. Framework for NNTP extensions
Although NNTP is widely and robustly deployed, some parts of the Although NNTP is widely and robustly deployed, some parts of the
Internet community might wish to extend the NNTP service. This Internet community might wish to extend the NNTP service. This
document defines a means whereby an extended NNTP client can query document defines a means whereby an extended NNTP client can query
the server to determine the service extensions that it supports. the server to determine the service extensions that it supports.
It must be emphasized that any extension to the NNTP service should It must be emphasized that any extension to the NNTP service should
not be considered lightly. NNTP's strength comes primarily from its not be considered lightly. NNTP's strength comes primarily from its
simplicity. Experience with many protocols has shown that: simplicity. Experience with many protocols has shown that:
skipping to change at page 61, line 33 skipping to change at page 63, line 33
Given this environment, the framework for extensions described in Given this environment, the framework for extensions described in
this document consists of: this document consists of:
o a mechanism for clients to determine a server's available o a mechanism for clients to determine a server's available
extensions extensions
o a registry of NNTP service extensions o a registry of NNTP service extensions
The LIST EXTENSIONS command is described in this document (see The LIST EXTENSIONS command is described in this document (see
Section 6.1) and is the mechanism for clients to use to determine Section 5.3) and is the mechanism for clients to use to determine
what extensions are available. what extensions are available.
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 letters. The extension-label will often string of 1 to 12 uppercase US-ASCII letters. The extension-label
be the name of a new command that the extension adds. However this will often be the name of a new command that the extension adds.
is not a requirement: an extension might not add any new commands or However this is not a requirement: an extension might not add any new
keywords. commands or keywords.
An extension is either a private extension or else it is included in An extension is either a private extension or else it is included in
the IANA registry and is defined in an RFC. Such RFCs either must be the IANA registry and is defined in an RFC. Such RFCs either must be
on the standards-track or must define an IESG-approved experimental on the standards-track or must define an IESG-approved experimental
protocol. protocol.
The definition of an extension must include: The definition of an extension must include:
o a descriptive name for the extension o a descriptive name for the extension
o the extension-label (which is returned by LIST EXTENSIONS to o the extension-label (which is returned by LIST EXTENSIONS to
skipping to change at page 62, line 16 skipping to change at page 64, line 16
extension) extension)
o the syntax, values, and meanings of any parameters following the o the syntax, values, and meanings of any parameters 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 o any new NNTP commands associated with the extension
o the syntax and possible values of parameters associated with the o the syntax and possible values of parameters associated with the
new NNTP commands new NNTP commands
o the response codes and possible values of parameters for the
responses of the new NNTP commands
o any new parameters the extension associates with any other o any new parameters the extension associates with any other
pre-existing NNTP commands pre-existing NNTP commands
o how support for the extension affects the behavior of a server and o how support for the extension affects the behavior of a server and
NNTP client NNTP client
o any increase in the maximum length of commands over the value o any increase in the maximum length of commands over the value
specified in this document 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)
The extension-label of private extensions MUST begin with "X". The The extension-label of private extensions MUST begin with "X". The
extension-label of registered extensions MUST NOT begin with "X". extension-label of registered extensions MUST NOT begin with "X".
A server MUST NOT provide any extension, whether or not listed in the A server MUST NOT provide any extension, whether or not listed in the
output from LIST EXTENSIONS, unless it is either a registered output from LIST EXTENSIONS, unless it is either a registered
extension or a private extension. extension or a private extension.
OUTSTANDING ISSUE
As worded, this forbids commands like MODE SLAVE that servers
already provide but that aren't part of an existing extension. We
can't simply make these illegal.
The wording about starting keywords with an X could be reduced to
a SHOULD, except for backwards compatibility (with a pointer to
RFC 2980). But is that the right answer?
Except where stated otherwise, the commands in this document are Except where stated otherwise, the commands in this document are
understood (even if not supported) by all servers and are not understood (even if not supported) by all servers and are not
described in the list of features returned by the LIST EXTENSIONS described in the list of features returned by the LIST EXTENSIONS
command. command.
A server MAY provide additional keywords - either for new commands or A server MAY provide additional keywords - either for new commands or
new variants of existing commands - as part of a private extension. new variants of existing commands - as part of a private extension.
These new keywords MUST begin with "X". These new keywords MUST begin with "X".
A server MUST NOT send different response codes to basic NNTP A server MUST NOT send different response codes to basic NNTP
commands documented here or commands documented in registered commands documented here or commands documented in registered
extensions in response to the availability or use of a private extensions in response to the availability or use of a private
extension. extension.
10.1 Initial IANA registry 8.1 Initial IANA registry
The IANA's initial registry of NNTP service extensions consists of The IANA's initial registry of NNTP service extensions consists of
these entries: these entries:
Extension Label Added behavior Extension Label Added behavior
Specific article numbers LISTGROUP Defined in this document Specific article numbers LISTGROUP Defined in this document
Overview support OVER Defined in this document Overview support OVER Defined in this document
Header pattern matching HDR Defined in this document Header pattern matching HDR Defined in this document
10.2 Standard extensions 8.2 Standard extensions
Each of the following sections describes an extension that a server Each of the following sections describes an extension that a server
MAY provide. If the server provides the extension, it MUST include MAY provide. If the server provides the extension, it MUST include
the appropriate extension label in the response to LIST EXTENSIONS. the appropriate extension label in the response to LIST EXTENSIONS.
If it does not provide it, it MUST NOT include the appropriate If it does not provide it, it MUST NOT include the appropriate
extension label. The descriptions of facilities in each section are extension label. The descriptions of facilities in each section are
written as if the extension is provided. If it is not provided, the written as if the extension is provided. If it is not provided, the
entire section should be ignored. entire section should be ignored.
If the server provides an extension, it MUST implement all of the If the server provides an extension, it MUST implement all of the
commands in the specification of the extension except for those commands in the specification of the extension except for those
marked as optional. If it does not provide an extension, it MUST NOT marked as optional. If it does not provide an extension, it MUST NOT
implement any of the commands in the specification of that extension. implement any of the commands in the specification of that extension.
10.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.
10.3.1 LISTGROUP 8.3.1 LISTGROUP
10.3.1.1 Usage 8.3.1.1 Usage
Syntax Syntax
LISTGROUP [ggg] LISTGROUP [group]
Responses Responses
211 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
ggg = name of newsgroup group = name of newsgroup
number = estimated number of articles in the group
low = reported low 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.
10.3.1.2 Description 8.3.1.2 Description
The LISTGROUP command is used to get a listing of all the article The LISTGROUP command is used to get a listing of all the article
numbers in a particular newsgroup. numbers in a particular newsgroup.
The optional parameter ggg is the name of the newsgroup to be The optional parameter is the name of the newsgroup to be selected
selected (e.g. "news.software.misc"). A list of valid newsgroups (e.g. "news.software.misc"). A list of valid newsgroups may be
may be obtained from the LIST ACTIVE command. If no group is obtained from the LIST ACTIVE command. If no group is specified, the
specified, the current selected newsgroup is used. current selected newsgroup is used.
OUTSTANDING ISSUE
On at least some servers the 211 response line is the same as with
GROUP. Should this be a requirement?
The list of article numbers is returned as a multi-line response The list of article numbers is returned as a multi-line response
following the 211 response code. It contains one number per line, is following the 211 response code (the parameters on the initial
in numerical order, and lists precisely those articles that exist in response line are the same as for the GROUP command (see Section
the group. 6.1.1). The list contains one number per line, is in numerical order,
and lists precisely those articles that exist in the group.
When a valid group is selected by means of this command, the current When a valid group is selected by means of this command, the current
selected newsgroup MUST be set to that group and the current article selected newsgroup MUST be set to that group and the current article
number MUST be set to the first article in the group. If an empty number MUST be set to the first article in the group. If an empty
newsgroup is selected, the current article pointer is made invalid. newsgroup is selected, the current article pointer is made invalid.
If an invalid group is specified, the current selected newsgroup and If an invalid group is specified, the current selected newsgroup and
current article number MUST NOT be changed. current article number MUST NOT be changed.
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
and current article number. and 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. If no group is specified and the current selected MUST be returned. If no group is specified and the current selected
newsgroup is invalid, a 412 response MUST be returned. newsgroup is invalid, a 412 response MUST be returned.
10.3.1.3 Examples 8.3.1.3 Examples
Example of LISTGROUP on an empty group: Example of LISTGROUP on an empty group:
[C] LISTGROUP example.empty.newsgroup [C] LISTGROUP example.empty.newsgroup
[S] 211 list of article numbers follows [S] 211 0 0 0 example.empty.newsgroup list follows
[S] . [S] .
Example of LISTGROUP on a valid current selected newsgroup: Example of LISTGROUP on a valid current selected newsgroup:
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 2000 3000234 3002322 misc.test selected [S] 211 2000 3000234 3002322 misc.test
[C] LISTGROUP [C] LISTGROUP
[S] 211 list follows [S] 211 2000 3000234 3002322 misc.test list follows
[S] 3000234 [S] 3000234
[S] 3000237 [S] 3000237
[S] 3000238 [S] 3000238
[S] 3000239 [S] 3000239
[S] 3002322 [S] 3002322
[S] . [S] .
Example of LISTGROUP failing because no group has been selected: Example of LISTGROUP failing because no group has been selected:
[Assumes current selected newsgroup is invalid.] [Assumes current selected newsgroup is invalid.]
[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
10.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 metadata". This is data about articles that does not occur within the
the article itself. Each metadata item has a name which MUST begin article itself. Each metadata item has a name which MUST begin with a
with a colon. Note that a historical feature of the LIST colon (and which MUST NOT contain a colon elsewhere within it).
OVERVIEW.FMT command means that metadata names SHOULD NOT end with
":full".
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.) article.)
This specification defines two metadata items: ":bytes" and ":lines". This specification defines two metadata items: ":bytes" and ":lines".
Implementations and other extensions may define other metadata items. Implementations and other extensions may define other metadata items.
10.4.1 The :bytes metadata item OUTSTANDING ISSUE
The :bytes metadata item for an article is a decimal integer. It Do we need a separate private namespace? For example, we could
MUST equal the number of octets in the entire article - headers, reserve :name for extensions and ::name for implementation use.
body, and separating blank line - except that the US-ASCII CRLF at
the end of each line MAY (but SHOULD NOT) be counted as a single 8.4.1 The :bytes metadata item
octet.
The :bytes metadata item for an article is a decimal integer. It MUST
equal the number of octets in the entire article - headers, body, and
separating empty line - except that each CRLF pair MAY (but SHOULD
NOT) be counted as a single octet.
OUTSTANDING ISSUE OUTSTANDING ISSUE
Should this be called ":octets" instead? Or should it be a count Should this be called ":octets" instead?
of UTF characters rather than octets?
10.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 The :lines metadata item for an article is a decimal integer. It MUST
MUST equal the number of lines in the article body (excluding the equal the number of lines in the article body (excluding the empty
blank line separating headers and body); equivalently, it is two less line separating headers and body); equivalently, it is two less than
than the number of US-ASCII CRLF pairs that the BODY command would the number of CRLF pairs that the BODY command would return for that
return for that article (the extra two are those following the article (the extra two are those following the response code and the
response code and the termination octet). termination octet).
10.5 The OVER extension 8.5 The OVER extension
This extension provides two commands, OVER and LIST OVERVIEW.FMT. This extension provides two commands, OVER and LIST OVERVIEW.FMT. The
The label for this extension is OVER. label for this extension is OVER.
The OVER extension provides access to the overview database [8], The OVER extension provides access to the "overview database", which
which is a database of header lines extracted from incoming articles. is a database of headers extracted from incoming articles. Only
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. The LIST OVERVIEW.FMT command
describes the information that would be stored for an article
arriving at the same time as the command was executed.
The information stored in the database may change over time. The This extension is based on the Overview/NOV database [ROBE1995]
LIST OVERVIEW.FMT command describes the information that would be developed by Geoff Collyer.
stored for an article arriving at the same time as the command was
executed.
10.5.1 OVER 8.5.1 OVER
10.5.1.1 Usage 8.5.1.1 Usage
Syntax Syntax
OVER [range] OVER [range]
Responses Responses
224 Overview information follows (multiline) 224 Overview information follows (multiline)
412 No newsgroup selected 412 No newsgroup selected
420 Current article number is invalid 420 Current article number is invalid
423 No articles in that range 423 No articles in that range
Parameters Parameters
range = Article(s) to return information for range = Article(s) to return information for
10.5.1.2 Description 8.5.1.2 Description
The OVER command returns the contents of the headers and metadata in The OVER command returns the contents of the headers and metadata in
the database for the article(s) specified from the current selected the database for the article(s) specified from the current selected
newsgroup. newsgroup.
The optional range argument may be any of the following: The optional range argument may be any of the following:
o an article number o an article number
o an article number followed by a dash to indicate all following o an article number followed by a dash to indicate all following
skipping to change at page 67, line 27 skipping to change at page 69, line 31
o an article number followed by a dash followed by another article o an article number followed by a dash followed by another article
number number
If no argument is specified, then the current article number is used. If no argument is specified, then the current article number is used.
If the information is available, it is returned as a multi-line If the information is available, it is returned as a multi-line
response following the 224 response code. If the current selected response following the 224 response code. If the current selected
newsgroup is invalid, a 412 response MUST be returned. If there are newsgroup is invalid, a 412 response MUST be returned. If there are
no articles in the range specified, a 423 response MUST be returned. no articles in the range specified, a 423 response MUST be returned.
If OVER is sent without any arguments and the current article number If OVER is sent without any arguments and the current article number
is invalid, a 420 response MUST be returned. If the client does not is invalid, a 420 response MUST be returned.
have permission to access the overview database, a 502 response MUST
be returned.
OUTSTANDING ISSUE
Should this be 502 ("not permitted") or 503 ("there is no overview
database")? In which case, why provide the command?
For a successful response, the output consists of one line per For a successful response, the output consists of one line per
article, sorted in numerical order of article number. Each line article, sorted in numerical order of article number. Each line
consists of a number of fields separated by an US-ASCII TAB consists of a number of fields separated by a TAB. A field may be
character. A field may be empty (in which case there will be two empty (in which case there will be two adjacent TABs), and a sequence
adjacent US-ASCII TABs), and a sequence of trailing US-ASCII TABs may of trailing TABs may be omitted.
be omitted.
The first 8 fields MUST be the following, in order: The first 8 fields MUST be the following, in order:
article number article number
"Subject" header Subject header content
"From" header From header content
"Date" header Date header content
"Message-ID" header Message-ID header content
"References" header References header content
:bytes metadata item :bytes metadata item
:lines metadata item :lines metadata item
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 original header with the header name and following colon based on the content of the header (that is, with the header name and
and space removed. If the article does not contain that header, or following colon and space removed). If the article does not contain
if there is nothing following the colon and space, the field MUST be that header, or if the content is empty, the field MUST be empty. For
empty. For the two mandatory metadata items, the content of the the two mandatory metadata items, the content of the field MUST be
field MUST be just the value, with no other text. 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
based on the entire header including the name. For all subsequent the entire header line other than the trailing CRLF. For all
fields that contain metadata, the field consists of the metadata subsequent fields that contain metadata, the field consists of the
name, a single US-ASCII 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 US-ASCII For all fields, the value is processed by first removing all CRLF
CRLF pairs and then replacing each remaining US-ASCII NUL, TAB, CR, pairs (that is, undoing any folding and removing the terminating
or LF character with a single US-ASCII space (for example, CR LF LF CRLF) and then replacing each TAB with a single space. If there is no
TAB will become two spaces). If there is no such header in the such header in the article, or no such metadata item, or no header or
article, or no such metadata item, or no header or item stored in the item stored in the database for that article, the corresponding field
database for that article, the corresponding field MUST be empty. MUST be empty.
Note that, after unfolding, the characters NUL, LF, and CR cannot
occur in the header of an article offered by a conformant server.
Nevertheless, servers SHOULD check for these characters and replace
each one by a single space (so that, for example, CR LF LF TAB will
become two spaces, since the CR and first LF will be removed by the
unfolding process). This will encourage robustness in the face of
non-conforming data; it is also possible that future versions of this
specification may permit these characters to appear in articles.
The server SHOULD NOT produce output for articles that no longer The server SHOULD NOT produce output for articles that no longer
exist. exist.
10.5.1.3 Examples 8.5.1.3 Examples
In the first two examples, US-ASCII tab has been replaced by vertical In the first two examples, TAB has been replaced by vertical bar and
bar and some lines have been folded for readability. some lines have been folded for readability.
Example of a successful retrieval of overview information for an Example of a successful retrieval of overview information for an
article (using no article number): article (using no article number):
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] OVER [C] OVER
[S] 224 Overview information follows [S] 224 Overview information follows
[S] 300234|I am just a test article|"Demo User" [S] 300234|I am just a test article|"Demo User"
<nobody@example.com>|6 Oct 1998 04:38:40 -0500| <nobody@example.com>|6 Oct 1998 04:38:40 -0500|
skipping to change at page 69, line 45 skipping to change at page 72, line 5
[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
10.5.2 LIST OVERVIEW.FMT 8.5.2 LIST OVERVIEW.FMT
8.5.2.1 Usage
10.5.2.1 Usage
Syntax Syntax
LIST OVERVIEW.FMT LIST OVERVIEW.FMT
Responses Responses
215 Information follows (multiline) 215 Information follows (multiline)
503 Facility not available
10.5.2.2 Description 8.5.2.2 Description
OUTSTANDING ISSUE OUTSTANDING ISSUE
Should this be optional even when the OVER extension is provided? Should this be optional even when the OVER extension is provided?
If so, is there a point in the 503 response? Or even just removed entirely? What do we want to require about
the OVER contents being consistent with the output of this
command?
The LIST OVERVIEW.FMT command returns a description of the fields in The LIST OVERVIEW.FMT command returns a description of the fields in
the database. The fields MUST be listed in the order that they will the database. The fields MUST be listed in the order that they will
be returned by the OVER command for a newly-received article (the be returned by the OVER command for a newly-received article (the
information stored for articles may change over time). information stored for articles may change over time).
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. If the information is not response following the 215 response code. The information contains
available, a 503 response MUST be returned. The information contains
one line per field in the order they are returned by the OVER one line per field in the order they are returned by the OVER
command; he first 7 lines MUST be exactly: command; the first 7 lines MUST be exactly:
Subject: Subject:
From: From:
Date: Date:
Message-ID: Message-ID:
References: References:
:bytes :bytes
:lines :lines
except that, for compatibility with existing implementations, the except that, for compatibility with existing implementations, the
skipping to change at page 71, line 10 skipping to change at page 73, line 14
There are no leading or trailing spaces in the output. There are no leading or trailing spaces in the output.
Note that the 7 fixed lines describe the 2nd to 8th fields of the Note that the 7 fixed lines describe the 2nd to 8th fields of the
OVER output. The "full" suffix is a reminder that the corresponding OVER output. The "full" suffix is a reminder that the corresponding
fields include the header name. fields include the header name.
This command MAY generate different results if used more than once in This command MAY generate different results if used more than once in
a session. a session.
10.5.2.3 Examples 8.5.2.3 Examples
Example of LIST OVERVIEW.FMT output corresponding to the example OVER Example of LIST OVERVIEW.FMT output corresponding to the example OVER
output above, using the preferred format: output above, using the preferred format:
[C] LIST OVERVIEW.FMT [C] LIST OVERVIEW.FMT
[S] 215 Order of fields in overview database. [S] 215 Order of fields in overview database.
[S] Subject: [S] Subject:
[S] From: [S] From:
[S] Date: [S] Date:
[S] Message-ID: [S] Message-ID:
skipping to change at page 72, line 5 skipping to change at page 74, line 5
[S] Lines: [S] Lines:
[S] Xref:full [S] Xref:full
[S] Distribution:full [S] Distribution:full
[S] . [S] .
Example of LIST OVERVIEW.FMT returning an error: Example of LIST OVERVIEW.FMT returning an error:
[C] LIST OVERVIEW.FMT [C] LIST OVERVIEW.FMT
[S] 503 overview.fmt not available [S] 503 overview.fmt not available
10.6 The HDR extension 8.6 The HDR extension
This extension provides one new command: HDR. The label for this This extension provides one new command: HDR. The label for this
extension is HDR. extension is HDR.
10.6.1 HDR OUTSTANDING ISSUE
10.6.1.1 Usage There is ongoing discussion about whether this extension should
have a parameter and, if so, what it means.
8.6.1 HDR
8.6.1.1 Usage
Syntax Syntax
HDR header range HDR header range
HDR header message-id HDR header message-id
HDR header HDR header
Responses Responses
First form (range specified) First form (range specified)
225 Headers follow (multiline) 225 Headers follow (multiline)
skipping to change at page 72, line 40 skipping to change at page 74, line 45
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
10.6.1.2 Description 8.6.1.2 Description
The HDR command retrieves specific headers from an article or The HDR command retrieves specific headers from an article or
specified range of articles in the current selected newsgroup, or specified range of articles in the current selected newsgroup, or
from an article specified by message-id. It can also return certain from an article specified by message-id. It can also return certain
metadata about the article or articles. metadata about the article or articles.
The required header parameter is the name of a header (e.g. The required header parameter is the name of a header (e.g.
"subject") 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. See RFC 1036 [6] for a list of valid header lines. case-insensitive. Names of metadata items always begin with a colon.
Names of metadata items always include a colon. Except where stated Except where stated otherwise, metadata items are treated as if they
otherwise, metadata items are treated as if they were header values, were header contents, and references to headers in this description
and references to headers in this description apply equally to apply equally to metadata items.
metadata items.
OUTSTANDING ISSUE
Should this be changed to require the name to *begin* with a
colon?
The range parameter may be any of the following: The range parameter may be any of the following:
o an article number o an article number
o an article number followed by a dash to indicate all following o an article number followed by a dash to indicate all following
o an article number followed by a dash followed by another article o an article number followed by a dash followed by another article
number number
The message-id argument indicates a specific article. As shown by The message-id argument indicates a specific article. As shown by the
the syntax, the range and message-id arguments are mutually syntax, the range and message-id arguments are mutually exclusive; if
exclusive; if neither are specified, the current article number is neither is specified, the current article number is used.
used.
If the information is available, it is returned as a multi-line If the information is available, it is returned as a multi-line
response following the 225 response code and contains one line for response following the 225 response code and contains one line for
each article where the relevant header line exists. The line each article where the relevant header line exists. The line consists
consists of the article number, a US-ASCII space, and then the of the article number, a space, and then the contents of the header
contents of the header (without the header name or the colon and (without the header name or the colon and space that follow it) or
space that follow it) or metadata item. If the article is specified metadata item. If the article is specified by message-id rather than
by message-id rather than by article range, the article number is by article range, the article number is given as "0".
given as "0".
Header contents are modified as follows: all US-ASCII CRLF pairs are Header contents are modified as follows: all CRLF pairs are removed,
removed, and then each remaining US-ASCII NUL, TAB, CR, or LF and then each TAB is replaced with a single space (note that this is
character is replaced with a single US-ASCII space. (Note that this the same transformation as is performed by the OVER extension
is the same transformation as is performed by the OVER extension.) (Section 8.5.1.2), and the same comment concerning NUL, CR, and LF
applies).
The header content is in all cases taken from the article. This The header content is in all cases taken from the article. This means
means that, for example, a request for the header "Lines" returns the that, for example, a request for the header "Lines" returns the
contents of the "Lines" header of the specified articles, if any, not contents of the "Lines" header of the specified articles, if any, not
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 value 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 the article number MAY be retained or omitted). If any article number
number in the provided range does not exist in the group, no line for in the provided range does not exist in the group, no line for that
that article number is included in the output. article number is included in the output.
If the optional argument is a message-id and no such article exists, If the optional argument is a message-id and no such article exists,
a 430 response MUST be returned. If the optional argument is not a a 430 response MUST be returned. If the optional argument is not a
message-id and the current selected newsgroup is invalid, a 412 message-id and the current selected newsgroup is invalid, a 412
response MUST be returned. If the optional argument is an article response MUST be returned. If the optional argument is an article
number or number range and no article with that number or in that number or number range and no article with that number or in that
number range exists in the current selected newsgroup, a 423 response number range exists in the current selected newsgroup, a 423 response
MUST be returned. If HDR is sent without any arguments and the MUST be returned. If HDR is sent without any arguments and the
current article number is invalid, a 420 response MUST be returned. current article number is invalid, a 420 response 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 (such as those present in the overview database). If metadata items (such as those present in the overview database). If
so, it MUST respond with a 503 response to attempts to request other so, it MUST respond with a 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.
10.6.1.3 Examples 8.6.1.3 Examples
Example of a successful retrieval of subject lines from a range of Example of a successful retrieval of subject lines from a range of
articles (3000235 has no Subject header, and 3000236 is missing): articles (3000235 has no Subject header, and 3000236 is missing):
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] HDR Subject 3000234-300238 [C] HDR Subject 3000234-300238
[S] 225 Headers follow [S] 225 Headers follow
[S] 3000234 I am just a test article [S] 3000234 I am just a test article
[S] 3000235 [S] 3000235
skipping to change at page 76, line 5 skipping to change at page 78, line 5
[S] 423 No articles in that range [S] 423 No articles in that range
Example of an unsuccessful retrieval of headers because the server Example of an unsuccessful retrieval of headers because the server
does not allow HDR commands for that header: does not allow HDR commands for that header:
[C] GROUP misc.test [C] GROUP misc.test
[S] 211 1234 3000234 3002322 misc.test [S] 211 1234 3000234 3002322 misc.test
[C] HDR Content-Type 3000234-300238 [C] HDR Content-Type 3000234-300238
[S] 503 HDR not permitted on Content-Type [S] 503 HDR not permitted on Content-Type
11. Augmented BNF Syntax for NNTP Commands 9. Augmented BNF Syntax for NNTP
This syntax defines the non-terminal "command-line". Note that ABNF Each of the following sections describes the syntax of a major
strings are case insensitive. element of NNTP. This syntax extends and refines the descriptions
elsewhere in this specification, and should be given precedence when
resolving apparent conflicts. Note that ABNF [RFC2234] strings are
case insensitive. Non-terminals used in several places are defined in
a separate section at the end.
9.1 Commands
This syntax defines the non-terminal "command-line", which
represents 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 /
group-command / group-command /
hdr-command / hdr-command /
head-command / head-command /
help-command / help-command /
ihave-command / ihave-command /
skipping to change at page 77, line 15 skipping to change at page 79, line 25
mode-reader-command = "MODE" WS "READER" mode-reader-command = "MODE" WS "READER"
newgroups-command = "NEWGROUPS" WS date-time newgroups-command = "NEWGROUPS" WS date-time
newnews-command = "NEWNEWS" WS wildmat WS date-time newnews-command = "NEWNEWS" WS wildmat WS date-time
next-command = "NEXT" next-command = "NEXT"
over-command = "OVER" [WS range] over-command = "OVER" [WS range]
post-command = "POST" post-command = "POST"
quit-command = "QUIT" quit-command = "QUIT"
stat-command = "STAT" [article-ref] stat-command = "STAT" [article-ref]
x-command = x-command-name *(WS x-argument) x-command = x-command-name *(WS x-argument)
; Each extension command is specified fully elsewhere ; Each extension command is specified fully elsewhere
article-ref = WS (article-number / message-id) article-ref = WS (article-number / message-id)
article-number = 1*16DIGIT article-number = 1*16DIGIT
date = [2DIGIT] 6DIGIT date = [2DIGIT] 6DIGIT
date-time = date WS time [WS "GMT"] date-time = date WS time [WS "GMT"]
header-meta-name = header-name / metadata-name header-meta-name = header-name / metadata-name
header-name = 1*header-name-char metadata-name = ":" 1*A-NOTCOLON
header-name-char = %x21-39 / %x3B-7E ; exclude SP and :
message-id = "<" 1*248message-id-char ">"
; subject to requirements in
Section 7
>
message-id-char = %x21-3B / %x3C / %x3E-7E ; exclude SP < >
metadata-name = ":" 1*header-name-char
newsgroup-name = 1*wildmat-exact 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 = 6DIGIT
x-command-name = 3*12%x21-7E x-command-name = 3*12A-CHAR
x-argument = 1*(%x21-7E / UTF-8-non-ascii) x-argument = 1*P-CHAR
wildmat = wildmat-pattern *("," ["!"] wildmat-pattern) wildmat = wildmat-pattern *("," ["!"] wildmat-pattern)
wildmat-pattern = 1*wildmat-item wildmat-pattern = 1*wildmat-item
wildmat-item = wildmat-exact / wildmat-wild wildmat-item = wildmat-exact / wildmat-wild
wildmat-exact = %x21-29 / %x2B / %x2D-3E / %x40-5A / %x5E-7E / wildmat-exact = %x21-29 / %x2B / %x2D-3E / %x40-5A / %x5E-7E /
UTF-8-non-ascii ; exclude * , ? [ \ ] UTF8-non-ascii ; exclude * , ? [ \ ]
wildmat-wild = "*" / "?" wildmat-wild = "*" / "?"
9.2 Responses
This syntax defines the non-terminal "response", which represents
what is sent from the server to the client in response to a command.
response = simple-response / multiline-response
multiline-response = simple-response *content-line termination
termination = "." CRLF
content-line = [content-text] CRLF
content-text = (".." / B-NONDOT) B-CHAR
simple-response = 3DIGIT parameters [ SP trailing-comment ] CRLF
trailing-comment = *U-CHAR
parameters = *( SP parameter ) ; How many depends on the response
parameter = 1*A-CHAR
9.3 Articles
This syntax defines the non-terminal "article", which represents the
format of an article as described in Section 3.4.
article = 1*header CRLF body
body = *(*B-CHAR CRLF)
header = header-name ":" header-tail CRLF
header-tail = SP header-content-u / CRLF SP header-content-f
header-content-u = *( header-gap header-text) *WS
header-content-f = *WS header-text header-content-u
header-gap = *WS [CRLF] 1*WS
header-text = 1*P-CHAR
9.4 General non-terminals
header-name = 1*A-NOTCOLON
message-id = "<" 1*248A-NOTGT ">"
; Assorted special character sets
; A- means based on ASCII, excluding controls and SP
; P- means based on UTF-8, excluding controls and SP
; U- means based on UTF-8, excluding NUL CR and LF
; B- means based on bytes, excluding NUL CR and LF
A-CHAR = %x21-7E
A-NOTCOLON = %x21-39 / %x3B-7E ; exclude ":"
A-NOTGT = %x21-3D / %x3F-7E ; exclude ">"
P-CHAR = A-CHAR / UTF8-non-ascii
U-CHAR = %x01-09 / %x0B-0C / %x0E-7F / UTF8-non-ascii
B-CHAR = %x01-09 / %x0B-0C / %x0E-FF
B-NONDOT = %x01-09 / %x0B-0C / %x0E-2D / %x2F-FF ; exclude "."
CR = %x0D CR = %x0D
CRLF = CR LF CRLF = CR LF
DIGIT = %x30-39 DIGIT = %x30-39
EOL = *(SP / HT) CRLF EOL = *(SP / HT) CRLF
HT = %x09 HT = %x09
LF = %x0A LF = %x0A
SP = %x20 SP = %x20
UTF-8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4 / UTF8-5 / UTF8-6 UTF8-non-ascii = UTF8-2 / UTF8-3 / UTF8-4
UTF8-1 = %x80-BF UTF8-2 = %xC2-DF UTF8-tail
UTF8-2 = %xC2-DF UTF8-1 UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2UTF8-tail /
UTF8-3 = %xE0 %A0-BF UTF8-1 / %xE1-EC 2UTF8-1 / %xED %x80-9F UTF8-tail / %xEE-EF 2UTF8-tail
%xED %80-9F UTF8-1 / %xEE-EF 2UTF8-1 UTF8-4 = %xF0 %x90-BF 2UTF8-tail / %xF1-F3 3UTF8-tail /
UTF8-4 = %xF0 %90-BF 2UTF8-1 / %xF1-F7 3UTF8-1 %xF4 %x80-8F 2UTF8-tail
UTF8-5 = %xF8 %88-BF 3UTF8-1 / %xF9-FB 4UTF8-1 UTF8-tail = %x80-BF
UTF8-6 = %xFC %84-BF 4UTF8-1 / %xFD 5UTF8-1
WS = 1*(SP / HT) WS = 1*(SP / HT)
12. Security Considerations OUTSTANDING ISSUE
When draft-yergeau-rfc2279bis-04.txt replaces 2279, need to update
references.
10. IANA Considerations
This specification requires IANA to keep a registry of
extension-labels. The initial contents of this registry are specified
in Section 8.1. As described in Section 8, names beginning with X are
reserved for private use while all other names are to be associated
with a specification in an RFC on the standards-track or defining an
IESG-approved experimental protocol.
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.
12.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) material that is added automatically to articles (e.g. in headers) is
is not disclosed inadvertently. Additionally, effective and easily 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.
12.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 handling can be constrained by law in certain countries. People using
using the NNTP protocol to provide data are responsible for ensuring the NNTP protocol to provide data are responsible for ensuring that
that such material is not distributed without the permission of any 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.
12.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 configuration files. Those files specify access by using domain names
names or IP addresses. However, this specification does permit the or IP addresses. However, this specification does permit the creation
creation of extensions to the NNTP protocol itself for such purposes. of extensions to the NNTP protocol itself for such purposes. While
While including such mechanisms is optional, doing so is strongly including such mechanisms is optional, doing so is strongly
encouraged. 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.
12.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
configuration files. Servers that use this type of authentication, configuration files. Servers that use this type of authentication,
and clients that find a server by doing a DNS lookup of the server and clients that find a server by doing a DNS lookup of the server
name, rely very heavily on the Domain Name Service, and are thus 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 appropriate, and they SHOULD be configured to do so. It is proper for
for these lookups to be cached, however, only when the TTL (Time To these lookups to be cached, however, only when the TTL (Time To Live)
Live) information reported by the name server makes it likely that information reported by the name server makes it likely that the
the cached information will remain useful. 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.
This requirement also improves the load-balancing behavior of clients This requirement also improves the load-balancing behavior of clients
for replicated servers using the same DNS name and reduces the for replicated servers using the same DNS name and reduces the
likelihood of a user's experiencing failure in accessing sites that likelihood of a user's experiencing failure in accessing sites that
use that strategy. use that strategy.
12.5 UTF-8 issues 11.5 UTF-8 issues
The UTF-8 specification [2] permits only certain sequences of octets UTF-8 [RFC2279] permits only certain sequences of octets and
and designates others as either malformed or "illegal". The Unicode designates others as either malformed or "illegal". The Unicode
standard identifies a number of security issues related to illegal standard identifies a number of security issues related to illegal
sequences and forbids their generation by conforming implementations. sequences and forbids their generation by conforming implementations.
Implementations of this specification MUST NOT generate malformed or Implementations of this specification MUST NOT generate malformed or
illegal sequences and SHOULD detect them and take some appropriate illegal sequences and SHOULD detect them and take some appropriate
action. This could include: action. This could include:
o replacing such sequences by a "guessed" valid sequence (based on o replacing such sequences by a "guessed" valid sequence (based on
properties of the UTF-8 encoding); properties of the UTF-8 encoding);
o replacing such sequences by the sequence %xEF.BF.BD, which encodes o replacing such sequences by the sequence %xEF.BF.BD, which encodes
the "replacement character"; the "replacement character" U+FFFD;
o closing the connection; o closing the connection;
o generating a 501 response code. o generating a 501 response code.
13. Acknowledgments In the first case, the implementation MUST ensure that any
replacement cannot be used to bypass validity or security checks. For
example, the illegal sequence %xC0.A0 is an over-long encoding for
space (%x20). If it is replaced by the latter in a command line, this
needs to happen before the command line is parsed into individual
arguments. If the replacement came after parsing, it would be
possible to generate an argument with an embedded space, which is
forbidden. Use of the "replacement character" does not have this
problem, since it is permitted wherever non-US-ASCII characters are.
OUTSTANDING ISSUE
Yergeau says that you MUST detect illegal sequences. He also
rejects the first bullet point and consequent text; I'm discussing
it with him now.
12. Acknowledgments
The author acknowledges the original authors of NNTP as documented in The author acknowledges the original authors of NNTP as documented in
RFC 977: Brian Kantor and Phil Lapsey. RFC 977 [RFC977]: Brian Kantor and Phil Lapsey.
The author gratefully acknowledges the work of the NNTP committee The author gratefully acknowledges the work of the NNTP committee
chaired by Eliot Lear. The organization of this document was chaired by Eliot Lear. The organization of this document was
influenced by the last available draft from this working group. A influenced by the last available draft from this working group. A
special thanks to Eliot for generously providing the original special thanks to Eliot for generously providing the original
machine-readable sources for that document. machine-readable sources for that document.
The author gratefully acknowledges the work of Marshall Rose & John The author gratefully acknowledges the work of Marshall Rose & John
G. Meyers in RFC 1939 and the work of the DRUMS working group, G. Meyers in RFC 1939 [RFC1939] and the work of the DRUMS working
specifically RFC 1869, which is the basis of the NNTP extensions group, specifically RFC 1869 [RFC1869], which is the basis of the
mechanism detailed in this document. NNTP extensions mechanism detailed in this document.
OUTSTANDING ISSUE OUTSTANDING ISSUE
Why RFC 1939? Why RFC 1939?
The author gratefully acknowledges the authors of RFC 2616 for The author gratefully acknowledges the authors of RFC 2616 [RFC2616]
providing specific and relevant examples of security issues that for providing specific and relevant examples of security issues that
should be considered for HTTP. Since many of the same considerations should be considered for HTTP. Since many of the same considerations
exist for NNTP, those examples that are relevant have been included exist for NNTP, those examples that are relevant have been included
here with some minor rewrites. here with some minor rewrites.
The author gratefully acknowledges the comments and additional The author gratefully acknowledges the comments and additional
information provided by the following individuals in preparing one or information provided by the following individuals in preparing one or
more of the progenitors of this document: 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>
skipping to change at page 84, line 7 skipping to change at page 88, line 7
Kim Storm Kim Storm
Original author of the NN news reader Original author of the NN news reader
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 Normative References
[1] Kantor, B. and P. Lapsley, "Network News Transfer Protocol", [ANSI1986]
RFC 977, February 1986. American National Standards Institute, "Coded Character
Set - 7-bit American Standard Code for Information
[2] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC Interchange", ANSI X3.4, 1986.
2279, January 1998.
[3] American National Standards Institute, "Coded Character Set - [RFC1305] Mills, D., "Network Time Protocol (Version 3)
7-bit American Standard Code for Information Interchange", ANSI Specification, Implementation", RFC 1305, March 1992.
X3.4, 1986.
[4] Bradner, S., "Key words for use in RFCs to Indicate Requirement [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[5] 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.
[6] Horton, M. and R. Adams, "Standard for interchange of USENET [RFC2279] Yergeau, F., "UTF-8, a transformation format of ISO
messages", RFC 1036, December 1987. 10646", RFC 2279, January 1998.
[7] Resnick, P., "Internet Message Format", RFC 2822, April 2001. [RFC2822] Resnick, P., "Internet Message Format", RFC 2822, April
2001.
[8] Robertson, R., "FAQ: Overview database / NOV General [RFC977] Kantor, B. and P. Lapsley, "Network News Transfer
Information", January 1995. Protocol", RFC 977, February 1986.
[9] International Telecommunications Union - Radio, "Glossary, [ROBE1995]
ITU-R Recommendation TF.686-1", ITU-R Recommendation TF.686-1, Robertson, R., "FAQ: Overview database / NOV General
October 1997. Information", January 1995.
[10] Mills, D., "Network Time Protocol (Version 3) Specification, [TF.686-1]
Implementation", RFC 1305, March 1992. International Telecommunications Union - Radio, "Glossary,
ITU-R Recommendation TF.686-1", ITU-R Recommendation
TF.686-1, October 1997.
Informative References Informative References
[11] Salz, R., "Manual Page for wildmat(3) from the INN 1.4 [RFC1036] Horton, M. and R. Adams, "Standard for interchange of
distribution, Revision 1.10", April 1992. USENET messages", RFC 1036, December 1987.
[12] Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629, June [RFC1869] Klensin, J., Freed, N., Rose, M., Stefferud, E. and D.
1999. Crocker, "SMTP Service Extensions", STD 10, RFC 1869,
November 1995.
[RFC1939] Myers, J. and M. Rose, "Post Office Protocol - Version 3",
STD 53, RFC 1939, May 1996.
[RFC2616] Fielding, R., Gettys, J., Mogul, J., Nielsen, H.,
Masinter, L., Leach, P. and T. Berners-Lee, "Hypertext
Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.
[RFC2629] Rose, M., "Writing I-Ds and RFCs using XML", RFC 2629,
June 1999.
[SALZ1992]
Salz, R., "Manual Page for wildmat(3) from the INN 1.4
distribution, Revision 1.10", April 1992.
Author's Address Author's Address
Clive D.W. Feather Clive D.W. Feather
Thus plc Thus plc
322 Regents Park Road 322 Regents Park Road
London N3 2QQ London N3 2QQ
GB GB
Phone: +44 20 8371 1138 Phone: +44 20 8495 6138
Fax: +44 870 051 9937 Fax: +44 870 051 9937
URI: http://www.davros.org/ URI: http://www.davros.org/
Intellectual Property Statement Intellectual Property Statement
The IETF takes no position regarding the validity or scope of any The IETF takes no position regarding the validity or scope of any
intellectual property or other rights that might be claimed to intellectual property or other rights that might be claimed to
pertain to the implementation or use of the technology described in pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights this document or the extent to which any license under such rights
might or might not be available; neither does it represent that it might or might not be available; neither does it represent that it
 End of changes. 

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