NAME

nntpd -
Tcl server for the NNTP protocol

SYNOPSIS

package require nntpd ?0.92?

::nntpd::nntpd options

DESCRIPTION

The nntpd package provides a simple Tcl-only server for the NNTP protocol. It works by listening on the standard NNTP socket on the current server, and then waiting for client connections.  The ::nntpd::nntpd command creates a new nntpd server.  Some of the commands supported by this package are not part of the NNTP rfc (rfc 977).  The common NNTP extentions that are support are: LIST ACTIVE, XOVER, OVER, AUTHINFO

Prior to starting the server, the directory structure for the news server must be set up.  When the news server is started, the required command line option of -news_root defines the root directory for the news server.  Create that directory.  That directory should ONLY contain subdirectories.  If subdirectories exist, they represent the news server's newsgroups.  (i.e.  /some/dir/news_root/comp.lang.tcl and /some/dir/news_root/comp.lang.tcl.announce).
Within each newsgroup's directory, numerical files will be written there by the server (make sure user starting server has write access here).  The only files you may want to add are:

.nopost : if this file exists then users cannot post to this newsgroup (they can read though)
.mirror_newshost:port : (eg. .mirror_news.somehost.com:119) if this file exists then the newsgroup is a mirror of a similarly named newsgroup on $newshost:$port.  Any posts will be forwarded to that news server and NOT directly posted to this news server.
.cclist : if this file exists, it is read.  Each line should ONLY contain one email address of the form "someone@somehost.com".  Each email listed is sent an automatic email to notify them that someone has posted to the newsgroup
 .fwdlist : if this file exists, it is read.  Each line should ONLY contain one email address of the form "someone@somehost.com".  Each email listed is sent an automatic forward of the message posted

COMMANDS

::nntpd::nntpd options
Open a socket NNTP server.  The command returns the name of the global command that can be used to access the nntpd server subsequently. The following is a list of all of the options for starting the news server:
-news_root  rootdir  (*required)
The root directory for the news server.  The directory should only contain subdirectories.  Those subdirectories each represent a newsgroup (the directory name being the newsgroup name).
-host hostname
The hostname that you want to bind for the news server.  By default it binds the interface that the socket command would bind when called without a host.  It is highly recommended that this be specified.
-port portNum
The port for the news server.  By default it is the standard nntp port, 119.  Keep in mind you must be root to bind a port <1024.
-admin_email user@your.host
The email address for the news server administrator.  It is presented to the user in various text output.  By default it is admin@host where host is the host the socket command bound.
-complain_email user@your.host
The email address for complaints.  It is supplied in the headers of all messages posted to or through the news server.  By default it is abuse@host where host is the host the socket command bound.
-do_auth 0|n|1|y
Flag to indicate if the news server is to request a username and password from each user for verification.  By default it is set to false.  If set to true, then the option -auth_proc must also be specified.
-auth_proc procname
The name of the authentication proc.  It must have been sourced in prior to starting the news server.  The proc will be passed the username and password as arguments.  It must return 1 or 0.  It can implement whatever authentication verification that you desire.  Only of value if the -do_auth option was set to true.
-disable_daemon 0|n|1|y
Flag to indicate if the news server should not be daemonized.  By default it is set to false.
-debug 0|n|1|y
Flag to indicate if the news server should operate in debug mode.  By default it is set to false.  If set to true, then daemonization will be prevented (regardless of -disable_daemon setting value) and output message will be sent to stdout.
-enable_post_notification 0|n|1|y
Flag to indicate if post notification is to be enabled.  By default it is set to false.  If set to true, whenever a posting is made to a newsgroup, a check is made for a .cclist file in that newsgroup's directory.  If the file exists, each email address specified in the file (of the form user@some.host, one per line) is sent an email notification that a posting was made.  If set to true, the option -mailhost must also be specified.
-enable_post_forwarding 0|n|1|y
Flag to indicate if post forwarding is to be enabled.  By default it is set to false.  If set to true, whenever a posting is made to a newsgroup, a check is made for a .fwdlist file in that newsgroup's directory.  If the file exists, each email address specified in the file (of the form user@some.host, one per line) is forwarded a copy of the posting via email.  If set to true, the option -mailhost must also be specified.
-mailhost hostname
The hostname for the mail server to which email will be sent for distribution.  This is only necessary if -enable_post_notification or -enable_post_forwarding was set to true.
-enable_mirroring 0|n|1|y
Flag to indicate if mirroring is to be enabled.  By default it is set to false.  If set to true, whenever a posting is made to a newsgroup, a check is made for a .mirror_hostname:port file in that newsgroup's directory.  If set to true, the option -mirror_passwd must also be specified
-mirror_passwd passwd
The password to put the server in mirror mode.  If the client uses the IHAVE command with the passwd, then the server is put in mirror mode.  Any postings by that client will then get posted directly to the news server and not forwarded to a mirror host, even if a .mirror_hostname:port file exists.  This was required to enable a client to connect to the server and propagate new articles posted since the mirror host was last mirrored.  This is only necessary if -enable_mirroring was set to true.

::nntpd::mirror_newsgroups newsgroups source_host destination_host ?source_port? ?destination_port?
Mirror each newsgroup in the list newsgroups from the source, source_host, to the mirror, destination_host.  If source_port and destination_port are not specified, they are defaulted to the standard NNTP port, 119.

KEYWORDS

news, nntpd, nntpdserver, server