Article View: news.software.nntp
Article #85446Re: NNTP API (Java)
From: Whiskers
Date: Mon, 18 Feb 2013 17:58
Date: Mon, 18 Feb 2013 17:58
62 lines
3940 bytes
3940 bytes
On 2013-02-16, Thufir Hawat <hawat.thufir@gmail.com> wrote: > I'm not quite understanding the NNTP protocol as it relates to article > numbers upstream and downstream. I'm using Java at the moment. > > Using the GNU NNTP API: > > http://www.gnu.org/software/classpathx/javamail/ [...] > My concern is that the "id" isn't reliable: > > "Note that the message number for a particular Message can change during > a session if other messages in the Folder are deleted and expunged." > > http://docs.oracle.com/javaee/6/api/javax/mail/ > Message.html#getMessageNumber%28%29 > > which is what the GNU is basing their NNTP client upon. I suppose it's > not the message number for a message which has been downloaded already, > it's the message number on the "server" upstream which matters!? > > > thanks, > > Thufir NNTP has no concept of "folder" or "NNTPStore"; these seem to be local terms used within the JavaMail software you're using (and about which I know nothing). "Message number" seems to relate only to the items stored within a "folder" created by or for JavaMail. Newsgroup articles are identified in two ways. The Message-ID (or MID) is unique to each article, and should be generated in a form that complies with the NNTP and Usenet RFCs. Look at the Message-ID and References headers in the articles in this newsgroup to see what they look like. The article number is local to each news-server or news spool, and for each newsgroup carried. When a server or spool gets a new article (identified ny the Message-ID header), it is added to the spool for the newsgroup concerned with the next available local article number. Such local article numbers are almost never re-used. The exception is when an administrator decides to delete all the articles currently stored and start again from "article 1"; this might be to overcome a corrupted file system or database, or to avoid difficulties with software that can only handle article numbers below a certain size. Look at the Xref headers from your news-server to see what article numbers look like. Newsgroup clients usually keep track of which articles have been fetched from the upstream server simply by recording that server's article number for the article 'seen' most recently in each newsgroup. This record may take the form of a file for the upstream server concerned: eg slrn creates a file such as ~/.jnewsrc in the user's home directory; Leafnode creates a file such as /var/spool/news/leaf.node/news.individual.net for an upstream account with Individual.net. -- -- ^^^^^^^^^^ -- Whiskers -- ~~~~~~~~~~
Technical Details
Message-ID:
<slrnki4qth.15v.catwheezel@ID-107770.user.individual.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.20141118.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mailReferences:
<j204v9-5j2.ln1@dur.bounceme.net>Show Full Headers
Complete Article Headers
Message-ID: <slrnki4qth.15v.catwheezel@ID-107770.user.individual.net> Subject: Re: NNTP API (Java) Date: Mon, 18 Feb 2013 17:58:09 +0000 From: Whiskers <catwheezel@operamail.com> References: <j204v9-5j2.ln1@dur.bounceme.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.20141118.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Newsgroups: news.software.nntp Organization: is an alien concept Lines: 62 X-Trace: individual.net 4tYMocRk2me90H1kpnU3aQhNJbCvnt7n/UUEfOAaW8rXbCAKFBFzrrrCVIkROjaerx X-Orig-Path: tavy.mobile.private!not-for-mail Cancel-Lock: sha1:NvsG5Ffj35YLaQfxJOLCcapdkCk= X-Face: (8UIp\C%, 7b>N'Aa}l7v*-4z\fb2ab=[r*LKrwTU]>W\E]YS3Cb3mZo1Ty.t2%6_KsTV_ "Pmt)1xC~QW%bU/xrlDuux"; aJOH0|Ka^MEDf"9Ck?FcYcR)aI~e[\"NW,mpyK}Q6dU[\BmvwRD00 xYer]; 5mR_!\-haGb/=!*bDWCm0~!G7ewqq7*|#g2#uEBhnKk60qLJ":i_#zfZ'cH`2a^!q_lzxh@ p& g^8<z5>HA User-Agent: slrn/1.0.1 (Linux) X-Original-Bytes: 3674