home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / share / doc / usd / 11.notes / b.interface < prev    next >
Encoding:
Text File  |  1991-04-17  |  17.0 KB  |  463 lines

  1. .\" Copyright (c) 1980 The Regents of the University of California.
  2. .\" All rights reserved.
  3. .\"
  4. .\" Redistribution and use in source and binary forms, with or without
  5. .\" modification, are permitted provided that the following conditions
  6. .\" are met:
  7. .\" 1. Redistributions of source code must retain the above copyright
  8. .\"    notice, this list of conditions and the following disclaimer.
  9. .\" 2. Redistributions in binary form must reproduce the above copyright
  10. .\"    notice, this list of conditions and the following disclaimer in the
  11. .\"    documentation and/or other materials provided with the distribution.
  12. .\" 3. All advertising materials mentioning features or use of this software
  13. .\"    must display the following acknowledgement:
  14. .\"    This product includes software developed by the University of
  15. .\"    California, Berkeley and its contributors.
  16. .\" 4. Neither the name of the University nor the names of its contributors
  17. .\"    may be used to endorse or promote products derived from this software
  18. .\"    without specific prior written permission.
  19. .\"
  20. .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  21. .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  22. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  23. .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  24. .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  25. .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  26. .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  28. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  29. .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. .\" SUCH DAMAGE.
  31. .\"
  32. .\"    @(#)b.interface    6.2 (Berkeley) 4/17/91
  33. .\"
  34. .ls 1
  35. .ap B "Interfacing Notesfiles to News"
  36.  
  37.     The News system provides functions similar to
  38. those provided by the Notesfile system.
  39. It is possible to gateway articles between the two systems.
  40. In USENET, a common configuration is for several notesfiles
  41. sites to form a subnetwork of USENET and
  42. gateway articles between the local notesfile network and
  43. the rest of USENET.
  44. These articles propogate across USENET in the news system.
  45. Article originating in the news system are gatewayed into
  46. the notesfile network.
  47. When several notesfile networks exist as subnetworks of
  48. a larger news network (such as USENET), articles written
  49. in one notesfile network will be correctly interpreted
  50. when arriving at another notesfile network.
  51. ``Correctly'' interpreted includes proper linking of
  52. responses to their true parents;
  53. this is sometimes not possible with articles written in the
  54. news system.
  55.  
  56.     The notesfile gateway code recognizes articles meeting
  57. the USENET standards.
  58. Additionally, the A-news protocol and older B-news protocols
  59. are recognized.
  60. Incoming (news \(-> notes) articles are parsed and placed in the
  61. appropriate notesfiles.
  62. Articles written within a notesfile subnetwork are formatted according
  63. to USENET standards and transmitted to the news system.
  64.  
  65. .a1 "Configurations for Sites without News"
  66.  
  67.     Sites running notesfiles without the news program have
  68. several possible configuations.
  69. If your site is part of a notesfile subnetwork and you wish to
  70. have your articles gatewayed to the news system and the
  71. rest of USENET, you must find a site who will act as a 
  72. gateway for your articles.
  73. The gateway code performs its task in such a way as to allow
  74. several sites to gateway the same article into the news system;
  75. the multiple copies will have identical unique identifiers 
  76. and one copy will be canceled when they meet on a remote system.
  77.  
  78. .a2 "Sites with no News Neighbors"
  79.  
  80.     If you have no immediate neighbor running news, there is
  81. no particular action you should take other than to reassure
  82. yourself that some site in the notesfile subnetwork is gatewaying
  83. notes-generated articles to the news system.
  84. This can be done in one of several ways.
  85. If the site wants to gateway articles specifically from your
  86. machine, the following command should be executed on that site
  87. occasionally. This is typically done through cron(8).
  88.  
  89.     newsoutput -syoursite notesfile-list
  90.  
  91. A more typical arrangement is where the gateway site sends all
  92. notes-generated articles that arrive on its system into the 
  93. news system.
  94. In this case, the gateway site will execute a command such as 
  95. the following:
  96.  
  97.     newsoutput -a notesfile-list
  98.  
  99. A site gate using this command line will automatically gateway
  100. articles written at your site and eliminates the need of running
  101. a command similar to the first command line.
  102.  
  103.  
  104. .a2 "Sites with Neighbors running News"
  105.  
  106.     If a neighboring system runs both notes and news, you
  107. have the option of gatewaying your own articles or allowing
  108. the neighbor to gateway articles for you.
  109. If the neighbor does not run the notesfile system, you must
  110. provide your own gateway functions.
  111.  
  112.     Gatewaying can be done similarly to the site without
  113. a news neighbor.  You can let your articles propogate across
  114. a notesfile network to a gateway site which will send them
  115. to the news system.
  116. Another option is to gateway your articles,
  117. and possibly any notesfile-generated articles,
  118. into the news system at the neighboring site.
  119. This gets your articles into USENET as quickly as possible.
  120. The two options are not mutually exclusive;
  121. you can gateway your own articles and allow another site to
  122. gateway them.
  123. When copies of the same article meet on a news system, the
  124. extra copy will be removed from the network.
  125.  
  126.     To gateway articles into news, you must modify the
  127. file
  128. /usr/spool/notes/.utilities/net.how
  129. to tell the newsoutput
  130. program how to get to the news system.
  131. More information on this can be found in the section
  132. ``Copying Notesfiles to News'' later in this appendix.
  133.  
  134.     To gateway from the news system to the notesfile
  135. system, you must arrange to have the news system at the remote
  136. site send articles as standard input to the program
  137. /usr/spool/notes/.utilities/newsinput 
  138. on your system.
  139.  
  140.     Information on mapping functions between notesfiles
  141. and news, how to configure a news system to send articles to
  142. a notesfile system,
  143. and
  144. how to have a notesfile system send articles to a news system
  145. can be found later in this appendix.
  146.  
  147. .a1 "Configurations for Sites running News"
  148.  
  149.     A site running both notesfiles and news will typically
  150. perform gateway functions in both directions,
  151. from the notesfile system to the news system
  152. and
  153. from the news system to the notesfile system.
  154. In these cases all the operations are local.
  155.  
  156. .a1 "Gatewaying between Notesfiles and News"
  157.  
  158.     The two notesfile programs ``newsoutput'' and ``newsinput''
  159. perform gatewaying between notesfile and news systems.
  160. Newsoutput takes notesfile-generated articles, formats them,
  161. and hands them to the news system.
  162. Newsinput takes articles from the news system and inserts
  163. them in the notesfile system.
  164.  
  165. .a2 "Copying News to Notesfiles"
  166.  
  167.     The news system maintains ``subscription lists'' for
  168. each neighboring system.
  169. The subscription list is stored in the file /usr/lib/news/sys
  170. on a B-news system.
  171. On an A-news system, the subscription list is in 
  172. /usr/spool/news/.sys
  173.  
  174.     News feeds articles to neighboring systems as they 
  175. arrive.
  176. In many cases, the article is queued for transmission.
  177. In other cases, the article is given to a batching program
  178. which collects a number of articles for transfer
  179. and sends them to an appropriate un-batching program at
  180. the receiving end.
  181.  
  182.     In the case where the notesfile system resides on another
  183. machine, the news subscription line should be generated similarly
  184. to that for a normal news feed with several exceptions.
  185. The first is that the newsinput program does not understand about
  186. batching; articles must be sent one at a time.
  187. Also, one must specify the method of transmitting the article.
  188. To feed the system ``somesite'' with news, the
  189. neighbor will add a line of the following form to his /usr/lib/news/sys:
  190.  
  191.     somesite:subscription::uux - -n somesite!/usr/spool/notes/.utilities/newsinput
  192.  
  193. Of course, networks other than UUCP can be used.
  194.  
  195.     To forward to a notesfile system on the same machine as the
  196. news system, create a pseudo site which doesn't exist elsewhere
  197. (a sitename such as ``nf_sys'' works), and add a line like:
  198.  
  199.     nf_sys:subscription::/usr/spool/notes/.utilities/newsinput
  200.  
  201. Articles arriving at the local system will now be forwarded to
  202. the notesfile system.
  203. By default, news articles are placed in notesfiles with the
  204. same name.
  205. To map newsgroups to particular notesfiles, see the later
  206. section ``Naming Notesfiles and Newsgroups''.
  207.  
  208. .a2 "Copying Notesfiles to News"
  209.  
  210.     The newsoutput program transfers notesfile-generated
  211. articles from the notesfile system to a news system.
  212. The news system does not have to be on the same machine.
  213.  
  214.     Newsoutput accepts parameters telling it to gateway
  215. articles from specific systems or any system.
  216. Additional options allow backwards compatible
  217. headers for older versions of the notesfile software.
  218. A typical newsoutput invocation looks like:
  219.  
  220.     newsoutput -a notesfile-list
  221.  
  222. The -a parameter indicates that notesfile generated articles
  223. from any site are to be sent to the news system.
  224. Under no circumstances will newsoutput transfer an article
  225. to the news system if it has passed through the news system
  226. before.
  227. Thus if a notes generated article passes from one notesfile
  228. subnetwork to another through the news system, the 
  229. article will not be sent into the news system by anyone in 
  230. the second notesfile subnetwork.
  231.  
  232.     The ``notesfile-list'' can contain a mixture of
  233. specific notesfiles, wild-card specifications (net.*),
  234. or ``-f file'' parameters which specifies a file
  235. containing a list of notesfiles to send.
  236.  
  237.     Alternatively, articles for only one system can be
  238. gatewayed with a command line of the form:
  239.  
  240.     newsoutput -ssitename notesfile-list
  241.  
  242. This invocation method maintains a sequencer for each system;
  243. the -a option maintains a single global sequencer.
  244.  
  245.     A third invocation method of newsoutput uses the
  246. ``-c'' option and specifies a specific set of systems to
  247. gateway articles for.  The command looks like:
  248.  
  249.     newsoutput -c gateway-site-file notesfile-list
  250.  
  251. The ``gateway-site-file'' specifies a file containing a list
  252. of sitenames.
  253. Articles written at any of these sites are gatewayed to the
  254. news system.
  255. Thus newsoutput has the ability to send articles to news
  256. for a single system, several systems, or any system.
  257.  
  258.     Newsoutput assumes that a news system is installed
  259. on the local system.
  260. If the news system is in a non-standard location on the
  261. local system or
  262. the news system is on a different machine, newsoutput
  263. can be told where to send articles.
  264. The file /usr/spool/notes/.utilities/net.how contains
  265. command templates for notesfile networking.
  266. To specify a non-standard place for the ``rnews'' program,
  267. add a line of the form:
  268.  
  269.     Usenet:x:::uux - -n myneighbor!/usr/bin/rnews
  270.  
  271. Non-UUCP connections and the like can be specified.
  272.  
  273. .a2 "Naming Notesfiles and Newsgroups"
  274.  
  275.     Notesfiles and newsgroups for the same topic can have
  276. different names.
  277. Notesfiles are currently limited in the last component of
  278. their name to the length of a filename;
  279. under V7, System III, System V, and 4.1 Bsd this is 14
  280. characters.  4.2 Bsd extends the length of a filename
  281. to a maximum of 255 characters per component.
  282. Newsgroup names are no longer limited in total length;
  283. the only restriction in current news versions is
  284. that each component (between .'s) is unique in
  285. the first 14 characters.
  286.  
  287.     The file ``/usr/spool/notes/.utilities/newsgroups''
  288. defines the relationships between notesfiles and newsgroups.
  289. Lines in the file have the general form:
  290.  
  291.     notesfile:base_newsgroup:respone_newsgroup
  292.  
  293. Lines beginning with the ``#'' character are considered
  294. comment lines.
  295. The ``response_newsgroup'' field and the colon separating
  296. it from the base_newsgroup field are optional.
  297.  
  298.     Entries in this file need be made for only a few reasons:
  299. (1) The newsgroup which matches the notesfile is longer than fourteen
  300. characters,
  301. (2) the notesfile and the newsgroup are different names
  302. (e.g. the notesfile `Bnews' can be linked to the newsgroup `net.news.b'
  303. with an entry of `Bnews:net.news.b'),
  304. (3) you want several newsgroups linked to a single notesfile,
  305. and
  306. (4) notes and responses from a notesfile should go to
  307. different newsgroups (net.general/net.followup is one example).
  308. The file is scanned from the beginning until EOF or a match is found.
  309. When no match is found, the code returns the original argument as if
  310. it had matched itself.
  311. The process is similar to having placed a sentinel line of the
  312. form:
  313.  
  314.     myarg:myarg
  315.  
  316. at the end of the file.
  317.  
  318.     The optional third field in the line is used to send 
  319. notes and responses from a notesfile to separate newsgroups.
  320. The net.general/net.followup convention is an example of
  321. how this would be used.
  322. Typically the net.general and net.followup newsgroups are
  323. mapped into the same notesfile.
  324. To preserve peace with news users, responses written in a
  325. notesfile `net.general' should go to the newsgroup `net.followup'.
  326. The following pair of lines will map all news from net.general
  327. and net.followup into the notesfile net.general. 
  328. Base notes from the notesfile net.general will go to the newsgroup
  329. net.general;
  330. responses in the net.general notesfile will be sent to
  331. the net.followup newsgroup.
  332.  
  333. .nf
  334.     net.general:net.general:net.followup
  335.     net.general:net.followup
  336. .fi
  337.  
  338. The first line maps news in net.general to the notesfile net.general.
  339. It also does the mapping from notesfiles to newsgroups.
  340. The second line maps news from net.followup into the notesfile
  341. net.general.
  342. Note that the response field is not used in the mapping from
  343. newsgroups to notesfiles; it is used only for mapping notesfile
  344. responses into a different newsgroup.
  345.  
  346.     To map several newsgroups into the same notesfile, 
  347. place lines of the following form in the ``newsgroups'' file:
  348.  
  349. .nf
  350.     somenotesfile:newsgroup1
  351.     somenotesfile:newsgroup2
  352. .fi
  353.  
  354. If you wish to have articles from the notesfile ``somenotesfile''
  355. go to both of the newsgroups, insert a line before the above lines
  356. to map articles going to notesfiles.
  357. The result would look like:
  358.  
  359. .nf
  360.     somenotesfile:newsgroup1,newsgroup2
  361.     somenotesfile:newsgroup1
  362.     somenotesfile:newsgroup2
  363. .fi
  364.  
  365. The first line is the one used for articles going from notesfiles
  366. to news; the newsgroups specification ``newsgroup1,newsgroup2''
  367. is used on those articles.
  368. Articles coming from the newsgroup ``newsgroup1'' will fail to
  369. match the first line, since the program expects exact matching.
  370. They will match the second line and be mapped to the 
  371. notesfile ``somenotesfile''.
  372.  
  373. .a1 "Typical Configurations"
  374.  
  375.     A typical notesfile subnetwork contains a number of
  376. pure notesfile sites and several sites running both news and
  377. notesfiles.
  378. In these situations, some subset of the sites running
  379. both notes and news
  380. act as gateway sites.
  381. The pure notesfile sites don't concern themselves with 
  382. gateway operations.
  383. The gateway sites typically gateway all notes-generated
  384. articles to news.
  385. Duplicate articles, gatewayed at several sites,
  386. will propogate across the news network.
  387. When two or more of these articles meet at some site, the
  388. superflous copy will be removed from the network.
  389.  
  390.     If none of the sites in the notesfile subnetwork
  391. run the news program,
  392. the gateway site will be one or more of the sites having
  393. neighbors that do run news.
  394. These gateway sites will run newsoutput and direct the
  395. output to the news site by making the appropriate
  396. entry in /usr/spool/notes/.utilities/net.how
  397. for the pseudo-site ``Usenet''.
  398.  
  399. .a1 "News Gateway Installation Checklist"
  400.  
  401.     The following checklist covers the variables in the
  402. ``newsgate.h'' file which may need to be changed on your system.
  403. It also mentions which files to modify to automate the transfer
  404. of articles between the two systems.
  405.  
  406. .bz
  407. .iz
  408. [edit] src/newsgate.h
  409. .iz
  410. MYDOMAIN.
  411. This should be set to the domain your site is in.
  412. Typical domains are ``UUCP'' and ``ARPA''.
  413. .iz
  414. DFLTRNEWS.
  415. The news receiving program. 
  416. This can normally be left as is;
  417. alternate news insertion methods can be specified
  418. with more flexibility through the net.how file.
  419. .iz
  420. EXPANDPATH.
  421. If defined, the code looks in the file specified
  422. by PATHMAP for a route to an author's system.
  423. The code which does this is in ``src/newspath.c''
  424. and expects a particular format in the PATHMAP 
  425. file.
  426. You may wish to replace it with code of your own if
  427. your data base is in a different format.
  428. .iz
  429. PATHMAP.
  430. This is the full pathname of the routing tables
  431. used if EXPANDPATH is defined.
  432. .iz
  433. [finished editing] src/newsgate.h
  434. .iz
  435. make newsouput newsinput.
  436. This will recompile the notesfile/news gateway programs.
  437. .iz
  438. Check /usr/lib/news/sys
  439. to see that news will be forwarded to the notesfile system.
  440. .iz
  441. Make entries in /usr/lib/crontab to
  442. invoke newsoutput occcasionally.
  443. We use every 6 hours.
  444. .iz
  445. If the news system is on another machine or in a non-standard
  446. place,
  447. modify 
  448. /usr/spool/notes/.utilities/net.how.
  449. Add a pseudo-site ``Usenet'' which specifies how to
  450. get to the remote machine.  One example is:
  451. .br
  452.     Usenet:x:::uux - -z neighbor!/usr/bin/rnews
  453. .iz
  454. Check /usr/spool/notes/.utilities/newsgroups.
  455. A sample of how this file will look is included in the
  456. ``Samples'' directory of the distribution.
  457. .iz
  458. Everything should be configured now.
  459. You will probably want to run several tests on local
  460. or limited distribution newsgroups to satisfy yourself
  461. that it works.
  462. .ez
  463.