🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #3036

Re: Accessing multiple nntp servers

#3036
From: bill davidsen
Date: Tue, 15 Nov 1994 18:53
60 lines
3055 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.

Technical Details
Message-ID: <3aar6q$736@usenety1.news.prodigy.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.admin.technical.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!darwin.sura.net!gwu.edu!uunet!not-for-mail
References: <3a2dfk$478@Tut.MsState.Edu>

Show Full Headers
Complete Article Headers
Message-ID: <3aar6q$736@usenety1.news.prodigy.com>
Subject: Re: Accessing multiple nntp servers
Date: Tue, 15 Nov 1994 18:53:46 +0000
From: davidsen@tmr.com (bill davidsen)
References: <3a2dfk$478@Tut.MsState.Edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.admin.technical.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!darwin.sura.net!gwu.edu!uunet!not-for-mail
Newsgroups: news.admin.technical,news.software.readers,news.software.nntp
Organization: TMR Associates, Schenectady NY
Lines: 59
Sender: zorch@ftp.UU.NET
Approved: zorch@uunet.UU.NET
Distribution: world
Reply-To: davidsen@prodigy.com
NNTP-Posting-Host: ftp.uu.net
Keywords: nntp multiple local