








               UUUUSSSSEEEENNNNEEEETTTT VVVVeeeerrrrssssiiiioooonnnn BBBB IIIInnnnssssttttaaaallllllllaaaattttiiiioooonnnn


                       Matt Glickman

                 Computer Science Division
 Department of Electrical Engineering and Computer Sciences
                  University of California
                 Berkeley, California 94720


                   Revised by Mark Horton






_1.  _I_n_t_r_o_d_u_c_t_i_o_n

     This document is intended to help a USENET site install
and  maintain  the  network news software.  Please ask ques-
tions of the author or of Mark Horton, 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 con-
     nection of some kind, for example ARPANET or UUCP.  You
     cannot get a link to Berkeley, sorry.  If you must  use
     UUCP  and have no connections, you must have at least a
     dialup and preferably a dialer, and find  someone  wil-
     ling 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 localize.sh script to make  local  changes  to
     the makefile and defs.h files.

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

(d)  Su 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  connection  to ucbvax via uucp links.  This is
     undoubtably wrong, so you will have to configure  links
     as needed.

(e)  After editing the configuration table, get your contact
     at the other end of the link to add you to their sys or
     .sys file.



                        May 3, 1983





                           - 2 -


(f)  Post a message to the to._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,  or  some
     local.test group, instead of net.test.

(g)  Fill out a USENET directory form and post a copy to the
     USENET newsgroup ``net.news.newsite.''

(h)  Post the ``etiquette'' and ``tencmdts'' files  (in  the
     doc  directory)  to  your  ``general'' newsgroup with a
     long expiration date.  Running ``rnews'' separately  on
     each of these files will do.

(i)  It will probably be necessary to fix your uucp  command
     to allow rnews, and to support the -z and -n options.

_2.  _I_n_s_t_a_l_l_a_t_i_o_n

_2._1.  _C_o_n_f_i_g_u_r_a_t_i_o_n

     Local configuration of the UUUUSSSSEEEENNNNEEEETTTT  version  B  software
requires  you  to  edit  a few files.  Most importantly, the
ddddeeeeffffssss....hhhh and MMMMaaaakkkkeeeeffffiiiilllleeee files must be created  from  their  tem-
plates  ddddeeeeffffssss....ddddiiiisssstttt and MMMMaaaakkkkeeeeffffiiiilllleeee....****.  You should create a shell
script called localize.sh 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  choose between Makefile.v7 and Makefile.usg,
and  between  postnews.v7  and  postnews.usg.   You   should
include  the  name of the local organization (MMMMYYYYOOOORRRRGGGG) and the
uid of the local news super user (RRRROOOOOOOOTTTTIIIIDDDD).  A sample  local-
ize  shell script can be found in localize.sample.  The most
important parameters are:

_2._1._1.  _R_O_O_T_I_D

     The numerical userid 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.

_2._1._2.  _N__U_M_A_S_K

     Mask for _u_m_a_s_k(_2) system call.  Set 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.






                        May 3, 1983





                           - 3 -


_2._1._3.  _D_F_L_T_E_X_P

     The default no. of seconds after which an article  will
expire.  2 weeks (1209600 seconds) is the default choice.

_2._1._4.  _D_F_L_T_S_U_B

     The default subscription list.   If  a  user  does  not
specify  any list of newsgroups, this will be used.  Popular
choices are aaaallllllll and ggggeeeennnneeeerrrraaaallll,,,,aaaallllllll....ggggeeeennnneeeerrrraaaallll.

_2._1._5.  _T_M_A_I_L

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

_2._1._6.  _A_D_M_S_U_B

     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nnn flag to readnews on the
command line, ADMSUB will always be selected.  This is  usu-
ally  set  to  ggggeeeennnneeeerrrraaaallll.  (The intent of this parameter is to
have certain newsgroups which users  are  required  to  sub-
scribe to.  A typical site might require ggggeeeennnneeeerrrraaaallll.)

_2._1._7.  _P_A_G_E

     The default program for which articles will be piped to
for paging.  This can be disabled or changed by the environ-
ment variable PAGER.  If you have it, the Berkeley _m_o_r_e com-
mand  should  be used, since the + option allows the headers
to be skipped.

_2._1._8.  _I_N_E_W_S

     The full path name of the _i_n_e_w_s program for _r_e_c_n_e_w_s  to
fork.

_2._1._9.  _F_O_L_L_O_W_U_P

     This is the command used to internally post  followups.
It is not normally changed.

_2._1._1_0.  _R_N_E_W_S

     The name of the _r_n_e_w_s program (a  link  to  _i_n_e_w_s)  for
_u_u_r_e_c  to  fork.  Normally this is /usr/bin/rnews.  Wherever
you install it, it must be in uuuuuuuuxxxxqqqqtttt's default path, normally
////bbbbiiiinnnn::::////uuuussssrrrr////bbbbiiiinnnn.





                        May 3, 1983





                           - 4 -


_2._1._1_1.  _N_O_T_I_F_Y

     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, and senduuname.) As distributed, mail will
be sent to user uuuusssseeeennnneeeettt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.

_2._1._1_2.  _D_F_T_X_M_I_T

     This is the default command to use to transmit news  if
no  explicit  command  is  given in the 4th field of the sys
file.  It normally includes uux with  the  -z  option.   You
should  install  this  mod  to  uucp at once, otherwise your
users will start being bombarded with annoying  uux  comple-
tion  messages.   However, you can turn this off to get news
installed.

_2._1._1_3.  _U_X_M_I_T

     This is the default command  used  if  the  U  flag  is
present  in  the  flags portion of a sys file line.  In this
case, the 2nd %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 modifications are made to the  uucp  system,
such as the -c option to uux.

_2._1._1_4.  _D_F_T_E_D_I_T_O_R

     This is the full path name of the default editor to use
during  followups and replies.  It should be set to the most
popular text editor on your system.  As distributed,  vvvviiii  is
used.

_2._1._1_5.  _U_U_P_R_O_G

     If this is defined, it will be used as a command to run
when  the sssseeeennnndddduuuuuuuunnnnaaaammmmeeee control message is sent around.  Other-
wise the command uuuuuuuunnnnaaaammmmeeee will be run.  Normally, this program
should be placed in LIBDIR.

_2._1._1_6.  _M_A_N_U_A_L_L_Y

     If this is defined, incoming rrrrmmmmggggrrrroooouuuupppp messages will  not
remove  the subdirectories, but rather just remove the group
line from your active file.  You should have  NOTIFY  on  if
you  use  this.   Note that on a USG system the subdirectory
will not be removed anyway unless you have an unsecure (mode
777  directory)  system.   This  is turned off by default to



                        May 3, 1983





                           - 5 -


protect you against accidental or malicious  removal  of  an
important newsgroup.

_2._1._1_7.  _B_A_T_C_H

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

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


_2._1._1_8.  _B_E_R_K_N_A_M_E

     If your site is connected into USENET  over  a  Berknet
link, specify the Berknet name of your site here.

_2._1._1_9.  _L_O_C_A_L_N_A_M_E

     Most systems have a full name database  on  line  some-
where,  showing for each user what their full name is.  Most
often this is in the GCOS field  of  /etc/passwd.   If  your
system  has  such a database, LOCALNAME should be left unde-
fined.  If not, define LOCALNAME, and articles  posted  will
only  receive  full names from local user information speci-
fied in NAME or ~/.name by the user.  If you have a nonstan-
dard GCOS format (not finger or RJE) it will be necessary to
make local changes to fullname.c as appropriate on your sys-
tem.

_2._1._2_0.  _I_N_T_E_R_N_E_T

     If your system  has  a  mailer  that  understands  ARPA
Internet  syntax  addresses  (user@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._2_1.  _M_Y_D_O_M_A_I_N

     When generating internet addresses, this domain will be
appended  to  the  local  site  name to form mailing address
domains.  For example, on system ucbvax with user  root,  if
MYDOMAIN  is set to ``.UUCP'', addresses generated will read
``root@ucbvax.UUCP''.  If  MYDOMAIN  is  ``.Berkeley.ARPA'',
the address would be ``root@ucbvax.Berkeley.ARPA''.  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.




                        May 3, 1983





                           - 6 -


_2._1._2_2.  _A_U_T_O_N_E_W_N_G

     If defined, any article that comes in with  an  invalid
newsgroup  will  automatically  cause  the  newsgroup  to be
created.  In the past this was enabled, but now it  is  dis-
abled to prevent typographical errors at sites running older
versions of news that  do  not  prevent  postings  with  bad
groups from creating newsgroups all over the network.  It is
recommended that this be left disabled, although a new  site
coming  up  without  a  complete active file may wish to run
with it enabled for a few weeks.

_2._1._2_3.  _C_H_E_A_P

     Do not chown spool files to  news.   Used  for  obscure
accounting reasons on some systems.

_2._1._2_4.  _O_L_D

     Define this if any of your USENET neighbors run 2.9  or
earlier versions of B news.  It will cause all headers writ-
ten to contain two extra lines: Article-I.D. and Posted, for
upward  compatibility.   Once  all  your neighbors have con-
verted, you can save disk space and  transmission  costs  by
turning this off.

_2._1._2_5.  _U_N_A_M_E

     Define this if  the  uname  system  call  is  available
locally,  even though you are not a USG system.  USG systems
always have uname available and ignore this setting.

_2._1._2_6.  _G_H_N_A_M_E

     Define this if the 4.2BSD gethostname  system  call  is
available.   If  neither  UNAME  or GHNAME is defined, inews
will determine the name  of  the  local  system  by  reading
/usr/include/whoami.h.

_2._1._2_7.  _V_7_M_A_I_L

     Define this if your system uses  V7  mail  conventions.
The  V7  mail  convention is that a mailbox contains several
messages concatenated, each message beginning  with  a  line
reading  ``From  user date'' 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._2_8.  _M_Y_O_R_G

     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.  40 characters is probably a good



                        May 3, 1983





                           - 7 -


upper bound on the length.  If the city and state or country
of  your organization are not obvious, please try to include
them.  If the organization name begins 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 `/usr/lib/news/organization'.  For example, an
organization  might  read  ``Bell  Labs,  Murray  Hill'', or
``U.C. Berkeley'' or ``MIT'' or  ``Computer  Corp.  America,
Cambridge, Mass''.

     There are other parameters  that  may  be  modified  in
ddddeeeeffffssss....hhhh, and they are described in the file.

_2._2.  _M_a_k_e_f_i_l_e

     There are also a few  parameters  in  the  MMMMaaaakkkkeeeeffffiiiilllleeee  as
well.  These are:

_2._2._1.  _N_E_W_S_U_S_R

     This is the owner (user name) of _i_n_e_w_s.  If you  are  a
superuser,  you should probably create a new user id (tradi-
tionally nnnneeeewwwwsss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uuusssseeeennnneeeettt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._2.  _N_E_W_S_G_R_P

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

_2._2._3.  _S_P_O_O_L_D_I_R

     This directory contains subdirectories  in  which  news
articles will be stored.  It is normally /usr/spool/news.

     Briefly, for each  newsgroup  (say  nnnneeeetttt....ggggeeeennnneeeerrrraaaallll)  there
will  be a subdirectory /usr/spool/news/net/general contain-
ing articles, whose filenames are sequential  numbers,  e.g.
/usr/spool/news/net/general/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 documented in RFC 822.

     You should place news in  an  area  of  the  disk  with
enough  free  space to hold news you intend to keep on line.



                        May 3, 1983





                           - 8 -


The total volume of news in  net.all  currently  runs  about
3MB/week.   If you expirenews after the default 2 weeks, you
will need about 6MB 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.  Other newsgroup classes  do  not  add
much   to   the  volume;  fa.all  accounts  for  only  about
80KB/week, and btl.all+bell.all are only about 450KB/week.

_2._2._4.  _L_I_B_D_I_R

     This directory will contain various system  files.   It
is normally /usr/lib/news.

_2._2._5.  _B_I_N_D_I_R

     This is the directory in  which  _i_n_e_w_s,  _r_e_a_d_n_e_w_s,  and
_c_h_e_c_k_n_e_w_s  are  to be installed.  This is normally /usr/bin.
If you decide to set BINDIR to a local binary directory, you
should  consider  that the rrrrnnnneeeewwwwssss command must be in a direc-
tory that can be found by uuuuuuuuxxxxqqqqtttt, which  only  searches  /bin
and /usr/bin unless you modify uuxqt.

_3.  _F_I_L_E_S

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

_3._1.  _a_c_t_i_v_e

     A list of active newsgroups.  Automatically updated  as
new newsgroups come in.  The order here is the order news is
presented by rrrreeeeaaaaddddnnnneeeewwwwssss, so you can  edit  this  file  to  put
important  newsgroups  first.   Each line of the active file
contains two fields: the newsgroup  name,  and  the  highest
local  article  number (for the most recently received arti-
cle), separated by a space.  Local article numbers begin  at
1  and  count  sequentially within the newsgroup as articles
are received.  They do not usually correspond to local arti-
cle  numbers  on  other sites.  The article number is always
stored as a 5 digit number (with  leading  zeros)  to  allow
updating of the file in place.

_3._2.  _c_a_e_s_a_r

     A program to do caesar decoding of rotated text,  on  a
line  by  line  basis.   The standard input is copied to the
standard 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'' readnews command, and may also be  used
with the ``13'' argument to encode material for posting.



                        May 3, 1983





                           - 9 -


_3._3.  _h_e_l_p

     A list of commands printed when an illegal  command  is
typed to rrrreeeeaaaaddddnnnneeeewwwwssss.

_3._4.  _h_i_s_t_o_r_y

     A list of every article that has come in to  your  sys-
tem.   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 expire command.

_3._5.  _h_i_s_t_o_r_y._d_i_r,_h_i_s_t_o_r_y._p_a_g

     These two files are used on V7 systems as a hashed ver-
sion of history, containing the message ID's of all articles
in history.  They are only used if -DDBM and -ldbm appear in
the Makefile.

_3._6.  _l_o_g

     If present, a log of articles processed and error  con-
ditions  is kept here.  This file grows without limit unless
cleaned out periodically, the trimlib script in misc can  be
invoked  from  /usr/lib/crontab  daily or weekly to keep the
log short.

_3._7.  _n_g_f_i_l_e

     A list of newsgroups  that  you  can  legally  post  to
locally.   Actually it's a pattern, so if you include aaaallllllll it
will allow everything.  You probably want to  forbid  ffffaaaa....aaaallllllll
here.   It  is  also possible to control what newsgroups you
will accept from other sites using a different  mechanism  -
see the section on the format of the ssssyyyyssss file.

_3._8.  _n_o_t_i_f_y

     If this file is present, it's 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  option  in  defs.h.)  This  is  useful if one person
administers several  systems  and  does  not  want  multiple
copies of control message notifications.

_3._9.  _r_e_c_n_e_w_s

     A program which allows you to send  mail  to  get  news
posted.   You usually need to run sssseeeennnnddddmmmmaaaaiiiillll or ddddeeeelllliiiivvvveeeerrrrmmmmaaaaiiiillll to
be able to use this.







                        May 3, 1983





                           - 10 -


_3._1_0.  _r_e_c_o_r_d_i_n_g

     A list of newsgroup classes and file names  to  display
recordings  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 newsgroup 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 misc directory.

_3._1_1.  _s_e_n_d_n_e_w_s

     A program to send news internally from one computer  to
another.  Useful if you use mail links to transmit articles.

_3._1_2.  _s_e_q

     The current sequence number for your system.   Used  to
generate unique article ID's.

_3._1_3.  _s_y_s

     A list of all your  neighbors,  which  newsgroups  they
get, and how to send news to them.  The format is documented
below.

_3._1_4.  _u_s_e_r_s

     A list of users that read news on your system.

_3._1_5.  _u_u_r_e_c

     A program to receive news sent by sssseeeennnnddddnnnneeeewwwwssss.

_4.  _S_e_t_t_i_n_g _U_p _L_i_n_k_s

     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 is without mail so that
is discussed first.





                        May 3, 1983





                           - 11 -


_4._1.  _N_o_n-_m_a_i_l _L_i_n_k_s

     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 arti-
cle being transmitted as the standard input.  This is possi-
ble  on some networks, but the most common implementation is
via the UUUUUUUUCCCCPPPP network.  Using the _u_u_x(_1_C) command,  the  com-
mand which is forked to the shell looks like:
           uuuuuuuuxxxx ---- ----rrrr ----zzzz rrrreeeemmmmooootttteeeessssyyyyssss!!!!rrrrnnnneeeewwwwssss <<<< aaaarrrrttttiiiicccclllleeee
This is the default transmission method.  In order to set up
such  a  link,  obviously a UUUUUUUUCCCCPPPP 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 /usr/bin so  _u_u_x  can  find
it.   Also,  /usr/src/cmd/uucp/uuxqt.c  should be checked to
make sure that rnews is an allowed command.

     Other networks that allow remote execution include  the
Berknet,  BLICN  (usend), many Ethernets, and the NSC hyper-
channel (nusend).  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 article could be lost.  Spooling arranges
that the system will try again when B comes back up.

_4._2.  _M_a_i_l _L_i_n_k_s

     When using mail to transmit articles, two  intermediary
programs are necessary.  These are _s_e_n_d_n_e_w_s(_8) and _u_u_r_e_c(_8).
The idea is that when system A wants to send an  article  to
system B, the sys 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.  Sendnews
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 input to the program _u_u_r_e_c.   This  pro-
gram unpackages it and invokes rnews.

     The best way to get mail to rnews fed into _u_u_r_e_c is  to
use  sendmail or delivermail, if you are on a system running
them.  Create an alias in /usr/lib/aliases as follows:

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

and sendmail 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 uurec every hour with /usr/spool/mail/rnews as stdin.
This solution is messier because uurec must potentially deal



                        May 3, 1983





                           - 12 -


with  multiple  messages,  something  that  has  never  been
tested.

_5.  _F_o_r_m_a_t _o_f _t_h_e _s_y_s _f_i_l_e

     To set up a link to another site, edit the ssssyyyyssss file  in
LIBDIR.   This  file  is  similar to the L.sys file of uucp.
Each line contains four fields, separated by colons:

(1)  The system name of a site to which  you  forward  news.
     Normally   all  systems  you  have  links  to  will  be
     included.  You should also have a  line  for  your  own
     system.

(2)  The newsgroups to be forwarded to them.  This is a pat-
     tern  in  the  sense of a subscription.  Generally, you
     will list classes of newsgroups, that is, using ``all''
     for  everything.   A  typical forwarding list for a new
     site would be

             net.all,fa.all,to.sysname

     where ssssyyyyssssnnnnaaaammmmeeee is the name of  the  remote  system.   In
     particular,  you  don't want to forward aaaallllllll 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 newsgroup you don't want, say nnnneeeetttt....jjjjooookkkkeeeessss,  include
     !!!!nnnneeeetttt....jjjjooookkkkeeeessss  here.   (You will have to add -DRESTRICT to
     CFLAGS in your Makefile or this won't have any effect.)
     This  measure  is  on top of AUTONEWNG, which will nor-
     mally prevent unknown newsgroups from  being  forwarded
     if  disabled.  RESTRICT allows certain newsgroups never
     to be forwarded even if recreated.

(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.   Leav-
     ing  it  empty  defaults 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 indicates that the
     fourth field is the name of a file.  The full path name
     of  a  file  containing  the  article  in SPOOL will be
     appended to this file.  The L flag  prevents  transmis-
     sion  unless the article was created on this site.  (It
     is recommended that you feed an L link  to  a  backbone
     site,  to  ensure  that  your  submissions 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



                        May 3, 1983





                           - 13 -


     sent using the iiiihhhhaaaavvvveeee////sssseeeennnnddddmmmmeeee protocol  described  below.
     The U field arranges that the parameter to the optional
     %s in the command field to be filled  in  with  a  per-
     manent file name from SPOOL instead of a temporary cus-
     tomized file name.

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

             uux - -r -z sysname!rnews

     The - option tells uux to expect input on  stdin.   The
     -z  option  is nonstandard - you should add it, see the
     minus.z* files in the uucp directory.  It shuts off the
     annoying  message you would otherwise get mailed to you
     telling you that your article  was  broadcast  OK.   To
     avoid using the -z option, change the source or put the
     uux command in the fourth field.  The -r  option  tells
     uux  not  to  start up a daemon right away.  This turns
     out to ease the load on the system, at the  expense  of
     making news be transmitted a bit slower.  The news will
     be sent when the next daemon is started,  usually  this
     means  the  next time mail is sent to or from your sys-
     tem.  If this turns out to be unreasonably long, put  a
     line in crontab to run

             /usr/lib/uucp/uucico -r1

     every hour or so.

     Here is a sample sys file for  a  site  ``myvax''  with
connections  to  ``yourvax'' where myvax also passes news on
to ``downstream''.  We assume  that  ``myvax''  and  ``down-
stream'' exchange a local newsgroup class lng.all as well as
the network wide  newsgroups.   News  to  ``downstream''  is
batched.

                myvax:net.all,fa.all,lng.all::
                yourvax:net.all,fa.all::
                downstream:net.all,fa.all,lng.all:F:/usr/spool/batch/downstream


_6.  _P_o_s_t_i_n_g _M_e_t_h_o_d_s

     There are three ways to post news.  The basic method is
to use the iiiinnnneeeewwwwssss command:

        iiiinnnneeeewwwwssss ----tttt _t_i_t_l_e ----nnnn _n_e_w_s_g_r_o_u_p_s < _b_o_d_y_f_i_l_e

This is the primitive used by other  programs,  and  is  not
very suitable for humans.




                        May 3, 1983





                           - 14 -


     A somewhat friendlier front end is ppppoooossssttttnnnneeeewwwwssss.  This pro-
gram  will prompt you for the title, newsgroups, and distri-
bution, then place you in the editor.  (The  system  default
EDITOR  is  used  unless  the environment 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
distribution.  When you write out the file and exit from the
editor, the article will be posted.

     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
arbitrary program as input.  This is easily  done  with  the
Berkeley  delivermail  or sendmail program, and not with any
other mailer the author is familiar with.  (It may be possi-
ble  to  painfully set this up with MMDF, provided the news-
group 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 nnnneeeetttt....ggggeeeennnneeeerrrraaaallll,  this  starts  up
the  given  shell command which calls recnews with one argu-
ment, 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RRReeeeccccnnnneeeewwwwssss  will  in  turn  invoke
iiiinnnneeeewwwwssss.

     Note that there are problems with recnews.  There is no
way  to use it to post to multiple newsgroups without creat-
ing separate articles (something frowned  upon   because  it
forces  people to read the same thing more than once.) Also,
there is no way to make the recording feature (to safe guard
proprietary information) work when recnews is used.

_7.  _V_a_r_i_o_u_s _c_o_n_s_i_d_e_r_a_t_i_o_n_s

_7._1.  _S_u_i_d _b_i_t_s

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

_7._2.  _M_o_d_e_s _o_f _S_p_o_o_l _D_i_r_e_c_t_o_r_i_e_s

     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 a new  subdirectory  of  SPOOLDIR  for  the
newsgroup.   Since both inews and mkdir are suid, mkdir will



                        May 3, 1983





                           - 15 -


use the real uid instead of NEWSUSER when checking for  per-
missions,  and  if  the  directory  isn't 777 the check will
fail.  Here are several alternatives if you don't want a 777
directory around:

_7._2._1.  _F_i_x _R_e_a_l _U_i_d

     If inews is always run from cron or by root,  the  real
uid  can  be arranged to be root or NEWSUSR.  This is a poor
solution since it makes the local creation of new  newsgroup
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.  _C_h_a_n_g_e _t_h_e _K_e_r_n_e_l

     _i_n_e_w_s will do _s_e_t_u_i_d(_g_e_t_e_u_i_d())  before  it  forks  the
mkdir.   If  your system permits this call, there will be no
problem.  In particular, Berkeley 4.0BSD and  later  systems
allow  this.   An  alternative  change  to  the kernel is to
automatically stack uids: when an suid program is  run,  set
the new real uid to the old effective uid.

_7._2._3.  _G_r_o_u_p_s

     You could have inews be  sgid  NEWSGRP  and  all  files
writable  by  the  group.  This approach has been tested and
the problem turns out to be that the mmmmkkkkddddiiiirrrr command uses  the
aaaacccccccceeeessssssss  system call to check permissions.  Since aaaacccccccceeeessssssss uses
the real gid, you run into the same problem.

_7._2._4.  _A_n_o_t_h_e_r _m_k_d_i_r

     You could create a version  of  mkdir  that  does  less
checking,  and  put  it  in  a  directory  that  can only be
accessed by NEWSUSR (mode  700,  owned  by  NEWSUSR).   Have
inews fork this mkdir.

_7._3.  _E_x_p_i_r_a_t_i_o_n _d_a_t_e_s

     To get articles to expire automatically, put a line  in
crontab to run

        ////uuuussssrrrr////lllliiiibbbb////nnnneeeewwwwssss////eeeexxxxppppiiiirrrreeee

every night.  This command deletes all expired news.  The -a
option   causes  all  expired  news  to  be  archived  under
/usr/spool/oldnews.

     Sometimes news is not expired when it  should  be.   Be
sure  to  check that expire has permissions to unlink files,
that it runs as a user that has a .newsrc, and  that  it  is
properly  suid.   You can manually invoke expire with the -v
(verbose) option to find out what it's doing.  Adding levels



                        May 3, 1983





                           - 16 -


of verbosity (e.g. -v6) will get more and more output.

_7._4.  _V_e_r_s_i_o_n _t_o _V_e_r_s_i_o_n

     Version B will understand incoming news in either  ver-
sion  A or B format, automatically.  Version B will generate
either format, depending on the flag in the 3rd field of the
sys  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 supports the standard and
will communicate 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 constructed as
well as possible from the available information.

_7._5.  _P_r_e_s_e_n_t_a_t_i_o_n _O_r_d_e_r

     The order of the newsgroups listed in LIBDIR/active  is
the  order  the  newsgroups will be presented in.  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:

                general
                local.general
                net.general
                net.followup
                local newsgroups, in alphabetical order
                net.all newsgroups, in alphabetical order
                junk
                fa.all, in alphabetical order
                test
                all.test
                to.all
                control


_8.  _C_o_n_t_r_o_l _M_e_s_s_a_g_e_s

     Some news systems will send you articles that  are  not
for  human  consumption.   They  are  messages  to your news



                        May 3, 1983





                           - 17 -


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
aaaallllllll....aaaallllllll....ccccttttllll, 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
nnnneeeetttt....mmmmssssgggg....ccccttttllll (or restricted broadcast such as bbbbttttllll....mmmmssssgggg....ccccttttllll) or
messages for a particular system:  ttttoooo....uuuuccccbbbbvvvvaaaaxxxx....ccccttttllll.   Messages
are cancelled, however, with a Control: line in a message to
the same newsgroup(s) as the original message.

     A control message contains a command and zero  or  more
arguments  (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.  _i_h_a_v_e/_s_e_n_d_m_e

     Two control messages are iiiihhhhaaaavvvveeee and sssseeeennnnddddmmmmeeee.  These  mes-
sages 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  con-
sults  the  history  file  to see if the article has already
been seen, and then throws it away if it's been seen before.

     Note  that,  since  most  messages  are  short  anyway,
experience  has  indicated  that for ordinary UUCP unbatched
communication, all ihave/sendme does is triple the load  and
slow  down  forwarding.   Hopefully  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 gen-
erate them.  So we advise that you  don't  use  ihave/sendme
for now.

     Use of these control messages  can  cut  down  on  this
wasted  transmission,  but if you have a polled UUCP connec-
tion, 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 protocol.  The choice is controlled by
the N flag in the sys file.  In the case of a leaf node (one
with only one neighbor) there is no advantage to this proto-
col.   Even  if both sites are able to initiate a connection
(have dialers or the link is hardwired) the -r option on the
uux  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
deciding whether to use it.  If transmission time and  phone
bills  dominate  your  costs,  and  you  are sending news to
several sites, and large article bodies dominate  the  costs



                        May 3, 1983





                           - 18 -


(rather  than  the  headers and the time spent by UUCP nego-
tiating transmission)  it  is  probably  worthwhile  to  use
ihave/sendme.   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 proto-
col.  The decision can be made independently for  each  site
in your sys file.

     This pair works as follows: Site mmmmyyyyssssiiiitttteeee receives  arti-
cle  <<<<111122223333@@@@aaaabbbbcccc....UUUUUUUUCCCCPPPP>>>>.   It  enters it locally and then broad-
casts it to its neighbors.  One of  its  neighbors  is  site
yyyyoooouuuurrrrssssiiiitttteeee  which  has  the N flag in the ssssyyyyssss file.  So mysite
sends an article on  newsgroup  to.yoursite.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 article.  The name of the  newsgroup
and  the  sys file control transmission of the article, nor-
mally the sys 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.

     Yoursite 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.mysite.ctl  with title ``sendme <123@abc.UUCP> yoursite''
which is transmitted  to  mysite.   (The  two  arguments  to
sendme  are the article ID requested and the site to send it
to.) Then mysite gets this message  and  actually  transmits
the article to yoursite.

_8._2.  _n_e_w_g_r_o_u_p

     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 inews.  By default, the newsgroup is added
to the active file and a directory is created, and  mail  is
sent  to  the local contact advising that this has happened.
See the routine ``c_newgroup''  in  control.c  if  you  want
something  different  to  happen.   (Note that, although the
body of the message contains a brief description of the pur-
pose  of  the  group,  this  body  is usually thrown away by
existing software.)

_8._3.  _r_m_g_r_o_u_p

     This message has one argument, the name of a  newsgroup
to  be removed.  It is used for network-wide cancellation of
a newsgroup.  If MANUALLY is not defined, it will remove the
articles,  directory,  and  active  file line for the group.



                        May 3, 1983





                           - 19 -


There is a shell script rrrrmmmmggggrrrrpppp that does essentially the same
thing as this message, but the shell script only removes the
group  locally.   We  recommend  that  you  leave   MANUALLY
defined,  and when you receive mail advising you of the dem-
ise of the newsgroup, you run  rmgrp  by  hand.   This  will
prevent accidental or malicious removal of a good newsgroup.

_8._4.  _c_a_n_c_e_l

     This message cancels a given  article.   It  takes  one
argument,  the  message  ID  of  the  article to cancel.  It
should be broadcast to the same newsgroup  as  the  original
article.

_8._5.  _s_e_n_d_s_y_s

     The sys file is mailed to the originator  of  the  mes-
sage.   There  are  no  arguments.   This is used for making
maps.  Since your sys file is public information, you should
not remove or change this control message.

_8._6.  _s_e_n_d_u_u_n_a_m_e

     The uuuuuuuunnnnaaaammmmeeee(1) 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.sys which are a secret, you may wish
to edit this.  Note  that  only  the  output  of  uuname  is
mailed,  not the contents of L.sys (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 control.c.

_8._7.  _v_e_r_s_i_o_n

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

_8._8.  _O_t_h_e_r _M_e_s_s_a_g_e_s

     Any unrecognized message will cause an error message to
be  mailed  to  the  originator.  Additional messages may be
defined as time goes on, such as messages  to  automatically
update  directories  or  maps.   You should be willing to go
into the code (control.c) and add messages  as  they  become
standardized.

_9.  _M_a_i_n_t_e_n_a_n_c_e

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



                        May 3, 1983





                           - 20 -


     The hhhhiiiissssttttoooorrrryyyy and lllloooogggg files in your  LIB  directory  will
grow.  You should make sure that they are cleaned up period-
ically.  The LIB/expire program will remove lines from  his-
tory  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 misc/trimlib
script can be installed in LIB/trimlib, and  invoked  weekly
from /usr/lib/crontab.

     You should also clean out old newsgroups  that  are  no
longer active.  To remove a newsgroup net.foo, you should do
the following: First, remove the subdirectory SPOOL/net/foo.
Second,  remove the line net.foo from your active file.  (It
is no longer necessary to  remove  the  net.foo  lines  from
people's .newsrc files, because readnews will clean them out
and reorder their files.) Here is a shell script  to  remove
newsgroups:

        : rmgrp newsgroup ...
        cd /usr/spool/news
        for i in $*
        do
                echo removing $i
                rm -rf `echo $i | sed 's:\.:/:'`
                cp /usr/lib/news/active /tmp/rmg$$
                sed /^$i /d < /tmp/rmg$$ > /usr/lib/news/active
        done
        rm /tmp/rmg$$


     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 sys-
tem more robust, but one thing you can and should do, if you
find  your  /usr/spool/uucp directory getting too big, is to
install a subdirectory fix to UUCP.  A quick and dirty  ver-
sion  of  this is available from Duke, which traps the open,
creat, link, etc. system  calls  at  the  assembly  language
level    and    maps,    for    example,   D.fooA1234   into
D.foo/D.fooA1234.  Since  the  C.  and  D.local  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



                        May 3, 1983





                           - 21 -


distribution, and you should certainly keep an eye on it.

_1_0.  _C_r_e_a_t_i_n_g _N_e_w _N_e_w_s_g_r_o_u_p_s

     As system news administrator, you are  able  to  create
newsgroups.   To create a newsgroup, first make sure this is
the right thing to do.   (Normally  a  suggestion  is  first
posted  to  net.general,net.news.group  for a net newsgroup,
followups are made to net.news.group, it is  established  if
there  is  general  interest  in such a group, and a name is
agreed on.) Then someone creates it by typing the command

        iiiinnnneeeewwwwssss ----CCCC _n_e_w_s_g_r_o_u_p

This will create the directory and active entry locally.  It
will  also  prompt  you for a paragraph describing the group
and start up an inews to post  a  newgroup  control  message
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 read-
able announcement is  not  made  -  you  can  post  this  to
net.news.group if necessary.

     Someone should post a first article to  the  new  news-
group immediately.  If this is not done, the empty directory
for the newsgroup will cause cccchhhheeeecccckkkknnnneeeewwwwssss to believe  there  is
unread  news, because each user has no .newsrc line for that
newsgroup.  This command creates the group network-wide.  It
is then possible to submit an article to the group.

     You must be the super user to  use  the  -C  option  to
inews.   (That is, your uid must match ROOTID.  It is recom-
mended that you change ROOTID to your own uid so  you  don't
have to su to create newsgroups.)

     A new site should get the active file from their neigh-
bor  and  use  the  mmmmaaaakkkkeeeeaaaaccccttttiiiivvvveeee....sssshhhh shell script to create the
local directory  hierarchy  and  active  file.   (The  local
active  file will have 00000 for each newsgroup, since local
numbers will start at 1 for the first  article  received  in
each newsgroup.)

_1_1.  _C_o_n_v_e_r_s_i_o_n _f_r_o_m _A _t_o _B

     If you are currently running version A on your  system,
note that B is incompatible with A.  The files are stored in
a different format (headers have mail like field names now).
The  directory organization is different (each newsgroup has
a subdirectory of its own, and the file  names  are  numbers
rather than site.id pairs).  There are no bitmap, uindex, or
nindex files to be trashed (which articles have been read is
stored  in  each users .newsrc file).  The user interface is
slightly different (news/netnews  is  now  called  readnews,
news  is posted using inews, subscription is done by editing



                        May 3, 1983





                           - 22 -


.newsrc, 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
     /usr/spool/newnews.  You can  change  to  the  standard
     name  later if you want.  Get it to work for local mes-
     sages.

(2)  Post an article to newsgroup ggggeeeennnneeeerrrraaaallll with the old  news
     announcing  the  change.   Make available documentation
     such as the accompanying paper ``How to Read  the  Net-
     work  News''  to  the  users.  This article will be the
     last one in the old news.

(3)  Chmod 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 rnews program with the new  rnews  pro-
     gram.

(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 sub-
scriptions.  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 .newsrc con-
taining

        options -s _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:



                        May 3, 1983





                           - 23 -


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


_1_2.  _C_o_n_v_e_r_s_i_o_n _f_r_o_m _2._9 _t_o _2._1_0

     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 .newsrc files are not affected.  However,
it  is  recommended 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 /bin/rnews 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 defs.h file and Makefile to suit local  prefer-
ences.   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  localize.sh.   (You  can  use
localize.sample  as  a  template.)  This shell script should
copy either postnews.v7 or postnews.usg  to  postnews,  copy
defs.dist   to   defs.h,  and  copy  either  Makefile.v7  or
Makefile.usg to Makefile.  It should chmod  any  files  that
need to be changed (often Makefile and defs.h) to a writable
mode.  Then it should invoke eeeedddd on  the  files,  making  any
necessary local changes.

     The  next  step  is  to  compile  the  software,   with
``make''.   It  may  be  necessary to update the localize.sh
file until you are satisfied  with  the  compilation.   Note
that  after  any  change to the Makefile in localize.sh, you
should run localize.sh by hand.   Otherwise,  although  make
will  run  it  for you, it will then continue to do the make
with the old Makefile.

     When the software  is  compiled,  you  should  run  the
cvt.dots.sh shell script, with the lib and spool directories
as parameters.  This will create the new hierarchical  spool
directory,  and  a new active file in LIB/nactive.  Old news
will be linked into the new hierarchy while leaving links in
the old hierarchy.

     Now you can test ./inews, ./checknews, and  ./readnews,
to  make  sure  everything works.  The newsgroup ``test'' is
good for this.

     The next step is  to  back  up  the  old  binaries  (mv
/usr/bin/inews  /usr/bin/oinews,  etc.)  and to install 2.10
with  ``make  cp''.   Move  LIB/active  to  LIB/oactive  and
LIB/nactive to LIB/active.  Once it is installed, any incom-
ing news will be placed into the new hierarchy but  not  the



                        May 3, 1983





                           - 24 -


old  one.   The  critical  time  window  is  between running
cvt.dots.sh 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  signifi-
cant  time  elapses  here,  you  should  divert rnews into a
separate spool directory as described above.

     Finally, test things by posting articles to to.neighbor
newsgroups and watching some incoming news, and announce the
change to your users.















































                        May 3, 1983


