





8



9                            USENET Version B Installation


                                    _M_a_t_t _G_l_i_c_k_m_a_n
                              _C_o_m_p_u_t_e_r _S_c_i_e_n_c_e _D_i_v_i_s_i_o_n
             _D_e_p_a_r_t_m_e_n_t _o_f _E_l_e_c_t_r_i_c_a_l _E_n_g_i_n_e_e_r_i_n_g _a_n_d _C_o_m_p_u_t_e_r _S_c_i_e_n_c_e_s
                              _U_n_i_v_e_r_s_i_t_y _o_f _C_a_l_i_f_o_r_n_i_a
                             _B_e_r_k_e_l_e_y, _C_a_l_i_f_o_r_n_i_a _9_4_7_2_0


                       _R_e_v_i_s_e_d _b_y _M_a_r_k _H_o_r_t_o_n _f_o_r _v_e_r_s_i_o_n _2._1_0
                      _R_e_v_i_s_e_d _b_y _R_i_c_k _A_d_a_m_s _f_o_r _v_e_r_s_i_o_n _2._1_0._3



          1.  Introduction

               This document is intended to help a USENET site install  and
          maintain the network news software.  Please ask questions of Rick
          Adams*; such questions will help to point out areas that need  to
          be addressed here.

               The overall order of things to do is:

          (a)  Find somebody to link up with.  You need a  network  connec-
               tion  of  some  kind,  for example, ARPANET or UUCP.  If you
               must use UUCP and have no  connections,  you  must  have  at
               least  a  dialup  and  preferably a dialer, and find someone
               willing to call your machine.  The USENET directory  may  be
               helpful in finding some other site geographically near yours
               to hook up to.

          (b)  Create a _l_o_c_a_l_i_z_e._s_h script to make  local  changes  to  the
               makefile  and  _d_e_f_s._h  files.  (Section 2 gives more details
               about creating _l_o_c_a_l_i_z_e._s_h.) Once  you're  finished  editing
               _l_o_c_a_l_i_z_e._s_h,  create a _d_e_f_s._h and _M_a_k_e_f_i_l_e tailored for your
               site with the command
                                      sh localize.sh
               Inspect _d_e_f_s._h and _M_a_k_e_f_i_l_e to ensure that  all  your  local
               customizations  got  into  your final versions. If you saw a
               "?" when you ran _l_o_c_a_l_i_z_e._s_h, one or both of  the  files  is
               certainly  wrong. It's a good idea to anchor the patterns in
               _l_o_c_a_l_i_z_e._s_h's _e_d(1) scripts,  especially  in  its  _M_a_k_e_f_i_l_e-
               editing  lines.  For  instance,  use  /^UUXFLAGS/ instead of
               /UUXFLAGS/.



          __________
          * ARPANET: rick@seismo.CSS.GOV, UUCP: seismo!rick


          USENET Version B Installation                                   1





9          USENET Version B Installation                                   2


9          (c)  Compile the software using the _m_a_k_e(1) command.

          (d)  _S_u(1) and type "make install".  This will copy the files out
               to  the  right place and make directories containing most of
               the important files.  It will configure you in with  a  con-
               nection  to  _o_o_p_s_v_a_x  via  UUCP  links.  This is undoubtedly
               wrong, so you will have to configure links  as  needed.   If
               you are upgrading from a version older than 2.10.3, do "make
               update".  This will cause various checks to be performed  on
               important  files in LIBDIR.  The results will be reported to
               you.  If you are not sure if you should do "make update", do
               it.  It will not hurt anything if you have already done it.

          (e)  After editing the configuration table, get your  contact  at
               the  other  end  of the link to add you to their netnews _s_y_s
               file.

          (f)  Post a message to the to._s_y_s_n_a_m_e_s_y_s_n_a_m_e newsgroup which  should  be
               set  up to go only to the site you are linked to, as a test.
               Have the other person send a message to  your  system  using
               the  same mechanism.  If this doesn't work, find the problem
               and fix it.  (Please don't use net.test unless there  is  no
               alternative.   It  is almost always possible to use test, or
               to._s_y_s_n_a_m_e_s_y_s_n_a_m_e or some _l_o_c_a_l_l_o_c_a_l.test group, instead of net.test.)

          (g)  Fill out a USENET directory form (the file  _d_i_r_f_o_r_m  in  the
               _m_i_s_c  directory).   Post  a  copy  to  the  USENET newsgroup
               net.news.newsite and mail a copy to _c_b_o_s_g_d!_u_u_c_p_m_a_p.

          (h)  Format the document toHow (the  file  _h_o_w_t_o._m_n  in  the  _d_o_c
               directory),  the  document  toHow (the file _m_a_n_n_e_r._m_n in the
               _d_o_c directory) and the  document  Law""Copyright  (the  file
               _c_o_p_y_r_i_g_h_t._m_n  in  the  _d_o_c  directory) and post them to your
               general newsgroup with a long expiration date.  You can  use
               _i_n_e_w_s(1) or _p_o_s_t_n_e_w_s(1) to do this.

          (i)  It will probably be necessary to fix your uucp  commands  to
               allow _r_n_e_w_s and to support the -z and -n options (if you are
               lucky enought to have the source).

          2.  Installation

          2.1.  Configuration

               Local configuration of the USENET  version  B  software  re-
          quires you to edit a few files.  Most importantly, the _d_e_f_s._h and
          _M_a_k_e_f_i_l_e files must be created from their templates _d_e_f_s._d_i_s_t and
          _M_a_k_e_f_i_l_e._d_s_t.    You   should   create   a  shell  script  called
          _l_o_c_a_l_i_z_e._s_h which copies the files and makes local changes to the
          copies.  Even for a completely vanilla site, some changes will be
          necessary.   For  example,  your   script   should   start   with
          _l_o_c_a_l_i_z_e._v_7  or _l_o_c_a_l_i_z_e._u_s_g.  You should include the name of the
          local organization (MYORG) and the uid of the  local  news  super
          user  (ROOTID).  You should also choose how your hostname will be


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                   3


9          determined.  If you are a USG site, define UNAME in  _d_e_f_s._h.   If
          you are running 4.[23] BSD, define GHNAME in _d_e_f_s._h.  If you have
          your UUCP name in /_e_t_c/_u_u_c_p_n_a_m_e, define UUNAME in _d_e_f_s._h.  Other-
          wise, news will look in the file /_u_s_r/_i_n_c_l_u_d_e/_w_h_o_a_m_i._h for a line
          of the form

                            #define sysname your-sysname

               If you are running System 3 or System 5, you are a USG site.
          Otherwise,  unless  you  are in AT&T, you are probably a V7 site.
          The previously mentioned defines are the only modifications  that
          are  _n_e_c_e_s_s_a_r_y  to  install news at your site.  However, you will
          probably want to change some of the ones listed below.   If  your
          compiler  does  not  accept "(void)", the simplest thing to do is
          add "-Dvoid=int" to the CFLAGS line in the _M_a_k_e_f_i_l_e.

               A  sample  localize   shell   script   can   be   found   in
          _l_o_c_a_l_i_z_e._s_a_m_p_l_e.  The most important parameters are:

          2.1.1.  ROOTID

               The numerical uid of the person who is the news super  user.
          This  should  not  be set to 0.  Normally it is set to the uid of
          the news contact person for the site.  If it is not defined,  the
          uid of NOTIFY will be looked up in /_e_t_c/_p_a_s_s_w_d and used instead.

          2.1.2.  N_UMASK

               Mask for _u_m_a_s_k(2) system call.  Set it to something like 022
          for  a  secure  system.   Unsecure systems might want 002 or 000.
          This mask  controls  the  mode  of  news  files  created  by  the
          software.   Insecure  modes  would allow people to edit the files
          directly.

          2.1.3.  DFLTEXP

               The default number of seconds after which  an  article  will
          expire.  Two weeks (1,209,600 seconds) is the default choice.  If
          you wish to expire articles faster than two weeks, it  is  recom-
          mended  that  you use the -e flag to expire instead of decreasing
          DFLTEXP.

          2.1.4.  HISTEXP

               Articles which were posted more than HISTEXP  ago  are  con-
          sidered  too  old and are moved into the junk directory.  This is
          because they are too old to be in the history file, so it is  im-
          possible  to  tell  if they really should be accepted or are end-
          lessly looping around the network.  (This was theoretically  pos-
          sible  before  this  feature was added.) The articles are removed
          after DFLTEXP seconds, but a copy of their "Message-ID"  is  kept
          in the history file for HISTEXP seconds (the default is 4 weeks).




          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                   4


9          2.1.5.  DFLTSUB

               The default subscription list.  If a user does  not  specify
          any  list  of newsgroups, this will be used.  Popular choices are
          all and general,all.general.

          2.1.6.  TMAIL

               This is the version of the Berkeley _M_a_i_l(1) program that has
          the  -T  option.  If left undefined, the -M option to _r_e_a_d_n_e_w_s(1)
          will be disabled.

          2.1.7.  ADMSUB

               This newsgroup (or newsgroup list) will always  be  selected
          unless  the  user specifies a newsgroup list that doesn't include
          ADMSUB on the command line.  That is, as long as the user doesn't
          use  the -n flag to _r_e_a_d_n_e_w_s on the command line, ADMSUB will al-
          ways be selected.  This is usually set to general.   (The  intent
          of  this  parameter is to have certain newsgroups which users are
          required to subscribe to.  A typical site might require general.)

          2.1.8.  PAGE

               The default program to which articles should  be  piped  for
          paging.  This can be disabled or changed by the environment vari-
          able PAGER.  If you have it, the Berkeley _m_o_r_e(1) command  should
          be used, since the + option allows the headers to be skipped.

          2.1.9.  NOTIFY

               If defined, this character string will be  used  as  a  user
          name  to send mail to in the event of certain control messages of
          interest.   (Currently  these  are  newgroup,  rmgroup,  sendsys,
          checkgroups,  and  senduuname.) As distributed, mail will be sent
          to user _u_s_e_n_e_t.  It is recommended  you  create  such  a  mailbox
          (have  it forwarded to yourself) if possible, since this makes it
          easier for another site to contact  the  site  administrator  for
          your  site.   If you are unable to do this (_e._g., you are not the
          super user) you should change this name to yourself.  Also,  mes-
          sages  about  missing or extra newsgroups are mailed to this user
          by the checkgroups control message.

          2.1.10.  DFTXMIT

               This is the default command to use to transmit  news  if  no
          explicit  command  is  given in the fourth field of the _s_y_s file.
          It normally includes _u_u_x(1) with the -z option.  You  should  in-
          stall  this  modification  to  UUCP at once; otherwise your users
          will start being bombarded with annoying _u_u_x completion messages.
          However, you can turn this off to get news installed.





          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                   5


9          2.1.11.  UXMIT

               This is the default command used if the U flag is present in
          the  flags  portion of a _s_y_s file line.  In this case, the second
          "%s" refers to the name of a file in the news spool area,  not  a
          temporary file.  It can usually only be used when local modifica-
          tions are made to the uucp system, such as the -c option to _u_u_x.

          2.1.12.  DFTEDITOR

               This is the full path name of the default editor to use dur-
          ing  followups and replies.  It should be set to the most popular
          text editor on your system.  As distributed, _v_i(1) is used.

          2.1.13.  UUPROG

               If this is defined, it will be used as a command to run when
          the  senduuname  control  message  is sent around.  Otherwise the
          command _u_u_n_a_m_e(1) will be run.  Normally, this program should  be
          placed in LIBDIR.

          2.1.14.  MANUALLY

               If this is defined, incoming rmgroup messages will  not  au-
          tomatically  remove  the group.  News will instead mail a message
          to NOTIFY advising that the group should be removed.  If you  de-
          fine  MANUALLY,  you should have NOTIFY defined.  MANUALLY is de-
          fined by default to protect you against accidental  or  malicious
          removal of an important newsgroup.

          2.1.15.  NONEWGROUPS

               If this is defined, incoming newgroup messages will not  au-
          tomatically  create  the group.  News will instead mail a message
          to NOTIFY advising that the group should be created.  If you  de-
          fine NONEWGROUPS, you should have NOTIFY defined.  NONEWGROUPS is
          undefined by default to make it easier to automatically  maintain
          the news system.

          2.1.16.  BATCH

               If set, this is the name of a program that will be  used  to
          unpack batched articles (those beginning with the character "#".)
          Batched articles normally are files reading

                         #! rnews 1234
                         article containing 1234 characters
                         #! rnews 4321
                         article containing 4321 characters
                         . . .

          Batching is _s_t_r_o_n_g_l_y recommended for increased efficiency on both
          sides.



          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                   6


9          2.1.17.  LOCALNAME

               Most systems have a full name database  on  line  somewhere,
          showing  for  each user what their full name is.  Most often this
          is in the gecos field of /_e_t_c/_p_a_s_s_w_d.  If your system has such  a
          database, LOCALNAME should be left undefined.  If not, define LO-
          CALNAME, and articles posted will only receive  full  names  from
          local  user  information  specified in _N_A_M_E or $_H_O_M_E$_H_O_M_E/._n_a_m_e by the
          user.  If you have a nonstandard gcos format  (not  _f_i_n_g_e_r(1)  or
          RJE)  it will be necessary to make local changes to _f_u_l_l_n_a_m_e._c as
          appropriate on your system.

          2.1.18.  INTERNET

               If your system has a mailer that understands  ARPA  Internet
          syntax  addresses  ("user@site.domain") turn this on, and replies
          will use the "From" or "Reply-To" headers.  Otherwise,  leave  it
          disabled and replies will use the "Path" header.

          2.1.19.  MYDOMAIN

               When generating internet addresses, this domain will be  ap-
          pended  to  the  local site name to form mailing address domains.
          For example, on system _u_c_b_v_a_x with user _r_o_o_t, if MYDOMAIN is  set
          to ".UUCP", addresses generated will read "root@ucbvax.UUCP".  If
          MYDOMAIN   is   ".Berkeley.EDU",    the    address    would    be
          "root@ucbvax.Berkeley.EDU".   If  your  site  is in more than one
          domain, use your primary domain.  The domain always begins with a
          period,  unless  the local site name contains the domain; in this
          case MYDOMAIN should be the null string.

          2.1.20.  CHEAP

               Do not _c_h_o_w_n(1) spool files to _n_e_w_s.  This  will  cause  the
          owner  of  the  file to be the person that started the _i_n_e_w_s pro-
          cess.  This is used for obscure accounting reasons on  some  sys-
          tems.

          2.1.21.  OLD

               Define this if any of your USENET neighbors run 2.9 or  ear-
          lier  versions  of  B news.  It will cause all headers written to
          contain two extra lines, "Article-I.D." and "Posted",  for  down-
          ward  compatibility.  Once all your neighbors have converted, you
          can save disk space and transmission costs by turning  this  off.
          It is strongly encouraged that they convert.  2.10.3 is _m_u_c_h fas-
          ter than 2.9.  The performance difference is dramatic.

          2.1.22.  UNAME

               Define this if the _u_n_a_m_e(2) system call is available  local-
          ly,  even  though  you  are not a USG system.  USG systems always
          have _u_n_a_m_e(2) available and ignore this setting.



          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                   7


9          2.1.23.  GHNAME

               Define this if the 4.[23] BSD _g_e_t_h_o_s_t_n_a_m_e(2) system call  is
          available.   If  neither  UNAME  or GHNAME is defined, _i_n_e_w_s will
          determine   the   name   of   the   local   system   by   reading
          /_u_s_r/_i_n_c_l_u_d_e/_w_h_o_a_m_i._h.

          2.1.24.  UUNAME

               Define this if you keep your UUCP name in /_e_t_c/_u_u_c_p_n_a_m_e.

          2.1.25.  V7MAIL

               Define this if your system uses V7 mail conventions.  The V7
          mail  convention is that a mailbox contains several messages con-
          catenated, each message beginning with a line reading "From  _u_s_e_r
          _d_a_t_e"  and  ending in a blank line.  If this is defined, articles
          saved will have these lines added so that mail  can  be  used  to
          look at saved news.

          2.1.26.  SORTACTIVE

               Define this if you want the news  groups  presented  in  the
          order of each person's ._n_e_w_s_r_c(5) instead of the active file.

          2.1.27.  ZAPNOTES

               Define this if you want old style notesfile id's in the body
          of the article to be converted into "Nf-Id" fields in the header.

          2.1.28.  DIGPAGE

               If this is defined, _v_n_e_w_s(1) will  attempt  to  process  the
          subarticles  of  a  digest instead of treating the article as one
          big file.

          2.1.29.  DOXREFS

               Define this if you are using _r_n(1).  _R_n uses this option  to
          keep from showing the same article twice.

          2.1.30.  MULTICAST

               If your transport mechanism supports multi-casting  of  mes-
          sages,  define  this.   Currently ACSNET is the only network that
          can handle this.

          2.1.31.  BSD4_2

               Define this if you are running 4.2 or 4.3 BSD UNIX*.


          __________
          *UNIX is a trademark of AT&T Bell Laboratories.


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                   8


9          2.1.32.  BSD4_1C

               Define this if you are running 4.1C BSD UNIX.

          2.1.33.  SENDMAIL

               Use this program instead of _r_e_c_m_a_i_l(8) for sending mail.

          2.1.34.  MMDF

               Use MMDF instead of _r_e_c_m_a_i_l for sending mail.

          2.1.35.  MYORG

               This should be set to the name of your organization.  Please
          keep  the  name short, because it will be printed, along with the
          electronic address and full name of the author of  each  message.
          Forty  characters  is  probably a good upper bound on the length.
          If the city and state or country of your organization are not ob-
          vious,  please try to include them.  If the organization name be-
          gins with a "/", it will be taken as the name  of  a  file.   The
          first  line  in that file will be used as the organization.  This
          permits the same binary to be used on many different machines.  A
          good file name would be /_u_s_r/_l_i_b/_n_e_w_s/_o_r_g_a_n_i_z_a_t_i_o_n.  For example,
          an organization might read "AT&T Bell Labs, Murray  Hill",  "U.C.
          Berkeley",  "MIT",  or  "Computer  Corp.  of  America, Cambridge,
          Mass".

          2.1.36.  HIDDENNET

               If you want all your news to look like it came from a single
          machine  instead of from every machine on your local network, de-
          fine HIDDENNET to be the name of the machine you wish to  pretend
          to  be.  Make sure that you have you own machine defined as _M_E in
          the sysfile or you may get some unnecessary  article  retransmis-
          sion.

          2.1.37.  NICENESS

               If NICENESS is defined, _r_n_e_w_s does  a  _n_i_c_e(2)  to  priority
          NICENESS before processing news.

          2.1.38.  FASCIST

               If this is defined, _i_n_e_w_s checks to see if the posting  user
          is  allowed  to  post to the given newsgroup.  If the username is
          not in the file LIBDIR/_a_u_t_h_o_r_i_z_e_d then the default newsgroup pat-
          tern in the symbol FASCIST is used.

               The format of the file _a_u_t_h_o_r_i_z_e_d is:
          user:allowed groups

               For example:



          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                   9


9               root:net.all,mod.all
               naughty_person:junk,net.politics
               operator:!net.all,general,test,mod.unix

               An open environment could have FASCIST set to all  and  then
          individual  entries  could  be  made  in  the  authorized file to
          prevent certain individuals from posting to such a wide area.

               Note that a distribution of all does _n_o_t mean to allow post-
          ings   only   to  local  groups  -  all  includes  all.all.   Use
          all,!all.all to get that behavior

          2.1.39.  SMALL_ADDRESS_SPACE

               Define  this  if  your  machine  has  16  bit  (or  smaller)
          pointers.  If you are on a PDP-11*,  this  is  automatically  de-
          fined.

          2.2.  Makefile

               There are also a few parameters in  the  _M_a_k_e_f_i_l_e  as  well.
          These are:

          2.2.1.  OSTYPE

               This is the type of UNIX system you are using.  It should be
          either v7 or USG.  Any BSD system is v7. Any System 3 or System 5
          system is USG.  This is normally set by _l_o_c_a_l_i_z_e._s_h.

          2.2.2.  NEWSUSR

               This is the owner (user name) of _i_n_e_w_s.  If you  are  a  su-
          peruser,  you should probably create a new user id (traditionally
          _n_e_w_s) and use this id.  If you are not a superuser, you  can  use
          your  own  user id.  If you are able to, you should create a mail
          alias _u_s_e_n_e_t and have mail to this alias forwarded to you.   This
          will  make  it easier for other sites to find the right person in
          the presence of changing jobs and  out  of  date  or  nonexistent
          directory pages.  NEWSUSR and ROOTID do not need to represent the
          same user.

          2.2.3.  NEWSGRP

               This is the group (name) to which _i_n_e_w_s belongs.   The  same
          considerations as NEWSUSR apply.

          2.2.4.  SPOOLDIR

               This directory contains subdirectories in which  news  arti-
          cles will be stored.  It is normally /_u_s_r/_s_p_o_o_l/_n_e_w_s.

          __________
          *PDP-11 is a trademark of  Digital  Equipment  Corpora-
          tion.


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  10


9               Briefly, for each newsgroup (say net.general) there will  be
          a  subdirectory  /_u_s_r/_s_p_o_o_l/_n_e_w_s/_n_e_t/_g_e_n_e_r_a_l containing articles,
          whose    file    names    are    sequential    numbers,     _e._g.,
          /_u_s_r/_s_p_o_o_l/_n_e_w_s/_n_e_t/_g_e_n_e_r_a_l/_1, etc.

               Each article file is in a mail-compatible format.  It begins
          with a number of header lines, followed by a blank line, followed
          by the body of the article.  The  format  has  deliberately  been
          chosen  to be compatible with the ARPANET standard for mail docu-
          mented in RFC 822.

               You should place news in an area of  the  disk  with  enough
          free  space to hold the news you intend to keep on line.  The to-
          tal volume of news in net.all currently runs about  1  Mbyte  per
          day.  If you expire news after the default 2 weeks, you will need
          about 14 Mbytes of disk space (plus some extra as a safety margin
          and  to  allow  for increased traffic in the future.) If you only
          receive some of the newsgroups, or expire news after a  different
          interval, these figures can be adjusted accordingly.

          2.2.5.  BATCHDIR

               This directory will contain the list of articles to send  to
          each system.  It is normally /_u_s_r/_s_p_o_o_l/_b_a_t_c_h.

          2.2.6.  LIBDIR

               This directory will contain various  system  files.   It  is
          normally /_u_s_r/_l_i_b/_n_e_w_s.

          2.2.7.  BINDIR

               This is the directory in which  _r_e_a_d_n_e_w_s,  _p_o_s_t_n_e_w_s,  _v_n_e_w_s,
          and _c_h_e_c_k_n_e_w_s(1) are to be installed.  This is normally /_u_s_r/_b_i_n.
          If you decide to set BINDIR to  a  local  binary  directory,  you
          should consider that the _r_n_e_w_s and _c_u_n_b_a_t_c_h commands must be in a
          directory that  can  be  found  by  _u_u_x_q_t,  which  normally  only
          searches /_b_i_n and /_u_s_r/_b_i_n.

          2.2.8.  UUXFLAGS

               These are the flags _u_u_x will be called with.

          2.2.9.  LNRNEWS

               This is the program used to link _r_n_e_w_s and  _i_n_e_w_s.   If  you
          have symbolic links, you can replace the "ln" with "ln -s".

          2.2.10.  SCCSID

               If this is defined, sccs ids will be included in each  file.
          If you are short on address space, don't define this.




          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  11


9          3.  FILES

               This section lists the files in LIBDIR and comments  briefly
          what they do.

          3.1.  active

               A list of active newsgroups.  It is automatically updated as
          new newsgroups come in.  The order here is the order news is ini-
          tially presented by _r_e_a_d_n_e_w_s, so you can edit this  file  to  put
          important  newsgroups  first.   If  you  have SORTACTIVE defined,
          after the first time  the  user  invokes  _r_e_a_d_n_e_w_s,  it  will  be
          presented  in  the order of his ._n_e_w_s_r_c.  Each line of the active
          file contains four fields, separated by a  space:  the  newsgroup
          name, the highest local article number (for the most recently re-
          ceived article), the lowest local article number that has not yet
          expired, and a single character used to determine if the user can
          post to that newsgroup.  If the character is "y" the user is per-
          mitted  to  post articles to that group.  If the character is "n"
          the user is not permitted to post articles to that groups.  (This
          field  takes the place of the _n_g_f_i_l_e in earlier versions of news.
          Local article numbers begin at 1 and  count  sequentially  within
          the  newsgroup  as  articles  are  received.  They do not usually
          correspond to local article numbers on other sites.  The  article
          numbers  are  always  stored as a five digit number (with leading
          zeros) to allow updating of the file in place.

               The active file should contain all  active  net-wide  active
          newsgroups  (net.alland  mod.all).  It is important that they all
          be present, as they are used as a check for valid newsgroup names
          and  invalid  newsgroup  names are removed from any articles pro-
          cessed by _i_n_e_w_s.  You should use the _s_y_s file to keep out unwant-
          ed newsgroups.

          3.2.  aliases

               This file is used to map bad newsgroup names to the  correct
          ones.   (For  example,  net.unix.wizards is mapped into net.unix-
          wizards).  Each line consists of two fields separated by a space.
          If the first field is found in the newsgroup list of the incoming
          article, it is changed to the second field.   This  change  takes
          place in the article before it is passed on to other systems, not
          just locally.

          3.3.  batch

               This program reads a list of filenames of articles and  out-
          puts  the articles themselves.  It is typically used by the shell
          script _s_e_n_d_b_a_t_c_h.

          3.4.  c7unbatch

               This is used to decompress news that has  been  encoded  for
          transmission  over  a  network that only supports 7-bit transfers


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  12


9          (e.g X.25.)

          3.5.  caesar

               This is a program to do Caesar decoding of rotated text,  on
          a  line by line basis.  The standard input is copied to the stan-
          dard output, rotating each line  according  to  a  static  single
          letter  frequency  table.  If an integer argument is given (_e._g.,
          13), every line is rotated by that argument,  without  regard  to
          letter  frequencies.   This  program is invoked by the D _r_e_a_d_n_e_w_s
          command.  It is also used by _p_o_s_t_n_e_w_s with the "13"  argument  to
          encode selected material for posting.

          3.6.  checkgroups

               _C_h_e_c_k_g_r_o_u_p_s is a shell file to aid in automatically checking
          the  accuracy  of your active file.  It is executed by the check-
          groups control message and mails a list of out of date newsgroups
          to  the  person  defined by NOTIFY It also updates the _n_e_w_s_g_r_o_u_p_s
          file that is used by _p_o_s_t_n_e_w_s as a helpfile for newsgroup  selec-
          tion.

          3.7.  compress

               This program does a modified Lempel-Ziv data compression. It
          is  used  by  the  compressed  batching  scheme.  It averages 50%
          compression on a typical batch of news.

          3.8.  distributions

               This is a list of distributions  that  are  valid  for  your
          site.   Each  line has two fields separated by the first space on
          the line.  The first field is the name of the distribution (_e._g.,
          usa,  na, etc.).  The second field is text describing the distri-
          bution.  As distributed, this file is only correct for  sites  in
          the  USA.  You should examine this file and add or delete the ap-
          propriate distributions.

          3.9.  encode

               This program transforms an 8-bit binary  file  into  a  file
          suitable  for  sending over a link that only allows 7-bit charac-
          ters. It is used by sendbatch -c7.

          3.10.  errlog

               This file contains the "important" error messages  found  in
          the  log  file.  These errors usually indicate that something was
          wrong with an article.  This file should be watched closely.  The
          _l_o_g  file  contains much more verbose information and it is often
          difficult to detect errors in it.





          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  13


9          3.11.  expire

               This program expires old articles and archives them  if  ar-
          chiving  is  selected.   It  is  typically  run  once  a day from
          _c_r_o_n(8).

          3.12.  help

               This contains a list of commands  printed  when  an  illegal
          command is typed to _r_e_a_d_n_e_w_s.

          3.13.  history

               A list of every article that has come in to your system.  It
          is  used  to  reject  articles  that  come in for the second time
          (presumably via a different path).  This file will  grow  but  is
          cleaned out by the _e_x_p_i_r_e(8) command.

          3.14.  history.d

               On  USG  systems,   this   directory   contains   10   files
          (history.[0-9])  which are used as part of a simple hashing algo-
          rithm to speed up history searches.  Since V7 systems  have  DBM,
          this is not used on V7 systems.

          3.15.  history.dir,history.pag

               These two files are used on V7 systems as a  hashed  version
          of _h_i_s_t_o_r_y, containing the message id's of all articles in histo-
          ry.  They are only used if -DDBM and -ldbm appear in _M_a_k_e_f_i_l_e.

          3.16.  inews

               This is the program that actually sends and  receives  news.
          All  other  programs interface eventually with it.  It is not in-
          tended to be used directly by a human, so  it  is  no  longer  in
          /_u_s_r/_b_i_n.

          3.17.  log

               If present, a log of articles processed and error conditions
          is  kept  here.  This file grows without limit unless cleaned out
          periodically.  The _t_r_i_m_l_i_b script in _m_i_s_c  can  be  invoked  from
          _c_r_o_n daily or weekly to keep the log short.

          3.18.  moderators

               This file contains a list of the moderators and their  mail-
          ing  addresses  for each moderated newsgroup.  Each line consists
          of two fields.  the first is the name  of  the  moderated  group.
          The  second  is the mailing address of the group's moderator.  As
          distributed, they are almost certainly wrong.  You will  need  to
          modify the paths so they work from your site.



          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  14


9          3.19.  newsgroups

               This file is displayed by _p_o_s_t_n_e_w_s when a user  hits  ?   in
          response to its request for newsgroups.  It is also used by _v_n_e_w_s
          when it displays the newsgroup name.  It is updated automatically
          by the checkgroups control message.

          3.20.  notify

               If this file is present, its contents will be taken  as  the
          name  of the user to notify in case of a problem.  If the file is
          empty, nobody will be notified.  (This overrides the  NOTIFY  op-
          tion  in _d_e_f_s._h).  Having a null file is useful if one person ad-
          ministers several systems and does not want  multiple  copies  of
          control message notifications.

          3.21.  oactive, ohistory, ohistory.dir, ohistory.pag

               These are  copies  of  the  corresponding  _a_c_t_i_v_e,  _h_i_s_t_o_r_y,
          _h_i_s_t_o_r_y._d_i_r,  and  _h_i_s_t_o_r_y._p_a_g files before _e_x_p_i_r_e ran.  They are
          kept in case something happens to the originals.

          3.22.  recmail

               This program can serve as a link between news and your local
          mailer.  If you have _s_e_n_d_m_a_i_l(8), don't use _r_e_c_m_a_i_l.  _S_e_n_d_m_a_i_l is
          much more useful.

          3.23.  recnews

               A program which allows you to send mail to get news  posted.
          You  usually need to run _s_e_n_d_m_a_i_l or _d_e_l_i_v_e_r_m_a_i_l(8) to be able to
          use this.

          3.24.  recording

               A list of newsgroup classes and filenames to display record-
          ings  for.   The recording feature is analogous to the recordings
          played in some areas when you dial directory  assistance,  trying
          to  be  annoying and make you think twice.  Recordings on certain
          newsgroups are intended to remind the user of the rules  for  the
          newsgroup,  or,  in  the  case of a company worried about letting
          proprietary information out, reminding authors that anything they
          say  is  seen  outside the company and so proprietary information
          should not be included.

               The file contains one line per recording.  The line contains
          two  fields,  separated by a space.  The first field is the news-
          group class (_e._g., net.all), the second field is the name of  the
          file  containing the recorded message.  If the file name does not
          begin with a slash, it will be searched for  in  LIBDIR.   Sample
          recording files can be found in the _m_i_s_c directory.




          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  15


9          3.25.  rmgroup

               This shell file should be used to remove any groups that are
          no longer used.

          3.26.  sendbatch

               This shell file is used to send batched  articles  to  other
          systems.  It is typically run from _c_r_o_n.  See the manual page for
          more details.

          3.27.  sendnews

               A program to send  news  internally  from  one  computer  to
          another.  It is useful if you must use mail links to transmit ar-
          ticles.

          3.28.  seq

               This file contains the current sequence number for your sys-
          tem.  It is used to generate unique article id's.

          3.29.  sys

               This file contains a list of all your neighbors, which news-
          groups they get, and how to send news to them.  The format is do-
          cumented below.

          3.30.  unbatch

               This program is used to unbatch the  incoming  batched  news
          and  feed  each article to _i_n_e_w_s.  It's horrible and will go away
          in the future.

          3.31.  users

               A list of users that have read news on your system.

          3.32.  uurec

               A program to receive news sent by _s_e_n_d_n_e_w_s(8).

          3.33.  vnews.help

               This is the helpfile used by _v_n_e_w_s.

          4.  Setting Up Links

               There are two basic types  of  links  for  exchanging  news:
          those that use mail and those that don't.  The ones that use mail
          are more indirect, yet more versatile, while the ones that  don't
          are  simpler.   The  default method does not use mail, so that is
          discussed first.



          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  16


9          4.1.  Non-mail Links

               The basic theory behind a non-mail link is  that  the  _r_n_e_w_s
          program  is  invoked  on the remote system with the article being
          transmitted as the standard input.  This is possible  on  several
          networks, but the most common implementation is via the UUCP net-
          work.  Using the _u_u_x command, the command which is forked to  the
          shell looks like:

                        uux - -r -z remotesys!rnews < article

          This is the default transmission method.  In order to set up such
          a  link,  obviously a UUCP link with the remote system must be in
          effect.  In addition, _r_n_e_w_s must be available and  executable  by
          _u_u_x_q_t  on  the  remote  machine.   In most cases, this means that
          _r_n_e_w_s must be in /_u_s_r/_b_i_n so _u_u_x can find it.  Also, the list  of
          allowed   UUCP   commands  (in  /_u_s_r/_s_r_c/_u_s_r._b_i_n/_u_u_c_p/_u_u_x_q_t._c  or
          /_u_s_r/_l_i_b/_u_u_c_p/_L._c_m_d_s, depending on the version of UUCP) should be
          checked to make sure that _r_n_e_w_s is an allowed command.

               Other networks that allow remote execution include the BERK-
          NET,  BLICN  (_u_s_e_n_d(1)), many Ethernets, and the NSC hyperchannel
          (_n_u_s_e_n_d(1)).  It is important, however, that a spooling mechanism
          be available.  Otherwise, if system _A tries to send an article to
          system _B via a remote execution command, and _B is down, the arti-
          cle  could  be  lost.  Spooling arranges that the system will try
          again when _B comes back up.

          4.2.  Mail Links

               When using mail to transmit articles, two intermediary  pro-
          grams  are necessary.  These are _s_e_n_d_n_e_w_s and _u_u_r_e_c(8).  The idea
          is that when system _A wants to send an article to system  _B,  the
          _s_y_s file on system _A has an entry for system _B such as:

                          /usr/lib/news/sendnews -a rnews@B

          which runs _s_e_n_d_n_e_w_s on the article.  The -a option specifies that
          the  mail should be formatted for the ARPANET.  _S_e_n_d_n_e_w_s packages
          the article and mails it to "rnews@B".  Somehow, the B system  is
          expected to make sure that all mail to user "rnews" is fed as in-
          put to the program _u_u_r_e_c.  This program unpackages it and invokes
          _r_n_e_w_s.

               The best way to get mail to "rnews" fed into _u_u_r_e_c is to use
          _s_e_n_d_m_a_i_l  or  _d_e_l_i_v_e_r_m_a_i_l,  if  you are on a system running them.
          Create an alias in /_u_s_r/_l_i_b/_a_l_i_a_s_e_s as follows:

                            rnews: "|/usr/lib/news/uurec"

          and _s_e_n_d_m_a_i_l will handle it.  If you do not have a  facility  for
          forwarding  mail  to  a  program,  you can gimmick your mailer to
          watch for it (using _p_o_p_e_n(3S), this is easy)  or,  if  you  don't
          want  to do any programming, you can have _c_r_o_n invoke _u_u_r_e_c every


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  17


9          hour with /_u_s_r/_s_p_o_o_l/_m_a_i_l/_r_n_e_w_s as standard input.  This solution
          is messier because _u_u_r_e_c must potentially deal with multiple mes-
          sages, something that has never been tested.

          5.  Format of the _s_y_s_s_y_s file

               To set up a link to another site, edit the _s_y_s file in  LIB-
          DIR.   This file is similar to the _L._s_y_s file of UUCP.  Each line
          contains four fields, separated by colons:

          (1)  The system name of a site to which you forward  news.   Nor-
               mally  all  systems you have links to will be included.  You
               should also have a line for your own system.  If this  field
               is _M_E, it will be used as if it were your local system name.
               If the system name is followed by a "/",  the  article  will
               not  be  forwarded  to  this system if it has already passwd
               through any of the (comma separated) list of  sites  immedi-
               ately following the "/".  For example, if the sysline was:

               yoursite/sitea,siteb,sitec:net,mod,na,usa,to.yoursite::

               the incoming article would only be forwarded to _y_o_u_r_s_i_t_e  if
               it  had  not  already been to any of _s_i_t_e_a, _s_i_t_e_b, or _s_i_t_e_c.
               This is normally used to reduce the number of duplicate  ar-
               ticles received at a site that has multiple main newsfeeds.

          (2)  The newsgroups to be forwarded to them.  This is  a  pattern
               of  the  same  kind  as a subscription list.  Generally, you
               will list classes of newsgroups,  that  is,  using  all  for
               everything.   A typical forwarding list for a new site would
               be

                              net,mod,na,usa,to._s_y_s_n_a_m_e

               where _s_y_s_n_a_m_e is the name of the remote system.  (Of course,
               if you are not in the USA or North America, you would remove
               those distributions and replace them with the ones appropri-
               ate  for you).  In particular, you don't want to forward all
               since local newsgroups (those without dots)  should  not  be
               sent.   For  the line describing your own system, this field
               describes the newsgroups your site will accept  from  remote
               sites.  Thus, if another site insists on sending you a news-
               group  you  don't  want,  for  example  net.jokes,   include
               !net.jokes here.

          (3)  This field contains flags describing the connection.   An  A
               will indicate that the other site is running an A version of
               netnews.  A B indicates a B version.  Leaving it  empty  de-
               faults to B.  If you are reading this document, you have a B
               version.  Some existing sites run A versions.  If you aren't
               sure,  ask  your  contact  at  the other site, with whom you
               should be talking to set this up anyway.  The F  flag  indi-
               cates that the fourth field is the name of a file.  The full
               path name of a file containing the article in SPOOL will  be


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  18


9               appended to this file.  The L flag prevents transmission un-
               less the article was created on this site.  If a number fol-
               lows  the  L (_e._g., L3), sites less than that number of hops
               away will be considered local.  (It is recommended that  you
               feed  an L link to a backbone site, to ensure that your sub-
               missions will be more likely to get to the  entire  network,
               even in the event of a local problem.  Please make sure that
               a mail link exists too, so you can get replies.) The N  flag
               can  also  be  included here, indicating that mail should be
               sent using the _i_h_a_v_e/_s_e_n_d_m_e protocol described below.  The H
               flag  can  be  used to interpolate the history file into the
               command.  The S flags says to execute the transmission  com-
               mand  directly  instead of forking a shell.  The U field ar-
               ranges that the parameter to the optional "%s" in  the  com-
               mand  field  to be filled in with a permanent file name from
               SPOOL instead of a temporary customized file  name.   The  M
               flag  says  to use multi-casting. Multi-casting is described
               in an appendix.

          (4)  This field is the command to be run to send news to the  re-
               mote  site.   The  article  will  be  on the standard input.
               Leaving this field blank means an ordinary UUCP link is  be-
               ing used, that is, the command defaults to

                              uux - -r -z sysname!rnews

               The - option tells _u_u_x to expect input from the standard in-
               put.   The -z option is nonstandard - you should add it (see
               the _m_i_n_u_s._z* files in the uucp source directory.)  It  shuts
               off  the  annoying message you would otherwise get mailed to
               you telling you that your article was broadcast  successful-
               ly.   To avoid using the -z option, change the source or put
               the _u_u_x command in the fourth field.  The  -r  option  tells
               _u_u_x  not  to  call  the other system once the job is queued.
               This turns out to ease the load on the system,  at  the  ex-
               pense  of making news be transmitted a bit slower.  The news
               will be sent when the next call is made; usually this  means
               the  next time mail is sent to or from your system.  If this
               turns out to be unreasonably long, put a line in _c_r_o_n_t_a_b  to
               run

                          /usr/lib/uucp/uucico -r1 -ssystem

               every hour or so.

               Here is a sample _s_y_s file for a site _m_y_v_a_x with  connections
          to _y_o_u_r_v_a_x where _m_y_v_a_x also passes news on to _d_o_w_n_s_t_r_e_a_m.  We as-
          sume that _m_y_v_a_x and _d_o_w_n_s_t_r_e_a_m exchange a local  newsgroup  class
          lng.all  as  well  as the network wide newsgroups.  News to _d_o_w_n_-
          _s_t_r_e_a_m is batched.  We also assume that _m_y_v_a_x and _y_o_u_r_v_a_x are  in
          the USA, while _d_o_w_n_s_t_r_e_a_m is in Canada.





          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  19


9               myvax:net,mod,na,usa,lng,to::
               yourvax:net,mod,na,usa,to.yourvax::
               downstream:net,mod,na,lng,to.downstream:F:/usr/spool/batch/downstream

          6.  Posting Methods

               The basic method is _p_o_s_t_n_e_w_s.  This program will prompt  you
          for  the  title,  newsgroups, and distribution, then place you in
          the editor.  (The system default EDITOR is used  unless  the  en-
          vironment variable EDITOR is set, overriding the system default.)
          The text should be typed after the blank  line.   The  title  and
          newsgroups  are  available  for editing at the top of the buffer.
          Other header lines can be added, such as an expiration date or  a
          distribution.  When you write out the file and exit from the edi-
          tor, you will be prompted for what to do next. Your choices  are:
          write  the  message to a file, send the message, list the message
          or edit it again.

               Another method is to use mail.  This can  only  be  done  on
          systems  that  allow mail to a given name to be fed into an arbi-
          trary program as input.  This is easily done  with  the  Berkeley
          _d_e_l_i_v_e_r_m_a_i_l  or  _s_e_n_d_m_a_i_l  program, and not with any other mailer
          the author is familiar with.  (It may be  possible  to  painfully
          set  this  up  with  MMDF, provided the newsgroup name is no more
          than 8 characters long.) To use mail, set up an alias such as the
          following:

                  net.general: "|/usr/lib/news/recnews net.general"

          Whenever a user sends mail to net.general,  this  starts  up  the
          given  shell  command  which calls recnews with one argument, the
          name of the newsgroup.  You need to create  one  alias  for  each
          newsgroup,  and to keep the list up to date as new newsgroups are
          created.  _R_e_c_n_e_w_s(8) will in turn invoke _i_n_e_w_s.

               Note that there are problems with _r_e_c_n_e_w_s.  There is no  way
          to  use  it  to  post  to  multiple  newsgroups  without creating
          separate articles (something frowned upon because it forces  peo-
          ple to read the same thing more than once.) Also, there is no way
          to make the recording feature (to remind people to not accidently
          divulge proprietary information) work when recnews is used.

          7.  Various considerations

          7.1.  Setuid bits

               The current intended state of affairs  is  that  _i_n_e_w_s  runs
          setuid  to  NEWSUSR.   The  _r_e_a_d_n_e_w_s  program does not need to be
          setuid.  This makes it possible to write your  own  interface  to
          read  news  instead of using _r_e_a_d_n_e_w_s.  (As distributed, _i_n_e_w_s is
          also setgid.  I know of no good reason for this.)





          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  20


9          7.2.  Modes of Spool Directories

               All the files should be writable by NEWSUSR.   However,  due
          to  a glitch, you will probably have to make the SPOOLDIR and its
          subdirectories mode 777.  It could be 755 except for one problem.
          When  a  new newsgroup comes in, _i_n_e_w_s will attempt to _m_k_d_i_r(1) a
          new subdirectory of SPOOLDIR for the newsgroup.  Since both _i_n_e_w_s
          and  _m_k_d_i_r  are  setuid, _m_k_d_i_r will use the uid of the person who
          ran _i_n_e_w_s instead of NEWSUSR when checking for  permissions.   If
          the  directory  mode  isn't  777  the  check will fail.  Here are
          several alternatives if you don't want a 777 directory around:

          7.2.1.  Fix Real Uid

               If _i_n_e_w_s is always run by _c_r_o_n or as _r_o_o_t, the real uid  can
          be arranged to be _r_o_o_t or NEWSUSR.  This is a poor solution since
          it makes the local creation of new newsgroups require super  user
          permissions,  and is a potential security hole.  If this approach
          is taken, care must be taken to insure  that  the  owner  of  the
          created directory is NEWSUSR.

          7.2.2.  Change the Kernel

               _I_n_e_w_s  will  do:  setuid(geteuid())   (see   _s_e_t_u_i_d(2)   and
          _g_e_t_e_u_i_d(2))  before  it  forks the _m_k_d_i_r.  If your system permits
          this call, there will be no problem.  In particular, Berkeley 4.0
          UNIX  and later systems allow this.  An alternative change to the
          kernel is to automatically stack uids: when a setuid  program  is
          run, set the new real uid to the old effective uid.

          7.2.3.  Groups

               You could have _i_n_e_w_s be setgid  to  NEWSGRP  and  all  files
          writable  by  the  group.   This approach has been tested and the
          problem turns out to be that the _m_k_d_i_r command uses the _a_c_c_e_s_s(2)
          system  call  to  check  permissions.  Since _a_c_c_e_s_s uses the real
          gid, you run into the same problem.

          7.2.4.  Another _M_k_d_i_r_M_k_d_i_r

               You could create a version of _m_k_d_i_r that does less  checking
          and  put  it  in a directory that can only be accessed by NEWSUSR
          (mode 700, owned by NEWSUSR).  Have _i_n_e_w_s fork this _m_k_d_i_r.

          7.3.  Expiration dates

               To get articles to expire automatically, put a line in _c_r_o_n_-
          _t_a_b to run

                                /usr/lib/news/expire

          every night.  This command deletes  all  expired  news.   The  -a
          _n_e_w_s_g_r_o_u_p_s  option  causes  all expired news to be archived under
          /_u_s_r/_s_p_o_o_l/_o_l_d_n_e_w_s depending on which  newsgroups  are  selected.


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  21


9          (See _e_x_p_i_r_e(8) for details.)

               Sometimes news is not expired when it should be.  Be sure to
          check that _e_x_p_i_r_e has permissions to unlink files, and that it is
          properly setuid to NEWSUSR.  You can manually invoke _e_x_p_i_r_e  with
          the -v (verbose) option to find out what it's doing.  Adding lev-
          els of verbosity (_e._g., -v6) will get more and more output.

          7.4.  Version to Version

               Version B will understand incoming news in either version  A
          or  B format, automatically (presuming OLD is defined in defs.h.)
          Version B will generate either format, depending on the  flag  in
          the  third  field of the _s_y_s line.  Version A will not understand
          version B format.  Thus, it is possible for two version  B  sites
          to communicate using version A format.  This will work but is not
          a good idea, since the translation from B to A loses  information
          (such  as  the  expiration  date)  which  will  not be there when
          translated back to version B.

               News from versions A and 2.9 B do not conform to the  USENET
          interchange standard.  2.10 B supports the standard and will com-
          municate with either A or 2.9 B news.  A news is written  (losing
          other  header  information)  if A is in the flags for the system.
          If OLD is defined, 2.10 will write out headers with both standard
          ("Date"  "Message-ID") and 2.9 ("Posted" "Article-I.D.") lines so
          that either B system will properly handle the article.   Incoming
          news  is  recognized  by  the first letter (A for A news), or the
          lack of an "@" in the "From" line (2.9).  Missing fields are con-
          structed as well as possible from the available information.

          7.5.  Presentation Order

               The order of the newsgroups listed in _L_I_B_D_I_R_L_I_B_D_I_R/_a_c_t_i_v_e  is  the
          order  the newsgroups will be presented in initially.  If SORTAC-
          TIVE is defined in _d_e_f_s._h, after the  first  time  news  will  be
          presented  in  the order of the person's ._n_e_w_s_r_c.  Initially this
          will be directory order, but you can  edit  important  newsgroups
          like general to the top.

               A recommended order to maintain your active file in is this:

               net.announce.newusers
               general
               local.general
               net.announce
               local _n_e_w_s_g_r_o_u_p_s _i_n _a_l_p_h_a_b_e_t_i_c_a_l _o_r_d_e_r
               mod.all _n_e_w_s_g_r_o_u_p_s _i_n _a_l_p_h_a_b_e_t_i_c_a_l _o_r_d_e_r
               net.all _n_e_w_s_g_r_o_u_p_s _i_n _a_l_p_h_a_b_e_t_i_c_a_l _o_r_d_e_r
               test
               all.test
               to.all
               control
               junk


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  22


9          8.  Control Messages

               Some news systems will send you articles that  are  not  for
          human  consumption.  They are messages to your news system called
          _c_o_n_t_r_o_l _m_e_s_s_a_g_e_s.  Such messages contain  the  "Control"  header.
          Older  systems use newsgroups matching all.all.ctl, and this will
          still work, although the "Control" header  is  preferred.   Since
          the  newsgroup  name  is  used  for distribution only, and is not
          checked to ensure it's in the active file, such  newsgroup  names
          can  still  be used.  This makes it possible to post network wide
          control messages with net.msg.ctl (or restricted  broadcast  such
          as   btl.msg.ctl)   or   messages   for   a   particular  system:
          to.ucbvax.ctl.  Messages are canceled, however, with a  "Control"
          line  in  a message to the same newsgroup(s) as the original mes-
          sage.

               A control message contains a command and zero or more  argu-
          ments  (much  like  a  UNIX program).  The subject of the article
          contains the command and arguments.  The body of the  article  is
          usually ignored, although some messages can use it for additional
          text information.  Control messages  are  not  stored  in  SPOOL;
          rather, they are acted on and discarded at once.

          8.1.  ihave/sendme

               Two control messages are ihave and sendme.   These  messages
          allow  two  participating sites to set up a link so that one site
          will tell the other site it has a given article and  wait  for  a
          request  before it actually sends it.  The normal case is to send
          an entire article to a system, which consults the history file to
          see if the article has already been seen, and then throws it away
          if it has been seen before.

               Note that, since most messages are short anyway,  experience
          has indicated that for ordinary UUCP unbatched communication, all
          _i_h_a_v_e/_s_e_n_d_m_e does is triple the load and  slow  down  forwarding.
          We hope future code will allow ihave's with multiple message id's
          in the body, and existing code in 2.10 understands such messages,
          but  does  not  generate  them.   So we advise that you don't use
          _i_h_a_v_e/_s_e_n_d_m_e for now.

               Use of these control messages can cut down  on  this  wasted
          transmission,  but if you have a polled UUCP connection, they can
          slow down receipt of news due to polling delays.   It  is  up  to
          each connected pair of sites whether they want to use this proto-
          col.  The choice is controlled by the N flag in the _s_y_s file.  In
          the  case of a leaf node (one with only one neighbor) there is no
          advantage to this protocol.  Even if both sites are able to  ini-
          tiate a connection (have dialers or the link is hardwired) the -r
          option on the _u_u_x can cause 2 hour or more delays in  propagating
          news.  Since this protocol can triple the number of messages gen-
          erated, you should carefully evaluate your situation when  decid-
          ing whether to use it.  If transmission time and phone bills dom-
          inate your costs, and you are sending news to several sites,  and


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  23


9          large  article bodies dominate the costs (rather than the headers
          and the time spent by UUCP negotiating transmission) it is  prob-
          ably worthwhile to use _i_h_a_v_e/_s_e_n_d_m_e.  If your costs are dominated
          by CPU load from UUCP, or if you send news to a site that  cannot
          get  it  from anywhere else, you probably do not want to use this
          protocol.  The decision can be made independently for  each  site
          in your _s_y_s file.

               This pair works as follows:  Site  _m_y_s_i_t_e  receives  article
          "<123@abc.UUCP>".  It enters it locally and then broadcasts it to
          its neighbors.  One of its neighbors is site _y_o_u_r_s_i_t_e  which  has
          the  N flag in the _s_y_s file.  So _m_y_s_i_t_e sends an article on news-
          group to._y_o_u_r_s_i_t_e_y_o_u_r_s_i_t_e.ctl with title "ihave  <123@abc.UUCP>  mysite".
          This   control   message   has   two   arguments   -   the  first
          ("<123@abc.UUCP>") is the article id of the article in  question,
          the  second  ("mysite") is the name of the site sending the arti-
          cle.  The  name  of  the  newsgroup  and  the  _s_y_s  file  control
          transmission  of  the  article.   Normally the _s_y_s file will read
          something like

                       yoursite:net.all,fa.all,to.yoursite:BN:

          which will cause an article on to.yoursite.ctl to be transmitted.

               _Y_o_u_r_s_i_t_e receives the message and looks to  see  if  it  has
          seen it before.  If it has, it throws the message away and stops.
          If it hasn't, it sends a  message  on  to._m_y_s_i_t_e_m_y_s_i_t_e.ctl  with  title
          "sendme  <123@abc.UUCP> yoursite" which is transmitted to _m_y_s_i_t_e.
          (The two arguments to _s_e_n_d_m_e are the article id requested and the
          site  to  send it to.) Then _m_y_s_i_t_e gets this message and actually
          transmits the article to _y_o_u_r_s_i_t_e.

          8.2.  newgroup

               This message has one argument, the name of a newsgroup to be
          created.   This  allows special action to be taken locally when a
          new newsgroup is created.  It is generated by the  -C  option  to
          _i_n_e_w_s.   By  default,  the newsgroup is added to the active file,
          and mail is sent to the local contact advising that this has hap-
          pened.   The  directory  will  be created when a message for that
          newsgroup arrives.  See the routine "c_newgroup" in _c_o_n_t_r_o_l._c  if
          you want something different to happen.  (Note that, although the
          body of the message contains a brief description of  the  purpose
          of  the  group,  this  body  is  usually  thrown away by existing
          software.)

          8.3.  rmgroup

               This message has one argument, the name of a newsgroup to be
          removed.   It  is  used  for network-wide cancellation of a news-
          group.  If MANUALLY is not defined, it will remove the  articles,
          directory,  and active file line for the group.  There is a shell
          script _r_m_g_r_o_u_p that does essentially the same thing as this  mes-
          sage,  but  the  shell script only removes the group locally.  We


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  24


9          recommend that you leave MANUALLY defined, and when  you  receive
          mail advising you of the demise of the newsgroup, you run _r_m_g_r_o_u_p
          by hand.  This will prevent accidental or malicious removal of  a
          good newsgroup.

          8.4.  cancel

               This message cancels a given article.  It  takes  one  argu-
          ment,  the  message  id  of  the article to cancel.  It should be
          broadcast to the same newsgroup as the original article.  If  the
          article  to  be canceled is not present, the control message will
          not be propagated to downstream sites.

          8.5.  sendsys

               The _s_y_s file is mailed to the  originator  of  the  message.
          There  are  no  arguments.   This is used for making maps.  Since
          your _s_y_s file is public information, you  should  not  remove  or
          change this control message.

          8.6.  senduuname

               The _u_u_n_a_m_e program is run and the output is  mailed  to  the
          originator of the message.  There are no arguments.  This is used
          for making UUCP maps.  If you do not run UUCP or  have  sites  in
          your  _L._s_y_s  which are a secret, you may wish to edit this.  Note
          that only the output of _u_u_n_a_m_e is mailed,  not  the  contents  of
          _L._s_y_s  (which  news  does  not have access to anyway).  If you do
          make a change, you should arrange that some mail  still  is  sent
          out  to  the originator of the message, so he will know your site
          received  it.   See  the  code  in  routine   "c_senduuname"   in
          _c_o_n_t_r_o_l._c.

          8.7.  version

               The local version name/number of  the  netnews  software  is
          mailed back to the author of the control message.

          8.8.  checkgroups

               This control message is an attempt at semi-automatic mainte-
          nance  of  the list of active news groups.  This control messages
          takes the body of the article and pipes it into  _L_I_B_L_I_B/_c_h_e_c_k_g_r_o_u_p_s.
          As  mentioned  previously,  _L_I_B_L_I_B/_c_h_e_c_k_g_r_o_u_p_s will update the news-
          groups file, add any missing newsgroups, and mail  a  message  to
          NOTIFY  about  any  old newsgroups that should be removed.  It is
          expected that the person who maintains the list of  active  news-
          groups will broadcast this control message on a regular basis.

          8.9.  Other Messages

               Any unrecognized message will cause an error message  to  be
          mailed  to the local site administrator.  Additional messages may
          be defined as time goes on, such  as  messages  to  automatically


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  25


9          update directories or maps.  You should be willing to go into the
          code (_c_o_n_t_r_o_l._c) and add messages as they become standardized.

          9.  Maintenance

               There are some things you should  do  periodically  to  keep
          your  news  system running smoothly.  We hope to eventually auto-
          mate all or most of this, but right now some of it must  be  done
          by hand.

               The _h_i_s_t_o_r_y and _l_o_g files in your LIB directory  will  grow.
          You  should make sure that they are cleaned up periodically.  The
          _L_I_B_L_I_B/_e_x_p_i_r_e program will remove lines from  history  corresponding
          to  deleted  articles,  but  it  is a good idea to check the file
          every few months to make sure it is not going wild.  Be sure  not
          to  completely  lose  your  history file when you clean it up, in
          case another neighbor tries to send you an article  you  recently
          got.   (If you only get news from one site it is safe to clean it
          out completely.)

               The log file is not automatically cleaned out by any netnews
          software,  and will grow quickly.  The _m_i_s_c/_t_r_i_m_l_i_b script can be
          installed in _L_I_B_L_I_B/_t_r_i_m_l_i_b, and invoked weekly by _c_r_o_n.

               You should also clean out old newsgroups that are no  longer
          active.   To remove a newsgroup net.foo, you should run the shell
          script _r_m_g_r_o_u_p with net.foo as the argument.  That is,

                            /usr/lib/news/rmgroup net.foo

               Note that clearing up UUCP  constipation  is  another  thing
          you'll  have to do if you have flaky hardware or phone lines.  If
          you have more than one connection, chances are that UUCP will get
          clogged  up  when one of your neighbors goes down for more than a
          few hours.  Various spooling schemes are being worked on to  help
          make  the news/uucp system more robust, but one thing you can and
          should do, if you find your /_u_s_r/_s_p_o_o_l/_u_u_c_p directory getting too
          big, is to install a subdirectory fix to UUCP.  A quick and dirty
          version of this is available from Duke,  which  traps  the  file-
          oriented  system  calls  at the assembly language level and maps,
          for example, D.fooA1234 into D.foo/D.fooA1234.  Since the C.  and
          D._l_o_c_a_l  directories  still  get  big, in practice this can still
          create some big directories, but the directories  tend  to  be  a
          factor  of  5 smaller, resulting in a factor of 25 improvement to
          speed (since a directory traversal for all files is quadratic  on
          UNIX).  Right now, UUCP is the weak link in netnews distribution,
          and you should certainly keep an eye on it.

          10.  Creating New Newsgroups

               As system news administrator, you are able to  create  news-
          groups.  To create a newsgroup, first make sure this is the right
          thing  to  do.   Normally  a  suggestion  is  first   posted   to
          net.news.group,net.relatedgroup     for     a    net    newsgroup


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  26


9          net.relatedgroup( should be the group which you are proposing  to
          sub-divide.  For instance, to propose creating net.tv.soaps, post
          the original article to  net.tv,net.news.group).   Followups  are
          made  to net.news.group _o_n_l_y.  (You can force this by putting the
          line:

                             Followup-To: net.news.group

          in the headers of your original posting).  If it  is  established
          that  there  is  general  interest in such a group, and a name is
          agreed on, then someone creates it by typing the command

                                 inews -C _n_e_w_s_g_r_o_u_p

          This will create the active entry locally. The directory will  be
          created  automatically  when the first article for that newsgroup
          is received.  It will also prompt you for a paragraph  describing
          the  group  and start up an _i_n_e_w_s to post a newgroup control mes-
          sage announcing the group.  This control message will be sent out
          on  net.msg.ctl and other sites may have configured their systems
          to do something with these messages.  A human readable  announce-
          ment  is not made - you can post this to net.news.group if neces-
          sary.

               You must be the super user to use the -C  option  to  _i_n_e_w_s.
          (That is, your uid must match ROOTID.  It is recommended that you
          change ROOTID to your own uid so you don't have to _s_u  to  create
          newsgroups.)

          11.  Conversion from A to B

               If you are currently running version A on your system,  note
          that  B  is  incompatible with A.  The files are stored in a dif-
          ferent format (headers have mail  like  field  names  now).   The
          directory  organization  is  different (each newsgroup has a sub-
          directory of its own, and the file names are numbers rather  than
          _s_i_t_e._i_d  pairs).  There are no _b_i_t_m_a_p, _u_i_n_d_e_x, or _n_i_n_d_e_x files to
          be trashed (which articles have been read is stored in each users
          ._n_e_w_s_r_c   file).    The  user  interface  is  slightly  different
          (news/_n_e_t_n_e_w_s(1) is now called _r_e_a_d_n_e_w_s,  news  is  posted  using
          _i_n_e_w_s,  subscription is done by editing ._n_e_w_s_r_c, the sense of the
          -c option is reversed, news is presented in newsgroup order,  the
          -a  and  -t  options  now probably need -x as well, and there are
          many minor changes).

               We decided not to provide a program to convert from  version
          A  to  version B.  Rather, the following strategy was adopted for
          conversion:

          (1)  Install the new news in a different spool directory from the
               old  one.  For example, you can use /_u_s_r/_s_p_o_o_l/_n_e_w_n_e_w_s.  You
               can change to the standard name later if you want.   Get  it
               to work for local messages.



          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  27


9          (2)  Post an article to newsgroup general with the old  news  an-
               nouncing  the  change.  Make available documentation such as
               the accompanying paper _H_o_w _t_o _R_e_a_d _t_h_e _N_e_t_w_o_r_k _N_e_w_s  to  the
               users.  This article will be the last one in the old news.

          (3)  _C_h_m_o_d the old news directory to 555 to prevent any more news
               from being posted.  (Actually, this will prevent the bitfile
               from being updated, so it may not be a good idea.)

          (4)  Replace the old _r_n_e_w_s program with the new _r_n_e_w_s program.

          (5)  Test it by having your neighbor send you a message.

          (6)  Wait a reasonable period for everyone to have read the final
               article with the old news.  Perhaps a few weeks is right.

          (7)  Uninstall the old news.

               Users will have to invoke _r_e_a_d_n_e_w_s  instead  of  _n_e_t_n_e_w_s  to
          read  news.   Depending on your old method of posting, this could
          be changed too.  (If you were using mail, it does not need to  be
          changed.)  They  will  also  have to fix their subscriptions.  In
          general, they can type

                                     netnews -s

          to see what they subscribe to on the old system, and then  create
          a file in their home directory called ._n_e_w_s_r_c containing

                            options -n _t_h_e_i_r _s_u_b_s_c_r_i_p_t_i_o_n

          The format of the subscription pattern matching is the same as in
          A  except  that  ALL  is  replaced by all (change to lower case).
          Something along the lines of this could be used to automate this:

           (echo -n "options -s" ; netnews -s | sed s/ALL/all/) > .newsrc

          12.  Conversion from 2.9 to 2.10

               Conversion from 2.9 to 2.10 is not nearly as involved as  an
          A  to B conversion.  The user interface does not change much, and
          the user ._n_e_w_s_r_c files are not affected.  However, it  is  recom-
          mended  that  you do the conversion during a time when no news is
          received, so that incoming news will not get lost.   One  way  to
          ensure  this  is  to  make /_u_s_r/_b_i_n/_r_n_e_w_s be a shell script which
          saves the article in /usr/spool/innews/$$$$ ($$$$ is the  process  id
          of the particular shell and will be unique for each article).

               The first step to conversion is to  customize  the  sources.
          In  the  past,  you had to take a fresh distribution and edit the
          _d_e_f_s._h file and _M_a_k_e_f_i_l_e to suit local preferences.  If  you  had
          many local changes, or didn't record the local changes, upgrading
          could be annoying.  2.10 provides a mechanism to  automate  these
          changes.   Create  a  shell  script  in  the src directory called


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  28


9          _l_o_c_a_l_i_z_e._s_h.  (You can use _l_o_c_a_l_i_z_e._s_a_m_p_l_e as a  template.)  This
          shell  script  should  copy  _d_e_f_s._d_i_s_t to _d_e_f_s._h, and copy either
          _M_a_k_e_f_i_l_e._v_7 or _M_a_k_e_f_i_l_e._u_s_g to _M_a_k_e_f_i_l_e.   It  should  _c_h_m_o_d  any
          files  that  need  to be changed (often _M_a_k_e_f_i_l_e and _d_e_f_s._h) to a
          writable mode.  Then it should invoke _e_d(1) on the files,  making
          any necessary local changes.

               The next step is to compile the software, with _m_a_k_e(1).   It
          may be necessary to update the _l_o_c_a_l_i_z_e._s_h file until you are sa-
          tisfied with the compilation.  Note that after any change to  the
          _M_a_k_e_f_i_l_e  in  _l_o_c_a_l_i_z_e._s_h,  you  should  run _l_o_c_a_l_i_z_e._s_h by hand.
          Otherwise, although make will run it for you, it will  then  con-
          tinue to do the make with the old _M_a_k_e_f_i_l_e.

               When  the  software  is  compiled,  you   should   run   the
          _c_v_t._a_c_t_i_v_e._s_h shell script, with the _l_i_b and _s_p_o_o_l directories as
          parameters.  This will create a new active  file  in  _L_I_B_L_I_B/_a_c_t_i_v_e.
          Then  run  _c_v_t._l_i_n_k_s._s_h  with  the  _l_i_b  and _s_p_o_o_l directories as
          parameters.  Then run _c_v_t._n_a_m_e_s._s_h with the _l_i_b and _s_p_o_o_l  direc-
          tories  as  parameters.   Old  news  will  be linked into the new
          hierarchy while leaving links in the old hierarchy.  If you  were
          using the default library and spool directories, you would do the
          following:

               sh cvt.active.sh /usr/lib/news /usr/spool/news
               sh cvt.links.sh /usr/lib/news /usr/spool/news
               sh cvt.names.sh /usr/lib/news /usr/spool/news

               The next step is to back up the old binaries:

               mv /usr/bin/rnews /usr/bin/ornews
               ...

          and to install 2.10 with

                                    make install

          Once it is installed, any incoming news will be placed  into  the
          new  hierarchy  but not the old one.  The critical time window is
          between running the three shell  files  and  installing  the  new
          software - any incoming news between these two points will appear
          in only the old hierarchy and be lost to the  new  software.   If
          any significant time elapses here, you should divert _r_n_e_w_s into a
          separate spool directory as described above.

               It is crucial that you run _e_x_p_i_r_e before any  new  news  ar-
          rives.  _E_x_p_i_r_e will update several key files automatically.

               Finally, test things  by  posting  articles  to  to._n_e_i_g_h_b_o_r_n_e_i_g_h_b_o_r
          newsgroups  and  watching  some  incoming  news, and announce the
          change to your users.

               When you are satisfied that the conversion  was  successful,
          run  the  shell  file  _c_v_t._c_l_e_a_n._s_h which will remove the old 2.9


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  29


9          news hierarchy.























































          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  30


9          Appendix A: Setting up a Compressed, Batched Newsfeed

               First, BATCH must have been #_d_e_f_i_n_e'd  when  you  built  the
          news  system.   To  check,  look  in  the file _d_e_f_s._h in the news
          source directory.  BATCH should be defined as a program name  (by
          default,  _u_n_b_a_t_c_h).   If  it's undefined or commented out, define
          it, re-make the news system, and install the new software.

               You'll also need a working _c_o_m_p_r_e_s_s program.   Use  the  one
          shipped  with  this  news distribution, which is based on version
          4.0.  Your news neighbors should be running a compatible  version
          of  compress.  Versions 3.0 and 4.0 are compatible with each oth-
          er, but both are incompatible with versions 2.0 and before.

               Update your _s_y_s file.  First, add the F flag  to  the  other
          news system's line.  For instance, if your compressed-and-batched
          news feed is named _f_r_o_b_o_z_z, and its _s_y_s file  entry  looks  like:
          frobozz:net,mod,na,usa,ca,to.frobozz:: then add the F flag as the
          third                  (colon-separated)                   field:
          frobozz:net,mod,na,usa,ca,to.frobozz:F:  Now the pathnames of ar-
          ticles to be sent will be stashed in a file.  This file is  named
          in  the  fourth field of the _s_y_s entry; add it now.  Use an entry
          of  the  form  _B_A_T_C_H_D_I_R_B_A_T_C_H_D_I_R/_s_y_s_t_e_m,   where   _B_A_T_C_H_D_I_R_B_A_T_C_H_D_I_R   is   usually
          /_u_s_r/_s_p_o_o_l/_b_a_t_c_h  (the  actual  value  is  defined  in  the  news
          _M_a_k_e_f_i_l_e), and _s_y_s_t_e_m is the name of the remote system,  in  this
          example _f_r_o_b_o_z_z.  A name of that form is necessary: the _s_e_n_d_b_a_t_c_h
          script, which sends the batched news, looks for a  file  name  of
          this form to decide if there's news for the remote system.

               Your completed _s_y_s file line should look something like:

               frobozz:net,mod,na,usa,ca,to.frobozz:F:/usr/spool/batch/frobozz

               In /_u_s_r/_l_i_b/_c_r_o_n_t_a_b, find or create at least two news lines:
          one  that  runs nightly, and one that runs every hour or so.  The
          nightly-run script should run _e_x_p_i_r_e, trim log files, and perhaps
          compile weekly statistics that you post to a local-area newsgroup
          one day a  week.   The  hourly-run  script  should  complete  the
          transmitting task with a line like:

                                sendbatch -c frobozz

          Make sure the script knows how to get to the directory  in  which
          _s_e_n_d_b_a_t_c_h  lives.   You  can  either mention the directory in the
          script's PATH-setting line, or replace _s_e_n_d_b_a_t_c_h  with  its  full
          pathname.     _S_e_n_d_b_a_t_c_h    reads    the    files   mentioned   in
          /_u_s_r/_s_p_o_o_l/_b_a_t_c_h/_f_r_o_b_o_z_z,  batches  them,  optionally  compresses
          them,  sends  them  to the remote system, and arranges for remote
          processing.

               This remote processing is directed by another file in BATCH-
          DIR.   Make  a  file  with a name of the form _B_A_T_C_H_D_I_R_B_A_T_C_H_D_I_R/_s_y_s_t_e_m.cmd
          (for this example, /_u_s_r/_s_p_o_o_l/_b_a_t_c_h/_f_r_o_b_o_z_z._c_m_d).  Put a line  in
          it  specifying  the command that the remote system should execute


          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  31


9          to unpack the news batches that your system will send.  An  exam-
          ple _f_r_o_b_o_z_z._c_m_d would be:

                          uux - -r -z -n -gd frobozz!rnews

               Now your system will transmit compressed batches.   The  re-
          ceiving  side  of  the  business  is handled largely by a program
          called _r_n_e_w_s, which will call other programs in LIBDIR to do  ad-
          ditional processing on the incoming batches.

               Make sure there is an executable file called  _r_n_e_w_s  in  the
          BINDIR  directory  (check  the _M_a_k_e_f_i_l_e for its actual location).
          It must be reachable by UUCP or by whatever transport you'll  use
          to  transfer the netnews.  If you defined BINDIR as /_u_s_r/_b_i_n, you
          should have no problems because _u_u_x_q_t can already get there.   If
          you  defined  it  as a different directory, you may have to teach
          _u_u_x_q_t to look in that directory; accomplishing this  varies  from
          system to system.  On 4.2BSD, add the directory to the PATH= line
          of your UUCP _L._c_m_d_s file.  On System V, on the _r_n_e_w_s line of your
          _L._c_m_d_s  file, add a comma followed by the remote system's name on
          that line.  If yours is in /_u_s_r/_b_i_n/_n_e_w_s/_r_n_e_w_s, your _L._c_m_d_s  file
          will look like:

               [For 4.2BSD]
               PATH=/bin:/usr/bin:/usr/bin/news
               rnews

               [For System V]
               /usr/bin/news/rnews,frobozz

          Other systems have a similar file in the /_u_s_r/_l_i_b/_u_u_c_p  directory
          by  which you can specify added programs and paths different from
          the defaults.  HP-UX, for example, has  a  /_u_s_r/_l_i_b/_u_u_c_p/_C_O_M_M_A_N_D_S
          file  which expands _u_u_x_q_t's horizons.  In more restrictive cases,
          paths are compiled into _u_u_x_q_t.  If  you  can't  modify  any  UUCP
          files, just put _r_n_e_w_s in /_u_s_r/_b_i_n.

               You must also have  a  _c_u_n_b_a_t_c_h  in  LIBDIR  (wherever  your
          _M_a_k_e_f_i_l_e  defines  it), because _r_n_e_w_s will eventually try to exec
          that copy.

               Tell the person at the other end of  your  newsfeed  to  use
          _s_e_n_d_b_a_t_c_h  -_c to send you news.  Once that's in place, watch your
          UUCP _L_O_G_F_I_L_E and your news _l_o_g and _e_r_r_l_o_g files  to  ensure  that
          news is being correctly received and unpacked on your system.

               Older compressed batching systems will try to exec  _c_u_n_b_a_t_c_h
          instead  of  _r_n_e_w_s.   If  you are still communicating with these,
          leave _c_u_n_b_a_t_c_h in BINDIR until they have upgraded their software.







          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  32


9          Appendix B: MULTICAST

               If this is defined (in _d_e_f_s._h) then two new flag  characters
          become  defined  in the _s_y_s file.  The first, and most important,
          of these is the M flag.

               If the M flag is set on some line in the _s_y_s file, then  the
          fourth  field  (transfer command) is redefined to become a _m_u_l_t_i_-
          _c_a_s_t name.  That is simply another system name,  expected  to  be
          found  in the first field of some line in the _s_y_s file (textually
          following the line containing the M flag).

               When a news item is being retransmitted, if it  should  (ac-
          cording  to  the  subscription list) be sent to a system that has
          the M flag set, then instead of a command being  run  immediately
          to  transmit the news, the news system remembers the system name,
          along with the multicast name (fourth field).

               Eventually the multicast system name is found in first field
          of a sys file line.  If its subscription list allows transmission
          of this news item, then its command will be executed.  This  com-
          mand  may have up to two "%s" substitutions in it.  The second of
          those is replaced by the name of a file containing the news  item
          (used with the U flag).  The first is subjected to rather special
          treatment.  The whole "word" (delimited by white space)  contain-
          ing  that  "%s" is duplicated as many times as there were systems
          with the M flag set that referenced this  multicast  name  (which
          might be 0 times, causing that "word" to be omitted).  In each of
          these duplicates, the "%s" is replaced by the name of  a  system.
          Note  the  multicast  system  name itself is not included in this
          process.  Then the command is executed as usual.

               The second flag available if the news system is  built  with
          MULTICAST  defined  is O.  If this flag is set, then the sys file
          line will be ignored unless the system name is a  multicast  name
          from  some  earlier line with the M flag, and the news item is to
          be sent to that (earlier) system.  This allows  the  subscription
          list  for the multicast system name (which is likely to be a fake
          system name, invented just for this purpose) to be given  a  very
          wide subscription list (like all) without any unusual effects.

               Here is  an  example.   Assume  that  you  wish  to  forward
          net.unix to four people by mail.  You could do this as ...

               fred:net.unix::mail fred
               harry:net.unix::mail harry
               jane:net.unix::mail jane
               tony:net.unix::mail tony

          however this causes the mail program to be started 4 times,  once
          for each recipient.  On some systems starting the mail program is
          a very expensive operation.  If MULTICAST is defined, an alterna-
          tive method is



          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  33


9               fred:net.unix:M:tony
               harry:net.unix:M:tony
               jane:net.unix:M:tony
               tony:net.unix::mail tony %s

          This would cause just one command to be run: "mail tony fred har-
          ry  jane".  Note that "tony" must still be explicitly included in
          the argument list to the mail command; the "%s" does  not  expand
          to include the multicast "system name" itself.

               A more useful way of doing this, which does not assume  that
          all  the mail readers will want to read the same newsgroups is as
          follows.

               fred:net.unix:M:Mail
               harry:net.physics,net.astro:M:Mail
               jane:net.unix-wizards,net.women:M:Mail
               tony:net.unix,net.unix-wizards,net.jokes:M:Mail
               Mail:all:O:mail %s

               Now, if a news item in group net.unix was received, the com-
          mand

                                   mail fred tony

          would be executed.   If  the  news  were  in  both  net.unix  and
          net.unix-wizards then the command would be

                                 mail fred jane tony

               If a newsitem in net.med (which no-one  gets  by  mail)  ar-
          rives,  then  the  "Mail"  line will be ignored, because of the O
          flag.  "Mail" is a fake system invented  just  so  its  "transfer
          command" can be used to send news to the other recipients.

               The same kind of technique can be used for  normal  transfer
          of news to other systems if your transport network supports a fa-
          cility to send to many other systems in one command.   (That  is,
          if it has a multicast facility.) SunIII (the network used in Aus-
          tralia) has this ability, so a typical Australian _s_y_s file  looks
          like

               emuvax:aus,net,mod,fa:M:FakeName
               kremlin:aus,net,mod:M:FakeName
               kanga:aus,net,!net.all,net.unix:M:FakeName
               FakeName:all:OUS:/bin/sendfile -NRSareporter -d%s -x%s

               A news item in aus.general causes the following command

          /bin/sendfile -NRSareporter -demuvax -dkremlin -dkanga -x/usr/spool/...

          to be executed.  Just one command is run  to  send  the  news  to
          three remote systems.



          News Version B2.10.3                            February 24, 1986





9          USENET Version B Installation                                  34


9               If a multicast system has the F flag set, then the name of a
          file containing the news is appended to the file whose name is in
          the fourth field, as usual.  But on the same line,  separated  by
          spaces, will be appended the names of all the systems that refer-
          enced this multicast system.

               For example, if the Australian site wanted  to  batch  news,
          instead  of  sending it directly, it would simply change the last
          line of its _s_y_s file to

                     FakeName:all:F:/usr/spool/batched/allsites

               Then a news item in net.jobs would cause the following  line
          to be appended to /_u_s_r/_s_p_o_o_l/_b_a_t_c_h_e_d/_a_l_l_s_i_t_e_s

                    /usr/spool/news/net/jobs/5542 emuvax kremlin

               This can then be processed later, in something like the nor-
          mal manner.  (Unfortunately no commands to do this processing are
          yet available).

               Caution: when MULTICAST is defined, the first  "%s"  in  all
          transfer commands is used for multicast, regardless of whether or
          not the system name is ever used as the last field of  some  line
          with  the  M flag set.  To use the U flag in such a case, a dummy
          "%s" should be used, it will simply be omitted from  the  command
          that is executed.

               As an example, if a _s_y_s file line were

                    foovax:net,na,usa:U:uux - foovax!foonews <%s

          without MULTICAST, it would need to be changed to

                   foovax:net,na,usa:U:uux - foovax!foonews %s <%s

          if MULTICAST were defined.

               Additional caution: The numbers of system names that may  be
          used  in  this way are quite severly restricted.  Typically there
          may only be about 10 multicast system names, and each of those is
          restricted  to  sending  to no more than about 20 systems.  These
          limits are dynamic (that is, the numbers counted are  the  number
          of  multicast  systems  receiving  any  single news item, and the
          number of systems that each of those  will  actually  cause  this
          particular  news item to be sent to).  These limits should easily
          suffice for real news sending to remote systems; however they are
          not  likely  to  suffice  if you want to mail news to everyone on
          your host.







          News Version B2.10.3                            February 24, 1986



