home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / inn-faq / part6 < prev    next >
Encoding:
Internet Message Format  |  1997-12-01  |  39.8 KB

  1. From: hwr@pilhuhn.de (Heiko W.Rupp)
  2. Newsgroups: news.software.nntp,news.software.b,news.answers
  3. Subject: INN FAQ Part 6/9: Day-to-day operation and changes to the system
  4. Supersedes: <faq.p6_879846811@pilhuhn.de>
  5. Followup-To: news.software.nntp
  6. Date: 25 Nov 1997 03:25:42 +0100
  7. Organization: The Home Of The Pilhuhn
  8. Lines: 1062
  9. Approved: hwr@pilhuhn.de
  10. Expires: 12 Dec 1997 02:25:25 GMT
  11. Message-ID: <faq.p6_880424725@pilhuhn.de>
  12. NNTP-Posting-Host: snert.pilhuhn.de
  13. Summary: This article is part 6 of a multi-part FAQ:
  14.     Part 6: Day-to-day operational questions.  Some big changes you can make, bug warnings for 1.4, 1.3, 1.2.
  15. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!boulder!csnews!coop.net!enews.sgi.com!su-news-feed4.bbnplanet.com!su-news-hub1.bbnplanet.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!fu-berlin.de!news.belwue.de!news.uni-ulm.de!rz.uni-karlsruhe.de!pilhuhn.de!snert!news
  16. Xref: senator-bedfellow.mit.edu news.software.nntp:43461 news.software.b:22577 news.answers:117901
  17.  
  18. Posted-By: post_faq 2.10
  19. Archive-name: usenet/software/inn-faq/part6
  20. Last Changed: $Date: 1997/07/01 01:25:41 $ $Revision: 2.21 $
  21.  
  22.                   Part 6 of 9
  23.  
  24. INN FAQ Part 1: General and questions from people that don't (yet) run INN
  25. INN FAQ Part 2: Specific notes for specific operating systems
  26. INN FAQ Part 3: Reasons why INN isn't starting
  27. INN FAQ Part 4: The debugging tutorial (setup of feeds etc.)
  28. INN FAQ Part 5: Other error messages and what they mean
  29. INN FAQ Part 6: Day-to-day operation and changes to the system
  30. INN FAQ Part 7: Problems with INN already running
  31. INN FAQ Part 8: Appendix A: Norman's install guide
  32. INN FAQ Part 9: Appendix B: Configurations for certain systems
  33.  
  34.  
  35. ------------------------------
  36.  
  37. Subject:  Table Of Contents for Part 6/9
  38.  
  39. =====================================================================
  40.   TABLE OF CONTENTS FOR PART 6/9
  41. =====================================================================
  42.  
  43. DAY-TO-DAY OPERATIONAL QUESTIONS:
  44.     6.1 How do I create all those directories in the newsspool?
  45.     6.2 Why is /usr/lib/news/newsgroups not found?
  46.     6.3 Safe way to edit the "active" file?
  47.     6.4 What's the best way to upgrade to a new version of INN?
  48.     6.5 How do I talk to innd from C or Perl?
  49.     6.6 After a crash.
  50.     6.7 How do I moderate a mailing list?
  51.     6.8 How do I configure the /usr/lib/news/moderators file?
  52.     6.9 Listing every article
  53.     6.10 How does /remember/ in expire.ctl work?
  54.     6.11 What does the output of ``expire -v1'' mean?
  55. HOW DO I... (Big changes you can make to the system):
  56.     6.12 How do I set up a delayed IHAVE/SENDME over NNTP?
  57.     6.13 I want compressed news, but do not have uucp
  58.     6.14 Can I use gzip with INN?
  59.     6.15 What do I do if /var/spool/news is split over multiple partitions?
  60.     6.16 Sun Online Disk Suite for news spool?
  61.     6.17 Add local newsgroups?
  62.     6.18 Archiving expired articles
  63.     6.19 How do I restrict access on certain newsgroups (like alt.sex)
  64.     6.20 INN on one machine, UUCP modem on a different one
  65.     6.21 Setting up proxy-nntp to talk through a firewall
  66.     6.22 How do I set up inpaths with INN?
  67.     6.23 Fill different types of control messages in different directories?
  68.     6.24 Use more than ~100 Feeds on SunOS 4.1 ?
  69.     6.25 Speed up NNTP Transfers ("Streaming NNTP")
  70.     6.26 I don't want all those reject messages from rnews in syslog
  71. BUGS IN 1.4:
  72.     6.27 Security Patch
  73.     6.28 Looping Select Patch
  74. BUGS IN 1.3 and 1.2: 
  75.     6.29 7-bit encoded batches are not correctly processed. Why is this?
  76.     6.30 NOV (overchan) doesn't work well.
  77.     6.31 Why doesn't nntpget work?
  78.  
  79.  
  80. =====================================================================
  81.                   DAY-TO-DAY OPERATIONAL QUESTIONS
  82. =====================================================================
  83.  
  84.  
  85. ------------------------------
  86.  
  87. Subject: (6.1) How do I create all those directories in the newsspool?
  88.  
  89. Q:  For example, if you receive comp.sys.amiga.applications, do you
  90. have to mkdir /var/spool/news/comp/sys/amiga/applications?
  91.  
  92. A:  Nope.  innd creates the directory for you the first time you
  93. receive an article for that newsgroup.
  94.  
  95. ------------------------------
  96.  
  97. Subject: (6.2) Why is /usr/lib/news/newsgroups not found?
  98.  
  99. The latest rev is in:
  100.         ftp://ftp.uu.net/networking/news/config/newsgroups.Z
  101. or in    ftp://ftp.sunet.se/pub/news/config/
  102. Get it and install it.
  103.  
  104. ------------------------------
  105.  
  106. Subject: (6.3) Safe way to edit the "active" file?
  107.  
  108. First of all, you could manipulate the active file using the ctlinnd
  109. "newgroup", "rmgroup" and "changegroup" commands.  However, sometimes
  110. you just need to do a lot of editing all at once:
  111.  
  112. The following sequence is the shortest:
  113.  
  114.     ctlinnd pause "edit active"
  115.     [do something to the active file]
  116.     inncheck
  117.     ctlinnd reload active "edit active"
  118.     ctlinnd go "edit active"
  119.  
  120. Simple!  No need to "flush" since the "pause" does that.
  121.  
  122. > What if I need to delete 3000 lines from my active file?
  123.  
  124. I would definitely edit the active file manually (using
  125. the above procedure).
  126.  
  127. > What if I need to delete 10 lines from my active file?
  128.  
  129. For a couple quick changes, I recommend using "ctlinnd".  This is a
  130. little slow because all channels are closed and reopened after each
  131. "rmgroup", "newgroup", and "changegroup".  However, it's easier than
  132. remembering the above sequence.
  133.  
  134. DO NOT THROTTLE THE SERVER WHEN DOING MULTIPLE rmgroup COMMANDS.  There
  135. is a bug in INN (all versions) that will shred your active file if you
  136. do multiple "rmgroup" messages while the server if throttled.  This is
  137. a common mistake.  People think the "rmgroup"'s will go faster if the
  138. server is throttled.  It will go faster, it will also shred your active
  139. file.
  140.  
  141. If you have a large number of groups to remove or create, you can use
  142. awk to write a script to do the work for you.
  143.  
  144.     % cat thelist
  145.     alt.foo.bar
  146.     alt.delete.me
  147.     comp.sys.mac
  148.     % awk <thelist '{ print "ctlinnd rmgroup " $1 }'
  149.     ctlinnd rmgroup alt.foo.bar
  150.     ctlinnd rmgroup alt.delete.me
  151.     ctlinnd rmgroup comp.sys.mac
  152.  
  153. Now, you can either send the output of that to "| sh -x",
  154. or you can redirect the output to a file, and "source" the
  155. file.
  156.  
  157. If you want to create a bunch of newsgroups, the awk
  158. command might be like this:
  159.  
  160.     % awk <thelist \
  161.     '{ print "ctlinnd newgroup " $1 " y user@host" }' | sh -x
  162.  
  163. Be aware that news.daily also throttles the server at some time so
  164. verify the state of the server before doing ctlinnd {rm,new}group.
  165.  
  166. ------------------------------
  167.  
  168. Subject: (6.4) What's the best way to upgrade to a new version of INN?
  169.  
  170. First, you should read the README and the Install.ms (yes, read
  171. them both... again).   Things change in new versions.
  172.  
  173. Second, the README explains how to do an upgrade.  This document
  174. is redundant, but explains the procedure in more detail.
  175.  
  176. STEP 1:  Copy the values in the old config.data to your new config.data.
  177. You can do this automatically with this trick:
  178.  
  179.     % cd config
  180.     % make subst
  181.     % cp config.dist config.data
  182.     % ./subst -f {OLDFILE} config.data
  183. where "{OLDFILE}" names your old config.data file.
  184.  
  185. STEP 2:  Edit the config.data to see if you want to change any of
  186. the new settings that didn't exist in the old version's config.data
  187. file.
  188.  
  189. STEP 3: Compile everything:
  190.  
  191.     % cd $INN
  192.     % make all
  193. (you can run "make world", which also runs "lint".  If you don't
  194. know what "lint" is, just ignore anything it outputs.  If it bombs,
  195. run "make all" instead.)
  196.  
  197. STEP 4: When you feel you are ready to install the new files shut down
  198.     the old daemon:
  199.  
  200.     % ctlinnd shutdown 'upgrade in progress'
  201.     [ kill innwatch by hand if you need to ]
  202.  
  203. STEP 4: Install the new files:
  204.  
  205.     % cd $INN
  206.     % make update
  207.  
  208. STEP 5: Now update all your $INN/site files to be the same as they were
  209. for your old software.  "cd $INN/site ; make diff-installed" will tell
  210. you what's different between the files in /usr/lib/news and $INN/site.
  211. If you only make changes in the $INN/site directory and use "make
  212. install" to copy them into place you'll save your self a lot of
  213. trouble.  Read $INN/site/Makefile for more interesting things that
  214. "make" can do.
  215.  
  216. STEP 6: When you feel you are ready to install the new $INN/site files:
  217.  
  218.     # cd $INN/site
  219.     # make install
  220.  
  221. STEP 7: Re-start the system:
  222.  
  223.     % sh /usr/lib/news/etc/rc.news
  224.  
  225. STEP 8: If everything was done right you should be up and running.
  226. Parts 3 and 4 of the FAQ gives tips on testing your configuration.
  227.  
  228. If you're upgrading from 1.4, you'll need to change the call to rc.news 
  229. in your rc.local, /etc/init.d/INN or equivalent to 
  230.     "su news -c /path/to/rc.news"  
  231. since rc.news now gets run as news instead of root.
  232.  
  233. DON'T FORGET to apply the appropriate security patches (even to 1.5.1!!)!!.
  234.  
  235. ------------------------------
  236.  
  237. Subject: (6.5) How do I talk to innd from C or Perl?
  238.  
  239. Rich Salz says:
  240.  
  241. If you are writing C, look at doc/inndcomm.3 and include/inndcomm.h;
  242. they include all you need to do any ctlinnd command (in fact, ctlinnd
  243. itself is little more than a call to the library).
  244.  
  245. Hacking up a Perl subroutine that spoke to innd's Unix-domain control
  246. socket should be fairly straightforward but hasn't yet been written.
  247.  
  248. ------------------------------
  249.  
  250. Subject: (6.6) After a crash.
  251.  
  252. "What do I do after a system crash?"
  253.  
  254. INN handles crashes pretty well.  If there are any problems they
  255. get cleaned up by the nightly expire.  About once a month you
  256. might want to run "makehistory -buv" to look for "lost" articles.
  257. Check the man page for "makehistory" for more information.
  258. (The man page for "makehistory" is in the news-recovery man
  259. page until INN 1.4). 
  260. The manpage is a little unclear about the '-n' flag. If used alone 
  261. (e.g. makehistory -n) it does not rebuild the dbz files. But if used 
  262. in conjunction with -bu (e.g. makehistory -bunv) it does not pause 
  263. the server.
  264.  
  265. See also #5.11.
  266.  
  267. ------------------------------
  268.  
  269. Subject: (6.7) How do I moderate a mailing list?
  270.  
  271. Ask your news administrator.  If you are the news administrator, read
  272. RFC 1036.  (also, refer to "How do I configure the
  273. /usr/lib/news/moderators file?")
  274.  
  275. Hint: The relevant part of RFC 1036 is " 2.2.11 Approved ".
  276.  
  277. See also #5.32, #6.8
  278.  
  279. ------------------------------
  280.  
  281. Subject: (6.8) How do I configure the /usr/lib/news/moderators file?
  282.  
  283. Q: The 'moderators' file that comes with INN has only the following
  284. lines:
  285.  
  286.     gnu.*:%s@tut.cis.ohio-state.edu
  287.     *:%s@uunet.uu.net
  288.  
  289. Should this be changed?  That is, if at Usenet site, does the news
  290. admin have to configure this file in order for INN to email the local
  291. posts to moderated newsgroups to the correct moderator?  In this case
  292. then, every time a new moderated group is created, and/or changes its
  293. moderator, it should be necessary to change this file.
  294.  
  295. A: Fortunately not! But also see below.
  296.  
  297. First of all, the default configuration says, "The moderator for
  298. foo.bar is foo-bar@uunet.uu.net".  The good people at UUNET keep mail
  299. aliases for all the moderated newsgroups so that as moderators come and
  300. go, they will always forward to the correct person.
  301.  
  302. A: But it also wouldn't be bad ...
  303.  
  304. The default entry could/should be changed to:
  305.  
  306. *:%s@moderators.uu.net
  307.  
  308. as this points to several servers around the world which have the
  309. records. This is good to balance the load on the servers. See the MX
  310. entry to see what servers there are. Be careful with that change, as
  311. the response packet is too large for a UDP response and the nameserver
  312. has to switch to TCP connections in order to get the response;
  313. unfortunately not all nameservers are able to do this.
  314.  
  315. Refer to the "How to Construct the Mailpaths File" FAQ, for an
  316. explanation of the moderation mechanism.  This article explains the
  317. 'mailpaths' file from C News, which is similar in nature to the INN's
  318. 'moderators' file although with a different syntax.
  319.  
  320. The file 'moderators' could be modified, though, according to that
  321. article.  For example, there are other sites that do what UUNET does,
  322. and they might be closer to you.
  323.  
  324. Also, you might want to take a look to the inn.conf(5) man page to read
  325. the 'moderatormailer' parameter description.
  326.  
  327. See also: #6.7, #5.32
  328.  
  329. ------------------------------
  330.  
  331. Subject: (6.9) Listing every article
  332.  
  333. People often ask for a way to list every file in the newsspool.  There
  334. are a couple ways of doing this.  They work well for INN as well as C
  335. News:
  336.  
  337. 1. Here's the fastest way.  However, it only lists the files that are
  338. actually in the history file and if an article is crossposted it only
  339. gets listed once:
  340.  
  341. #!/bin/sh
  342. . /usr/lib/news/innshellvars
  343. cd ${SPOOL}
  344. awk '(NF > 2){print $3}' < ${HISTORY} | tr . /
  345.  
  346. Sorting the output will improve directory cache efficiency.
  347.  
  348. 2. This lists any article file no matter how many links
  349. you have, etc. and even if it is not listed in the history
  350. file:
  351.  
  352.     cd /var/spool/news
  353.     gfind . -regex '.*/[0-9][0-9]*$' -print
  354.  
  355. NOTE: GNU find will execute this much faster than the "find" that
  356. comes with most versions of Unix (including SunOS).
  357.  
  358. 3. If you need to do something fancier than what find can do, consider
  359. using perl's find2perl program.  Given a find command line, find2perl
  360. will output the perl code to do the same thing.  You can then modify
  361. the output to do what you want.  For example:
  362.  
  363.     find2perl . -mtime +30 -name '[0-9][0-9]*$' -exec '/bin/rm {}'
  364.  
  365. outputs a perl script that deletes any article that is over 30 days old
  366. (except the regular expression is output as wrong...  change it to:
  367.  
  368.     /^[0-9]+$/ &&
  369.  
  370. and it should work just fine.
  371.  
  372. 4. Another efficient way to scan all articles in the spool, including
  373. those that for some reason aren't in the history file, is to read the
  374. active file for a list of newsgroup names, and chdir() to each
  375. directory to scan for files.  Remember *not* to do a recursive treewalk
  376. for each directory.
  377.  
  378. ------------------------------
  379.  
  380. Subject: (6.10) How does /remember/ in expire.ctl work?
  381.  
  382. (from Jerry Aguirre)
  383. The /remember/ time specifies how long a history only (i.e. a entry that 
  384. only is in history, but where the article is no longer there) entry will
  385. be kept measured from the arrival time.  If the expire value is 14 days
  386. and the /remember/ time is 5 then entries will be kept for 15 days.
  387. This is because the /remember/ only applies to entries after that
  388. articles have expired.  It can not force a history entry to be removed
  389. before the article is expired.  The extra day beyond expire might be
  390. considered a harmless bug in expire.
  391.  
  392. ------------------------------
  393.  
  394. Subject: (6.11) What does the output of ``expire -v1'' mean?
  395.  
  396. (Based on a submission from Chris Johnson <cj@sra.com>)
  397.  
  398. Running expire with -v1 option produces output like:
  399.  
  400.         Removed approximately    764913k
  401.         Article lines processed  1044872
  402.         Articles retained         872883
  403.         Entries expired           171989
  404.         Files unlinked            239657
  405.         Old entries dropped            0
  406.         Old entries retained      103038
  407.  
  408. "Article lines processed": the number of lines in the the history file
  409.     that were read by the expire program (it reads through the entire
  410.     history file when it runs)
  411.  
  412. "Articles retained": the lines left in the history file after some of the 
  413.     lines (entries) are dropped.
  414.  
  415. "Entries expired": the number of entries/articles listed in the history 
  416.     file that were deemed old enough to be deleted; this equals
  417.     "Article lines processed" - "Articles retained"
  418.  
  419. "Files unlinked": the number of files deleted from the file system where 
  420.     1 file equals 1 article; however, this number can be much higher than 
  421.     "Entries expired" because a single entry can be posted to multiple groups
  422.     and you get 1 file for each group it is posted to
  423.  
  424. "Old entries dropped": lines deleted from the history file that are only 
  425.     present because of the value of /remember/ in expire.ctl
  426.  
  427. "Old entries retained": lines left in the history file for articles that 
  428.     have already expired
  429.  
  430. (Note that running expire with -t option articles are not deleted from
  431. filesystem and the output changes slightly to: Would remove
  432. approximately 103623k). Running expire with -z option also does not
  433. remove files, but writes a list of files to be removed (see entries
  434. about "delayrm" and "fastrm" in this FAQ) See also the manpage for
  435. expire ...
  436.  
  437. =====================================================================
  438.         HOW DO I... (Big changes you can make to the system)
  439. =====================================================================
  440.  
  441. ------------------------------
  442.  
  443. Subject: (6.12) How do I set up a delayed IHAVE/SENDME over NNTP?
  444.  
  445. Christophe Wolfhugel <Christophe.Wolfhugel@grasp.insa-lyon.fr> writes:
  446.  
  447. Having some of your NNTP newsfeeds delayed by a fixed amount of time is
  448. a good way to reduce your bandwidth requirements, or a good way to set
  449. up a backup-feed.  By including a Wt flag in your newsfeeds file, INN
  450. will insert timestamp entries in that batchfile, channels, or
  451. exploders.  This timestamp can be used to implement delayed
  452. ihave/sendme processing.  INN's senders (like innxmit) do not use that
  453. data yet.  However, NNTPLINK does support this delayed IHAVE/SENDME
  454. mechanism since release 3.3  (NNTPLINK can be found on
  455. shape.mps.ohio-state.edu:/pub/nntplink/nntplink.tar.gz).
  456.  
  457. HOW TO DO IT:
  458.  
  459. The syntax that you would use in your newsfeeds file would be:
  460.  
  461.     site:*:Tf,Wtmn:
  462.  
  463. and run this command now and then:
  464.  
  465.     nntplink -i batchfile -y 300 -b site news.site.fr
  466.  
  467. The delayed IHAVE/SENDME is expected to allow bandwidth savings in
  468. situations where all sites use nntplink in following topology:
  469.  
  470.     Your site -- 64k -----------+-----------  Site 1
  471.                                 |               |
  472.                                 |              2mb
  473.                                 |               |
  474.                                 +------------ Site 2
  475.  
  476.    Site 1 and 2 are in the same metropolitan area, you feed them both.
  477.    With the standard nntplink layout, you generally send all articles
  478.    twice, which is a waste even if you're at 2 Meg/s link and even if
  479.    Site 1 and 2 do nntplinks, you're faster.
  480.  
  481.    The delayed link would be used between your site and Site 2.  A 2 or
  482.    3 minute delay allows Site 1 to feed Site 2 before you, and in case
  483.    of a Site 1 outage the backup starts nearly immediately.
  484.  
  485.    Reasonable delays are still kept as You -> 1 -> 2 should take less
  486.    than one minute (or just 300 ms disk to disk if using nntplink -i ? :)).
  487.  
  488. Experiences seem to show that a 2 to 3 minutes delay is
  489. a reasonable choice.
  490.  
  491. Chris
  492.  
  493. ------------------------------
  494.  
  495. Subject: (6.13) I want compressed news, but do not have uucp
  496.  
  497. There is an extension to the nntp Protocol called XBatch. XBatch
  498. lets you tunnel binary data through a nntp connection. The batches
  499. will be put in a separate directory on the receiving host, where they
  500. can then be fed into rnews.
  501.  
  502. Before trying xbatch make sure, that you can get news via nntp!!!
  503.  
  504. Inn 1.5 has xbatch built in, so you can just read the innxbatch(8)
  505. manual page.
  506.  
  507. You can check that a server accepts xbatch (from a host which is in 
  508. your hosts.nntp):
  509.  
  510. 132 % telnet your.news.host.pilhuhn.de nntp
  511. xbatch 3  <-- you type
  512. 339            result code
  513. abc       <-- you type
  514. 239            successfully accepted
  515.  
  516. ------------------------------
  517.  
  518. Subject: (6.14) Can I use gzip with INN?
  519.  
  520. [this was written with the help of Michael Brouwer
  521. <michael@tar.wft.stack.urc.tue.nl>]
  522.  
  523. There are three things that can be effected by using gzip:  Compression
  524. of old logs, compressing batches to send out, and decompressing batches
  525. that come in.
  526.  
  527. With INN 1.4 all you need to do is change two lines in config.data to
  528. something like this:
  529.  
  530. COMPRESS                /usr/local/bin/gzip
  531. DOTZ                    .gz
  532.  
  533. If you rebuild INN with these options set, all logs will be gzipped, and rnews
  534. will use gzip to decompress news.
  535.  
  536. gzip will automaticly and transparently decompress UNIX Compress, SCO
  537. UNIX Compress (I'm told it's 99% compatible with UNIX Compress), Pack,
  538. and gzip.  Therefore, you can now receive batches compressed with any
  539. of the above listed formats.  Let's say your site is now has "a
  540. universal decompresser".
  541.  
  542. It has been reported that if you hardlink gzip to be zcat, and make
  543. sure that it is the zcat that INN uses, you can get the "universal
  544. decompresser" without having to use gzip for your logs.  (Though, gzip
  545. for your logs is a big win, so why make trouble for yourself?)
  546.  
  547. `send-uucp' will still use compress for outgoing batches, so the sites
  548. you feed won't suddenly start getting data they don't understand.
  549.  
  550. Before you can send gzipped batches, you should make sure that the
  551. sites that you feed have made the above changes so that they have the
  552. "universal decompresser" too.
  553.  
  554. Edit send-uucp to use gzip instead of compress for certain hosts (see
  555. example of using compress -b12 for the host esca in send-uucp),
  556. outgoing batches will be gzipped.
  557.  
  558. If you use sendbatch, you will have to edit the file so that COMPRESS
  559. is set to "gzip" and COMPFLAGS is set to "-9vc".
  560.  
  561. ------------------------------
  562.  
  563. Subject: (6.15) What do I do if /var/spool/news is split over multiple partitions?
  564.  
  565. READ THIS ENTIRE SECTION BEFORE YOU BEGIN.
  566.  
  567. First of all, you can do this by either mounting a filesystem at
  568. /var/spool/news/comp (for example) or by mounting a filesystem anywhere
  569. and making /var/spool/news/comp a symbolic link to the new partition.
  570.  
  571. Articles will be written as normal, but cross-posts have to be handled
  572. specially now.  Usually INN handles crossposts by writing the article
  573. to the first newsgroup, and then creating hard links to all the other
  574. places where the article should appear.  Hard links do not take up
  575. additional disk space (except making your directories longer).  Hard
  576. links also have the advantage that the file data doesn't get deleted
  577. until the last hard link is gone (and they can be deleted in any
  578. order).  Therefore, you can expire each newsgroup at a different rate,
  579. but the file data won't delete until it is expired from the last
  580. newsgroup.
  581.  
  582. The problem is that two hard linked files must both be on the same
  583. filesystem (partition).
  584.  
  585. When INN sees that it can not make a hard link (because an article is
  586. cross-posted across two partitions) it will try to make a symbolic
  587. link.  If your system can not do symbolic links, set HAVE_SYMLINK to
  588. DONT in your config.data file.  This will make INN write a second
  589. (or third, etc.) copy of the file instead.  (NOTE: INN 1.4 doesn't
  590. make the extra files.)
  591.  
  592. Anyway, even though INN will automatically create symbolic links, you
  593. have to give expire the "-l" flag so that it will know to modify its
  594. behavior.  Suppose that a message is posted to rec.photo and
  595. alt.cameras and suppose that rec.photo expires more quickly then the
  596. alt group.  If this happens, then you will be left with a dangling
  597. symlink.  The -l flag prevents this from happening by not removing
  598. the file from rec.photo until alt.cameras expire time permits it
  599. from being deleted.
  600.  
  601. To inform expire that your spool is split across multiple partitions:
  602.  
  603. In news.daily, change:
  604.     EXPIREFLAGS="-v1"
  605. to read
  606.     EXPIREFLAGS="-v1 -l"
  607.  
  608. In expirerm, change:
  609.     RMPROC="fastrm -e -u -s ${SPOOL}"
  610. to read
  611.     RMPROC="fastrm -e -s ${SPOOL}"
  612.  
  613. Now edit innwatch.ctl so that it checks all the spool disks, not just
  614. ".".  See the lines with "No space (spool)". Also edit innshellvars
  615. and change the INNDF variable to reflect the innwatch.ctl changes.
  616.  
  617. Lastly, edit innstat (the line with the "df") so that all spool disks
  618. are included.  After that, you're done!
  619.  
  620. If you ever need to run "makehistory" you should pay attention to the
  621. caveat in makehistory(8) (NB: This man page is called "news-recovery"
  622. in releases before INN 1.5):
  623.  
  624. MOVING THE FILES:
  625.  
  626. Here is an example of moving /var/spool/news/rec to its own
  627. partition:
  628.     (mount the new disk onto /mnt)
  629.     cd /var/spool/news/rec
  630.     tar cf - . | ( cd /mnt && tar xpvf - )
  631.     If you are confident you did it right, "rm -rf /var/spool/news/rec"
  632.     then "mkdir /var/spool/news/rec".
  633.     umount /mnt
  634.     mount /var/spool/news/rec
  635.  
  636. If you are moving >50% of the spool, you might use dump instead of tar:
  637.     dump 0f - /var/spool/news | ( cd /mnt && restore xf - rec)
  638. But try it out first if it is really faster - some people had much better 
  639. success with using a tar-pipe (as above) using GnuTar (10 times faster). 
  640. If you don't mind about article loss, just deleting the articles would 
  641. be fastest:
  642.     cd /var/spool/news
  643.     mv rec rec.o
  644.     mkdir rec
  645.     mount /dev/newdisk /var/spool/news/rec
  646.     rm -rf rec.o
  647.  
  648. Remember:  If you screw up the /etc/fstab, SunOS and many other UNIXs
  649. won't boot.  fstab can't have any blank lines in many UNIXs either.
  650. Double check the file after you modify it.
  651.  
  652. ------------------------------
  653.  
  654. Subject: (6.16) Sun Online Disk Suite for news spool?
  655.  
  656. Another way under SunOS 4.1.[34] not to use multiple partitions is 
  657. to use the Sun Online Disk Suite. 
  658. Several sites use this and have spool capacities up to 12 GB. It has 
  659. been reported that using a stripe size of 1 cylinder gives the best
  660. performance for the article filesystem.
  661. Chris Schmidt <cs@germany.eu.net> elaborates more:
  662.  
  663.   "You add several physical volumes to get a logical volume. We have 
  664. a meta partition made out of three 2GB disks with one partition each.
  665. df shows:
  666. Filesystem            kbytes    used   avail capacity  Mounted on
  667. /dev/md1a            5878350 4831490  752943    87%    /EUnet/news/spool
  668.  
  669. With the Online Disk Suite you also can do striping to balance the 
  670. load among the used disks: the first cylinder is on the first disk, 
  671. the second on the second one, the third on the third one and the 
  672. fourth on the first disk again .."
  673.  
  674. ------------------------------
  675.  
  676. Subject: (6.17) Add local newsgroups?
  677.  
  678. Q: Does anyone have a cookbook example on how to create a local news group?
  679.  
  680. These are the steps ..
  681.  
  682. 1) Make sure your innd is running
  683. 2) Add the group with: ctlinnd newgroup local.group
  684. 3) Add entries to newsfeeds to restrict the local groups to your 
  685.    organization:
  686.     ME:!local.*::
  687.  
  688.     out.going.site:*,!local.*:Tf,Wnm:
  689. 4) Add a descriptive entry to newsgroups
  690. 5) Ready :)
  691.  
  692. Please consider, that local is a very common name for local groups, so
  693. if a user crossposts to local.test and misc.test the article will show
  694. up in all local.test over the world. So please choose a 'better' name.
  695.  
  696. ------------------------------
  697.  
  698. Subject: (6.18) Archiving expired articles
  699.  
  700. In <2hmomh$262@news.iastate.edu> rod@iastate.edu writes:
  701. >What options do I have in INN for archiving local newsgroups?
  702. >Any help would be appreciated. Any cookbook examples would also help.
  703.  
  704. See doc/archive.8.  You could also put "never:never:never" in your
  705. expire.ctl file.
  706.  
  707. Here's a cookbook example of an archive feed:
  708.     # Feed all moderated source postings to an archiver
  709.     source-archive!:!*,*sources*,!*wanted*,!*.d\
  710.         :Tc,Nm,Wn:/usr/local/bin/archive -f -i /usr/spool/news.archive/INDEX
  711.  
  712. Ulf Kieber <uk1@irz.inf.tu-dresden.de> writes:
  713. The INN 1.4 newsfeeds(5) man page show how to set up a /program/ feed
  714. for archive.  The "archive" program currently does NOT support this
  715. method.  i.e. do not use Tp in "newsfeeds" for an archive feed.
  716.  
  717. Even if "archive" supported being used as a program feed, you would not
  718. want to use it as such if you intended to use the ``-i'' flag as
  719. archive does not do any file locking on it's index file.  The index
  720. file might get corrupted by multiple concurrently running instances of
  721. archive, as may happen with a program feed.
  722.  
  723. ------------------------------
  724.  
  725. Subject: (6.19) How do I restrict access on certain newsgroups (like alt.sex)
  726.  
  727. >If I were running a news server, and some of my users complained that they
  728. >didn't want their kids being able to access some of the newsgroups, would it
  729. >be possible to block access to specific newsgroups on a per-user basis?
  730.  
  731. >I'm not asking if it's easy, just _possible_.
  732.  
  733. If they are not using NNTP for reading, you can make a /etc/group entry
  734. for a group called something special, like "horny" and give only users
  735. in group horny access to read that directory:
  736.  
  737.     chown news /var/spool/news/alt/sex
  738.     chgrp horny /var/spool/news/alt/sex
  739.     chmod 750 /var/spool/news/alt/sex
  740.     chmod 750 /var/spool/news/over.view/alt/sex    # your NOV data
  741.     chmod 770 /var/spool/news/in.coming
  742.     chmod 770 /var/spool/news/out.going
  743.  
  744. Now only people in the group "horny" can read that newsgroup.  Everyone
  745. can subscribe to it, but only horny people can read it.  innd (which
  746. runs as "news") will still be able to do its business.
  747.  
  748. Inn  has an authentication scheme called authinfo for use with NNTP. 
  749. The user must supply a name and a password. If they match an entry in 
  750. nnrp.access, then the user may read the groups specific to this entry. 
  751. An example entry for nnrp.access:
  752.  
  753. ----------
  754. *.pilhuhn.de:R P:::*,!pilhuhn.foo
  755. :R P:hwr:XXX:*
  756. ----------
  757.  
  758. Here users from hosts *.pilhuhn.de may read and post in all groups
  759. besides pilhuhn.foo. If a user authenticates a user hwr with password
  760. XXX, then he or she might also read pilhuhn.foo.
  761. In order to be able to authenticate as user ``hwr'' in the above
  762. example, the host where this ``hwr'' connects from also must have read
  763. rights. So this
  764.  
  765. ---------
  766. :R P:hwr:XXX:*
  767. ---------
  768.  
  769. as the only entry in nnrp.access won't work, but the following will work:
  770.  
  771. ---------
  772. *:R:::*,!pilhuhn.foo
  773. :R P:hwr:XXX:*
  774. ---------
  775.  
  776. Note that those 'password entries' need to be last in nnrp.access.
  777. There is a bug in inn1.4 which allows users to post to such a protected 
  778. group if they know the name of the group even if they can't read it. 
  779. nnrp.access-auth.patch (on the usual patch site) cures this.
  780.  
  781. If the newsreader software doesn't support this then you can still restrict 
  782. access on a per-host basis.  To read a specific group you then need to be
  783. on a specific machine (but then everybody on that machine can read the group).
  784.  
  785. In 1.5 there is be a better protocol (authinfo generic) for doing this and 
  786. it should gain better acceptance than the current protocol.
  787. Also in 1.5 you can use entries from the password database if you use
  788. the following entries:
  789.  
  790. ---------
  791. *:R:::*,!pilhuhn.foo
  792. :R P:+::*
  793. ---------
  794.  
  795. In order to get authentication with Netscape to work, you need a
  796. slightly different way of authentication; Netscape (and other
  797. newsreaders) don't send authentication info on startup ("active
  798. authentication"), but only then when the server requests it by sending 
  799. a "480 Authentication required for command" reply ("passive
  800. authentication"). A entry like the following will do this:
  801.  
  802. ---------
  803. :R P:user1:pass1:*,!pilhuhn.foo
  804. :R P:test:test:pilhuhn.foo
  805. snert.pilhuhn.de:R P:user2:pass2:*
  806. tritta.pilhuhn.de:R P:user3:pass3:*,!ka.test
  807. ---------
  808.  
  809. Here all users (in this case only from host {snert,tritta}.pilhuhn.de 
  810. allowed) have 
  811. to authenticate. If they do as ``user2'' then they can read and post
  812. all groups. If they do as user ``test'' then they can only read pilhuhn.foo
  813. and if they do as ``user1'' then they will be able to read all groups
  814. except pilhuhn.foo. Note that in the above example if the user comes from e.g.
  815. snert.pilhuhn.de then he she will nevertheless be able to authenticate
  816. as ``user3''  even if this is marked as host tritta. That means at the
  817. stage where a ``authinfo {user|pass}'' command is sent to the server,
  818. the host is no longer checked and every valid combination of user and
  819. pass will authenticate; so password security is here as important as
  820. in the normal password database. 
  821. Note that passive authentication will only take place if there is a
  822. hostname match with security fields filled in.
  823.  
  824. If authentication is needed for a protected/secure newsgroup in an
  825. environment where no authentication is required for all other newsgroups,
  826. and users access the news server from many different hosts (ie; dial-up),
  827. then there must be a hostname entry to force passive news agents/clients
  828. to authenticate; this may result, however, in every user having to
  829. authenticate for ALL newsgroups, even when they don't attempt to access
  830. the secured newsgroup; in most cases, this will be accomplished by using
  831. a wildcard hostname entry
  832. For those that now ask how they can directly go to a newsgroup that
  833. needs authentication ... use <news://user:pass@server/some.group>
  834.  
  835.  
  836. Many thanks to Jim Dutton <jimd@dutton2.it.siu.edu> for his valuable
  837. comments.
  838.  
  839. ------------------------------
  840.  
  841. Subject:  (6.20) INN on one machine, UUCP modem on a different one
  842.  
  843. Say you have a machine named "newsy" and "modemhead".  "newsy" runs INN
  844. but only "modemhead" has any modems.
  845.  
  846. A quick overview:  config.data has a variable called "RNEWSLOCALCONNECT".
  847. If it is set to "DO", "rnews" will expect to be running on the same
  848. machine as "innd".  On the other hand, if "RNEWSLOCALCONNECT" is set to
  849. "DONT" then "rnews" will connect to the machine listed in "inn.conf".
  850. Sending batches is a little more complicated.
  851.  
  852. Receiving batches on modemhead:  Make sure config.data has
  853. "RNEWSLOCALCONNECT" set to "DONT", recompile, and copy /bin/rnews and
  854. /usr/lib/news/inn.conf to modemhead.  The unbatching will be done on
  855. modemhead, but the articles will be sent to newsy.  It will work like
  856. magic.  When /bin/rnews runs, it will open an NNTP connection to newsy
  857. and feed the batch (one article at a time) to newsy... newsy thinks
  858. it's just getting a regular NNTP feed.  (which means modemhead has to
  859. be listed in hosts.nntp).  If newsy and modemhead are different platforms
  860. (i.e. Ultrix vs. SunOS) you can use the MakeRnews script (mentioned
  861. in Install.ms) to generate just rnews for the modemhead machine.
  862.  
  863. Sending batches via modemhead:  The "sendbatch" program calls $(UUX).
  864. Change ${UUX} to be something like "rsh modemhead uux" instead of "uux".
  865. You'll have to do a little hacking on sendbatch.  For example, the part
  866. that checks to see if the queue is full might have to be re-written.
  867. Anyway... now the batches will be generated and send via modemhead's
  868. UUCP system.
  869.  
  870. Pretty neat, eh?
  871.  
  872. Other advice:
  873.  
  874. I set UUX to 'rsh uucphost uux' (note no pipe [|]).
  875. Also, we have no 'uuq' command, but even if we did, it would have
  876.     returned bogus info as $SITE is not known to UUCP on newshost.
  877.     Thus I created a stupid 'uuq' that does 'echo 0 0 0 0 0 0 0'
  878.     to satisfy the awk script.  However, we have no way to monitor
  879.     queue length (though its of little importance to us as we only have
  880.     3 feeds and they are partial)
  881. Finally, the /etc/passwd entry for 'news' on 'uucphost' MUST list /bin/sh;
  882.     /bin/csh results in 'rnews: event not found' and escaping the '!'
  883.     inside sendbatch had no effect.
  884.  
  885. ------------------------------
  886.  
  887. Subject: (6.21) Setting up proxy-nntp to talk through a firewall
  888.  
  889. Try ftp://ftp.cs.cmu.edu/misc/dnntpd/dnntpd.tar.Z
  890.  
  891. or look at backends/rcompressed.c in the INN distribution.
  892.  
  893. ------------------------------
  894.  
  895. Subject: (6.22) How do I set up inpaths with INN?
  896.  
  897. inpaths should work just fine with INN as it ships.  However, you can
  898. make it run faster by using the following shell script.  Edit it to
  899. your tastes.  It replaces the long "(cd /var/spool/news ;
  900. /usr/local/bin/gfind . -type f -print | /usr/lib/news/local/inpaths sdl
  901. | /usr/ucb/mail admin,pathsurvey@pathsurvey.eu.org)" which people usually
  902. use.
  903.  
  904. #!/bin/sh
  905. . /usr/lib/news/innshellvars
  906. cd ${SPOOL}
  907. awk '(NF > 2){print $3}' < ${HISTORY} | tr . / | sort | \
  908. inpaths `innconfval pathhost` | \
  909. ${MAILCMD} newsmaster,pathsurvey@pathsurvey.eu.org
  910.  
  911. If the inpaths people would include this information in the
  912. README, I could delete it from this FAQ.
  913.  
  914. ------------------------------
  915.  
  916. Subject: (6.23) Fill different types of control messages in different directories?
  917.  
  918. If you want to keep newgroup messages longer and expire cancel messages after
  919. half a day you can do the following:
  920.  
  921. Create the groups control.newgroup and control.cancel
  922.  
  923. ctlinnd newgroup control.newgroup
  924. ctlinnd newgroup control.cancel
  925.  
  926. Add the following to expire.ctl:
  927.  
  928. control.*:A:1:2:4
  929. control.sendsys:A:10:15:21
  930. control.newgroup:A:10:15:21
  931.  
  932. so all control messages typically expire after 2 days, but sendsys and 
  933. newgroup messages are normally kept for 15 days.
  934. You should also change newsfeeds appropriately to reflect the changes that
  935. control now is a group and a hierarchy.
  936.  
  937. ------------------------------
  938.  
  939. Subject: (6.24) Use more than ~100 Feeds on SunOS 4.1 ?
  940.  
  941. SunOS 4.1 normally has a limit of 256 file descriptors per process. But
  942. unfortunately there is a bug in stdio (the use of a _signed_ char ) which
  943. lets one only use 128 file descriptors.
  944. One way would be to use an exploder feed (like bufchan).
  945. The other is:
  946.    There is a stdio replacement called sfio which you can get from 
  947. http://netlib.att.com/netlib/attgifts/sfio.shar.Z
  948. Just compile it as indicated in the package. After that, you must tweak
  949. config.data a bit to use sfio:
  950.  
  951. DEFS            -I../include -I/usr/local/include/sfio
  952. CC              gcc
  953. CFLAGS          $(DEFS) -O2
  954. DBZCFLAGS      $(CFLAGS) -DMMAP
  955. LDFLAGS         (empty)
  956. LIBS            -L/usr/local/lib/sfio -lsfio
  957. VAR_STYLE       STDARGS (important! sfio doesn't like varargs if compiled ANSI)
  958. NOFILE_LIMIT    -1
  959. EXITVAL         volatile void
  960. _EXITVAL        volatile void
  961.  
  962. Just recompile inn then and go for it.
  963.  
  964. If you even need more than 256 descriptors, then you can use SunDBE (the
  965. Sun Databese Excelerator) which raises the limit from 256 to 1024.
  966. Thanks to Christopher Davis <ckd@loiosh.kei.com> for this tip.
  967.  
  968. ------------------------------
  969.  
  970. Subject: (6.25) Speed up NNTP Transfers ("Streaming NNTP")
  971.  
  972. Normal NNTP uses the following scheme to transfer articles:
  973.  
  974. Sender                    Receiver
  975.   ---> Ihave <some Message>
  976.    Ok send it to me       <---
  977.   --->  sends the actual message 
  978.    Says 'this was ok'    <---
  979.  
  980. This procedure uses 2*RTT on the link (rtt = round trip time) plus time
  981. for the actual article transfer. Jerry Aguirre has rewritten NNTP code
  982. so that it now sends a list of message ids to remote which checks it and
  983. returns a value if it is to be sent. With each message sent Streaming NNTP
  984. also sends a new message-id to check so that the flow of news keeps 
  985. streaming.
  986.  
  987. Advantages of Streaming NNTP are
  988. - Fast even on lines with a high rtt (e.g. satellite links)
  989. - faster than normal nntp
  990. - compatible as innxmit has a autofallback to normal nntp
  991.  
  992. Disadvantages are
  993. - INN gets more compute intensive
  994. - Streaming NNTP can fill a 64kB line that much that working 
  995. over it via telnet gets a real pain.
  996.  
  997. ------------------------------
  998.  
  999. Subject: (6.26) I don't want all those reject messages from rnews in syslog
  1000.  
  1001. Rnews is logging those rejects via syslog. The level is determined
  1002. at compile time via what you tell it in config.data:
  1003.  
  1004. #  Informational notice, usually not worth caring about.
  1005. ### =()<L_NOTICE               @<L_NOTICE>@>()=
  1006. L_NOTICE                LOG_WARNING
  1007.  
  1008. So in this case you need to tell you syslogd to log only messages
  1009. above level warning.
  1010.  
  1011. =====================================================================
  1012.                            INFO ABOUT 1.5
  1013. =====================================================================
  1014.  
  1015. INN Version 1.5 has been released. For how to get it look at part1 of
  1016. this FAQ.
  1017.  
  1018. =====================================================================
  1019.                              BUGS IN 1.4
  1020. =====================================================================
  1021.  
  1022. UNOFFICIAL patches for INN 1.4 are available via anonymous FTP at
  1023. ftp://ftp.isc.org/isc/inn/unoff-patches
  1024.  
  1025.  
  1026. The ones that are highly recommended are:
  1027.  
  1028. 1.4-to-1.4sec     -- Fixes the major security hole in INN.
  1029. 1.4sec-to-1.4sec2 -- Fixes the remaining known security hole in INN.
  1030. select-loop-bug.patch -- Under some circumstances innd can lose track
  1031.         of a file descriptor and end up sitting in a select()
  1032.         loop.  If your INN suddenly is using up tons of CPU
  1033.         time and not getting much done, install this UNOFFICIAL
  1034.         patch.  Some OSs are more susceptible to this bug.
  1035.  
  1036. THERE ARE MANY MORE at that site, many add some useful features.
  1037.  
  1038. There is a replacement for innwatch that is written in Perl.  Get it from
  1039. "ftp://ftp.univ-lyon1.fr/pub/unix/news/inn/contrib/innwatch-beta2.pl.gz".
  1040. This directory is mirrored on ftp://ftp.isc.org/isc/inn/unoff-contrib
  1041.  
  1042.  
  1043. =====================================================================
  1044.                              BUGS IN 1.3 and 1.2
  1045.                  (Hey, it's 1997!  Upgrade already!)
  1046. =====================================================================
  1047.  
  1048.  
  1049. ------------------------------
  1050.  
  1051. Subject: (6.29) 7-bit encoded batches are not correctly processed. Why is this?
  1052.  
  1053. Chris Schmidt <cs@germany.eu.net> replies:
  1054.  
  1055. The decode program that comes with INN up to version 1.3 is broken.
  1056. Because of that the last article in a 7bit encoded batch will not
  1057. correctly be decoded (the last characters are screwed up).  This is
  1058. fixed in INN 1.4.
  1059.  
  1060. ------------------------------
  1061.  
  1062. Subject: (6.30) NOV (overchan) doesn't work well.
  1063.  
  1064. Correct.  The NOV support in 1.3 didn't have all the bugs worked out.
  1065. Don't use NOV under INN 1.3.  Better yet, upgrade to at least 1.4sec 
  1066. and get all the benefits!
  1067.  
  1068. ------------------------------
  1069.  
  1070. Subject: (6.31) Why doesn't nntpget work?
  1071.  
  1072. The nntpget in INN 1.2 doesn't work.  Period.  Upgrade to the latest
  1073. version of INN.
  1074.  
  1075. -- 
  1076.           See <a href="http://www.netbsd.org">NetBSD</a> for a multiplatform OS
  1077. "Geschmacklos"
  1078.  
  1079.  
  1080.