rfc977.txt
来自「RFC 的详细文档!」· 文本 代码 · 共 1,540 行 · 第 1/4 页
TXT
1,540 行
<first> field, there are no articles currently on file in the
newsgroup.
Note that posting may still be prohibited to a client even though the
LIST command indicates that posting is permitted to a particular
newsgroup. See the POST command for an explanation of client
prohibitions. The posting flag exists for each newsgroup because
some newsgroups are moderated or are digests, and therefore cannot be
posted to; that is, articles posted to them must be mailed to a
moderator who will post them for the submitter. This is independent
of the posting permission granted to a client by the NNTP server.
Please note that an empty list (i.e., the text body returned by this
command consists only of the terminating period) is a possible valid
response, and indicates that there are currently no valid newsgroups.
3.6.2. Responses
215 list of newsgroups follows
Kantor & Lapsley [Page 14]
RFC 977 February 1986
Network News Transfer Protocol
3.7. The NEWGROUPS command
3.7.1. NEWGROUPS
NEWGROUPS date time [GMT] [<distributions>]
A list of newsgroups created since <date and time> will be listed in
the same format as the LIST command.
The date is sent as 6 digits in the format YYMMDD, where YY is the
last two digits of the year, MM is the two digits of the month (with
leading zero, if appropriate), and DD is the day of the month (with
leading zero, if appropriate). The closest century is assumed as
part of the year (i.e., 86 specifies 1986, 30 specifies 2030, 99 is
1999, 00 is 2000).
Time must also be specified. It must be as 6 digits HHMMSS with HH
being hours on the 24-hour clock, MM minutes 00-59, and SS seconds
00-59. The time is assumed to be in the server's timezone unless the
token "GMT" appears, in which case both time and date are evaluated
at the 0 meridian.
The optional parameter "distributions" is a list of distribution
groups, enclosed in angle brackets. If specified, the distribution
portion of a new newsgroup (e.g, 'net' in 'net.wombat') will be
examined for a match with the distribution categories listed, and
only those new newsgroups which match will be listed. If more than
one distribution group is to be listed, they must be separated by
commas within the angle brackets.
Please note that an empty list (i.e., the text body returned by this
command consists only of the terminating period) is a possible valid
response, and indicates that there are currently no new newsgroups.
3.7.2. Responses
231 list of new newsgroups follows
Kantor & Lapsley [Page 15]
RFC 977 February 1986
Network News Transfer Protocol
3.8. The NEWNEWS command
3.8.1. NEWNEWS
NEWNEWS newsgroups date time [GMT] [<distribution>]
A list of message-ids of articles posted or received to the specified
newsgroup since "date" will be listed. The format of the listing will
be one message-id per line, as though text were being sent. A single
line consisting solely of one period followed by CR-LF will terminate
the list.
Date and time are in the same format as the NEWGROUPS command.
A newsgroup name containing a "*" (an asterisk) may be specified to
broaden the article search to some or all newsgroups. The asterisk
will be extended to match any part of a newsgroup name (e.g.,
net.micro* will match net.micro.wombat, net.micro.apple, etc). Thus
if only an asterisk is given as the newsgroup name, all newsgroups
will be searched for new news.
(Please note that the asterisk "*" expansion is a general
replacement; in particular, the specification of e.g., net.*.unix
should be correctly expanded to embrace names such as net.wombat.unix
and net.whocares.unix.)
Conversely, if no asterisk appears in a given newsgroup name, only
the specified newsgroup will be searched for new articles. Newsgroup
names must be chosen from those returned in the listing of available
groups. Multiple newsgroup names (including a "*") may be specified
in this command, separated by a comma. No comma shall appear after
the last newsgroup in the list. [Implementors are cautioned to keep
the 512 character command length limit in mind.]
The exclamation point ("!") may be used to negate a match. This can
be used to selectively omit certain newsgroups from an otherwise
larger list. For example, a newsgroups specification of
"net.*,mod.*,!mod.map.*" would specify that all net.<anything> and
all mod.<anything> EXCEPT mod.map.<anything> newsgroup names would be
matched. If used, the exclamation point must appear as the first
character of the given newsgroup name or pattern.
The optional parameter "distributions" is a list of distribution
groups, enclosed in angle brackets. If specified, the distribution
portion of an article's newsgroup (e.g, 'net' in 'net.wombat') will
be examined for a match with the distribution categories listed, and
only those articles which have at least one newsgroup belonging to
Kantor & Lapsley [Page 16]
RFC 977 February 1986
Network News Transfer Protocol
the list of distributions will be listed. If more than one
distribution group is to be supplied, they must be separated by
commas within the angle brackets.
The use of the IHAVE, NEWNEWS, and NEWGROUPS commands to distribute
news is discussed in an earlier part of this document.
Please note that an empty list (i.e., the text body returned by this
command consists only of the terminating period) is a possible valid
response, and indicates that there is currently no new news.
3.8.2. Responses
230 list of new articles by message-id follows
3.9. The NEXT command
3.9.1. NEXT
NEXT
The internally maintained "current article pointer" is advanced to
the next article in the current newsgroup. If no more articles
remain in the current group, an error message is returned and the
current article remains selected.
The internally-maintained "current article pointer" is set by this
command.
A response indicating the current article number, and the message-id
string will be returned. No text is sent in response to this
command.
3.9.2. Responses
223 n a article retrieved - request text separately
(n = article number, a = unique article id)
412 no newsgroup selected
420 no current article has been selected
421 no next article in this group
Kantor & Lapsley [Page 17]
RFC 977 February 1986
Network News Transfer Protocol
3.10. The POST command
3.10.1. POST
POST
If posting is allowed, response code 340 is returned to indicate that
the article to be posted should be sent. Response code 440 indicates
that posting is prohibited for some installation-dependent reason.
If posting is permitted, the article should be presented in the
format specified by RFC850, and should include all required header
lines. After the article's header and body have been completely sent
by the client to the server, a further response code will be returned
to indicate success or failure of the posting attempt.
The text forming the header and body of the message to be posted
should be sent by the client using the conventions for text received
from the news server: A single period (".") on a line indicates the
end of the text, with lines starting with a period in the original
text having that period doubled during transmission.
No attempt shall be made by the server to filter characters, fold or
limit lines, or otherwise process incoming text. It is our intent
that the server just pass the incoming message to be posted to the
server installation's news posting software, which is separate from
this specification. See RFC850 for more details.
Since most installations will want the client news program to allow
the user to prepare his message using some sort of text editor, and
transmit it to the server for posting only after it is composed, the
client program should take note of the herald message that greeted it
when the connection was first established. This message indicates
whether postings from that client are permitted or not, and can be
used to caution the user that his access is read-only if that is the
case. This will prevent the user from wasting a good deal of time
composing a message only to find posting of the message was denied.
The method and determination of which clients and hosts may post is
installation dependent and is not covered by this specification.
3.10.2. Responses
240 article posted ok
340 send article to be posted. End with <CR-LF>.<CR-LF>
440 posting not allowed
441 posting failed
Kantor & Lapsley [Page 18]
RFC 977 February 1986
Network News Transfer Protocol
(for reference, one of the following codes will be sent upon initial
connection; the client program should determine whether posting is
generally permitted from these:) 200 server ready - posting allowed
201 server ready - no posting allowed
3.11. The QUIT command
3.11.1. QUIT
QUIT
The server process acknowledges the QUIT command and then closes 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 should gracefully cease its attempts
to service the client.
3.11.2. Responses
205 closing connection - goodbye!
3.12. The SLAVE command
3.12.1. SLAVE
SLAVE
Indicates to the server that this client connection is to a slave
server, rather than a user.
This command is intended for use in separating connections to single
users from those to subsidiary ("slave") servers. It may be used to
indicate that priority should therefore be given to requests from
this client, as it is presumably serving more than one person. It
might also be used to determine which connections to close when
system load levels are exceeded, perhaps giving preference to slave
servers. The actual use this command is put to is entirely
implementation dependent, and may vary from one host to another. In
NNTP servers which do not give priority to slave servers, this
command must nonetheless be recognized and acknowledged.
3.12.2. Responses
202 slave status noted
Kantor & Lapsley [Page 19]
RFC 977 February 1986
Network News Transfer Protocol
4. Sample Conversations
These are samples of the conversations that might be expected with
the news server in hypothetical sessions. The notation C: indicates
commands sent to the news server from the client program; S: indicate
responses received from the server by the client.
4.1. Example 1 - relative access with NEXT
S: (listens at TCP port 119)
C: (requests connection on TCP port 119)
S: 200 wombatvax news server ready - posting ok
(client asks for a current newsgroup list)
C: LIST
S: 215 list of newsgroups follows
S: net.wombats 00543 00501 y
S: net.unix-wizards 10125 10011 y
(more information here)
S: net.idiots 00100 00001 n
S: .
(client selects a newsgroup)
C: GROUP net.unix-wizards
S: 211 104 10011 10125 net.unix-wizards group selected
(there are 104 articles on file, from 10011 to 10125)
(client selects an article to read)
C: STAT 10110
S: 223 10110 <23445@sdcsvax.ARPA> article retrieved - statistics
only (article 10110 selected, its message-id is
<23445@sdcsvax.ARPA>)
(client examines the header)
C: HEAD
S: 221 10110 <23445@sdcsvax.ARPA> article retrieved - head
follows (text of the header appears here)
S: .
(client wants to see the text body of the article)
C: BODY
S: 222 10110 <23445@sdcsvax.ARPA> article retrieved - body
follows (body text here)
S: .
(client selects next article in group)
Kantor & Lapsley [Page 20]
RFC 977 February 1986
Network News Transfer Protocol
C: NEXT
S: 223 10113 <21495@nudebch.uucp> article retrieved - statistics
only (article 10113 was next in group)
(client finishes session)
C: QUIT
S: 205 goodbye.
4.2. Example 2 - absolute article access with ARTICLE
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?