DNEWS Installation, a brief guide
			---------------------------------

DNEWS is a dynamic news server system, it is not a news reader!

Distributed by EGLE Magic emagic@world.std.com, it is not freeware, please see
license.txt for details.

These instructions describe how to setup a sucking news feed, see the manual
for setting up a traditional feeding mechanism.
-----------------------------------------------------------------------------
Installation VMS: (see below for UNIX)
	1) FTP the files from ftp.std.com ftp/vendors/emagic/dnews...
		extract.com	(ascii)
		install.txt	(ascii)
		dnews.bck_z	(binary)
	2) @extract  	Extracts the required files from the saveset
	3) Modify REGISTER_USER.COM to register a user DNEWS$SERVER 
	4) @REGISTER_USER.COM
	5) Modify DNEWS_START.COM to define the disks news should use.
	   (don't run it yet!)
	6) $ edit sys$manager:systartup_v5.com    Add a call to dnews_start.com
	7) $ edit sys$sylogin:           Add the symbol, see dnews_login.com
	8) $ edit dnews_top:dnews.conf    
		Modify the file DNEWS.CONF to describe your
  		system by defining the following symbols
			SYMBOL		EXAMPLE
			manager		system  	
					(email address or user@site.com)
			nntp_feeder	news.feeder.site
			myname		news.this.place
			timezone	nzst
					(new zealand standard time)
			diskspace	100
					(space available in megabytes)
			mail		smtp
					(the foreign email protocol name)
			confirm		*.this.place  Enable email confirmation
					when item is passed up to a feeder site.
	9) If your news feeder stamps news items with a name other than
	    the ip name you specified above, then you will need to add an
	    exclude field to the file newsfeeds.conf to prevent your system
	    echoing all news back to the feeder!!!
	    (check the path header of an item to see what it is doing)
	10) $ edit access.conf          Grant an ip range access to your users.
					by name or number, e.g.
			*.this.place:read,post:::*
			161.23.4.*:read,post:::*
     
	11) $ @dnews_start	       Start the system
 	    $ @dnews_login 		(to define the symbol tellnews)
	 The system will now try and get a list of news groups from your
  	 feeder site, while this is happenning it will not respond, but you
	 can check it's progress by:
	    $ type dnews.info
	 When it has finished (give it 10-20 minutes), you can then try:
	    $ tellnews status

	12) Go to a PC and try out your news reader software pointed 
	    at the new system.
-----------------------------------------------------------------------------
Installation for UNIX:  (Sucking feed)
	1) FTP the files from ftp.std.com ftp/vendors/emagic/dnews...
		dnews_MACHINE.tar.Z		(binary)
		(e.g. dnews_linux.tar.Z	)
	2) Extract to a temporary directory in your own account
		uncompress dnews_linux.tar
		tar -xvf dnews_linux.tar
	3) EDIT dnews.conf
		Modify the file DNEWS.CONF to describe your
  		system by defining the following symbols
			SYMBOL		EXAMPLE
			manager		system  	
					(email address or user@site.com)
			nntp_feeder	news.feeder.site
			myname		news.this.place
			diskspace	100
					(space available in megabytes)
			df		The path and flags for df
			sendmail	The path and flags for sendmail
			confirm		*.this.place  Enable email confirmation
					when item is passed up to a feeder site.
	4) Edit your system startup script, the name will vary:
		On LINUX /etc/rc.d/rc.local
		Add a line:
			/usr/local/dnews/dnews_start.sh
	5) If your news feeder stamps news items with a name other than
	    the ip name you specified above, then you will need to add an
	    exclude field to the file newsfeeds.conf to prevent your system
	    echoing all news back to the feeder!!!
	    (check the path header of an item to see what it is doing)
	6) Edit access.conf 		Grant an ip range access to your users.
					by name or number, e.g.
			*.this.place:read,post:::*
			161.23.4.*:read,post:::*
	7) If you have changed any of the default directories, then edit
	   all the .sh scripts to reflect the changes.
	8) Run the installation script
		su root   (You need priv to install the files start dnews)
		./install.sh
	9) Start the system
		./dnews_start.sh
	 The system will now try and get a list of news groups from your
  	 feeder site, while this is happenning it will not respond, but you
	 can check it's progress by:
		more dnews.info
	 When it has finished (give it 10-20 minutes), you can then try:
	    	> tellnews status

	10) Go to a PC and try out your news reader software pointed 
	    at the new system.
-----------------------------------------------------------------------------
Installing a full feed:

In access.conf, give your feed site access to send you ihave messages:
	my.feeder.site.com:ihave:::*
In dnews.conf, comment out the nntp_feeder definition.
In newsfeeds.conf
	Replace
		site $NNTP_FEEDER
			groups *
			builtin
			posting
	With
		site my.feeder.site
			groups *
			builtin

Copying important files from an existing system:
	With a sucking system you can do this with the commands:
		tellnews getnames
	The active file will be fetched automatically.

	However if you are replacing a news system then you want
	the active file from the one you replace, not from your
	feeder site:

	You can safely copy these files:

	active		-> active.dat
	active.times	-> active.times
	newsgroups 	-> active.names  (may be changed in future)
	
	If you copy the active file, you must reset it so that
	it doesn't think it has any items, do this with the command
		tellnews resetall
	
Renaming a volume (on unix):
	You may wish to rename a current volume /var/spool/news
	to be /var/spool/dnews, to do this:

	cd /var/spool/news
	mkdir OLD
	mv * OLD
	umount /var/spool/news
	emacs /etc/vfstab (or /etc/fstab)
		(change /news into /dnews)
	mount /var/spool/dnews
	
	When you are happy with the new system, or you need the space:

		rm -r /var/spool/dnews/OLD
	
-----------------------------------------------------------------------------
Recommended news readers:
	For PC's
		Netscape's built in reader.
		WINVN
		Trumpet (old versions are slow, get a new version)
	For VMS
		FNEWS

Testing DNEWS or your FEEDER site or your OWN site by hand:
VMS	$ telnet feeder.site /port=119
UNIX	> telnet feeder.site 119
	group comp.os.vms	(select a group)
	head			(display the header)
	body			(display the body)
	next			(next item please)
	help			(show valid commands)
	quit			(exit the connection)
	$ 
	
-----------------------------------------------------------------------------
FAQ and What if it doesn't work:
-----------------------------------------------------------------------------
FTP the complete manual in MS word 6 format from:
	ftp.std.com ftp/vendors/emagic/dnews/dnewsdoc.zip

Can't BIND, and tellnews sais "I can't talk to you"
	LINUX slackware: Comes with a dummy nntp daemon installed, you must remove 
	this so dnews can bind to the socket.
		edit /etc/inetd.conf
		(comment out the NNTP line)
		kill -HUP <pid of inetd process>
TELLNEWS fails 
	The DNEWS process may take 1-2 minutes to initialize, so wait a bit
	before panicking.

	Check if the process is running
		ps -axl | grep dnews	(linux)
		ps -ef | grep dnews	(sunos)
	
	Check the log files
		more /usr/local/dnews/dnews.error (.info)
	
	If it gets started up with the wrong PID you will get all sorts of
	protection problems,  all the files in
		/var/spool/dnews/...  (including var/spool/dnews)
	must be owned by the same user, normally 'news'
	Also all the files in:
		/var/local/dnews/*
TELLNEWS gives unusual error message
	On vms, if the symbol tellnews is not defined, it will try and run
	telnet instead, this can be confusing.

-----------------------------------------------------------------------------
Using other TCPIP stacks on VMS
-------------------------------
	Only the multinet driver has been tested.  The ucx driver has been
	compiled and will probably work with very little effort.

To build a new TCPIP driver:
	$ edit nntp.c
	(Add a section to include the header files for your version
	of tcpip, ifdef it in some obvious way). e.g.
		#ifdef MULTINET
			#include "multinet_root:[multinet.include.sys]socket.h"
			...
		#endif

	$ edit n.com
	(Change the compile line so it defines the symbol that you
	used above to distinguish your tcpip software AND change the
	name of the object file too) e.g.
		$ cc nntp.c /define=("MULTINET"="TRUE") /obj=nntp_multi.obj
	
	$ edit l.com
	(Add a section to link to your tcpip stack, you will need to change
	the name of the nntp_XXX.obj file name and probably the socket library
	name.) 

	Try and compile it and link it:
		$ @N
		$ @l multinet all

	Most likely it will fail because of some conflict between names
	e.g. socket_close(), or simply close(),  add ifdefs to NNTP.C to
	correct for this.

	Once you have it working, email the files nntp.c and l.com and n.com
	to egle magic and we will maintain and distribute these changes for
	others.
				emagic@world.std.com
-----------------------------------------------------------------------------
Mailing list
------------
	You can join the dnews mailing list by sending a message to:
		maiser@emagic.co.nz
	Containing one line:
		subscribe dnews

This is a moderated mailing list, it's only function is to announce new
versions of dnews and to disseminate up to date information on installation
problems, bugs, new features etc to people who manage news systems.

You will not be flooded with mail from this mailing list, it will probably
average 1-2 messages a month.

-----------------------------------------------------------------------------
Notes on compiling and porting DNEWS (unix)
------------------------------------
	Uncompess and untar the saveset
	Copy a config file which matches your machine, if one does not match
	then find the closest one you can. e.g.
	(for SunOS)	> cp config.solaris config.i
	(for LINUX)	> cp config.linux config.i
	
	Edit and modify config.i as necessary.
	Type in make all.
			> make all
	Now follow the normal installation instructions.

	If you have to make changes to the config.i file, then email it to
	EGLE Magic, specifying what type of machine & OS it is for and we
	will include it in the next distribution.

	If you change source code then email us the entire source files
	that were changes, please don't send diff or patch files these
	are extremely difficult to merge from multiple sources.

	When making machine specific changes, IFDEF all the changes 
	and where possible use 'feature' like ifdefs rather than 
	'machine' related ifdefs, e.g.

		#ifdef NEEDS_STRDUP
			...
		#endif
	(then define NEEDS_STRDUP in the config.i file)
	Rather than:
		#ifdef LINUX
			...
		#endif
	
-----------------------------------------------------------------------------
Updates, List of bugs fixed for each version.  Recent versions at the top.
-----------------------------------------------------------------------------
0.9d  (Wide BETA release 2)
	+ Fixed embarassing bug which prevented news groups from being added.
	+ Added missing nocached.body file to distribution.	
0.9c  (Wide BETA release)
	+ Socket error's trapped correctly, this was causing the process
	  to dissappear when a connection was badly closed at the other end.
	+ New articles added after an expire run were indexed incorrectly. 
	+ Messages tidied up
	+ Control mail messages now contain "done" or "logged only"
	+ Pause message now contains status information.
	+ Inactive sockets closed even when data still pending on output.
0.9b 
	First ALPHA testing release