5 Setting Up News as a Local Reader/Server
5.10 Setting up the NNTP server
If you are connected to a high speed DECnet or TCP/IP network, you may choose
to set up the NNTP server supplied in the ANU News distribution. This will
allow clients on other systems access to news from your local database, and can
also serve as a means to receive incoming news feeds. Using the NNTP access
file described above, you can control the types of access different remote
hosts are allowed to your database.
The specifics of setting up the server differ depending on the transport
protocol you will be using. The procedure for each transport supported by ANU
News is described below. In addition, if you have more than one incoming feed
for any substantial number of newsgroups, you may also wish to enable message
ID caching by the NNTP server, as described above, in order to minimize
redundant transfer and processing of items. (Remember that the NNTP server
must have SysLck and SysGbl privileges if you are using message ID caching.)
5.10.1 NNTP server running over DECnet
There are two versions of the server provided in the News distribution, one a
single-threaded server designed to be invoked in response to an incoming
connection request to a known DECnet object, and the other a multithreaded
server which will register itself as a DECnet object and process up to 32
simultaneous connections. In general, the multithreaded server is more
efficient if you expect multiple simultaneous connections, but it is unable to
obtain the remote host and username for each thread, so it will not allow you
to control access to restricted newsgroups as the single-threaded server will.
Whichever server you use, you will need to determine under what local account
the NNTP server will run. This need not be a privileged account, but the
NetServer.Log files from incoming connections will be left in its Sys$Login,
and it must have execute access to the server image. In most cases, the DECnet
default account is fine for this purpose. If you choose another account, you
must either provide remote sites with proxy access or with the appropriate
access control information, or you must specify this information in a local
DECnet object definition.
5.10.1.1 Setting up the single-threaded DECnet server
If the TASK DECnet object is not disabled on your system, you need only do the
following:
-
create a DCL procedure named NNTP.Com in Sys$Login of the account you
are using to run the server, which contains the commands
$ Run dev:[dir]NNTP_DEC.Exe
$ Exit
In addition, you may want to add commands to purge old copies of NetServer.Log,
or set a reasonable version limit for this file.
-
Copy the image NNTP_DEC.Exe from the [News_Dist] directory to the
location you specified in NNTP.Com above, and make sure the account under
which the server processes will run has execute access.
-
Install NNTP_Dec.Exe with SysPrv. If you plan to use the News lock
mechanism (e.g. NewsShutDown) add SysLck as well, and if you are using
message-ID caching, add SysLck and SysGbl. You should use a command like
$ Install Add /Priv=(SysPrv,SysLck,SysGbl)
Be sure to add this command to your system startup procedure as well.
If the TASK object is disabled (as is frequently the case because of the
security hole it creates), then you will need to create a DECnet object which
can be used to direct incoming connection requests. It's impractical here to
discuss all of the possible variations in configuration this method will
support, so we'll stick to a few simple examples here. For more information,
consult the VMS Networking Manual and the Network Control Program manual in the
VMS doc set.
To define a DECnet object which runs under the default DECnet account, and to
which users connect by specifying the task string "0=NNTP", perform the
following, from an account with the requisite privileges:
$ Run Sys$System:NCP
NCP> Set Object NNTP Number 0
NCP> Define Object NNTP Number 0
If the file NNTP.Com is not in Sys$Login for the default DECnet account, add
the FILE parameter to these commands. Similarly, if you want this process to
run under an account other than the DECnet default, add the USER and PASS
parameters to these commands.
If you would prefer that the task string used to specify the NNTP server is of
the form "NNTP= ", then select an unused DECnet object number between 128 and
255, and set up the object as follows:
$ Run Sys$System:NCP
NCP> Set Object NNTP Number number
NCP> Define Object NNTP Number number
In this case, the file NNTP.Com must be in Sys$System; if it's not, use the
FILE parameter to these NCP commands to specify it. Again, if you want this
process to run under an account other than the DECnet default, add the USER and
PASS parameters to these commands.
5.10.1.2 Setting up the multithreaded DECnet server
The procedure for setting up the multithreaded DECnet server is essentially
identical to that for setting up the single-threaded server, with a few
important exceptions:
-
The image used is NNTP_DECM.Exe, not NNTP_DEC.Exe
-
It must be installed with SysNam privilege, as well as those specified
above, so it can declare itself as a permanent network object.
-
The NNTP DECnet object must have the number 0. If the TASK DECnet object
is not disabled on your system, you don't need to do anything as long as remote
users will use the task string "TASK=NNTP" to connect to the server. If the
TASK object is disabled, or remote users will use the task string "0=NNTP" to
connect to the server, you must follow the directions given in the previous
section for setting up a DECnet object corresponding to this task string. You
may not use a task string of the form "NNTP= " with the multithreaded server.
The first incoming connection request will cause the server to be started, and
it will then accept all incoming connections to the NNTP task until the server
process is deleted, the system is shut down, or the server process exits in
response to a News resource lock generated via the News_Stop logical name or
NewsShutDown.Exe.
5.10.2 Setting up the CMU-IP NNTP Server
There are two versions of the NNTP server available for use with the CMU-IP
TCP/IP package, one single-threaded and the other multithreaded. The
single-threaded server is designed to be started by the CMU-IP master TCP
server. The multithreaded server can also be invoked by the master server in
response to the first incoming connection request, and then handle successive
requests itself, or it can be directly run as a detached process.
5.10.2.1 Setting up the single-threaded CMU-IP server
In order to set up the single-threaded server, you need to do the following:
-
Copy the image NNTP_TCPCMU.Exe from the [News_Dist] directory to a
location accessible to the SYSTEM account (e.g. TCP$System).
-
Add the following line to Sys$Manager:Internet.Config (line wrapped here
to fit into the margins):
WKS:119:NEWSRV:TCP$NEWSRV:NETWRK:NETMBX,TMPMBX,SYSPRV,
SYSLCK,SYSGBL,PHY_IO:4:5
You need SysLck only if you are using the News lock mechanism (e.g.
NewsShutDown) or message-ID caching; you need SysGbl only if you are using
message-ID caching.
-
Define the logical name TCP$Newsrv in the system logical name table as
the filespec of NNTP_TCPCMU.Exe. Add a command to do this to
Sys$Manager:IP_Startup.Com as well.
-
Stop and restart the TCP master server process.
Incoming connection requests to TCP port 119 will now be connected to the NNTP
server.
5.10.2.2 Setting up the multithreaded CMU-IP NNTP server
If you want the multithreaded server to be invoked by the TCP master server in
response to the first incoming connection request on TCP port 119, follow the
instructions for setting up the single-threaded server, with the following
changes:
-
Use the image NNTP_TCPCMU_M.Exe instead of NNTP_TCPCMU.Exe.
-
The entry added to Sys$Manager:Internet.Config should be:
WKS:119:NEWSRV:TCP$NEWSRV:NETWRK:\
NETMBX,TMPMBX,PHY_IO,SYSPRV,SYSLCK,SYSGBL:\
BYTLM=65535,BIOLM=32767,DIOLM=32767,ASTLM=200,ENQLM=100:\
SYS$NULL:SYS$NULL:SYS$NULL:4:5
You need SysLck only if you are using the News lock mechanism (e.g.
NewsShutDown) or message-ID caching; you need SysGbl only if you are using
message-ID caching.
-
Define Sys$Null as _NLA0: in the system logical name table, and add a
command to do this to Sys$Manager:IP_Startup.Com.
-
Stop and restart the TCP master server process.
The first incoming connection request to TCP port 119 will cause the NNTP
server to be started, and it will then accept all incoming connections to port
119 until the server process is deleted, the system is shut down, or the server
process exits in response to a News resource lock generated via the News_Stop
logical name or NewsShutDown.Exe. If a News resource lock is in effect, all
incoming connection requests to TCP port 119 will be accepted, a message will
be transmitted saying that the server is temporarily unavailable, and the
connection will be closed.
Alternatively, you may run the NNTP server directly as a detached process. In
order to start the server, use a command like
$ Run/Detached/Process="NEWSRV" -
/Privilege=(NetMbx,TmpMbx,Phy_IO,SysPrv,SysLck,SysGbl) -
/Input=_NLA0:/Output=_NLA0:/Error=_NLA0:/Priority=4 -
/Buffer_Limit=65535/IO_Buffered=32767/IO_Direct=32767 -
/AST_Limit=200/Enqueue_Limit=100
dev:[dir]NNTP_TCPCMU_M.Exe
You need SysLck only if you are using the News lock mechanism (e.g.
NewsShutDown) or message-ID caching; you need SysGbl only if you are using
message-ID caching.
You may also want to specify a file with the /Error qualifier, so you can
examine any error messages generated by the server.
The server process will start immediately, and it will then accept all incoming
connections to port 119 until the server process is deleted, the system is shut
down, or the server process exits in response to a News resource lock
generated via the News_Stop logical name or NewsShutDown.Exe. Once the server
process exits, all incoming connections to TCP port 119 will be rejected until
you manually restart the server (for instance, from the process which took out
the exclusive lock on the News resource, once it's done whatever processing
required exclusive access to the database).
5.10.3 Setting up the Multinet TCP NNTP server
The NNTP server provided for use with the Multinet TCP package is
single-threaded, and is usually invoked by Multinet's master TCP server. In
order to set up this server, you should
-
Copy NNTP_TCPWINMultinet.Exe from the [News_Dist] directory to
Multinet:NNTP_Server.Exe
-
Set up the service using the Multinet services configuration program:
$ Multinet Config/Serv
MultiNet Server Configuration Utility 3.2(32)
[Reading in configuration from MULTINET:SERVICES.MASTER_SERVER]
SERVER-CONFIG>add NNTP
[Adding new configuration entry for service "NNTP"]
Protocol: [TCP]
TCP Port number: 119
Program to run: Multinet:NNTP_Server.Exe
[Added service NNTP to configuration]
[Selected service is now NNTP]
SERVER-CONFIG>Sho/Ful NNTP
Service "NNTP":
TCP socket (AF_INET,SOCK_STREAM), Port 119
Socket Options = SO_KEEPALIVE
INIT() = TCP_Init
LISTEN() = TCP_Listen
CONNECTED() = TCP_Connected
SERVICE() = Run_Program
Program = "MULTINET:NNTP_SERVER.EXE"
SERVER-CONFIG>Quit
Configuration modified, do you want to save it ? [NO] YES
A server process will be started by the master server in response to each
incoming connection request on TCP port 119. The server process will exist for
the duration of that connection only.
5.10.4 Setting up the TCPware TCP NNTP server
The NNTP server provided for use with Process Software's TCPware TCP package is
single-threaded, and is usually invoked by the master TCP server. In order to
set up this server, you should
-
Copy NNTP_TCPWINMultinet.Exe from the [News_Dist] directory to
TCPware_Common:[TCPware]NNTP_Server.Exe.
-
Add the following line to the file TCPware:Services.
nntp 119/tcp readnews # USENET News Transfer Protocol
-
Define the service as follows:
$ Run TCPware:NetCU
Add/Service NNTP Stream TCPware:NNTP_Server.EXE -
/Process_Name = NNTP_SERVER -
/NoAccounting -
/NoAuthorize -
/UIC = [SYSTEM] -
/AST_Limit = 50 -
/Buffer_Limit = 10240 -
/Enqueue_Limit = 100 -
/Extent = 1024 -
/File_Limit = 50 -
/IO_Buffered = 16 -
/IO_Direct = 16 -
/Maximum_Working_Set = 4096 -
/Page_File = 10000 -
/Priority = 4 -
/Privileges = (NoSame,SysPrv,Phy_IO,NetMbx,TmpMbx,World,SysLck,SysGbl) -
/Queue_Limit = 8 -
/Working_Set = 1024 -
/Subprocess_Limit = 0
Quit
You need SysLck only if you are using the News lock mechanism (e.g.
NewsShutDown) or message-ID caching; you need SysGbl only if you are using
message-ID caching.
-
Add the NetCU commands to TCPware:Servers.Com as well, so that the
service will be defined at subsequent TCPware startups.
A server process will be started by the master server in response to each
incoming connection request on TCP port 119. The server process will exist for
the duration of that connection only.
5.10.5 Setting up the UCX TCP NNTP server
There are two versions of the UCX NNTP server provided in the News
distribution, one a single-threaded server designed to be invoked by the UCX
master TCP server in response to an incoming connection request, and the other
a multithreaded server which runs as a detached process and handles up to 16
simultaneous connections.
5.10.5.1 Setting up the single-threaded UCX NNTP server
At the time of this release, the single-threaded server is not functional; only
the multithreaded server is supported. The source code for the single-threaded
server is still provided, however, and anyone is welcome to clean up the code.
5.10.5.2 Setting up the multithreaded UCX NNTP server
In order to set up the multithreaded server, you should
-
Copy NNTP_TCPUCXM.Exe from the [News_Dist] directory to a location
accessible to the UIC under which the detached process will run.
-
Create the directory News_Manager_Dev:[News_Log], in which the server
will create its log files (named NNTP_Server_Drvr.Log). If you wish to
change this, change the line
#define drvrlogfile
"NEWS_MANAGER_DEV:[NEWS_LOG]NNTP_SERVER_DRVR.LOG"
in NNTP_TCPUCXM.C, and run News_Build.Com to rebuild NNTP_TCPUCXM.Exe.
-
As part of your News system startup, create a detached process running
this image, using a DCL procedure like:
$! Change the following four lines as appropriate to your site.
$ outfile = "News_Manager:NNTP_TCPUCXM.Log"
$ errfile = "News_Manager:NNTP_TCPUCXM.Log"
$ server_image = "Sys$System:NNTP_TCPUCXM.Exe"
$ uic = "[NEWSMGR]"
$!
$ oldpriv = F$SetPrv("Detach,SysPrv,SysLck,SysGbl,PrmMbx")
$ Create &outfile
$ Create &errfile
$ Purge/Keep=5 &outfile
$ Purge/Keep=5 &errfile
$ Run/Detach/UIC=&uic -
/Privileges=(NoSame,SysPrv,PrmMbx,NetMbx,SysLck,SysGbl) -
/Priority=4 -
/Enqueue_Limit=50/AST_Limit=20/Queue_Limit=8 -
/Buffer_Limit=12288/File_Limit=20/Page_File=10000 -
/Working_Set=600/Maximum_Working_Set=1000/Extent=2000 -
/Input=_NLA0:/Output=&outfile/error=&errfile -
/Process_Name="UCX/NNTP server" -
&server_image
$ If oldpriv .nes. "" Then foo = F$SetPrv(oldpriv)
$ Exit
If you expect the server to operate under a heavy load (e.g. many connections
will be active at most times), you may need to increase some of the quota
values given here.
The server process will start immediately, and it will then accept all incoming
connections to port 119 until the server process is deleted, the system is shut
down, or the server process exits in response to a News resource lock
generated via the News_Stop logical name or NewsShutDown.Exe. Once the server
process exits, all incoming connections to TCP port 119 will be rejected until
you manually restart the server (for instance, from the process which took out
the exclusive lock on the News resource, once it's done whatever processing
required exclusive access to the database).
5.10.6 Setting up the Wollongong TCP NNTP server
The NNTP server provided for use with The Wollongong Group's WIN/TCP for VMS or
PathWay for OpenVMS TCP package is single-threaded, and is usually invoked by
the master TCP server. In order to set up this server, you should
A server process will be started by the master server in response to each
incoming connection request on TCP port 119. The server process will exist for
the duration of that connection only.
previous: 5.9 Creating newsgroups on your system
next: 5.11 Setting up the maintenance jobs
Table of Contents