INN Stat command can not get article number

Julien ÉLIE julien at
Thu Oct 29 07:31:22 UTC 2009

Hi Zhenyu,

> We found a problem about INN 2.5.0 Stat command.
> This command can't show article number when using message id to get article number.
> ==============================
> group trash
> 211 69 46 114 trash
> stat 69
> 223 69 <hbrdfo$be1$1 at> status
> stat <hbrdfo$be1$1 at>
> 223 0 <hbrdfo$be1$1 at> status
> =================================
> Here article number is zero.

That's normal and RFC-compliant.  Note that RFC 3977 is the current one!

   First form (message-id specified)
     223 0|n 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 article with that number

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

   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 currently 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 cross-posted to more than
   one newsgroup.

   In the response, the article number MUST be replaced with zero,
   unless there is a currently selected newsgroup and the article is
   present in that group, in which case the server MAY use the article's
   number in that group.  (The server is not required to determine
   whether the article is in the currently selected newsgroup or, if so,
   what article number it has; the client MUST always be prepared for
   zero to be specified.)  The server MUST NOT provide an article number
   unless use of that number in a second [STAT] command immediately
   following this one would return the same article.  Even if the server
   chooses to return article numbers in these circumstances, it need not
   do so consistently; it MAY return zero to any such command.

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

      [C] STAT <45223423 at>
      [S] 223 0 <45223423 at>

      [C] GROUP misc.test
      [S] 211 1234 3000234 3002322 misc.test
      [C] STAT
      [S] 223 3000234 <45223423 at>
      [C] STAT <45223423 at>
      [S] 223 0 <45223423 at>
      [C] STAT <45223423 at>
      [S] 223 3000234 <45223423 at>
      [C] GROUP example.empty.newsgroup
      [S] 211 0 0 0 example.empty.newsgroup
      [C] STAT <45223423 at>
      [S] 223 0 <45223423 at>
      [C] GROUP alt.crossposts
      [S] 211 9999 111111 222222 alt.crossposts
      [C] STAT <45223423 at>
      [S] 223 123456 <45223423 at>
      [C] STAT
      [S] 223 111111 <23894720 at>

   The first STAT command establishes the identity of an article in the
   group.  The second and third show that the server may, but need not,
   give the article number when the message-id is specified.  The fourth
   STAT command shows that zero must be specified if the article isn't
   in the currently selected newsgroup.  The fifth shows that the
   number, if provided, must be that relating to the currently selected
   newsgroup.  The last one shows that the current article number is
   still not changed by the use of STAT with a message-id even if it
   returns an article number.

> It's not compliance with RFC
> ===========================================================
> Responses should be
>   220 n <a> article retrieved - head and body follow
>           (n = article number, <a> = message-id)
>   221 n <a> article retrieved - head follows
>   222 n <a> article retrieved - body follows
>   223 n <a> article retrieved - request text separately
> ===========================================================

RFC 977 is obsolete and wrong.  In RFC 977, even the sample is wrong:

   (client asks for article <1772 at foo.UUCP>)
   C:      ARTICLE <1772 at foo.UUCP>
   S:      220 <1772 at foo.UUCP> All of article follows
   S:      (sends entire message)
   S:      .

You do not have the article number!

> Is there any command get article number from specific message id?

No.  INN does not give the article number.

Julien ÉLIE

« Dans la vie il faut savoir compter, mais pas sur les autres. »
  (Paul-Jean Toulet) 

More information about the inn-workers mailing list