Skip to content

NNTP Commands

go-while edited this page Oct 23, 2026 · 4 revisions

NNTP Commands

What the Store server (Store and Groups) answers, from storehandler.go. Script and Handler mode answer only what you give them. The streaming and IHAVE peer is described on Fake Server.

Command Replies
CAPABILITIES 101: VERSION 2, READER, LIST ACTIVE NEWSGROUPS OVERVIEW.FMT, NEWNEWS (not with NoNewnews), OVER MSGID (not with NoOver), POST (not with ReaderOnly), AUTHINFO USER (until logged in), COMPRESS DEFLATE (with Compress, after the login, while compression is off), IMPLEMENTATION fakeserver
MODE READER 200, 201 with ReaderOnly; other MODE variants 501
HELP 100 and the command list (without the commands NoOver, NoXover and NoNewnews turn off)
AUTHINFO USER u / PASS p 381, then 281 or 481; 482 for PASS without USER; 502 when no login is configured or it is done (so also after COMPRESS)
LIST [ACTIVE [wildmat]] 215 "name high low y|n"
LIST NEWSGROUPS [wildmat] 215 "name<TAB>description"
LIST OVERVIEW.FMT 215 and the fields; other LIST keywords 501
GROUP g 211 count low high g; 411
LISTGROUP [g [range]] 211 count low high g list follows and the numbers; 411; 412 without a group
ARTICLE, HEAD, BODY, STAT [n|<id>] 220/221/222/223 "n <id>"; 412, 420, 423, 430. A number selects the current article, a message-ID doesn't
NEXT, LAST 223; 412, 420, 421/422
OVER, XOVER [range|<id>] 224; 412, 420, 423 for an empty range, 430
NEWGROUPS date time [GMT] 231, groups whose Created is at or after that time (always UTC)
NEWNEWS wildmat date time [GMT] 230, the Message-IDs of the articles in matching groups whose Arrived is at or after that time (always UTC); each ID once, in group name order and by number; 503 when a matching generated group spans more numbers than its limit; 500 with NoNewnews
DATE 111 yyyymmddhhmmss (UTC)
POST 340, then 240 or 441; 440 with ReaderOnly
COMPRESS alg with Compress (else 500): 206, then both directions compressed (RFC 8054); 501 for a missing or bad algorithm name; 502 while compression is on; 503 for an algorithm other than DEFLATE; 480 before a required login (see Fake Server)
QUIT 205, then the connection is closed
  • Ranges are n, n- and n-m.
  • Dates are yyyymmdd or yymmdd (RFC 3977 7.3.2 century rule), times hhmmss.
  • A wildmat takes *, ?, comma lists and ! negation.
  • An unknown command gets 500; wrong arguments 501.
  • In a generated group, an OVER, XOVER or LISTGROUP that spans more numbers than the generator's limit gets 503 fakeserver: ..., and so does a NEWNEWS whose wildmat matches such a group (see Store and Groups).
  • With User or Pass set, every command except CAPABILITIES, MODE, HELP, AUTHINFO, DATE and QUIT gets 480 until the login succeeds.

StoreOptions change several of these replies: ListgroupRange, NoOver, NoXover, NoNewnews, EmptyOverReply, MaxOverRange, GroupNumbers, OverviewFields, Compress, CompressOutputOnly (see Store and Groups). Faults can replace any reply.

Not implemented

IHAVE, XHDR, HDR, XPAT, LIST HEADERS, LIST ACTIVE.TIMES and STARTTLS get 500 from the Store server, and so does COMPRESS without Compress. A test that needs one of them can use a Handler; PeerHandler answers IHAVE (see Fake Server).

Clone this wiki locally