🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #66908

New NNTP draft -- Section 6

#66908
From: Russ Allbery
Date: Tue, 21 Oct 2003 17:21
1011 lines
39137 bytes
[ See <http://www.davros.org/nntp-texts/draft20.txt> for the complete
  document, including credits and references.  This is the fourth in a
  series of postings of the sections of the new NNTP draft, which is
  currently in Last Call. ]


NNTP                                                          C. Feather
Internet-Draft                                                  Thus plc
Expires: April 15, 2004                                 October 16, 2003


6. Article posting and retrieval

   News reading clients have available a variety of mechanisms to
   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.
   Another key is composed of the newsgroup name and the article number
   within that newsgroup. That key MUST be unique to a particular server
   (there will be only one article with that number within a particular
   newsgroup), but is not required to be globally unique. Additionally,
   because the same article can be cross-posted to multiple newsgroups,
   there may be multiple keys that point to the same article on the same
   server. The final key is the arrival timestamp, giving the time that
   the article arrived at the server.

   The server MUST ensure that article numbers are issued in order of
   arrival timestamp; that is, articles arriving later MUST have higher
   numbers than those that arrive earlier. The server SHOULD allocate
   the next sequential unused number to each new article.

   Article numbers MUST lie between 1 and 4,294,967,295 inclusive. The
   client and server SHOULD NOT use leading zeroes in specifying article
   numbers, and MUST NOT use more than 16 digits. In some situations,
   the value zero replaces an article number to show some special
   situation.

6.1 Group and article selection

   The following commands are used to set the "current selected
   newsgroup" and the "current article number", which are used by
   various commands. At the start of an NNTP session, both of these
   values are set to the special value "invalid".

6.1.1 GROUP

6.1.1.1 Usage

   Syntax
      GROUP group

   Responses
      211 number low high group   Group successfully selected
      411                         No such newsgroup

   Parameters
      group  = name of newsgroup
      number = estimated number of articles in the group
      low    = reported low water mark
      high   = reported high water mark

6.1.1.2 Description

   The required argument is the name of the newsgroup to be selected
   (e.g. "news.software.b"). A list of valid newsgroups may be obtained
   by using the LIST ACTIVE command (see Section 7.6.1).

   The successful selection response will return the article numbers of
   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
   the "reported high water mark"), and an estimate of the number of
   articles in the group currently available.

   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
   than the difference between the reported low and high water marks.
   (Some implementations will actually count the number of articles
   currently stored. Others will just subtract the low water mark from
   the high water mark and add one to get an estimate.)

   If the group is empty, one of the following three situations will
   occur. Clients MUST accept all three cases; servers MUST NOT
   represent an empty group in any other way.

   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
      method to show an empty group. This is the only time that the high
      water mark can be less than the low water mark.

   o  All three numbers will be zero.

   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
      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
   carried out. That is:

   o  articles may be removed from the group

   o  articles may be reinstated in the group with the same article
      number, but those articles MUST have numbers no less than the
      reported low water mark (note that this is a reinstatement of the
      previous article, not a new article reusing the number)

   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
      highest number has been removed, the next new article will not
      have the number one greater than the reported high water mark)

   Except when the group is empty and all three numbers are zero,
   whenever a subsequent GROUP command for the same newsgroup is issued,
   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
   response for that newsgroup sent to any client. The client may make
   use of the low water mark to remove all remembered information about
   articles with lower numbers, as these will never recur. This includes
   the situation when the high water mark is one less than the low water
   mark. No similar assumption 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.

   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
   number MUST be set to the first article in the group. If an empty
   newsgroup is 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
   used by a client and a successful response received before any other
   command is used that depends on the value of the current selected
   newsgroup or current article number.

   If the group specified is not available on the server, a 411 response
   MUST be returned.

6.1.1.3 Examples

   Example for a group known to the server:

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test

   Example for a group unknown to the server:

      [C] GROUP   example.is.sob.bradner.or.barber
      [S] 411 example.is.sob.bradner.or.barber is unknown

   Example of an empty group using the preferred response:

      [C] GROUP   example.currently.empty.newsgroup
      [S] 211 0 4000 3999 example.currently.empty.newsgroup

   Example of an empty group using an alternative response:

      [C] GROUP   example.currently.empty.newsgroup
      [S] 211 0 0 0 example.currently.empty.newsgroup

   Example of an empty group using a different alternative response:

      [C] GROUP   example.currently.empty.newsgroup
      [S] 211 0 4000 4321 example.currently.empty.newsgroup


6.1.2 LAST

6.1.2.1 Usage

   Syntax
      LAST

   Responses
      223 n message-id   Article found
      412                No newsgroup selected
      420                Current article number is invalid
      422                No previous article in this group

   Parameters
      n          = article number
      message-id = article message-id

6.1.2.2 Description

   If the current selected newsgroup is valid, the current article
   number MUST be set to the previous article in that newsgroup (that
   is, the highest existing article number less than the current article
   number). If successful, a response indicating the new current article
   number and the message-id of that article MUST be returned. No
   article text is sent in response to this command.

   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
   a previous article when the current article number is the reported
   low water mark.

   Because articles can be removed and added, the results of multiple
   LAST and NEXT commands MAY not be consistent over the life of a
   particular NNTP session.

   If the current article number is already the first article of the
   newsgroup, a 422 response MUST be returned. If the current article
   number is invalid, a 420 response MUST be returned. If the current
   selected newsgroup is invalid, a 412 response MUST be returned. In
   all three cases the current selected newsgroup and current article
   number MUST NOT be altered.

6.1.2.3 Examples

   Example of a successful article retrieval using LAST:

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] NEXT
      [S] 223 3000237 <668929@example.org> retrieved
      [C] LAST
      [S] 223 3000234 <45223423@example.com> retrieved

   Example of an attempt to retrieve an article without having selected
   a group (via the GROUP command) first:

      [Assumes current selected newsgroup is invalid.]
      [C] LAST
      [S] 412 no newsgroup selected

   Example of an attempt to retrieve an article using the LAST command
   when the current article number is that of the first article in the
   group:

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] LAST
      [S] 422 No previous article to retrieve

   Example of an attempt to retrieve an article using the LAST command
   when the current selected newsgroup is empty:

      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] LAST
      [S] 420 No current article selected


6.1.3 NEXT

6.1.3.1 Usage

   Syntax
      NEXT

   Responses
      223 n message-id   Article found
      412                No newsgroup selected
      420                Current article number is invalid
      421                No next article in this group

   Parameters
      n          = article number
      message-id = article message-id

6.1.3.2 Description

   If the current selected newsgroup is valid, the current article
   number MUST be set to the next article in that newsgroup (that is,
   the lowest existing article number greater than the current article
   number). If successful, a response indicating the new current article
   number and the message-id of that article MUST be returned. No
   article text is sent in response to this command.

   If the current article number is already the last article of the
   newsgroup, a 421 response MUST be returned. In all other aspects
   (apart, of course, from the lack of 422 response) this command is
   identical to the LAST command (Section 6.1.2).

6.1.3.3 Examples

   Example of a successful article retrieval using NEXT:

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] NEXT
      [S] 223 3000237 <668929@example.org> retrieved

   Example of an attempt to retrieve an article without having selected
   a group (via the GROUP command) first:

      [Assumes current selected newsgroup is invalid.]
      [C] NEXT
      [S] 412 no newsgroup selected

   Example of an attempt to retrieve an article using the NEXT command
   when the current article number is that of the last article in the
   group:

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] STAT   3002322
      [S] 223 3002322 <411@example.net> retrieved
      [C] NEXT
      [S] 421 No next article to retrieve

   Example of an attempt to retrieve an article using the NEXT command
   when the current selected newsgroup is empty:

      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] NEXT
      [S] 420 No current article selected


6.2 Retrieval of articles and article sections

   The ARTICLE, BODY, HEAD, and STAT commands are very similar. They
   differ only in the parts of the article that are presented to the
   client and in the successful response code. The ARTICLE command is
   described here in full, while the other commands are described in
   terms of the differences. As specified in Section 3.4, an article
   consists of two parts: the article headers and the article body. When
   responding to one of these commands, the server MUST present the
   entire article or appropriate part and MUST NOT attempt to alter or
   translate it in any way.

6.2.1 ARTICLE

6.2.1.1 Usage

   Syntax
      ARTICLE message-id
      ARTICLE number
      ARTICLE

   Responses

      First form (message-id specified)
         220 0 message-id   Article follows (multiline)
         430                No article with that message-id

      Second form (article number specified)
         220 n message-id   Article follows (multiline)
         412                No newsgroup selected
         423                No articles in that range

      Third form (current article number used)
         220 n message-id   Article follows (multiline)
         412                No newsgroup selected
         420                Current article number is invalid

   Parameters
      number     = Requested article number
      n          = Returned article number
      message-id = Article message-id

6.2.1.2 Description

   The ARTICLE command selects an article based on the arguments and
   presents the entire article (that is, the headers, an empty line, and
   the body in that order). The command has three forms.

   In the first form, a message-id is specified and the server presents
   the article with that message-id. In this case, the server MUST NOT
   alter the current selected newsgroup or current article number. This
   is both to facilitate the presentation of articles that may be
   referenced within another article being read, and because of the
   semantic difficulties of determining the proper sequence and
   membership of an article that may have been crossposted to more than
   one newsgroup.

   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
   current selected newsgroup or what article number(s) it has).

   In the second form, an article number is specified. If there is an
   article with that number in the current selected newsgroup, the
   server MUST set the current article number to that number.

   In the third form, the article indicated by the current article
   number in the current selected newsgroup is used.

   Note that a previously valid article number MAY become invalid if the
   article has been removed. A previously invalid article number MAY
   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
   group.

   The server MUST NOT change the current selected newsgroup as a result
   of this command. The server MUST NOT change the current article
   number except when an article number argument was provided and the
   article exists; in particular, it MUST NOT change it following an
   unsuccessful response.

   Since the message-id is unique for each article, it may be used by a
   client to skip duplicate displays of articles that have been posted
   more than once, or to more than one newsgroup.

   The article is returned as a multi-line response following the 220
   response code.

   If the argument is a message-id and no such article exists, a 430
   response MUST be returned. If the argument is a number or is omitted
   and the current selected newsgroup is invalid, a 412 response MUST be
   returned. If the argument is a number and that article does not exist
   in the current selected newsgroup, a 423 response MUST be returned.
   If the argument is omitted and the current article number is invalid,
   a 420 response MUST be returned.

6.2.1.3 Examples

   Example of a successful retrieval of an article (using no article
   number):

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] ARTICLE
      [S] 220 3000234 <45223423@example.com>
      [S] Path: pathost!demo!whitehouse!not-for-mail
      [S] From: "Demo User" <nobody@example.net>
      [S] Newsgroups: misc.test
      [S] Subject: I am just a test article
      [S] Date: 6 Oct 1998 04:38:40 -0500
      [S] Organization: An Example Net, Uncertain, Texas
      [S] Message-ID: <411@example.net>
      [S]
      [S] This is just a test article.
      [S] .

   Example of a successful retrieval of an article by message-id:

      [C] ARTICLE   <45223423@example.com>
      [S] 220 0 <45223423@example.com>
      [S] Path: pathost!demo!whitehouse!not-for-mail
      [S] From: "Demo User" <nobody@example.net>
      [S] Newsgroups: misc.test
      [S] Subject: I am just a test article
      [S] Date: 6 Oct 1998 04:38:40 -0500
      [S] Organization: An Example Net, Uncertain, Texas
      [S] Message-ID: <411@example.net>
      [S]
      [S] This is just a test article.
      [S] .

   Example of an unsuccessful retrieval of an article by message-id:

      [C] ARTICLE   <i.am.not.there@example.com>
      [S] 430 No Such Article Found

   Example of an unsuccessful retrieval of an article by number:

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 news.groups
      [C] ARTICLE   300256
      [S] 423 No such article number in this group

   Example of an unsuccessful retrieval of an article by number because
   no newsgroup was selected first:

      [Assumes current selected newsgroup is invalid.]
      [C] ARTICLE   300256
      [S] 412 No newsgroup selected

   Example of an attempt to retrieve an article when the current
   selected newsgroup is empty:

      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] ARTICLE
      [S] 420 No current article selected


6.2.2 HEAD

6.2.2.1 Usage

   Syntax
      HEAD message-id
      HEAD number
      HEAD

   Responses

      First form (message-id specified)
         221 0 message-id   Headers follow (multiline)
         430                No article with that message-id

      Second form (article number specified)
         221 n message-id   Headers follow (multiline)
         412                No newsgroup selected
         423                No articles in that range

      Third form (current article number used)
         221 n message-id   Headers follow (multiline)
         412                No newsgroup selected
         420                Current article number is invalid

   Parameters
      number     = Requested article number
      n          = Returned article number
      message-id = Article message-id

6.2.2.2 Description

   The HEAD command behaves identically to the ARTICLE command except
   that, if the article exists, the response code is 221 instead of 220
   and only the headers are presented (the empty line separating the
   headers and body MUST NOT be included).

6.2.2.3 Examples

   Example of a successful retrieval of the headers of an article (using
   no article number):

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HEAD
      [S] 221 3000234 <45223423@example.com>
      [S] Path: pathost!demo!whitehouse!not-for-mail
      [S] From: "Demo User" <nobody@example.net>
      [S] Newsgroups: misc.test
      [S] Subject: I am just a test article
      [S] Date: 6 Oct 1998 04:38:40 -0500
      [S] Organization: An Example Net, Uncertain, Texas
      [S] Message-ID: <411@example.net>
      [S] .

   Example of a successful retrieval of the headers of an article by
   message-id:

      [C] HEAD   <45223423@example.com>
      [S] 221 0 <45223423@example.com>
      [S] Path: pathost!demo!whitehouse!not-for-mail
      [S] From: "Demo User" <nobody@example.net>
      [S] Newsgroups: misc.test
      [S] Subject: I am just a test article
      [S] Date: 6 Oct 1998 04:38:40 -0500
      [S] Organization: An Example Net, Uncertain, Texas
      [S] Message-ID: <411@example.net>
      [S] .

   Example of an unsuccessful retrieval of the headers of an article by
   message-id:

      [C] HEAD   <i.am.not.there@example.com>
      [S] 430 No Such Article Found

   Example of an unsuccessful retrieval of the headers of an article by
   number:

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] HEAD   300256
      [S] 423 No such article number in this group

   Example of an unsuccessful retrieval the headers of an article by
   number because no newsgroup was selected first:

      [Assumes current selected newsgroup is invalid.]
      [C] HEAD   300256
      [S] 412 No newsgroup selected

   Example of an attempt to retrieve the headers of an article when the
   current selected newsgroup is empty:

      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] HEAD
      [S] 420 No current article selected


6.2.3 BODY

6.2.3.1 Usage

   Syntax
      BODY message-id
      BODY number
      BODY

   Responses

      First form (message-id specified)
         222 0 message-id   Body follows (multiline)
         430                No article with that message-id

      Second form (article number specified)
         222 n message-id   Body follows (multiline)
         412                No newsgroup selected
         423                No articles in that range

      Third form (current article number used)
         222 n message-id   Body follows (multiline)
         412                No newsgroup selected
         420                Current article number is invalid

   Parameters
      number     = Requested article number
      n          = Returned article number
      message-id = Article message-id

6.2.3.2 Description

   The BODY command behaves identically to the ARTICLE command except
   that, if the article exists, the response code is 222 instead of 220
   and only the body is presented (the empty line separating the headers
   and body MUST NOT be included).

6.2.3.3 Examples

   Example of a successful retrieval of the body of an article (using no
   article number):

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] BODY
      [S] 222 3000234 <45223423@example.com>
      [S] This is just a test article.
      [S] .

   Example of a successful retrieval of the body of an article by
   message-id:

      [C] BODY   <45223423@example.com>
      [S] 222 0 <45223423@example.com>
      [S] This is just a test article.
      [S] .

   Example of an unsuccessful retrieval of the body of an article by
   message-id:

      [C] BODY   <i.am.not.there@example.com>
      [S] 430 No Such Article Found

   Example of an unsuccessful retrieval of the body of an article by
   number:

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] BODY   300256
      [S] 423 No such article number in this group

   Example of an unsuccessful retrieval of the body of an article by
   number because no newsgroup was selected first:

      [Assumes current selected newsgroup is invalid.]
      [C] BODY   300256
      [S] 412 No newsgroup selected

   Example of an attempt to retrieve the body of an article when the
   current selected newsgroup is empty:

      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] BODY
      [S] 420 No current article selected


6.2.4 STAT

6.2.4.1 Usage

   Syntax
      STAT message-id
      STAT number
      STAT

   Responses

      First form (message-id specified)
         223 0 message-id   Article exists
         430                No article with that message-id

      Second form (article number specified)
         223 n message-id   Article exists
         412                No newsgroup selected
         423                No articles in that range

      Third form (current article number used)
         223 n message-id   Article exists
         412                No newsgroup selected
         420                Current article number is invalid

   Parameters
      number     = Requested article number
      n          = Returned article number
      message-id = Article message-id

6.2.4.2 Description

   The STAT command behaves identically to the ARTICLE command except
   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
   NOT multi-line.

   This command allows the client to determine whether an article
   exists, and in the second and third forms what its message-id is,
   without having to process an arbitrary amount of text.

6.2.4.3 Examples

   Example of STAT on an existing article (using no article number):

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] STAT
      [S] 223 3000234 <45223423@example.com>

   Example of a STAT of an existing article by message-id:

      [C] STAT   <45223423@example.com>
      [S] 223 0 <45223423@example.com>

   Example of an STAT of an article not on the server by message-id:

      [C] STAT   <i.am.not.there@example.com>
      [S] 430 No Such Article Found

   Example of STAT of an article not in the server by number:

      [C] GROUP   misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] STAT   300256
      [S] 423 No such article number in this group

   Example of STAT of an article by number when no newsgroup was
   selected first:

      [Assumes current selected newsgroup is invalid.]
      [C] STAT   300256
      [S] 412 No newsgroup selected

   Example of STAT of an article when the current selected newsgroup is
   empty:

      [C] GROUP   example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] STAT
      [S] 420 No current article selected


6.3 Article posting

   Article posting is done in one of two modes: individual article
   posting from news reading clients using POST, and article transfer
   from other news servers using IHAVE.

6.3.1 POST

6.3.1.1 Usage

   This command MUST NOT be pipelined.

   Syntax
      POST

   Responses

      Initial responses
         340   Send article to be posted
         440   Posting not permitted

      Subsequent responses
         240   Article received OK
         441   Posting failed


6.3.1.2 Description

   If posting is allowed, a 340 response MUST be returned to indicate
   that the article to be posted should be sent. If posting is
   prohibited for some installation-dependent reason, a 440 response
   MUST be returned.

   If posting is permitted, the article MUST be in the format specified
   in Section 3.4 and MUST be sent by the client to the server in the
   manner specified in (Section 3.1) for multi-line responses (except
   that there is no initial line containing a response code). Thus a
   single dot (".") on a line indicates the end of the text, and lines
   starting with a dot in the original text have that dot doubled during
   transmission.

   Following the presentation of the termination sequence by the client,
   the server MUST return a response indicating success or failure of
   the article transfer. Note that response codes 340 and 440 are used
   in direct response to the POST command. Others are returned following
   the sending of the article.

   A response of 240 SHOULD indicate that, barring unforseen server
   errors, the posted article will be made available on the server and/
   or transferred to other servers as appropriate, possibly following
   further processing. In other words, articles not wanted by the server
   SHOULD be rejected with a 441 response and not accepted and silently
   discarded. However, the client SHOULD NOT assume that the article has
   been successfully transferred unless it receives an affirmative
   response from the server, and SHOULD NOT assume that it is being made
   available to other clients without explicitly checking (for example
   using the STAT command).

   If the session is interrupted before the response is received, it is
   possible that an affirmative response was sent but has been lost.
   Therefore, in any subsequent session, the client SHOULD either check
   whether the article was successfully posted before resending or
   ensure that the server will allocate the same message-id to the new
   attempt (see Appendix B.2) - 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).

6.3.1.3 Examples

   Example of a successful posting:

      [C] POST
      [S] 340 Input article; end with <CR-LF>.<CR-LF>
      [C] From: "Demo User" <nobody@example.net>
      [C] Newsgroups: misc.test
      [C] Subject: I am just a test article
      [C] Organization: An Example Net
      [C]
      [C] This is just a test article.
      [C] .
      [S] 240 Article received OK

   Example of an unsuccessful posting:

      [C] POST
      [S] 340 Input article; end with <CR-LF>.<CR-LF>
      [C] From: "Demo User" <nobody@example.net>
      [C] Newsgroups: misc.test
      [C] Subject: I am just a test article
      [C] Organization: An Example Net
      [C]
      [C] This is just a test article.
      [C] .
      [S] 441 Posting failed

   Example of an attempt to post when posting is not allowed:

      [C] MODE READER
      [S] 201 NNTP Service Ready, posting prohibited
      [C] POST
      [S] 440 Posting not permitted


6.3.2 IHAVE

6.3.2.1 Usage

   This command MUST NOT be pipelined.

   Syntax
      IHAVE message-id

   Responses

      Initial responses
         335   Send article to be transferred
         435   Article not wanted
         436   Transfer not possible; try again later

      Subsequent responses
         235   Article transferred OK
         436   Transfer failed; try again later
         437   Transfer rejected; do not retry

   Parameters
      message-id = Article message-id


6.3.2.2 Description

   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
   article a 335 response MUST be returned, instructing the client to
   send the entire article. If the server does not want the article (if,
   for example, the server already has a copy of it), a 435 response
   MUST be returned, indicating that the article is not wanted. Finally,
   if the article isn't wanted immediately but the client should retry
   later if possible (if, for example, another client is in the process
   of sending the same article to the server), a 436 response MUST be
   returned.

   If transmission of the article is requested, the client MUST send the
   entire article, including headers and body, in the format defined
   above (Section 3.1) for multi-line responses (except that there is no
   initial line containing a response code). Thus a single dot (".") on
   a line indicates the end of the text, and lines starting with a dot
   in the original text have that dot doubled during transmission. The
   server MUST return either a 235 response, indicating that the article
   was successfully transferred, a 436 response, indicating that the
   transfer failed but should be tried again later, or a 437 response,
   indicating that the article was rejected.

   This function differs from the POST command in that it is intended
   for use in transferring already-posted articles between hosts. It
   SHOULD NOT be used when the client is a personal news reading
   program, since use of this command indicates that the article has
   already been posted at another site and is simply being forwarded
   from another host. However, despite this, the server MAY elect not to
   post or forward the article if, after further examination of the
   article, it deems it inappropriate to do so. Reasons for such
   subsequent rejection of an article may include such problems as
   inappropriate newsgroups or distributions, disc space limitations,
   article lengths, garbled headers, and the like. These are typically
   restrictions enforced by the server host's news software and not
   necessarily the NNTP server itself.

   The client SHOULD NOT assume that the article has been successfully
   transferred unless it receives an affirmative response from the
   server. A lack of response (such as a dropped network connection or a
   network timeout) SHOULD be treated the same as a 436 response.

   Because some news server software may not be able immediately to
   determine whether or not an article is suitable for posting or
   forwarding, an NNTP server MAY acknowledge the successful transfer of
   the article (with a 235 response) but later silently discard it.

6.3.2.3 Examples

   Example of successfully sending an article to another site:

      [C] IHAVE   <i.am.an.article.you.will.want@example.com>
      [S] 335 Send it; end with <CR-LF>.<CR-LF>
      [C] Path: pathost!demo!somewhere!not-for-mail
      [C] From: "Demo User" <nobody@example.com>
      [C] Newsgroups: misc.test
      [C] Subject: I am just a test article
      [C] Date: 6 Oct 1998 04:38:40 -0500
      [C] Organization: An Example Com, San Jose, CA
      [C] Message-ID: <i.am.an.article.you.will.want@example.com>
      [C]
      [C] This is just a test article.
      [C] .
      [S] 235 Article transferred OK

   Example of sending an article to another site that rejects it. Note
   that the message-id in the IHAVE command is not the same as the one
   in the article headers; while this is bad practice and SHOULD NOT be
   done, it is not forbidden.

      [C] IHAVE   <i.am.an.article.you.will.want@example.com>
      [S] 335 Send it; end with <CR-LF>.<CR-LF>
      [C] Path: pathost!demo!somewhere!not-for-mail
      [C] From: "Demo User" <nobody@example.com>
      [C] Newsgroups: misc.test
      [C] Subject: I am just a test article
      [C] Date: 6 Oct 1998 04:38:40 -0500
      [C] Organization: An Example Com, San Jose, CA
      [C] Message-ID: <i.am.an.article.you.have@example.com>
      [C]
      [C] This is just a test article.
      [C] .
      [S] 437 Article rejected; don't send again

   Example of sending an article to another site where the transfer
   fails:

      [C] IHAVE   <i.am.an.article.you.will.want@example.com>
      [S] 335 Send it; end with <CR-LF>.<CR-LF>
      [C] Path: pathost!demo!somewhere!not-for-mail
      [C] From: "Demo User" <nobody@example.com>
      [C] Newsgroups: misc.test
      [C] Subject: I am just a test article
      [C] Date: 6 Oct 1998 04:38:40 -0500
      [C] Organization: An Example Com, San Jose, CA
      [C] Message-ID: <i.am.an.article.you.will.want@example.com>
      [C]
      [C] This is just a test article.
      [C] .
      [S] 436 Transfer failed

   Example of sending an article to a site that already has it:

      [C] IHAVE   <i.am.an.article.you.have@example.com>
      [S] 435 Duplicate

   Example of sending an article to a site that requests the article be
   tried again later:

      [C] IHAVE   <i.am.an.article.you.defer@example.com>
      [S] 436 Retry later


Full Copyright Statement

   Copyright (C) The Internet Society (2003). All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works. However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assignees.

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
   BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
   HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <873cdm8q1l.fsf_-_@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
References: <87fzhryxdc.fsf@windlord.stanford.edu> <871xta1bbb.fsf@windlord.stanford.edu> <874qy3hnhl.fsf_-_@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <873cdm8q1l.fsf_-_@windlord.stanford.edu>
Subject: New NNTP draft -- Section 6
Date: Tue, 21 Oct 2003 10:21:42 -0700
From: Russ Allbery <rra@stanford.edu>
References: <87fzhryxdc.fsf@windlord.stanford.edu> <871xta1bbb.fsf@windlord.stanford.edu> <874qy3hnhl.fsf_-_@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!news5.aus1.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!newsfeed1.easynews.com!easynews.com!easynews!elnk-pas-nf1!elnk-nf2-pas!newsfeed.earthlink.net!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 1011
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 1066756904 11578 171.64.19.147 (21 Oct 2003
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.1002 (Gnus v5.10.2) XEmacs/21.4 (Common Lisp, linux)
Cancel-Lock: sha1:nawXtXTeYx5E3X9BWYTTsShqxL0=