.\"
.\" @(#)nntpd.dst	1.3	(Berkeley) 10/15/87
.\"
.TH NNTPD 8C "8 July 1987"
.UC 4
.SH NAME
nntpd \- Network News Transfer Protocol server
.SH SYNOPSIS
.B LNNTPD
.br
.I (with INETD, see below)
.SH DESCRIPTION
.I Nntpd
is a server that supports the proposed standard
for the stream based transmission of network
news articles.
It can be used both by ``reader/poster'' clients that
present news to users, and by
``transfer'' clients that transport news between machines.
When used with Internet TCP,
.I nntpd
operates at the port indicated in the ``nntp'' service
entry in
.IR SERVICES ;
the port number assigned by the Network Information Center
for this service is 119.
For use with DECNET,
xxx.
This manual page describes
.I nntpd
from version 1.4 of the NNTP package.
.PP
.I Nntpd
can operate either as a stand-alone server, or as a
server under
.IR inetd (1).
For stand-alone use,
.I nntpd
must be compiled with the -DALONE option, and is
invoked as mentioned in the synopsis above.
Under
.IR inetd (1),
the appropriate entry must be made in
.IR INETDCONFIG ,
and the server must be compiled without the
-DALONE flag.
.PP
The server handles clients on a one to one basis,
forking to take care of clients as they request
connections.
Each server changes its current
directory to the news spool directory
(
.IR NEWSSPOOL )
and then executes commands from its client.
These commands are described in ARPA Internet
RFC 977, ``Network News Transfer Protocol;
A Proposed Standard for the Stream Based Transmission
of News Articles.''
.SH "CLIENT ACCESS"
.PP
Sites may choose to limit
the hosts that can query the server for news.
Further, some sites may not wish to allow
certain hosts to post news.
Finally, some sites may wish to restrict the newsgroups
that can be accessed from remote hosts.
Such limiting can be accomplished through an
access file,
.IR NEWSLIB/nntp_access .
This file consists of three or four fields in the following form:
.sp
.nf
host/net		read/xfer/no	post/no		newsgroups
.fi
.sp
where
.f
.I host
is a valid host name as found in
.I HOSTFILE,
.I net
is a valid network name as found in
.I NETWORKFILE,
and
.I ``read'',
.I ``xfer'',
.I ``post'',
and
.I ``no''
are the corresponding string constants.
.I Newsgroups
is an optional list of comma separated newsgroup names.
Anything to the right of a `#' character
is taken to be a comment and is ignored.
.PP
The presence of an entry in this file
implies that specific host, or
hosts on the named network, are
allowed to read news, but not to post news.
The absence of a entry corresponding
to a client's host or network implies that the client
is not allowed to read or post news.
Default permissions can be set by having the
first entry in the file be a host/net name of
``default''.
If this is used, ``default'' must be the
first entry.
.PP
The first field to the right of the host/net entry
specifies the read access of the host/net in
question.
If the entry is ``read,'' matching
hosts can both read and transfer news.
If the entry is ``xfer,'' however,
matching hosts can only execute commands
used for transferring news, such as
NEWNEWS, NEWGROUPS, IHAVE, and ARTICLE with message-id parameters.
The string ``no'' denies read permission
of any kind to a matching host.
.PP
The next field to the right defines
whether a matching host has post
permission: if the field is ``post''
then the POST command is permitted; if
the field is ``no,'' then matching clients
are not allowed to post news.
.PP
The next field is optional, and, if present,
is a comma separated list of newsgroup names
that restrict the client's reading ability.
Clients are not allowed to read or transfer
articles in newsgroup names preceded by an exclamation
point.
By default, clients are allowed to read all newsgroups.
.PP
.I Nntpd
is selective and searches for a ``best match''
when searching this file to check its client's
permissions.  That is, a specific host name
match is used over a
client being a member of a specified net.
.SH EXAMPLE ACCESS FILE
.PP
.sp
.nf
#
# Example access file
#
default		xfer	no
ucb-ether	read	post
shadow		no	no
ic		read	post	!ucb.postgres
.fi
.sp
.PP
The above file allows only transfer of news (i.e., no reading or posting)
by default.
Hosts on the network ``ucb-ether'' would be able to
read and post news.
The host ``shadow'' would not be allowed
to read or post news.
Finally, the host ``ic'' is allowed to read and post
news, but cannot access articles in the newsgroup
``ucb.postgres'' or any of its child newsgroups
(e.g., ``ucb.postgres.core'').
.SH "INFORMING USERS OF NEW NEWSGROUPS"
.PP
The NEWGROUPS command has never worked very well because
newsgroup creation dates are not stored under
the USENET news system.
As a result, it is left to client programs to determine
by difference in active file size whether new groups exist,
and if so, whether to inform the user of their existence.
.PP
Older versions of
.I nntpd
relied on the program
.I mkgrdates
to prepare newsgroup creation information.
.I Mkgrdates
was fallible and could present a hefty load
on the serving system.
Consequently, it is no longer supported, and its use is discouraged.
.SH AUTHOR
Phil Lapsley (Internet: phil@berkeley.edu; UUCP: ...!ucbvax!phil)
.SH SEE ALSO
services(5),
inetd(8C)
.PP
RFC 977, ``Network News Transfer Protocol:
A Proposed Standard for the Stream Based Transmission
of News Articles.''
