home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / misc / linhowto.zip / NEWS.HOW < prev    next >
Text File  |  1993-10-08  |  28KB  |  767 lines

  1. Newsgroups: comp.os.linux.announce,comp.os.linux.admin,comp.answers,news.answers
  2. From: vince@victrola.wa.com (Vince Skahan)
  3. Reply-To: vince@victrola.wa.com (Vince Skahan)
  4. Followup-To: poster
  5. Subject: Linux News HOWTO
  6. Approved: linux-announce@tc.cornell.edu (Matt Welsh)
  7. Keywords: Linux News NNTP UUCP HOWTO USENET
  8.  
  9. Archive-name: linux/howto/news
  10. Last-modified:  06 September 1993
  11.  
  12. The Linux News HOWTO
  13. by Vince Skahan, <vince@victrola.wa.com>
  14. v1.0, Last Modified 06 September 1993
  15. ---------------------------------------------------------------------------
  16.  
  17. This document describes the setup and care+feeding of USENET News under
  18. Linux.
  19.  
  20. You need to read this if you plan to post or read USENET news either
  21. locally on your site or between your site and other sites.
  22.  
  23. You probably do *not* need to read this document if don't plan to provide
  24. USENET news as a feature of your system.
  25.  
  26.  
  27. 0.  Introduction
  28.  
  29. The intent of this document is to answer some of the questions and comments
  30. that appear to meet the definition of 'frequently asked questions' about
  31. USENET News software under Linux in general, and the version in the Linux
  32. SLS distribution in particular.
  33.  
  34. This document and the corresponding Mail and UUCP 'HOWTO' documents
  35. collectively supersede the UUCP-NEWS-MAIL-FAQ that has previously been
  36. posted to comp.os.linux.announce.
  37.  
  38.  
  39. 0.1 New versions of this document
  40.  
  41.     New versions of this document will be periodically posted to
  42.     comp.os.linux.announce, comp.answers, and news.answers.  They will
  43.     also be added to the various anonymous ftp sites who archive such
  44.     information including sunsite.unc.edu:/pub/Linux/docs/HOWTO.
  45.  
  46.  
  47. 0.2 Feedback
  48.  
  49.     I am interested in any feedback, positive or negative, regarding
  50.     the content of this document via e-mail.  Definitely contact me if
  51.     you find errors or obvious omissions.
  52.  
  53.     I read, but do not necessarily respond to, all e-mail I receive.
  54.     Requests for enhancements will be considered and acted upon based on
  55.     that day's combination of available time, merit of the request, and
  56.     daily blood pressure :-)
  57.  
  58.     Flames will quietly go to /dev/null so don't bother.
  59.  
  60.     Feedback concerning the actual format of the document should go to
  61.     the HOWTO coordinator - Matt Welsh (mdw@sunsite.unc.edu).
  62.  
  63.  
  64. 0.3 Other sources of information
  65.  
  66.     USENET:
  67.     =======
  68.     news.admin        Comments directed to news administrators.
  69.     news.admin.misc        General topics of network news administration.
  70.     news.admin.policy    Policy issues of USENET.
  71.     news.admin.technical    Maintaining network news. (Moderated)
  72.     news.software.b        Discussion about B-news-compatible software.
  73.     news.software.nn    Discussion about the "nn" news reader package.
  74.     news.software.nntp    The Network News Transfer Protocol.
  75.     news.software.readers    Software used to read network news.
  76.     news.sysadmin        Comments directed to system administrators.
  77.     news.announce.newusers    Explanatory postings for new users. (Moderated)
  78.     news.newusers.questions    Q & A for users new to the Usenet.
  79.  
  80.     Books:
  81.     ======
  82.  
  83.     The following is a non-inclusive set of books that will help...
  84.  
  85.     'Managing UUCP and USENET' published by O'Reilly+Associates is in
  86.     my opinion the best book out there for figuring out the programs
  87.     and protocols involved in being a USENET site.
  88.  
  89.     'Unix Communications' published by The Waite Group contains a nice
  90.     description of all the pieces (and more) and how they fit together.
  91.  
  92.     'Practical Unix Security' published by O'Reilly+Associates has a
  93.     nice discussion of how to secure UUCP in general.
  94.  
  95.  
  96. 0.4 Where *NOT* to look for help
  97.  
  98.     There is nothing 'special' about configuring and running USENET
  99.     news under Linux (any more).  Accordingly, you almost certainly do
  100.     *NOT* want to be posting generic news-related questions to the
  101.     comp.os.linux.* newsgroups.
  102.  
  103.     Unless your posting is truly Linux-specific (ie, "please tell me
  104.     what patches are needed to run INN with the bash1.12 in SLS v1.03)
  105.     you should be asking your questions in the newsgroups mentioned above.
  106.  
  107.     Let me repeat that.
  108.  
  109.     There is virtually no reason to post anything news-related in the
  110.     comp.os.linux hierarchy any more.  There are existing newsgroups in
  111.     the news.* hierarchy to handle *ALL* your questions.
  112.  
  113.  
  114. 1.0 Hardware Requirements
  115.  
  116.     There are no specific hardware requirements for USENET News under
  117.     Linux.  The only requirement of any type is sufficient disk space
  118.     to hold the software itself, the threads database(s), and the
  119.     amount of news you wish to keep on the system.  Figure on a minimum
  120.     of 10 MB of disk space for starters.
  121.  
  122.  
  123. 2.0 Getting USENET News software 
  124.  
  125.     All the software referenced in this 'HOWTO' is available on the usual
  126.     Internet anonymous ftp sites.  
  127.  
  128.     Looking in /news on ftp.uu.net is usually a good way to start.
  129.  
  130.     The newspak-1.7.tar.z distribution contains config files and readme
  131.     files related to building uucp, news, and mail software under Linux
  132.     from the various freely-available sources.  It can usually be found 
  133.     on sunsite.unc.edu in the directory /pub/Linux/system/Mail.
  134.  
  135.  
  136. 3.0 News Transport Software
  137.  
  138.     There are two main sets of news 'transport' software for *nix these
  139.     days, Cnews and INN.  The old 'Bnews' has been declared officially
  140.     dead and unsupported by its authors.
  141.  
  142.     News 'transport' is defined here to be the software that works behind
  143.     the scenes to post and propagate the news articles as well as making
  144.     the articles available for the newsreaders to access.
  145.  
  146.     You can set your paths to anything you like, as long as UUCP has the
  147.     absolute path to rnews in the Permissions file and as long as you
  148.     have your newsreaders configured so that they can find 'inews' and
  149.     'mail'.
  150.  
  151.     Important - you're asking for trouble if you try to intermix Cnews
  152.     and INN.  Pick one or the other.  It's ok to add the NNTP 'Reference
  153.     Release' into Cnews since they're intended to play well together.
  154.  
  155.  
  156. 3.1 Cnews Performance Release
  157.  
  158.     The current de-facto standard news software is Cnews.  It has been
  159.     around for a number of years, I first saw it sometime around 1988.
  160.  
  161.     Cnews's main benefit is its maturity.  It runs on about every *nix
  162.     you can find and there are literally thousands of systems running
  163.     it worldwide.
  164.  
  165.     Its main disadvantage is that it seems to have been intended for
  166.     uucp-over-modem connections between sites and as such requires 
  167.     the addition of NNTP software to handle realtime Internet feeds
  168.     and reading.  
  169.  
  170.     In addition, it requires external threading packages for the
  171.     various newsreaders, although the NOV package can now be hooked in
  172.     to help somewhat and it's rumored to have native NOV support in the
  173.     upcoming 'cleanup' release.
  174.  
  175.     Regardless, the beginning USENET admin should probably run Cnews
  176.     first since it's so stable, well documented, and has many thousands
  177.     of experienced administrators who can answer questions.
  178.  
  179.     The newspak-1.7.tar.z distribution on sunsite contains working
  180.     config files for Cnews under Linux as well as a couple line patch
  181.     you'll need to make to 'doexplode' to get around some problems with
  182.     bash1.12.
  183.  
  184.  
  185. 3.1.1 Installing Cnews
  186.  
  187.     Installing the Performance Release of Cnews is absolutely a 'rtfm'
  188.     project.  Just grab the sources, extract them, and follow the
  189.     instructions.
  190.  
  191.     The build.def in newspak was generated by running 'build' the
  192.     first time and simply looking up the answers by checking out the
  193.     /usr/include files to get the right answers.
  194.  
  195.     When you start the actual compilation, it'll blow up a couple of
  196.     times.  In all cases, you'll need to simply comment out a couple of
  197.     atoi() and atol() macros that gcc doesn't like when your doit.bin
  198.     compilation blows up.  
  199.  
  200.     Also, you need the following tiny change to doexplode to get around
  201.     some bash1.12 bugs or else you won't feed anything downstream...
  202.  
  203.     [...from Steve Robbins -  steve@nyongwa.cam.org ...]
  204.  
  205.     if [ ! -f $f ] ; then continue; fi            # add this line
  206.     #    case "$f" in                            # comment me out
  207.     #    "out.master/[0-9]*")    break ;;    # comment me out
  208.     #    esac                                    # comment me out
  209.  
  210.     Henry Spencer of Cnews fame says that the code in doexplode that is
  211.     currently causing problems with bash is on the list to be revised in
  212.     a future release.
  213.  
  214.  
  215. 3.1.2 Configuring Cnews
  216.  
  217.     At the very least, you need to edit the following files that all
  218.     should be in /usr/local/lib/news:
  219.  
  220.         active             - the active file
  221.                 batchparms         - batch parameters
  222.                 explist            - article expiration setup
  223.                 mailname           - name in headers for mailed replies
  224.                 mailpaths          - path to mail moderated postings to
  225.                 organization       - your 'org'
  226.                 sys                - control what you take and feed
  227.                 whoami             - your hostname for the Path: line
  228.  
  229.  
  230. 3.1.3 Maintaining a Cnews Site
  231.  
  232.     First, a significant rule of thumb is to not mess with files
  233.     by hand that have utilities that configure them. In particular
  234.     don't set up newsfeeds (run 'addfeed'instead) and don't mess with
  235.     your active file (run 'addgroup').  When in doubt, read and re-read
  236.     the docs in the source distribution.
  237.  
  238.     Everything else can be done via cron.  My crontab for 'news' looks
  239.     like the following:
  240.  
  241.     # take the compressed batches that came in from other systems
  242.     20 *       * * * /usenet/sw/news/bin/input/newsrun  
  243.  
  244.     # batch 'em up to go out
  245.     0 *       * * * /usenet/sw/news/bin/batch/sendbatches myfeedsite
  246.  
  247.     # expire C-news 
  248.     59 0       * * * /usenet/sw/news/bin/expire/doexpire 
  249.  
  250.     # monitor stuff and report if needed
  251.     10 5 * * * /usenet/sw/news/bin/newsdaily 
  252.     00 5 * * * /usenet/sw/new/bin/newswatch 
  253.  
  254.     # turn processing of incoming news batches off 6:30AM - 4:00 PM
  255.     30 6       * * * /usenet/sw/news/bin/input/newsrunning off 
  256.     00 16       * * * /usenet/sw/news/bin/input/newsrunning on 
  257.  
  258.  
  259. 3.2 InterNetNews (INN)
  260.  
  261.     INN is the newcomer on the scene, but it's gaining popularity as
  262.     it matures.  Its main benefit is speed and the fact that it contains
  263.     an integrated nntp package.  Its main drawback is that it's new and
  264.     that it doesn't necessarily install and run flawlessly on the many
  265.     'standard *nixes' yet.  In addition, it operates by having a daemon
  266.     (the innd) always running plus potentially a overchan daemon to do
  267.     threading.  The tradeoff seems to be memory vs. speed.
  268.  
  269.     New USENET admins should probably not try INN until they have
  270.     experience with either B-news or Cnews.  While it's fast and
  271.     reliable under Linux, it's virtually undocumented for the 
  272.     beginning news administrator (though in practice it's rather
  273.     simple to run once you figure it out).
  274.  
  275.     INN is very particular about its permissions.  Don't mess with them.
  276.  
  277.  
  278. 3.2.1 Installing INN
  279.  
  280.     [... from Arjan de Vet - devet@info.win.tue.nl ...]
  281.  
  282.     I've made a patch + config kit for INN 1.4 to get it to run on Linux.
  283.     It can be found at:
  284.  
  285.     ftp.win.tue.nl:/pub/linux/ports/inn-1.4-linux.tar.gz
  286.  
  287.     INN depends heavily on a good /bin/sh substitute. I use a beta
  288.     version of bash 1.13.  bash 1.12 gives some small problems with
  289.     newgroups not being handled correctly (maybe some other problems
  290.     too, I don't remember).
  291.  
  292.  
  293. 3.2.2 Configuring INN
  294.  
  295.     Basically follow Arjan's instructions and you'll be all set.
  296.     Here's the summary of what to do:
  297.  
  298.     - In config.data, make sure you have "HAVE_UNIX_DOMAIN    DONT"
  299.     - Add the hostname of the system running innd to hosts.nntp
  300.         (for a uucp-only site, that's your sitename...)
  301.     - Make sure you do not have a line for nntp in /etc/inetd.conf
  302.     - Make sure that you have innshellvars say "HAVE_UUSTAT DO"
  303.         rather than the 'DONT' in his example config.data if you
  304.         have uustat from the Taylor UUCP package installed.  If you
  305.         have this defined wrong, it'll result in no outgoing news
  306.         getting batched.
  307.  
  308.     If you run INN, *definitely* define the recommended syslogd
  309.     stuff because it is very, very helpful.
  310.  
  311.     There is a spectacular (!!!!) FAQ for INN that comes out monthly.
  312.     Look on rtfm.mit.edu for it.  You'll be glad you did.
  313.  
  314.  
  315. 3.2.3 Maintaining a INN Site
  316.  
  317.     I've found that there's essentially zero care-and-feeding of
  318.     a Linux INN site other than having a working 'cron'.  Basically
  319.     you want a crontab that looks something like the following:
  320.  
  321.     # daily maint, also expire the .overview database and articles
  322.     1 0 * * * /usenet/sw/inn/bin/news.daily expireover delayrm < /dev/null
  323.  
  324.     # process batches that came in when innd was down for maint
  325.     20 23 * * * /usenet/sw/inn/lib/rnews -U
  326.  
  327.     # send 'em out
  328.     5 * * * * /usenet/sw/inn/lib/send-uucp
  329.  
  330.  
  331. 3.3 Other News Transport Agents
  332.  
  333.     The following is a non-inclusive list of other news transport
  334.     software known to work under Linux:
  335.  
  336.                  dynafeed, nntp1.5.11, slurp1.05
  337.  
  338. 4.0 News Readers
  339.  
  340.     There is no 'one true newsreader'.  As a result, there are many
  341.     well-known newsreaders that port easily to Linux in particular.  At
  342.     this writing, 'tin', 'trn', and 'nn' are in the SLS distribution of
  343.     Linux.
  344.  
  345.     When picking a newsreader, you basically want to find something
  346.     that is easy to use, very configurable by the user, with threading
  347.     and kill files (to select interesting articles or make the
  348.     non-interesting ones not appear at all).
  349.  
  350.     You can set your paths to anything you like as long as all the
  351.     newsreaders can find 'inews' from your Cnews or INN installation
  352.     and a 'mail' program to send mail replies to posts.
  353.  
  354.     This section will talk briefly about several of the most popular
  355.     ones.  Before you ask, I use 'nn' for lots of reasons :-)
  356.  
  357.     
  358. 4.1 Tin
  359.  
  360.     Tin is a threaded newsreader generally intended to be easy for new
  361.     users.  It supports kill files and soon will support NOV threading
  362.     from INN.
  363.  
  364.     To compile Tin under linux, basically just edit the makefile to set
  365.     the locations of the software (especially the location of inews)
  366.     and type 'make sysv'.  There are no patches required for tin under
  367.     Linux.
  368.  
  369.     For threading, you can basically just say 'tin -U' to update the
  370.     threads.
  371.  
  372.     To enable the ability to read via NNTP, compile with 'NNTP_ABLE'
  373.     defined.  This will result in a file called 'tin' for local and one
  374.     called 'rtin' for NNTP reading.  'tin -r' will also get the same
  375.     behavior as 'rtin'.
  376.  
  377.     The following is a typical crontab entry for 'tin':
  378.  
  379.     # thread the database
  380.     35 * * * * /usenet/bin/tin -u
  381.  
  382.  
  383. 4.2 Trn/Mthreads
  384.  
  385.     trn is a threaded derivative of the 'rn' newsreader.  trn3.3 has
  386.     the nice ability to select either the 'mthreads' (trn's threading
  387.     package) or NOV (threader from INN) threading.
  388.  
  389.     To compile it, just run Configure and take the calculated defaults.
  390.     You might need to have lib4.4.1 and bash-1.13 (which is unreleased
  391.     at this time and rather hard to find) to successfully run Configure.
  392.     
  393.     The newspak-1.7.tar.z distribution on sunsite contains working
  394.     config files for trn under Linux.
  395.  
  396.     It's probably unwise to try to edit a trn config.sh by hand unless
  397.     you're doing something *VERY* simple like changing the paths to
  398.     fit your tastes.  If you do so, you'll need to run 'Configure -S'
  399.     before you 'make depend', 'make', and 'make install'.
  400.  
  401.     Although 'Configure' fails generally under Linux, 'Configure -S'
  402.     work fine with bash 1.12 so if you take the newspak config.sh as a
  403.     starting point, you'll be very close.
  404.  
  405.     Compiling for NNTP reading is as simple as answering 'yes' when
  406.     Configure asks you if you want to do so (assuming Configure runs
  407.     ok on your system).  A future release of newspak will include a
  408.     config.sh for NNTP reading as well as the existing one for local
  409.     reading for those of us who are still 'bash-impaired' :-)
  410.  
  411.     There are dozens of command line switches for trn to get all kinds
  412.     of behavior.  Read the 'trn' man page for details.  I use a nice
  413.     feature to set all the switches easily:
  414.         - add all the settings in a file called ~/.trnrc
  415.         - export TRNINIT="~/.trnrc"
  416.  
  417.     A future newspak will have my .trnrc file as an example.
  418.  
  419.     trn3.2 and above has support for NOV or mthreads threading
  420.     that's user-selectable.  Accordingly, I recommend building the
  421.     software to allow both threading mechanisms (it's a question in
  422.     Configure).  To pick one at runtime, try 'trn -Zo' for NOV and 'trn
  423.     -Zt' for mthreads.
  424.  
  425.     To build the mthreads database, do something like the following
  426.     in the 'news' crontab:
  427.  
  428.     # thread the trn database
  429.     35 * * * * /usenet/bin/mthreads all
  430.  
  431.     
  432. 4.3 NN
  433.  
  434.     The newspak-1.7.tar.z distribution on sunsite contains working
  435.     config files for nn6.4.18 that you can drop into place and type
  436.     'make' under Linux.  
  437.  
  438.     When you're done compiling, you need to do the following:
  439.         - run the 'inst' program to install things.  
  440.             (install everything)
  441.         - initialize the database
  442.         - fire up nnmaster
  443.  
  444.     See the nn docs for details.  Compiling, configuring, and running
  445.     nn under Linux is no different than running nn on any other *nix
  446.     with the exception that you probably want to run nnmaster as a cron
  447.     entry rather than as a daemon.  If you run it as a daemon under
  448.     linux, it doesn't tend to wake up properly (the net effect of
  449.     running it from cron is the same anyway).
  450.  
  451.     Support of 'nn' is as simple as the following crontab entries:
  452.  
  453.     # run nnmaster to collect 'nn' stuff
  454.     25 * * * * /usenet/sw/nn/lib/nnmaster
  455.  
  456.     # expire the nn database
  457.     0  4       * * * /usenet/sw/nn/bin/nnadmin =EYW 
  458.  
  459.     # stash a copy of the active file for 'nngoback' and keep last 7
  460.     0 3 * * * /usenet/sw/nn/lib/back_act 7 
  461.  
  462.  
  463. 4.4 Other newsreaders
  464.  
  465.     The following is a non-inclusive list of newsreaders said to
  466.     install and run under Linux:
  467.  
  468.         tass, xrn
  469.  
  470.  
  471. 5.0 Acknowledgements
  472.  
  473.  
  474.     The following people have helped in the assembly of the information
  475.     (and experience) that helped make this document possible:
  476.  
  477.         Ed Carp, Steve Robbins, Ian Taylor, Greg Naber, Matt Welsh 
  478.  
  479.     If I forgot anybody, my apologies...
  480.  
  481. #=============================================================================
  482.  
  483. 6.0 Frequently Asked Questions about USENET (in c.o.l.* anyway...)
  484.  
  485. 6.1 Why can't I post to moderated groups ?
  486.  
  487.     Probably because the newsreader is trying to call /bin/mail to send
  488.     the mail and it doesn't like it.  Replace the /bin/mail in SLS with
  489.     the port of mailx-5.3b.tar.z from the pub/Linux/system/Mail dir on
  490.     sunsite.unc.edu and make it mode 2755 and group mail (like 'elm')
  491.     and you'll be all set.
  492.  
  493.     Another possibility is that you have a moderated newsgroup set up
  494.     on your local system as not-moderated and somebody upstream is
  495.     quietly deleting the article (some system's software, not a
  496.     person).  Make sure you run a 'checkgroups' every now and then when
  497.     the checkgroups article rolls by in news.admin every few weeks.
  498.  
  499.  
  500. 6.2 Why do I have problems that appear to be permission-related ?
  501.  
  502.     Because until very recently, SLS didn't have a 'news' username or
  503.     group in the default passwd/group files.
  504.  
  505.     All the stuff in /usr/local/lib/news should be news.news except
  506.     /usr/local/lib/news/setnewsids which should be setuid root.
  507.  
  508.     You can use whatever UID and GID you want for 'news'.
  509.  
  510.  
  511. 6.3 Why can I post articles locally, but they don't get fed downstream ?
  512.  
  513.     Probably because you didn't call newsrun from cron.  Maybe because
  514.     you edited your sys file and messed it up.  There are examples of
  515.     each in the SLS /usr/local/lib/news directory.  Maybe because you
  516.     don't have a /usr/spool/news/out.going tree or something.
  517.  
  518.     Do not create newsgroups or feeds by editing the active or sys
  519.     files.  Use the utilities in /usr/local/lib/news/bin/maint to do
  520.     it.
  521.  
  522.  
  523. 6.4 Why doesn't SLS have the 'Performance Release' of C-news?
  524.  
  525.     Because it's optional.  Because it has problems under Linux in some
  526.     places.  Because the one in SLS is more stable and plenty fast
  527.     enough on any type of reasonable system (IMHO). If you need any
  528.     more convincing, here's a few excerpts from the C-news README.new
  529.     file:
  530.  
  531.         "This is the 20 Feb 1993 Performance Release of C News, a
  532.         minor update to the 2 May 1992 P.R. that just fixes some
  533.         installation problems and a couple of annoying bugs"...
  534.  
  535.         "This release is more or less a halfway step to what we've
  536.         been calling the "cleanup release"...
  537.  
  538.         "People who are happy with the older C News might want to
  539.         wait for the cleanup release, which is still coming
  540.         although behind schedule"...
  541.  
  542.  
  543. 6.5 Why doesn't SLS have nntp ?
  544.  
  545.     Because it's supposed to be plug-n-play under Linux and because I
  546.     didn't want to make SLS's news stuff doubly big by having to
  547.     maintain both nntp and non-nntp versions of the newsreaders and
  548.     news transport programs.  Also because it compiles in localized
  549.     information that is not overridable at runtime via a config file.
  550.  
  551.  
  552. 6.6 Why does doexpire (or relaynews or...) say "severe space shortage" when
  553.     there's lots of room ?
  554.  
  555.     Because it can't read /etc/mtab.  Make it mode 644.  This happens
  556.     when you unmount a mounted filesystem by root with a umask that
  557.     doesn't permit world-read of files owned by root.
  558.  
  559.  
  560. 6.7 Why does everything look normal, but posting doesn't happen ?
  561.  
  562.     Older versions of Linux had a 'broken' sed that C-news was prone
  563.     to blow up.  In particular, if you've installed over an old SLS,
  564.     be sure to check /bin and /usr/bin to be certain you have only
  565.     one copy of sed and that it's a modern one.
  566.  
  567.  
  568. 6.8  Can I hook the new news overview (NOV) stuff into trn/tin/nn to replace
  569.     the various independent thread databases ?
  570.  
  571.     Yes.  trn3.3 supports it now.  The next version of tin will.
  572.     
  573.     You can hook it into the Performance Release of Cnews and various
  574.     other readers as well...
  575.  
  576.     There is a proof-of-concept nn6.4.18 in src/news on world.std.com
  577.     that compiles and works under Linux too.  I run it here and have
  578.     nn running without having to run nnmaster (!).
  579.  
  580.     Look for nov.dist.tar.Z and the various <newsreadername>.dist.tar.Z
  581.     file for ones that give you the idea.
  582.  
  583.  
  584. 6.9  Why can't we have a binary distribution of NNTP ?
  585.  
  586.     Because significant local-only information is compiled-in and 
  587.     cannot be determined auto-magically at runtime.
  588.  
  589.  
  590. 6.10  How do I set up NNTP to allow read/post across the network while *not*
  591.     storing any news articles or databases locally.
  592.  
  593.     [... mdw@sunsite.unc.edu (Matt Welsh) ...]
  594.  
  595.     1) Grab the 'reference implementation' of nntp and a copy or rn
  596.         from your local archive site.  If you connect to ftp.uu.net
  597.         you'd grab:
  598.  
  599.         nntp.1.5.11.tar.Z from ftp.uu.net:/news/nntp
  600.         rn-4.4.pl3.tar.Z from ftp.uu.net:/news/rn
  601.  
  602.     2) compile nntp as follows:
  603.  
  604.         copy common/conf.h.dist to common/conf.h. 
  605.         Edit common/conf.h to set certain options: 
  606.         The only ones I set were: 
  607.  
  608.         DOMAIN: undefine it (i.e. change the line to #undef DOMAIN).
  609.         REALDOMAIN: Define this. It looks up the domain using 
  610.                 the libraries. 
  611.  
  612.         SERVER_FILE: Set this to the name of the file which will
  613.             contain the hostname of the news server (i.e. the
  614.             machine you'll read and post news through). I use
  615.             "/usr/local/lib/news/server".
  616.  
  617.         PASSFILE: If your news server requires authorization (i.e.
  618.             some kind of username/password) to post, set this to
  619.             the name of the file which contains the username and
  620.             password (described below).  I use
  621.             "/usr/local/lib/news/nntppass".
  622.  
  623.     I decided to keep all of the other news stuff in /usr/local/lib/news.
  624.     So I set all of the rest of the pathnames in the file (i.e.
  625.     ACTIVE_FILE, NEWSGROUPS_FILE, etc.) to use /usr/local/lib/news.  Many
  626.     of these files are only used by the NNTP server, not the client, but
  627.     to be safe I changed them all to point to the right directory. You can
  628.     of course use the default pathnames; just make sure you create the
  629.     directory accordingly.
  630.  
  631.     3) Create the user "usenet" if you haven't already. The inews program
  632.     runs as this user. All you need is a userid; you don't need a home
  633.     directory or shell or anything for the user. Just plop the following
  634.     line into your /etc/passwd:
  635.  
  636.                 usenet:*:13:1::/:
  637.  
  638.     Make sure you set the userid ("13", above) to something unique. The
  639.     group can be anything; I use "daemon" (gid 1).
  640.  
  641.     4) Create the SERVER_FILE, above. For example, my news server is
  642.     "wonton.tc.cornell.edu", so I created the file
  643.     /usr/local/lib/news/server which contained one line:
  644.          wonton.tc.cornell.edu
  645.  
  646.     5) Create the PASSFILE. This file contains lines of the form
  647.         <server name> <username> <password>
  648.  
  649.     Let's say that your news server (the one in SERVER_FILE, above) is
  650.     "shoop.vpizza.com", and to post on that machine you need to be
  651.     authorized as the user "news" with a password of "floof". Thus, in the
  652.     PASSFILE (I use /usr/local/lib/news/nntppass), you need the line
  653.         shoop.vpizza.com news floof
  654.  
  655.     6) Make this file secure! The inews program runs as the user "usenet",
  656.     so make this news directory owned by that user and the nntppass file
  657.     as well.
  658.  
  659.     chown usenet /usr/local/lib/news 
  660.     chmod 755 /usr/local/lib/news 
  661.     chown usenet /usr/local/lib/news/nntppass 
  662.     chmod 600 /usr/local/lib/news/nntppass 
  663.  
  664.     So nobody else can read this file. No, the passwords in it are not
  665.     encrypted.
  666.  
  667.     7) Go back to the nntp.1.5.11 source directory; issue "make client".
  668.     At this point you'll build the NNTP version of inews, which is the
  669.     only software used by the NNTP client.
  670.  
  671.     When I built inews, there was a bug in the library which caused the
  672.     function uname() in uname.c to call itself eternally. This should be
  673.     gone now; however, if inews seems to hang and your system starts
  674.     slowing down *a lot* you should rename the function "uname()" in
  675.     uname.c to something like "my_uname()", and change the calls to it (in
  676.     inews.c) to call my_uname() instead. Mail me if you run into this
  677.     problem. 
  678.         [...VDS note - this means mail to Matt...not me :-) ...]
  679.  
  680.     8) Issue "make install_client". This will install the inews stuff.
  681.     Also make the link /usr/local/lib/news/inews -> /usr/local/bin/inews
  682.  
  683.     Now you should be able to happily post (by hand). Try something like
  684.     the following:
  685.  
  686.         $ inews -h << EOF
  687.         Newsgroups: misc.test
  688.         From: me@foo.bar.com
  689.         Subject: Testing
  690.         Reply-To: my-real-address@wherever.edu
  691.  
  692.         This is a test.
  693.         EOF
  694.  
  695.     If this works, inews should post the article. You'll know because
  696.     test-responders on misc.test will reply to the address on the Reply-To
  697.     line, above. Please don't do test postings on real groups, like c.o.l.
  698.     :)
  699.  
  700.  
  701. 6.11 How do I build 'rrn' as a nntp-based newsreader/poster ?
  702.  
  703.     [... mdw@sunsite.unc.edu (Matt Welsh) ...]
  704.  
  705.     1. cd to the rn source directory and do "./Configure". For almost all
  706.     the questions, take the defaults (it's very smart).  Make sure you
  707.     have a link to "cpp" (usually in /usr/lib/gcc-lib/i386-linux/2.3.3) in
  708.     /lib, so rn can find it.
  709.  
  710.     - Don't panic if it says you're on a NeXT or a USG system. Just go
  711.     with the flow...
  712.  
  713.     - Answer "y" to "Do you expect to run these scripts and binaries on
  714.     multiple machines?"
  715.  
  716.     - For your domain name: if your system is, say, "foo.bar.com", answer
  717.     with just "bar.com" (the domain, not the entire hostname).
  718.  
  719.     - Answer "usenet" for the name of the user which is the news admin.
  720.  
  721.     - For "Where is your news library?" use the directory where the above
  722.     NNTP files are kept: I use /usr/local/lib/news.
  723.  
  724.     - Man page source is in /usr/man/man1.
  725.  
  726.     - Answer "y" to "Does your /etc/passwd file keep full names in
  727.     Berkeley/V7 format?"
  728.  
  729.     - Answer "gcc" to the name of the compiler which forces resolution.
  730.  
  731.     - Answer "y" to "Do you want to build the NNTP version of rn (rrn)?"
  732.  
  733.     - For the name of the news server file: use the same name you used
  734.     when building inews, above (for me, /usr/local/lib/news/server).
  735.  
  736.     Don't run makedepend yet! Go to the next step:
  737.  
  738.     2) Edit config.h. Change the "#define ROOTID ..." line to
  739.         #define ROOTID 0
  740.     if it isn't already. 
  741.  
  742.     3) In rrn-4.4.pl3, there is a small bug with SIGEMT: it doesn't exist
  743.     on Linux. rn used SIGEMT to check if a process is still running;
  744.     however, under POSIX.1 we can instead just send the process a 
  745.     signal 0.
  746.  
  747.     Edit init.c. On line 243, note the following:
  748.         if (kill(processnum, SIGEMT)) {
  749.     Change this to
  750.         if (kill(processnum, 0)) {
  751.  
  752.     You may wish to #ifdef it out instead; it's up to you. Don't just define
  753.     SIGEMT to be zero; this will break the sigignore() call in final.c.
  754.  
  755.     4) Issue "makedepend > makedepend.out". 
  756.  
  757.     5) Issue "make". Rn should compile happily.
  758.  
  759.     6) Issue "make install". 
  760.  
  761.     You're all set. Keep in mind that rn does in fact eat a lot of memory
  762.     (as does any newsreader), handling the newsgroups file. So when you 
  763.     first run rn, it might be a little slow building your .newsrc and
  764.     checking for new groups. If you're impatient, copy a .newsrc from
  765.     somewhere else and use that.
  766.  
  767.