For quick semi idiot proof installation, run dnews_setup
     ./dnews_setup
This will guide you thru installation, or upgrading automatically.
If you prefer the manual approach or the automatic install fails then 
examine the file install.sh which will do most of the job and then edit
the config files as described below.


The rest of this file has been superseeded by 
	http://netwinsite.com/manual/install.htm 
for the latest installation instructions:
For the list of the latest changes / bug fixes / updates see the file:
       	http://netwinsite.com/manual/updates.htm



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

DNEWS is a dynamic news server system, it is not a news reader but rather
it is the server which a news reader reads news from.

DNEWS is not freeware, see license.txt for details.

Index to this document:

(1) DNEWS Feature list
(2) Installation VMS
(3) Installation for UNIX
(4) Installation for Windows NT (& Windows 95)
(5) Installation for NETWARE 
    (see install.os2 for OS2 specific installation instructions)
(6) Installing a full feed
(6b) Example of full feed from UUNET 
(7) Recommended news readers
(8) FAQ and What if it doesn't work
(9) Using other TCPIP stacks on VMS
(10) Mailing lists
(11) Notes on compiling and porting DNEWS (unix)
(12) Updates, List of bugs fixed for each version.
     See the FAQ section for "Creating local news groups"
     See the FAQ section for "Gatewaying Mailing lists"


-----------------------------------------------------------------------------
(1) DNEWS Feature list:
	Dynamic sucking feed.
		A sucking feed may use as little as 10% of the normal
		disk space and network bandwidth.
		By only getting news items that people usually read 
		very large savings are possible particularly for small
		sites & workgroups.  A hundred users can be supported
		on 100 MB depending on their reading habbits!
		I run a single user server on my NT as a background
		service, it's using less than 5MB.
	Flexible expire settings 
		By allowing expiration by 'number of items' low volume groups
		become much more useful.  Also by allowing settings 
		which change with disk space the system is much more
		stable to large influxes of news.
	Flexible access restrictions
		Reading and Posting access can be given separately to
		to different users and selections of news groups.
	Binarys available for common platforms
		On many platforms you do not need to build the binary
		yourself, e.g. VMS, (VAX & ALPHA), Solaris, Linux, Windows NT
	Email confirmation of posts
		DNEWS can be configured to send email confirmations as it
		sends items up to a main news server.  This gives users 
		a clear record of a posted item and it's successful 
		transfer into the 'net'.
	Items stored in a database
		Items are stored in a database which puts items together
		in blocks of 100.  This saves directory entries, inodes,
		and the empty space usually wasted due to blocking factors.
		Also file open and closes are minimized, this is essential
		on systems where this is a 'costly' operation, e.g. VMS.
	Compiling and porting relatively easy
		DNEWS was designed to be portable from the ground up, it 
		does not rely on obscure UNIX features.
	Installation easy, totally configurable without recompiling
		DNEWS can be configured without recompiling and all
		the configuration scripts have been simplified where 
		possible.
	Documentated
		A user manual is available.
	Supported
		EMAIL support is available for help with installation
		and management.
	Speed
		On comparable systems DNEWS typically out performs other
		news software, (even the likes of CNEWS and INN in some
		instances), other VMS news servers don't even come close.  
		This is partly because DNEWS uses a more advanced database
		to store the news items.  The difference is also very 
		noteable on smaller systems (e.g. Linux)
	XOVER implemented in software
		No xover database is created, the normal DNEWS database
		is fast enough to create this information 'on the fly'
	Streaming support
		Streaming NNTP extensions are built in.
	Strictly limited machine impact due to single threaded nature.
		DNEWS runs on a single process, this speeds up connect
		time as a process does not need to be created, and it
		self-limits the impact on the system.
Limitations:
	DNEWS does not store items in the same file structure as used by
	INN and CNEWS, so old software which accesses these files directly
	will not work.  	
-----------------------------------------------------------------------------
These instructions describe how to setup a sucking news feed, see the manual
for setting up a traditional feeding mechanism.
-----------------------------------------------------------------------------
(2) Installation VMS: (see below for UNIX and Windows NT)
	1) FTP the files from ftp.std.com ftp/vendors/netwin/dnews...
		extract.com	(ascii)
		install.txt	(ascii)
	   UCX
		binary
		get /fdl dnews.bck	(binary - ucx)
	   Multinet:
	  	type backup
		get dnews.bck

	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.log
	 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.
-----------------------------------------------------------------------------
(3) Installation for UNIX:  (Sucking feed)  See below for Windows NT
	1) FTP the files from ftp.std.com ftp/vendors/netwin/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.log
	 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.

	LINUX slackware: Comes with a dummy nntp daemon installed, you must remove 
	this so dnews can bind to the socket.  (so it 
	won't even start up)
		edit /etc/inetd.conf
		(comment out the NNTP line)
		kill -HUP <pid of inetd process>

	Some brands of unix (BSDI, Unixware) have process limits, the 
	two that will hurt dnews are memoryuse/datasize, and 
	openfiles.  The following commands can remove these limits
	you will need to do this for root and news users.
		limit memoryuse unlimited
		limit openfiles 256
		limit datasize unlimited
	To test these limits are really removed use the commands:
		tellnews test_mem
		tellnews test_files
	You must stop and restart dnews after running these tests.
	You should see about 200 free file handles and about 30MB or more
	of memory that can be allocated, if you see less then you haven't
	removed the limits.	
	

-----------------------------------------------------------------------------
!!! Notes for Windows 95 !!!
  Follow the instructions for Windows NT and mostly it will work
  except for:
      1) Services don't exist, so you have to run dnews from a 
         DOS prompt.  You can put this into your STARTUP group to
         make it start automatically like an NT service.
      2) The DNEWS MANAGER start and stop service buttons won't work.
         You can stop the service by sending the EXIT command, it 
         may give an error when you do this, but check the log and
         it will probably show it has shut down.
      3) NetWin do not recommend the use of Windows 95 as a full
         news server for large numbers of users. Use NT if possible.

---------------------------------------------------------------------
(4) !!! UPGRADING NT!!! 
	Shutdown the server and exit from DNEWS Manager
	Run the self extracting archive
            dnews23c.exe (or whatever version)
        When installation is complete start DNEWS Manager
	from the DNEWS Program Group. And click on 
            'Start Service'

(4) Installation for Windows NT !!! on a new system !!! (Sucking feed) 
	1) FTP the files from ftp.std.com ftp/vendors/netwin/dnews...
		dnews23c.exe (binary transfer)
	2) Run the self extracting archive and installation
           procedure
		dnews23c.exe
        3) Run DNEWS Manager to modify the setup further
           and to start the service
	4) Point your news reader software at your NT and try out your new
	    fast news system.

	5) Join the mailing lists for advice an update information, 
 	and don't forget to register :-)
	        Open DOS Window
	        then type TELLNEWS REGISTER


	If it fails, look in
		type \dnews\dnews.log
	Then check the FAQ file DNEWSFAQ.TXT
	Then send email to us if you think you've found a bug, or to
	the mailing list if you just want advice from other DNEWS 
	managers.
-----------------------------------------------------------------------------
(5) Installation for NETWARE 4.x
WARNING: MEMORY
  DNEWS expects virtual memory, as netware has none you
  have to make sure your system has sufficient REAL memory, 
  for a sucking feed you will need 8MB free, for a full IHAVE 
  feed you will need 16MB of free memory (these are estimates)
WARNING: GROUPS
  This release for NETWARE is limited to 10,000 groups, 
  this is heaps if you take care with the 'ME' setting 
  in feeds.con
WARNING: BETA RELEASE
  This is a beta release, NetWin do not recommend that you
  install this on a mission critical server.  Please report
  any problems you find.
	
	attach myserver
	File, Run, dnewsnw23f.exe  (or whatever the latest version is)
	Answer the configuration questions.
	
	In your autoexec.ncf script add the following lines.
		load dnews
	Load the server by hand.
	 	load dnews
	
	Go to a PC and try out your news reader software pointed 
	at the new system.  On windows 95 you can run the DNEWSMAN 
	configuration utility to setup or modify your configuration.

	Use the command:
		load tellnews status		To see what it's doing
		load tellnews register		To see what it's doing
		load tellnews exit		To shutdown dnews nicely
		load tellnews help		For other commands.

	NEVER shutdown the service with the 'unload' command. Always use
		load tellnews exit
	instead.


-----------------------------------------------------------------------------
(6) 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 and add a line:
	  cachedall true 
In newsfeeds.conf
	Replace
		site $NNTP_FEEDER
			groups *
			builtin
			posting
	With
		site my.feeder.site
			groups *
			builtin
	And correct the ME feed, the default one does not 
	allow any binary groups in, if you really want a 
	full feed fix this by removing the !*binary*

**** You must get an active file ***
You MUST get a copy of active.dat from your provider, the file is simply
called the 'active' file on INN or CNEWS, you need to FTP the file and copy it
to \dnews\spool\active.dat while the server is NOT running.

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.  But if you are setting
	up an IHAVE feed so you don't have 'reader' access this WILL NOT WORK, you
	must FTP the active file from your provider if possible, or from
	ftp.std.com /ftp/vendors/netwin/dnews/active.dat_sample and copy it
	to  /dnews/spool/active.dat  (the workarea directory)

	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

 	The only way to get the actual news items from an existing system is to
	setup DNEWS on a second system (or on the same system on a different
	PORT) and then suck the entire database via nntp.  Obviously to do this
	you need a lot of free disk space.
	
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
	

(XMIT (Setting up full feeds)
	This is necessary when you want to send a full feed onto another site.
	If you are a leaf site then you DONT NEED TO DO THIS !!!!!!
	First add entries to your NEWSFEEDS.CONF file, this creates the
	file site_name.feed, then you need to setup a timed job to send those
	items to the other sites using NNTP IHAVE (or streaming extensions)

	You should set all groups as cached, in dnews.conf add  a line:
	         cachedall true
 
XMIT (On unix)
	Add lines to your rc.local procedure, e.g.
		cd /usr/local/dnews
		./xmit send.to.site.name -at "*2" "*"
		./xmit send.other.site.name -at "*7" "*"

XMIT (On Windows NT)
	On windows NT you need to setup each xmit job as a service, to do this
	use the program ADDSVC.EXE which came with the dnews distribution to
	add a service for each outgoing feed, e.g. (see setupsvc.cmd)
		addsvc -add dxmit1 xmit.exe "dxmit1 site.name.edu -at *5 *"
		addsvc -add dxmit2 xmit.exe "dxmit2 site2.name.edu -at *5 *"
	Then from CONTROL PANEL, SERVICES, and start the feeds.

XMIT (On VMS)
	See RUNXMIT.COM

------------------------------------
(6b) Example of full feed from UUNET


-------dnews.conf---------
In  dnews.conf  comment out nntp_feeder by putting a HASH in 
front of the line, and add cachedall true, e.g.
	# nntp_feeder	your.feeder.ohio.edu
	cachedall true

------newsfeeds.conf cut here ----------
	site me
		groups *
	site news.uu.net
		groups *,!local.*
		exclude uunet
	site YOUR.MAIL.GATEWAY
		smtp
------access.conf cut here and change your domain and ipnumbers ------
# Don't let the world connect :-)
*:logoff:::*

# Do let your domain and ip range connect    **** CHANGE THIS BIT ***
*.your.domain:Read,Post:::*
161.232.32.*:read,post:::*

# Do let your news feed from UUNET send you items
news*.uu.net:ihave:::*
-----------------------------------------------------------------------------
(7) Recommended news readers:
	For PC's
		Netscape's built in reader.
		WINVN
		Trumpet (old versions are slow, get a new version)
		Freeagent
	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)
	$ 
	
-----------------------------------------------------------------------------
(8) FAQ and What if it doesn't work:
-----------------------------------------------------------------------------
Index to FAQ section:
	Calculating Memory use
	Setting your EXCLUDE parameter correctly
	Posting to a moderated group
	Can't BIND, and tellnews sais "I can't talk to you"
	TELLNEWS fails 
	TELLNEWS gives unusual error message
	TELLNEWS GETOLD * gives a core dump
	Transfer permission denied.
	Creating local news groups:
	What if DNEWS Crashes !!!
	Gatewaying Mailing Lists
	Windows NT operating system bug
	Setting up a UUCP feed out of DNEWS
	Setting up a UUCP feed into DNEWS
        Message aren't going upstream/ 435 Duplicate error

Calculating memory use
	This is a rough guide to calculating how much memory	
	dnews will use.  This is VIRTUAL memory, you dont' need this
	much physical memory (but it will go faster if it does :-)

		(Concurrent connections) * 200K
		(Articles in history file - see expire processed) * 12
		(Spool Gig's) * 1MB
		(Max article size accepted) * 2
		(Number of news groups) * 100
		head_cache (default 200) * 3k
		xover_cache (default 3000) * 300 
		Program static data 4mb
	 
	So lets take a smallish system with 20,000 news groups, 
	10 concurrent connections, 200,000 lines of history data, 
	1 Gig of spool, 1MB articles.

		10 * 200K = 2MB
		200,000 * 12 = 2.4MB
		1Gig = 1MB
		1MB Artilces = 2MB
		20,000 News groups,  = 2MB
		head_cache (default 200) * 3k = 600K
		xover_cache (default 3000) * 300 = 900K
		Program static data = 4mb
		Total memory use = 14.9MB
	NOTE you DO NOT NEED THIS MUCH RAM, dnews is designed to 
	deal with multiple full feeds and 100's of users, if you
	are running a smaller system you don't need all this as REAL
	ram, that's what virutal memory is for, it just slows down
	a little.

	Typically on a small system where you wish to reduce the 
	memory use you need to look at:
		Total groups
		History remember setting.
		Maximum article size

	You can drastically reduce memory use with these settings:
		(in expire.conf) remember 4
		(in dnews.conf) item_max 200000  (stops large binary items!!!)
		(in newsfeeds.conf change your ME feed to only
		allow groups that really exist in your country-area)
			site ME
				groups !*,rec.*,comp.*,alt.*,news.*,soc.*,bit.*,bionet.*,sci.*
		tellnews matchfeed
		tellnews purgegroups
		(restart dnews to free up the memory)
		
	As a rule of thumb to avoid calculations with unix and NT, 
	create a 100MB swap/page file as a first step.  If you 
	are running a big system, then 200mb would be a wise choice.  

Setting your EXCLUDE parameter correctly:
 	In newsfeeds.conf you must set your exclude parameter to 
	stop DNEWS from sending incoming messages back
	to your feed site.  Lets assume your feed site is 	
	called fastfeed.world.net. You need to find out what it 
	stamps onto news articles, to do this read a news article
	(and show all headers so you can see the PATH header)

	e.g.
	Newsgroups: alt.winsock.trumpet
	Subject: Sportster Si does not seem to work with TRUMPET
	Date: Thu, 26 Oct 1995 22:44:08
	Organization: Personal
	Lines: 8
	Message-ID: <moleski.2.0016BD02@sasknet.sk.ca>
	NNTP-Posting-Host: eagle28.sasknet.sk.ca
	X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]
	Path: fast1.world.net!world.net!news.icix.net!esol.intermedia.com

	Look thru the path, left to right, and find the first or most generic 
	name for your feed site, in this case 'world.net' looks like
	the best name to choose. 

	So here is the entry you should put in newsfeeds.conf, you may
	need the builtin and posting settings as well but that is up to you.

	site fastfeed.world.net
       		groups *
		exclude world.net
		builtin
	
	You may need to delete your .feed and .sending
	files from the spool directory to clear out
	the backlog of articles queued.

Posting to a moderated group
	Note: You can only do this to your own moderated local groups.
	Get the FreeAgent news reader.
        In agent.ini change showallfields to 1, e.g.

		[Message]
		ShowAllFields=1

	Then re-post the article after putting your mail address
	in the approved header using freeagent.


FTP the complete manual in MS word 6 format from:
	ftp.std.com ftp/vendors/netwin/dnews/dnewsdoc.zip

HINT: when reading the log files, it is easy to confuse an error message
from DNEWS with an error message that dnews got while talking to 
your feeding site.   Usually if the error looks like:
   Status {223 transfer permission denied}
then it came from somewhere else, not your system.

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
		(linux) ps -axl | grep dnews
		(sunos) ps -ef | grep dnews
		(nt) Look at services in control panel
	
	Check the log files
		more /usr/local/dnews/dnews.log
		(nt) type /dnews/dnews.log	

	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.
	On Windows NT if you left the disk name out of the config file and
	you run the tellnews command from a different default disk then
	it won't be able to find all the files it needs to work.
TELLNEWS GETOLD * gives a core dump
	Try 
		tellnews getold "*"
	Need I say more?  This gets me every time too :-)
Transfer permission denied.
	This can come from one of two directions,  DNEWS can give this error
	when a site tries to feed it new items.  

	If you are using a sucking feed then you should stop the
	site that is trying to send to you from sending as DNEWS
	will ask for any items it wants. 

	If you do want to allow incoming IHAVE messages, 
	then add an IHAVE record for this ip address in the 
	ACCESS.CONF file, and also remove the 'POSTING' flag from
	the NEWSFEEDS.CONF file for the ME site.	
	
	The last possibility is that this error is coming 
	from your feeding site, in which case that system manager 
	has to fix the problem for you.
Creating local news groups:
	If you wish to have local groups on your server, that are not on the
	server you 'suck' from, then you should remove the 'POSTING' flag
	from the feed to your feeder site (in newsfeeds.conf).  But 
	only if you can get ihave or transfer permission to send 
	articles up stream rather than simple 'posting' access.

	You can add groups with the TELLNEWS NEWGROUP command, e.g.
		tellnews newgroup here.chat y myname Local group for chatting
		
		here.chat = name of group
		y = Normal group (m = moderated)
		myname = Just a record of who created the group (one word)
		Local group for chatting = description for active.names file. 

	To stop your local group from being sent up stream, you would
	change the line in your newsfeeds.conf file:
		groups *,!here.chat,!here.secret.*
	NOTE: KNOWN BUG, with version 2.0 items will still be sent upstream if 
	you have left the 'POSTING' keyword in your feed.  This will probably
	be fixed in a future version

Giving DNEWS access to an INN news system.
	1) Give normal NEWS READER access to the dnews machine by adding a 
	line to your nnrp.access file
 	        dnews.ip.name:read post:::*

	2) Give DNEWS ihave access to your server 
	Add a line to  hosts.nntp
	        dnews.ip.name

What if DNEWS Crashes !!!
	Don't Panic! (in large friendly letters)
	It is a design goal of DNEWS that it should never never never
	never never crash.
	
	We have now built in some special debugging options so you can
	help us track down the problem if this should happen on your
	machine.

	So, if it crashes, do this:
		Edit dnews.conf and change the debugging lines to:
			loglvl flush
			debug_rotate 2000
	Then start the system, and the next time it crashes, email
		dnews.log  & dnews.conf & newsfeeds.conf
	To us at:  netwin@world.std.com
	Together with any other facts that you can give us, e.g.
		If you are sucking news or getting a full feed.
		If you are using xmit
		What systems and news readers are reading from you,
		(e.g. tin, trumpet, pc's only, whatever...)
		At what time of day it crashes. any other clues...
	
	Many thanks for your assistance in this.

Gatewaying Mailing Lists
	CAUTION, gatewaying mailing lists to public news groups is 
	a little risky, don't do it lightly.
 
	Two gateways are needed to make a news group and a mailing list 
	'identical', you must setup both so that a news post gets sent to the
	mailing list and so a mailing post gets posted to the news group.
	
    Setting up a gateway from a "NEWS group" to a "MAILING LIST"
    	In newsfeeds.conf add a feed for the group you wish to gateway, the
	'site' name can be anything meaningful to you.
	
		site juggling
		        groups rec.juggling

	(This will make dnews create juggling.feed in the workarea directory)

	Now to actually send the items, setup an xmit process for each mailing
	list.  To do this edit addmail.cmd (which will be in /dnews with luck)

	notepad addmail.cmd
		Change the -name to be the name in newsfeeds.conf
		Change MAIL.HERE.COM to point to your mail server
		Change JUGLIST@HERE.COM to point to the actual mailing list
		addsvc -del dxmail1
		addsvc -add dxmail1 xmit.exe "dxmail1 MAIL.HERE.COM -at *5 *
(cont. but should be on one line)   -mail JUGLIST@HERE.COM -name juggling"

	addmail.cmd  (run the script to add the service)

     	Restart things:
	     tellnews reload
	     Start the xmit service in Control Panels (for nt)

	Test the mailing list, if a loop occurs, disable it quickly and figure 
	out why.

    Setting up a gateway from a MAILING LIST to a NEWS GROUP  (Windows NT only)
        First setup DROBOT to run from ntmail, in control panels run the 
	NTMail admin tool.  Click on 'executables' and enter a name for this
	gateway, e.g.
		juglist-robot
	(You will then need to add this user to your juglist mailing list, e.g.
	 juglist-robot@here.com, so that this robot will get all messages that
	 are posted to the mailing list)

	In the command line box type in:
	    drobot -dir c:\ntmail\news -groups rec.juggling
	
	Now, setup the service to post these items.
		addsvc -del dposter
		addsvc -add dposter dposter.exe "dposter -dir c:\ntmail\news
			-to news.here.com"

	Now start the services (from control panel) and then test 
	posting a message and mailing a message to the mailing list and 
	see if the newsgroup and mailing list are kept inline.

Windows NT operating system bug

>Situation:
>- In ControlPanel->Network->Server->Configure the optimization is set by
>default to "Maximize Throughput for File Sharing". - Most of the time this
>has no apparent effect, but when copying a single file that is large, all
>available ram is allocated to the disk cache, and when the ram runs out, it
>starts paging like crazy. This is stupid behaviour, and is a bug. If this
>goes on for any length of time, you'll probably have to reboot. - When (if)
>that file copy ends, the ram is released and the system resumes normal
>operation. - If you copy lots of smaller files, you will not observe this.
>It happens on a file by file basis. Presumably the same thing happens with
>all files, but if they're not huge, you probably won't notice because the
>ram doesn't run out before the file operation finishes.
>
>Workaround:
>- Set optimization to "Maximize Throughput for Network Applications". This
>causes memory to be more intelligently managed, and the avail free memory
>is kept above 4Mb as much as possible. It will still dip low, depending on
>what's running, but will come back up quickly.

Setting up a UUCP feed into DNEWS
	In dnews.conf add
		suck_uucp c:\uucp\in\*.bag
        
    The BAG/UUCP file format is:

    #! rnews nnnn
    ...(article, exactly nnnn bytes, counting each end of line as one byte)
    #! rnews nnnn
    ...(next article)...
       
Setting up a UUCP feed out of DNEWS
   In newsfeeds.conf add a feed, e.g.
           	site site1.name.uucp
			type uucp
			uucp_dir c:\uucp\out
	       		groups *


   This will create files called news000n.bag in the directory c:\uucp\out
   It's your job to uucp copy these to the destination sites, and delete them.
   If you want you can compress them first.  :-)

   The format of the file is:

    #! rnews nnnn
    ...(article, exactly nnnn bytes, counting each end of line as one byte)
    #! rnews nnnn
    ...(next article)...


Message aren't going upstream/ 435 Duplicate error
        The problem is your exclude paramter is wrong, this
	results in dnews sending all items it gets back upstream
	which results is a clogged queue so your local posts
	never get sent.

	Read the section above:
              Setting your EXCLUDE parameter correctly:
        
-----------------------------------------------------------------------------
(9) 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 us and we will maintain and distribute these changes for
	others.
				netwin@world.std.com
-----------------------------------------------------------------------------
(10) Mailing list  (Announcements)  (discussion list below)
---------------------------------------------------
	You can join the dnews mailing list by sending a message to:
		dnews-announce-request@netwin.co.nz
	Containing one line:
		join dnews-announce

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 or less!

Mailing list, (Discussion)
--------------------------------------
If you want to 'chat' about DNEWS with other DNEWS users, discuss possible
new features, complain or praise the wonderful support we give or generally
natter to other people running similar systems,  then you can join the 
DNEWS discussion list which is kindly hosted by Stephen White:

To subscribe send a message to:
        dnews-request@adam.com.au

Containing one line:
		subscribe

To send messages to the list send to:
		dnews@adam.com.au

-----------------------------------------------------------------------------
(11) 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
	us, 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
	
Enabling the DNEWS Full Text Searching engine
---------------------------------------------
Warning: This is a beta release of the Full Text Searching mechanism which
was more than a little difficult to implement, it is still experimental at this
time! We will be keen to hear how it performs in the 'real world' your feedback 
is always valuable.  

Warning!!! To build a really complete index will require free space
of about 10-50% the size of your spool area, it will also gobble up
signficant processor & memory resources.  See the file fts.conf to control how
much of each item is actually indexed, and limit the list of groups that
you send to the indexing service.

You can 'index' a subset of groups, possibly just your local
news groups which are important to you, this will require very little 
resources.

What to do:
	1) In dnews.conf define the directory to use to build indexes, it
	   must be a disk with lots of free space :-)
		fts_dir c:/dnews/fts		   (NT) 
		fts_dir /var/spool/dnews/fts   (Unix) 
	2) Create the directory and move or copy fts.conf into it.
		(NT)
		  mkdir c:/dnews/fts
		  copy /dnews/fts.conf c:/dnews/fts
		  del /dnews/fts.conf (so you don't mix it up with the real one)
        (UNIX)
          mkdir /var/spool/dnews/fts
          copy fts.conf /var/spool/dnews/fts   
	3) Install an xmit service to build the indexes:
		(NT) 
		  addsvc -del dfts 
		  addsvc -add dfts xmit.exe "dfts ftsfeed -fts -at *5 *"
		(UNIX)
		  nohup xmit ftsfeed -fts -at "*5" "*" &
		  (put that in a startup file)
	4) Add an ftsfeed to newsfeeds.conf to send items to the xmit service.
	   Select a list of groups that seem sensible to index, don't index
	   the binary groups :-)  (add this to the end of newsfeeds.conf)
		site ftsfeed
			groups !*,comp.*,rec.*,local.*
	5) Install dnewsweb, and in dnewsweb.ini tell it that fts is enabled
		search true
	6) From Program Manager start the xmit fts service:
		In Control Panel, Services, Start the DFTS Service
		(UNIX) nohup xmit ftsfeed -fts -at "*5" "*" &
	7) Wait for the indexes to start being created, if you have a small
	   system you might want to send your current items into the database
	   we DO NOT RECOMMEND using this command, it WILL lock up dnews
	   for several minutes:
	        tellnews refeed ftsfeed   (DO THIS AT YOUR OWN RISK)
	8) Try the system out:

	Notes:
		1) New items will not appear immediately as DNEWS does
		   not reload the database very often.

/* ---------------------- Example code darchiv.c -------------------- */
/* This sample archiver just writes all the articles to a single file */

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE (!FALSE)
#endif

#define MAX_LINE 20000
void main(int argc, char *argv[])
{
	FILE *f;
	char bf[MAX_LINE];
	int inarticle= FALSE;
	f = fopen(argv[1],"a");
	if (f==NULL) {perror(argv[1]); return;}	

	for (;!feof(stdin);) {
  	  if (fgets(bf,MAX_LINE-1,stdin)==NULL) break;
	  if (!inarticle) {
	  	if (strncmp(bf,"ARTICLE",7)==0) {
			inarticle = TRUE;
			continue;
		} else {
			fprintf(f,"--- Unknown Command {%s} \n",bf);
			continue;
		} 
	  } else {
		if (strcmp(bf,".\n")==0) { /* single full stop is end of message */
			fflush(f); 
			fprintf(f,"-------------Next Message----\n");
			inarticle = FALSE;
			continue;
		}
		if (strcmp(bf,"..\n")==0) strcpy(bf,".\n"); /* message contained a full stop so it was translated */
	 	fwrite(bf,1,strlen(bf),f); /* Write message to archive */
 	  }
	}
	fclose(f);
}
/*------------ End of sample program --------*/	  	  

