🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
11 messages
11 total messages Started by David Simmons Tue, 15 Nov 1994 01:03
Accessing multiple nntp servers
#12648
Author: David Simmons
Date: Tue, 15 Nov 1994 01:03
29 lines
2255 bytes
Is there an elegant way to use two nntp servers for a site; one for local
newsgroups, and one for USENET newsgroups?  I administrate a system for a
local high school, and would like to implement local newsgroups as a
replacement for the primitive bbs system they have now.  However, they use a
nearby university's nntp server for their mainstream news.  Spooling all
their news locally is definately not an option, due to the limited bandwidth
of their link and lack of disk space, and creating local newsgroups on the
university's server is not an option for political reasons.

The trouble with using some scheme of changing the NNTPSERVER variable as
needed is that the .newsrc could be potentially corrupted with every change.
I've thought about getting the source for a popular newsreader such as 'tin',
and making modifications to hard-code the new local nntp sever and force it
to use a .bbsrc file instead of a .newsrc file, eliminating the possibility
of corruption.  The problem with that is that it keeps people from using the
newsreader of their choice.  I suppose I could make modifications to all the
major newsreaders, but I figured I would present my dilemma to the
experienced news admins.

Any enlightenment or discussion is appreciated. :)

David

-- 
David Simmons, System Administrator                 simmons@ee.msstate.edu
Mississippi State University Electrical and Computer Engineering
Visit my home page!  http://www.ee.msstate.edu/~simmons

Re: Accessing multiple nntp servers
#12681
Author: William Bardwell
Date: Tue, 15 Nov 1994 18:51
17 lines
1435 bytes
In article <3a2dfk$478@Tut.MsState.Edu>,
David Simmons <simmons@EE.MsState.Edu> wrote:
>Is there an elegant way to use two nntp servers for a site; one for local
>newsgroups, and one for USENET newsgroups?
Yes...there is...
check out the software used here (CS Dept at CMU), which I wrote...
It acts as an nntp server which will talk to an arbitrary number or real news
servers...(it figures out where it can get which groups, and forwards
commands to the right server...)
ftp to ftp.cs.cmu.edu and look in misc/dnntpd
(there are readme's and such in the src tar.Z file...)

-- 
William Bardwell
wbardwel+@[cs.]cmu.edu

Re: Accessing multiple nntp servers
#12683
Author: bill davidsen
Date: Tue, 15 Nov 1994 18:53
60 lines
2956 bytes
In article <3a2dfk$478@Tut.MsState.Edu>,
David Simmons <simmons@EE.MsState.Edu> wrote:
| Is there an elegant way to use two nntp servers for a site; one for local
| newsgroups, and one for USENET newsgroups?  I administrate a system for a
| local high school, and would like to implement local newsgroups as a
| replacement for the primitive bbs system they have now.  However, they use a
| nearby university's nntp server for their mainstream news.  Spooling all
| their news locally is definately not an option, due to the limited bandwidth
| of their link and lack of disk space, and creating local newsgroups on the
| university's server is not an option for political reasons.

Two answers to this one. One, since I change servers all the time to
check on various machines, here's a ksh macro to preserve the info you
want and switch between the servers:

function Server
{
  # list of files to save/restore
  newsfiles=".newsrc .rn*"
  # sanity check
  if [ -z "$1" ]; then
    if [ -f ~/.server ]; then
      export NNTPSERVER=$(<~/.server)
      echo "Server set to ${NNTPSERVER}"
      zip -u ~/NN/${NNTPSERVER} ${newsfiles}
      return 0
    else
      echo "No server defined"
      return 1
    fi
  fi
  if [ -f ~/.server ]; then
    server=$(<~/.server)
  else
    server=current
  fi
  # save the current news files
  (cd; zip -u NN/${server} ${newsfiles})
  # restore the new files and set the .server file
  (cd; unzip -o NN/${1} || rm ${newsfiles})
  echo $1 > ~/.server
  export NNTPSERVER=${1}
}

The set the NNTPSERVER to the last thing you used (after loggin out)
you just say Server. To change to another server you say "Server name."
To start a new server you save the current files with 'Server', then
(manually, unfortunately) delete the news files and set NNTPSERVER the
first time.

Another solution for the multiple server problem should be release in a
few weeks, unless INN 1.5 comes out first and I forget anything based on
1.4. The beta sites report no problems.

-- 
Bill Davidsen (davidsen@tmr.com) UNIX Codger
	Will solve problems for money.
Stupidity, like virtue, is its own reward.

Re: Accessing multiple nntp servers
#12720
Author: Chris Lewis
Date: Wed, 16 Nov 1994 19:57
35 lines
2101 bytes
In article <3aar6q$736@usenety1.news.prodigy.com>,
bill davidsen <davidsen@prodigy.com> wrote:
>In article <3a2dfk$478@Tut.MsState.Edu>,
>David Simmons <simmons@EE.MsState.Edu> wrote:
>| Is there an elegant way to use two nntp servers for a site; one for local
>| newsgroups, and one for USENET newsgroups?

>Two answers to this one. One, since I change servers all the time to
>check on various machines, here's a ksh macro to preserve the info you
>want and switch between the servers:

I have something a little simpler, a shell script like this, omitting
the error checking:

    NNTPSERVER=$1
    if [ ! -d $HOME/News/$NNTPSERVER ]
    then
	mkdir $HOME/News/$NNTPSERVER
    fi
    HOME=$HOME/News/$NNTPSERVER
    export HOME NNTPSERVER
    <insert your newsreader here>

Changing HOME like this is, of course, dangerous for nested stuff.  However,
not all newsreaders give you the opportunity to set .newsrc file names (etc)
without then clashing in some other way.

This one is more-or-less guaranteed to work with minimal manual intervention.
-- 
Chris Lewis: _Una confibula non sat est_
Phone: Canada 613 832-0541  Ferret list: ferret-request@ferret.ocunix.on.ca
Latest psroff: FTP://ftp.uunet.ca/distrib/chris_lewis/psroff3.0pl17/*
Latest hp2pbm: FTP://ftp.uunet.ca/distrib/chris_lewis/hp2pbm/*

Re: Accessing multiple nntp servers
#12719
Author: Michael O'Reilly
Date: Wed, 16 Nov 1994 19:58
22 lines
1585 bytes
David Simmons (simmons@EE.MsState.Edu) wrote:
: Is there an elegant way to use two nntp servers for a site; one for local
: newsgroups, and one for USENET newsgroups?

Proxy NNTP. :)

I belive I saw a perl script around that was a 'caching' server. It didn't
actually get feed news, it just handled NNTP connection, and walked over the
another server for any news it was asked for that it didn't have.

Should be nice and easy to extend to asking the relevent server.

Easy. Assuming your a perl hacker with lots of spare time. :)

Michael.
-- 
Michael O'Reilly @ iiNet Technologies, Internet Service providers.
Voice (09) 307 1183, Fax (09) 307 8414. Email michael@iinet.com.au
GCS d? au- a- v* c++ UL++++ L+++ E po--(+) b+++ D++ h* r++ u+
	 e+ m+ s+++/--- !n h-- f? g+ w t-- y+ 

Re: Accessing multiple nntp servers
#12723
Author: Steven King, Software Archaeolog...
Date: Wed, 16 Nov 1994 20:01
54 lines
2825 bytes
simmons@EE.MsState.Edu publicly declared:

>Is there an elegant way to use two nntp servers for a site; one for
>local newsgroups, and one for USENET newsgroups?  I administrate a
>system for a local high school, and would like to implement local
>newsgroups as a replacement for the primitive bbs system they have
>now.  However, they use a nearby university's nntp server for their
>mainstream news.  Spooling all their news locally is definately not an
>option, due to the limited bandwidth of their link and lack of disk
>space, and creating local newsgroups on the university's server is not
>an option for political reasons.

Simply create a wrapper script to link the proper .*rc file to .newsrc,
then call the newsreader of choice.  Here, try this perl script:

    #! /bin/perl

    $localhost  = "news.my.site.edu";
    $nntpserver = $ARGV[0] || $ENV{'NNTPSERVER'} || $localhost;
    $ENV{'NNTPSERVER'} = $nntpserver;

    $newsreader = "$ENV{'NEWSREADER'}";
    $newsrc     = "$ENV{'HOME'}/.newsrc";
    $localrc    = "$ENV{'HOME'}/.localrc";
    $remoterc   = "$ENV{'HOME'}/.remoterc";

    unlink($newsrc);

    if ($nntpserver eq $localhost) {
      symlink($newsrc,$localrc);
    }
    else {
      symlink($newsrc,$remoterc);
    }

    exec($newsreader);

This is a little ditty I ran off in about 2 minutes.  It's completely
untested.  It could obviously use some more error checking (like not
unlinking the .newsrc file if it's a real file instead of a symlink!)
and could probably use some more bells and whistles.

It's not very elegant, no, but it is usable with any newsreader program.
More elegant solutions are possible with specific readers (like setting
trn's DOTDIR environment variable, for example), but those aren't
portable.

-- 
----------------------------------------------<Steven King, king@cig.mot.com>--
                                       ___
                                lim  \/ 3  = 2
                                3->4

Re: Accessing multiple nntp servers
#12722
Author: zorch
Date: Wed, 16 Nov 1994 20:09
11 lines
1093 bytes
Unless something radically new comes along, I think we've had about enough of
this thread in news.admin.technical.  Please take further followups to
news.software.readers and/or news.software.nntp.

Thanks,

-- 
Scott Hazen Mueller, guest of UUNET      zorch@uunet.uu.net or uunet!zorch
Moderator, news.admin.technical; submissions to natech@uunet.uu.net

Re: Accessing multiple nntp servers
#12883
Author: Mickey Coggins
Date: Tue, 22 Nov 1994 19:36
24 lines
1858 bytes
William Bardwell (wbardwel@cs.cmu.edu) wrote:
: In article <3a2dfk$478@Tut.MsState.Edu>,
: David Simmons <simmons@EE.MsState.Edu> wrote:
: >Is there an elegant way to use two nntp servers for a site; one for local
: >newsgroups, and one for USENET newsgroups?
: Yes...there is...
: check out the software used here (CS Dept at CMU), which I wrote...

I got it, and it compiles and runs fine on AIX 3.2.5+.

I am, however getting the following messages from syslog:
Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command XINDEX
Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command XUSER
Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command SPOOLDIR
Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command XMOTD

My newsreader is TIN.

Any clues?
--
Mickey Coggins     ('93 RM125)          "All who have meditated on the art of
48 Av. G. Motta    mick@oahu.cern.ch     governing mankind have been convinced
CH-1211 Geneva 2   Tel:+41-89-210-3762   that the fate of empires depends on
Switzerland        Fax:+41-22-791-5200   the education of youth."  -Aristotle
Re: Accessing multiple nntp servers
#12907
Author: Tim Pierce
Date: Wed, 23 Nov 1994 15:14
17 lines
1391 bytes
In article <Czop4M.6M7@news.cern.ch>, Mickey Coggins <mick@oahu.cern.ch> wrote:

>I am, however getting the following messages from syslog:
>Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command XINDEX
>Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command XUSER
>Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command SPOOLDIR
>Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command XMOTD
>
>My newsreader is TIN.
>
>Any clues?

Yes: use a different newsreader.

-- 
Green Card fodder: Canter, Siegel, green card, Joel Furr, liable,
fortune, conspiracy, CyberSell, Tennessee Bar.
Re: Accessing multiple nntp servers
#12911
Author: William Bardwell
Date: Wed, 23 Nov 1994 16:15
24 lines
1917 bytes
In article <Czop4M.6M7@news.cern.ch>, Mickey Coggins <mick@oahu.cern.ch> wrote:
>William Bardwell (wbardwel@cs.cmu.edu) wrote:
[...dnntpd...]
>I got it, and it compiles and runs fine on AIX 3.2.5+.
>I am, however getting the following messages from syslog:
>Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command XINDEX
>Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command XUSER
>Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command SPOOLDIR
>Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command XMOTD
>My newsreader is TIN.
>Any clues?
Yeah...it doesn't support those...you can turn those particular messages off...
(either undefine DEBUG_CMD_PRINT in the dnntpconf.h, or just change the line
in serve.c that does them...)

We don't use TIN around here, so we didn't have any news-readers which
used these extensions...(and we used to not have INN anywhere) so it wasn't
a priority to add these commands...I will probably add a couple of
the INN extensions, next time I am playing with dnntpd...(ie I would
add XINDEX, the rest of those seem like junk...)

-- 
William Bardwell
wbardwel+@[cs.]cmu.edu
Re: Accessing multiple nntp servers
#12934
Author: Per Hedeland
Date: Wed, 23 Nov 1994 23:19
23 lines
1967 bytes
In article <3avpq8$cuq@cantaloupe.srv.cs.cmu.edu> wbardwel@cs.cmu.edu (William Bardwell) writes:
>In article <Czop4M.6M7@news.cern.ch>, Mickey Coggins <mick@oahu.cern.ch> wrote:
>>William Bardwell (wbardwel@cs.cmu.edu) wrote:
>[...dnntpd...]
>>I got it, and it compiles and runs fine on AIX 3.2.5+.
>>I am, however getting the following messages from syslog:
>>Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command XINDEX
>>Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command XUSER
>>Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command SPOOLDIR
>>Nov 22 20:20:45 woodstock dnntpd[33425]: unrecognized command XMOTD
>>My newsreader is TIN.
>>Any clues?
[ deleted ]
>We don't use TIN around here, so we didn't have any news-readers which
>used these extensions...(and we used to not have INN anywhere) so it wasn't
>a priority to add these commands...I will probably add a couple of
>the INN extensions, next time I am playing with dnntpd...(ie I would
>add XINDEX, the rest of those seem like junk...)

XINDEX isn't an INN extension (nor is any of the others above).

--Per Hedeland
per@erix.ericsson.se
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads