Setting up TIN under DLG. Running TIN under DLGpro is fairly straighforward. Here's what you need to do to get started. System Requirements =================== In order to run TIN under DLG you will need approximately 512k RAM per user [you can probably get away with less]. Each user will also use approx 100k of disk space as well. Since the current version of TIN is pure, you can make it resident, thus saving some space if you're running multiple copies. In addition you will need some disk space for the article index maintained by TIND. This will depend on the size of your newsfeed. In my case [Equinox runs a full newsfeed] this is around 5MB. By default the article index is kept under uunews: but it is possible to move this if you wish. If you SETENV TIN_INDEX to the desired directory, the index will be kept beneath the specified directory. This can be useful in order to minimise disk thrashing when running TIND, you will find performance is improved if the index and uunews: are on separate drives. If you wish to have multiple users running TIN you must be using WB2.04 or better, as TIN relies on the WB2.0 local environment to set up user variables. Installation ============ Create a directory for the TIN files and assign tin: to your directory. Copy the files from the archive to the appropriate directories. Follow the installation instructions for TIN. Create a menu entry which will run tin. This should be a Menu Script, set it to run 'tin:tin.dlg'. The current tin:tin.dlg uses MAKERES and MAKEUNRES in order to make TIN resident on demand [i.e when no users are running TIN it will not be left sitting around in memory]. If you wish to make TIN permanently resident, or if you don't want TIN to be resident at all, you should remove the MAKERES and MAKEUNRES lines. [If TIN is not resident, the EXE line in tin.dlg must be changed to: EXE tin:tin.exe ] Create a menu entry for bundling news saved from within TIN [if required] this should be a batch file set to run DLGconfig:batch/bundle_news %UNAME In order for bundle_news to work correctly, you will need DLGupload [provided with this archive], rename the executable to 'upload' and put it somewhere in your path. If users wish to check their saved news before bundling you can add another menu item to do this. It should run an executable as follows: c:list user:%UNAME/news Since TIN reads articles directly from uunews: there is no need to do all that messy importing and assigning that DLG normally requires and you can delete your DLG UseNet message areas completely if you're happy to have all your UseNet users running TIN. The TIN indexing daemon will need to be run periodically. How often will depend on the size of your newsfeed and how often you update it. I run TIND every 4 hours which seems to be plenty. Some environment variables need to be set up in order to prevent TIND from creating spurious NEWS and MAIL directories. The batch file index_daemon provides an example of this. If you aren't running CNews, you will also have to run actived, this reads your newsgroups file and your uunews:.next files and creates a new active file in uulib: the batch file active_daemon shows how to set this up, renaming the existing active file allows this to be run without problems if someone is running TIN at the time. I run this batch every half hour. If you don't run actived regularly, TIN users will never see new articles that arrive on your machine. Real Names & Aliases ==================== We have TIN set up so that DLG's %UNAME corresponds to the users ID, and %ALIAS corresponds to the users real name, this allows users to log in with a 'handle' and have their real name in their alias. e.g. DLG : Joe_Bloggs@equinox.gen.nz (bloggsy) Unix, DLG/TIN : bloggsy@equinox.gen.nz (Joe Bloggs) In order to do this of course, users would have to log in with their handle when DLG asks for first and last name, and their real name when DLG asks for an alias, which sounds a bit backwards. Nevertheless it still works OK if the user has given DLG their real name. Basically the Alias is there, so the user has control over what goes inside the (). You can change this easily if you don't like it. Restricting Access ================== It may be desirable to provide selective access to newsgroups for some users e.g. you may wish to make some newsgroups unavailable to minors. This can be achieved by creating fake active files which to not include the groups you want to restrict, and telling TIN to use the fake file. The program SETACTIVE is used to set the environment variable TIN_ACTIVE according to the data in the tin:access file. Access can be by user name or user level [or in fact any string or number can be used]. The tin:access file contains a token variable pair on each line. The token is either be a string [user name] or a number [user level]. The variable is the name of the active file for that user. [do not prepend uulib: to this!] Access by user level. The access file is searched until a token less than or equal to the given level is found. If there is no token less than or equal to the given level then TIN_ACTIVE is unset. This means that the level tokens must be listed in descending order in the access file. Access by user name. The access file is searched until a token matching the given name is found. If there is no token matching the given name then TIN_ACTIVE is unset. Note that if TIN_ACTIVE is unset, or the file specified does not exist, TIN will use UULIB:active as the active file. For this reason you should make UULIB:active the lowest common denominator of the various active files you wish to use [otherwise an error could result in someone accessing the full active file]. For examples of tin:access and uulib:banned see the files tin/access_by_name, tin/access_by_level and uulib/banned in the archive. If you do not wish to restrict access, you should remove the EXE setactive line from tin.dlg Creating Active files. The active file is created periodically by active_daemon, so this is the logical place to create the fake files as well. The supplied active_daemon has an example using grep which creates UULIB:active excluding the newsgroups in the banned file, and UULIB:active.dude including all newsgroups. Cnews users will not need to run active_daemon normally, but a similar technique can be used to create fake active files for TIN. By using these techniques it is possible to have any number of different access restrictions in place, it's simply a matter of creating the active files, and using SETACTIVE to point the users at the appropriate one. Execing with EXEC ================= Included with this archive is EXEC, which is used to run resident [or internal] programs from a DLG menu script. In tin.dlg EXEC is used to run TIN when it has been made resident. Usage: exec [-s] command [arg1 .. argn] EXEC is also useful when using tptshell, since it can be used to execute scripts and resident programs which can't normally be done from tptshell. Trimming with TRIM ================== We include in the archive a small trimnews replacement called trim, trim is faster than trimnews and responds to a break. usage: trim [-v] [-t n] [-f ] Without any arguments Trim will behave just like trimnews, however instead of outputting the delete information, trim will display the names of .next files which are greater than 14 days old. Use the -v flag if you wish to see the delete information. The -t n flag can be used if you wish to change the number of days expiry from that specified in the newsgroups file, e.g. if you have all your newsgroups set to expire at 5 days, and wish to trim back to 4 days, type: trim -t 1, this subtracts 1 from the expiry time for each newsgroup in the newsgroups file. If you wish to use a different newsgroups file from the default [uulib:newsgroups], use the -f option. One disadvantage of trim, is that it cannot cope with a break in the sequential numbering of news articles, therefore it may be wise to run trimnews from time to time to pick up any stray articles. Changes for 1.2 PL1 =================== The Tin indexing structure is changed in this release, therefore it is essential that you use the TIND included here with Tin 1.2 PL1. You should also delete all your old index files before running Tin. A new version of doarchive is included which will work with any archiver properly installed into DLG. Acknowledgements ================ We include some PD executables with this archive which we have found useful when running TIN under DLG. The stuff we have written we have provided source for, we wish to acknowledge the various authors of the other executables which we have included for the sake of completeness. Thanks to Erik Karlin for the updated doarchive. We would also like to thank the DLG sysops who have sent us feedback and suggestions. In Case of Problems, Contact: ============================= Geoff McCaughan - geoff@satori.equinox.gen.nz Mark Tomlinson - mark@garden.equinox.gen.nz Who also brought you KiwiElm, Telnet and FTP for the Amiga