VMSNEWS Release 4.02 23-Nov-1987 Author : Geoff Huston Address : Computer Services Centre Australian National University G.P.O. Box 4, Canberra City, A.C.T. 2601 AUSTRALIA (062)492763 ------------------------------------------------------------------------------ ACSnet,CSNET: gih900@fac.anu.oz INTERNET: gih900%fac.anu.oz@uunet.uu.net UUCP: {uunet,hplabs,ubc-vision,nttlab,mcvax,ukc}!munnari!fac.anu.oz!gih900 +-----------------------------------------------------------------------------+ | NEWS, Copyright (c) Geoff Huston, Australian National University, 1987 | | | | License is granted to run this software on one condition: | | | | The Licensee registers with the copyright holders the details of the | | systems which are running NEWS. In doing so I will also endeavour to notify| | you of new versions and bug fixes. It is a condition of the license that | | the following letter is mailed to: | | | | Geoff Huston | | Computer Services Centre | | Australian National University | | GPO Box 4, Canberra, ACT 2601 | | Australia | | | | or the letter may be e-mailed to: | | | | ACSnet,CSNET: gih900@fac.anu.oz | | INTERNET: gih900%fac.anu.oz@uunet.uu.net | | UUCP: {uunet,hplabs,ubc-vision,nttlab,mcvax,ukc}!munnari!fac.anu.oz!gih900| | | | No charge is made for this license. NEWS is free software. | | | | +--------------------------------------------------------------------------+| | | || | | || | | Please license the following system for the NEWS Software: || | | || | | ORGANISATION: _______________________________________________ || | | || | | ADDRESS: ____________________________________________________ || | | || | | ____________________________________________________ || | | || | | ____________________________________________________ || | | || | | ____________________________________________________ || | | || | | CONTACT: ____________________________________________________ || | | || | | E-MAIL: ____________________________________________________ || | | || | | ____________________________________________________ || | | || | +--------------------------------------------------------------------------+| | | | Permission is given to make and distribute copies of this software provided | | 1: the author headers in all the source files are preserved | | 2: that any further distribution of this software is free (except for a | | nominal shipping change which may be applied). | | 3: This file is included in all distributed copies of NEWS. | | | | Permission is given to modify the sources in any way, provided: | | 1: the author headers are preserved on the source files | | 2: the source files contain a header stating who changed the source | | and the date of the change | | | | NOTE : This software is distributed free of change on the understanding that| | no warranty is implied with this software, nor any liability is incurred | | by the owner of the original copyright nor any person who has modified | | the file(s), nor any person who permits a copy of the software to be made| +-----------------------------------------------------------------------------+ NEWS The files in this save set build the complete news system on VMS. This is NOT set up as a VMS INSTALLable product. The software is distributed in the source, object and execuatable formats, BUT will require one module to be written (in the language of your choice!) and linked against the object files. It will also require the installation of a number of logical names, and a number of DCL procedures to be defined at each site. SOURCE FILES: The .CLD files are NEWSCMD.CLD command definition file (NEWS uses the DCL parser) The .H files are: CLIMSGDEF.H CLI return status definitions - missing in VMS C LNMDEF.H Logical name service definitions - ditto! SMGDEFEXTRA.H SMG defintions - missing in VMS C SORTDEF.H Definitions for callable sort (SOR$) SYIDEF.H SYS$GETSYI definitions - missing in VMS C (These 5 files are normally set up into a text library, and the logical name C$LIBRARY used to point to that library during the compile runs) e.g. $ library/text/create ldef clismgdef.h,smgdefextra.h,- syidef.h,lnmdef.h,sortdef.h $ define c$library ldef NEWSDEFINE.H NEWS definitions NEWSEXTERN.H import variables NEWSINCLUDE.H standard include set NEWSSITE.H Defines newsgroup & newsitem lifetimes, and batchfile size NEWSVARIABLES.H variables definition The .C files are: ADD_TRANSFORM.C Internet address to VMS address transformation THIS FILE IS SITE SPECIFIC, and must be written to suit the local configuration NEWSADD.C Adding network news items into NEWS NEWSCREATE.C Create new newsgroups NEWSDEFINE.C Key definition NEWSDELETE.C Delete newsitem / newsgroup NEWSDIR.C Directory listings NEWSDISPLAY.C Display a news item NEWSEXTRACT.C Extract / Print news items NEWSFORWARD.C Forward / Reply using VMS Mail NEWSHELP.C Help command NEWSMODE.C Utility procedures for up,down arrow functionality NEWSPOST.C Post / Followup postings into NEWS NEWSREAD.C Read news item NEWSREGISTER.C Register into newsgroups NEWSSELECT.C View items within a newsgroup NEWSSETSHOW.C Set / show newsgroup / newsitem attributes NEWSSITE.C Startup code, reads local logical names NEWSSKIM.C Delete old newsitems NEWSSKIP.C Skip reading news items NEWSUTILITY.C Utility functions (These files are compiled and placed into a local object library, which is explicitly names when linking NEWS) NEWS.C Main program The .COM files are: NEWSSKIM.COM Collect MAIL items and deliver DECNET items THIS FILE IS SITE SPECIFIC - MODIFY IT TO SUIT YOUR SITE REQUIREMENTS The .HLB file (and associated files): NEWS.HLP which is used to make NEWS.HLB NEWS.HLB the actual help file The Link options file is: OPTIONS_C_LINK.OPT This file causes the link to use sys$library:vaxcrtl.exe as the sharable runtime library rather than the default of sys$library:vaxcrtl.olb INSTALLATION: 1. Build the Executables (AND WRITE SOME CODE FIRST) VMS NEWS uses internet style addresses internally, and must be able to convert these addresses into VMS usable addresses. This address transformation is performed by the procedure "add_transform". READ the comments in ADD_TRANSFORM.C, and write (in your favourite language!) an equivalent module which matches the requirements for your site's mailer. Then create two object files: ADD_TRANSFORM.OBJ normal compilation ADD_TRANSFORMD.OBJ compile with /DEBUG/OBJECT=ADD_TRANSFORMD Add these to the object libraries: $ LIBRARY/OBJ NEWS_LIBRARY ADD_TRANSFORM $ LIBRARY/OBJ NEWS_LIBRARYD ADD_TRANSFORMD Link the form the new executable: $ LINK/NODEBUG/NOTRACE NEWS,NEWS_LIBRARY/LIBRARY, OPTIONS_C_LINK/OPT $ LINK/DEBUG NEWSDBG,NEWS_LIBRARYD/LIBRARY,OPTIONS_C_LINK/OPT 2. [Optional, but this does make life much easier!] Add an account for a NEWSMGR - this account runs the NEWSSKIM and NEWSNET batch jobs (and should have proxy entries to other DECNET NEWSMGR accounts if more than one node will be running NEWS on the one DECNET). There are no special requirements for this account, but it may need a reasonable disk quota if you are anticipating a large amount of network news flowing through your system. 3. Logical Names - IT IS IMPORTANT THAT THESE NAMES EXIST BEFORE RUNNING NEWS FOR THE FIRST TIME. An example follows: (This is the file SETUP_LOG_EXAMPLE.COM) $! NEWS logical names as set up at the ANU - the names $! are documented in AAAREADME.TXT $! $! root of news tree $! $ DEFINE/SYSTEM/EXEC NEWS_ROOT ANU_PKG:[NEWS] $ DEFINE/SYSTEM/TRANS=(conc)/EXEC NEWS_DEVICE ANU_PKG:[NEWS.] $! $! News manager accounts must own this identifier $! $ DEFINE/SYSTEM/EXEC NEWS_MGR_ID NEWSMANAGER $! $! the node address is the internet address of the node $! $ DEFINE/SYSTEM/EXEC NEWS_ADDRESS CSC.ANU.OZ $! $! the node name is either the decnet node name, or the cluster decnet alias $! $ DEFINE/SYSTEM/EXEC NEWS_NODE CSC $! $! The name of the organisation $! $ DEFINE/SYSTEM NEWS_ORGANISATION "CSC, Australian National University" $! $! The "work directory" for news - normally sys$login of the news manager $! account $! $ DEFINE/EXEC NEWS_MANAGER ANUDISK:[G900.NEWS] $ DEFINE/SYSTEM/TRANS=(conc)/EXEC NEWS_MANAGER_DEV ANUDISK:[G900.NEWS.] $! $! Custom editor definitions $! $ DEFINE/SYSTEM NEWS_TPUEDIT "TPU/NOJOURNAL/SEC=ANU_LIBRARY:ANU_EVE" $ DEFINE/SYSTEM NEWS_TPUVIEW "TPU/NOJOURNAL/READONLY/SEC=ANU_LIBRARY:ANU_EVE" Details: - NEWS_ROOT - NEWS_DEVICE both point to the news files parent directory. Both must be defined in EXEC mode. The news data files are placed in a tree descending from this root. The index files and help file are placed in NEWS_ROOT. - NEWS_MGR_ID NEWS_MGR_ID translates to the identifier name which must be granted to any users who require the management functions of NEWS (delete newsgroup, create newsgroup, etc). EXEC mode to stop unauthorized users tinkering with NEWS. - NEWS_ADDRESS NEWS_ADDRESS translates to the internet address of the host node. This is typically of the form "node.site.domain" - NEWS_NODE NEWS_NODE translates to the local node name. This is made a logical name to allow a cluster to operate as a single logical node, using a cluster alias. - NEWS_ORGANISATION NEWS_ORGANISATION translates to the name of the organisation. This is to help in identifying the person posting the message to other users on the net. - NEWS_MANAGER - NEWS_MANAGER_DEV NEWS_MANAGER is the work directory of the NEWSMGR account. All temp files used in news maintenance are placed here. NEWS_MANAGER_DEV is the equivalent area, defined as a concealed device. OPTIONAL - NEWS_TPUEDIT - NEWS_TPUVIEW The default editor used by NEWS is the TPU edt emulator. This may be changed by equating these two logical names to a new TPU command. TPUEDIT is used to edit files, TPUVIEW to read files. OPTIONAL - NEWS_EDIT - NEWS_VIEW You can call other editors than TPU, but they will be called as SPAWNED SUB PROCESSES. To do this, use the logical names NEWS_EDIT and NEWS_VIEW. These logical names are used in the same fashion as "MAIL$EDIT": the logical name points to a DCL COMMAND PROCEDURE which is used to edit the file. The procedure will be handed only one parameter, the name of the file to edit (or to view in the case of NEWS_VIEW). MAIL$EDIT is a useful place to start when writing your own NEWS_EDIT and NEWS_VIEW procedures. Included in this distribution set is the file NEWSEDIT_EXAMPLE.COM. To invoke this command procedure the LOGIN.COM command is: +----------------------------------------------------------------------------+ | DO NOT DEFINE NEWS_EDIT or NEWS_VIEW as /SYSTEM logical names! If you | | do define them as system wide logical names, those users who wish to | | use TPU will have to define their own per process versions of NEWS_EDIT | | and call TPU as a subprocess (which is slower than necessary). If you | | leave the definition of NEWS_EDIT and NEWS_VIEW up to individual users, | | then you leave TPU users with the ability to use TPU relatively | | efficiently. | +----------------------------------------------------------------------------+ 4. DCL SYMBOLS: In the system login command add a symbol for news: $ NEWS :== $ location:NEWS 5. Copy NEWS.EXE to the location as specified by the DCL symbol for NEWS. Then install the image with SYSPRV. $INSTALL install> ADD location:NEWS.EXE /OPEN/HEAD/SHARE/PRIV=SYSPRV (SYSPRV IS REQUIRED to ensure that users who post news items end ------------------ up NOT owning the actual news text file!, and also IS REQUIRED to successfully initialise the indexed files on the first-time execution of the program) 6. Using AUTHORIZE, create the NEWSMANAGER identifier (the value of the logical name NEWS_MGR_ID), and grant the identifier to the user(s) who will be responsible for the management of NEWS. 7. Create the directories that have been defined by the logical names NEWS_MANAGER and NEWS_ROOT. 8. Using SYS$EXAMPLES:MAILUAF.COM, add an entry for the address "USENET", and add a forwarding address to the news manager on your host. 9. Copy NEWS.HLB to NEWS_ROOT: 10. Read (and then EDIT) file NEWS.SYS. This file determines which newsgroups you will accept, and which newsgroups your net partners will accept. The edited version of NEWS.SYS should be copied to NEWS_MANAGER:NEWS.SYS. You may wish to include the newsgroups "junk" and "control" for local acceptance to store reject newsitems for later viewing. 11. Read (and then EDIT the file NEWS.DISTRIBUTION. This file determines how news is distributed thorugh your node. If you are an 'end-node' for NEWS, then this file should be empty. The edited version of NEWS.DISTRIBUTION should be copied to NEWS_MANAGER:NEWS.DISTRIBUTION. 12. Read NEWSSKIM.COM modify it to suit your requirements. See comments in the code (Then copy this files to NEWS_ROOT). This file is responsible for the collection and distribution of news items to remote sites. 13. That's almost it - login to NEWSMGR (or any account which has the News_Mgr_Id identifier and SYSPRV as an AUTHORIZED PRIV), and run NEWS. **> (NEWS should be installed with SYSPRV at this point - alternatively run NEWS from an account which has SYSPRV AS AN AUTHORIZED PRIV). ***> [***** DEFINE THE LOGICAL NAMES FIRST!! ****] The first time NEWS is invoked it will create the necessary indexed files. The files in NEWS_ROOT: should then be: NEWS.GROUPS indexed file containing newsgroup information (automatically created with restrictive protection mask) NEWS.ITEMS indexed file for news item descriptions (automatically created with restrictive protection mask) NEWS.HLB help file (copied in by you!!) NEWSSKIM.COM maintenance batch file (copied in by you after editing!) 14. Create some newsgroups (using the CREATE command). It is suggested that you include entries for "junk" and "control" in this list. 15. If you need to rebuild the files from sources, BUILD_NEWS.COM is included to simplify this process. Please read the header lines of this file before executing it. You will need VAX C to recompile all the sources. SECURITY ISSUES It is intended that NEWS be run with SYSPRV so as to control write access to the news files. (all news text files are readable without privs). All care has been taken to prevent users being able to get to DCL level with SYSPRV, or to read or write files using SYSPRV. Thus you will see calls to nosysprv() and sysprv() around code areas which are considered at risk. If you do not wish all users on your system to read all items in the news database, then the directories of the relevant newsgroups can be protected via ACLs (As sysprv is NOT used to read text files, the ACLS will be effective). Control message - the following control messages are implemented: cancel is executed correctly, but the local system cannot generate cancel messages to send to the wider net. Users who submit into news have no means of deleting their postings as yet. This will be fixed newgroup Implemented by posting a "create" command procedure to the USENET account. The news manager is expected to edit this procedure then execute it to bring the local database into line with the wider net. rmgroup Implemented by posting a "cleanup" command procedure to the USENET account. The news manager is expected to edit this procedure then execute it to bring the local database into line with the wider net. sendsys Automatic reply generation implemented senduuname Not that relevant - is implemented as a generated negative reply version Automatic reply generation implemented checkgroups Implemented by posting a "cleanup" command procedure to the USENET account. The news manager is expected to edit this procedure then execute it to bring the local database into line with the wider net. BUGS: I'm sure that many remain :-( - single-handed debugging cannot locate all possible errors in the short time I've been running this version. If you encounter problems, your options are to: - mail me a description of the problem - I'll attempt an answer if I can reproduce the problem here. - better still, run the debug version of the program, and mail me a more precise description of where the code is falling over. - better still, fix the bug, and mail me the details of the code change, so that it can be included in the distribution set. Also, if you make any useful modifications to the sources which you consider would be generally useful, please send me the changes and I will include them on the distribution set VERSION HISTORY: V4.01 Minor bug fix in NEWSUTILITY - no number greater than 127 could be read in at the command level - fixed V4.02 Added execution of the control messages Fixed sundry bugs in all modules FURTHER DIRECTIONS: 1 - Cross postings: Add the commands SET XREF and SET NOXREF with NOXREF the default. With XREF turned on, if a news item is posted to multiple newsgroups, once the first instance of the item has been viewed, all xref postings are also marked as having been read. 2 - Control Messages Ihave/Sendme not implemented - this is a low priority item as there seems to be little demand for this functionality. 3 - DECNET distributed news database Allow remote users to access the local news database for newsgroups which are not supported on the remote (VMS) system. Distribution - always a problem! - I will submit version 4.0 to DECUS in November 1987 (currently version 2.0 is available as VAX-214) - I will also make V4.0 available on a collection basis via AUSTPAC (using PSI_COPY from DTE 0505262440032