Article View: news.software.nntp
Article #54972Re: Article numbering and handling article number rollover
From: Howard Siegel
Date: Mon, 05 Nov 2001 07:08
Date: Mon, 05 Nov 2001 07:08
71 lines
4650 bytes
4650 bytes
jim@crowfam.org.uk writes: > In message <9rj5nq$br$1@news.panix.com>, Howard Siegel > >Well, for the time being, I'll use NEWNEWS as it does seem to be > >supported and working with our current NNTP server. When we have to > >move on to another NNTP server, if it does not support NEWNEWS, my > >program will stop working and I'll have to revamp it then. But I don't > >expect that to happen for a decent amount of time (at least 6 months or > >a year). > > Let us know how you get on. :) Guess it's time to lay my cards on the table..... The application is a News to Mail gateway and the implementation platform is an Alpha running VMS. We have a conferencing system in DEC/Notes to which we post selected articles from News. The articles were originally being forward via mail from an old "C" news system and the infrastructure was already in place to handle the automated conversion from mail to the Notes system. However, the old Unix system we were using was becoming flakey and was decommisioned when our Alpha was moved to a new facility. Since the new facility was donating space, power, cooling, net connectivity, etc., it didn't seem right to impose on them any more. Plus, we have no budget to buy any new h/w to put up our own news server, nor the desire to install or manage one even if the h/w was donated. The Alpha/VMS host system has plenty of cycles to spare and we already have access to the News server via the host facility. I could have grabbed a variety of programs off the net to do the News to Mail gateway, but they were pretty much all overkill for what we needed or would have required work to make them buildable/runnable on VMS. Instead I opted to build a new, minimalist, news to mail gateway NNTP client program in perl using an existing NNTP interface package to connect to the news server. The perl program I wrote is about 100 lines long. This includes newsrc file maintenance and a decent amount of error checking (I always write pretty defensive code). The newsrc file consists of the group name and the gmt time at which it was last read. I do a NEWNEWS command using that time, set the last read time to the time immediately following the NEWNEWS command, then process the list of message id's, grabbing each article, writing it to a file, and e-mailing said file in to the account from which it is posted to the Notes conference. I keep the message id's so that as I process each news group, if the article was cross posted, the message id will already have been seen and I won't reprocess the article (though I do not keep the message id list between runs). And, no article numbers to worry about! Right now the process is manual (I run the perl program from the command line every now and then), and it has been in use now for a bit more than a week with no problems. Eventually, after I tweak the perl program a little bit more, I will wrap the it in a DCL command procedure that will run as a batch job which will resubmit itself every few hours, and send me e-mail when something goes wrong. So, I may have reinvented the wheel here, but it was a very small wheel and I learned a bunch of perl in the process. And the result has a lot fewer moving parts than if we put up a new news server or used some of the other software available from the nets. - howard -- -- Netcom Class of '93, RIP Netcom! <*> hsiegel<->at<->pobox<->dot<->com
Technical Details
Message-ID:
<9s5dtq$sns$1@news.panix.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!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news-peer.gip.net!news.gsl.net!gip.net!panix!news.panix.com!not-for-mailReferences:
<9r5agg$7ma$1@news.panix.com> <20011027143410.031$2l@newsreader.com> <9rj5nq$br$1@news.panix.com> <illnU1B5lT37EALM@crowfam.org.uk>Show Full Headers
Complete Article Headers
Message-ID: <9s5dtq$sns$1@news.panix.com> Subject: Re: Article numbering and handling article number rollover Date: Mon, 05 Nov 2001 07:08:42 +0000 From: Howard Siegel <not.interested@nospam.invalid> References: <9r5agg$7ma$1@news.panix.com> <20011027143410.031$2l@newsreader.com> <9rj5nq$br$1@news.panix.com> <illnU1B5lT37EALM@crowfam.org.uk> 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!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news-peer.gip.net!news.gsl.net!gip.net!panix!news.panix.com!not-for-mail Newsgroups: news.software.readers,news.software.nntp Organization: Gallifrey Beach Club Lines: 70 Distribution: inet Reply-To: not.interested@nospam.invalid NNTP-Posting-Host: panix3.panix.com X-Trace: news.panix.com 1004944122 29436 166.84.1.3 (5 Nov 2001 07:08:42 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: 5 Nov 2001 07:08:42 GMT X-Newsreader: trn 4.0-test74 (May 26, 2000)