Article View: news.software.nntp
Article #22972Re: Getting Article number from message ID?
From: Forrest J. Cavalier III
Date: Wed, 05 Nov 1997 00:00
Date: Wed, 05 Nov 1997 00:00
86 lines
3701 bytes
3701 bytes
In article <63or49$t28$1@earth.execpc.com>, jgreco@ns.sol.net wrote...
>
>In news.software.nntp article <63nje1$h8i$1@news1.epix.net>, mibsoft@epix.net
(Forrest J. Cavalier III) wrote:
>:In article <345F4BF8.6AD709E2@bbnplanet.com>, cosborn@bbnplanet.com wrote...
>:>I have been looking for an NNTP command to get the Article number given
>:>the message ID.
>:>The head command works fine going from article to message ID.
>:>
>:>Please respond by email.
>:
>:RFC 977 3.1 Read it at:
>: http://www.mibsoftware.com/userkt/nntp/0013.htm
>:
>:Is it possible whatever server you are contacting is not
>:implementing the fetch by ID, or it implements only a subset
>:of the NNTP protocol. For example even the innd part of INN
>:disables ARTICLE, and other commands.
>
>Forrest, you failed to read the question.
>
Guilty as charged. I took it up in e-mail. Not the first
or only time I read too fast. My apologies.
>The answer is: there is no standard way to do this, although you
>may be able to guess the answer given the Xref: information that
>may be supplied by HEAD on some implementations, some of the time.
>
>Why? Because a Message-ID does not map to a single article number.
>It may map to numerous article numbers in various groups.
True.
Here is the whole (well, at least more complete) story for INN 1.5.1
and later. I've not inspected the 1.4 sources, but guess they are
similar.)
1. The standard reply to the STAT NNTP command as per RFC977
(Read it at
http://www.mibsoftware.com/userkt/nntp/0013.htm
)
is:
223 n <a> article retrieved - request text separately
Where n is the article number, and <a> is the message ID.
2. Big caveat: sometimes n will be 0. And that was the
flaw in my advice to the original poster.
In INN 1.5.1, n will be filled in if and only if (all must
be true)
A. There is a current group.
B. The message was posted to the current group.
C. The current group is the first one mentioned in
the history file entry. (Usually this means it was
first on the newsgroups line.)
(I suppose if you were using Clayton's timespool
or CNFS for example, you wouldn't get an N returned either,
because the history entries are changed, am I right?)
The original poster was accessing a Netscape server, which
could do something totally different also.
I never did find out what the original poster was trying
to do, exactly. There is a way to get a list of all the
message ID's in a group, which could be used to map from
one to the other externally. Maybe this would have worked
too.
The original poster was not aware of the Xref header, which
could mean that the server being used did not generate one.
If you had access to the code, it wouldn't be hard to patch
article.c::ARTopenbyid() to pull out the article number even
if the current group were NOT the first entry in the
history file. I wonder why this was not done now. Anyone
have any idea why you would NOT want to do that?
Forrest Cavalier, Mib Software
Technical Details
Message-ID:
<63pur9$p8b$1@news1.epix.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<345F4BF8.6AD709E2@bbnplanet.com> <63nje1$h8i$1@news1.epix.net> <63or49$t28$1@earth.execpc.com>Show Full Headers
Complete Article Headers
Message-ID: <63pur9$p8b$1@news1.epix.net> Subject: Re: Getting Article number from message ID? Date: Wed, 05 Nov 1997 00:00:00 +0000 From: mibsoft@epix.net (Forrest J. Cavalier III) References: <345F4BF8.6AD709E2@bbnplanet.com> <63nje1$h8i$1@news1.epix.net> <63or49$t28$1@earth.execpc.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 287187152 Organization: Mib Software Newsgroups: news.software.nntp