Article View: news.software.nntp
Article #3260Changes to INN FAQ Part 3/4: Operating Guide & Tutorial
From: Tom Limoncelli
Date: Mon, 09 Jan 1995 09:14
Date: Mon, 09 Jan 1995 09:14
460 lines
20008 bytes
20008 bytes
Posted-By: post_faq 2.10
Archive-name: usenet/software/inn-faq/diff3
*** FAQ-inn.3.lastpost Fri Dec 30 00:19:50 1994
--- FAQ-inn.3 Sun Jan 8 22:10:15 1995
***************
*** 8,14 ****
Posted-By: post_faq 2.10
Archive-name: usenet/software/inn-faq/part3
! Last Changed: $Id: FAQ-inn.3,v 1.95 1994/12/28 14:06:58 tal Exp $
Part 3 of 4
--- 8,14 ----
Posted-By: post_faq 2.10
Archive-name: usenet/software/inn-faq/part3
! Last Changed: $Id: FAQ-inn.3,v 1.105 1995/01/09 03:10:09 tal Exp tal $
Part 3 of 4
***************
*** 40,47 ****
What's the best way to upgrade to a new version of INN?
How do I talk to innd from C or Perl?
After a crash.
! Subject: Listing every article
INN IS RUNNING, BUT I HAVE THIS SMALL PROBLEM...:
Suddenly my active and history files are owned by root!
How come my host name comes out twice in the Path line?
Expire had problems last night, and while I fixed the problem,
--- 40,51 ----
What's the best way to upgrade to a new version of INN?
How do I talk to innd from C or Perl?
After a crash.
! How do I moderate a mailing list?
! How do I configure the /usr/lib/news/moderators file?
! Listing every article
INN IS RUNNING, BUT I HAVE THIS SMALL PROBLEM...:
+ XHDR says Bad Article Number
+ Everything I receive, I re-feed to the feeder
Suddenly my active and history files are owned by root!
How come my host name comes out twice in the Path line?
Expire had problems last night, and while I fixed the problem,
***************
*** 55,66 ****
When my feeder connects, I get articles but they don't take
what's waiting for them.
Directories are being created with wrong permissions.
! Why am I getting alt.sex.pictures even though I have
More about the "to.*" groups
What's a decent syslog.conf configuration?
INN batcher writing "#!rnews 0" separators
Posting while throttled doesn't work
! "innd: overview! spooling" and the file "overview!" in /usr/spool/news/out.going
"newgroup" control messages aren't being executed
HOW DO I... (Big changes you can make to the system):
How do I set up a delayed IHAVE/SENDME over NNTP?
--- 59,70 ----
When my feeder connects, I get articles but they don't take
what's waiting for them.
Directories are being created with wrong permissions.
! Why am I getting alt.sex.pictures even though I have...
More about the "to.*" groups
What's a decent syslog.conf configuration?
INN batcher writing "#!rnews 0" separators
Posting while throttled doesn't work
! overchan can't keep up.
"newgroup" control messages aren't being executed
HOW DO I... (Big changes you can make to the system):
How do I set up a delayed IHAVE/SENDME over NNTP?
***************
*** 67,73 ****
--- 71,80 ----
Can I use gzip with INN?
What do I do if /var/spool/news is split over multiple partitions?
Archiving expired articles
+ How do I restrict access on certain newsgroups (like alt.sex)
INN on one machine, UUCP modem on a different one
+ Setting up proxy-nntp to talk through a firewall
+ How do I set up inpaths with INN?
BUGS IN 1.4:
Security Patch
Looping Select Patch
***************
*** 187,193 ****
STEP 3: Compile everything:
% cd $INN
! % make world
STEP 4: When you feel you are ready to install the new files shut the old daemon:
--- 194,203 ----
STEP 3: Compile everything:
% cd $INN
! % make all
! (you can run "make world", which also runs "lint". If you don't
! know what "lint" is, just ignore anything it outputs. If it bombs,
! run "make all" instead.)
STEP 4: When you feel you are ready to install the new files shut the old daemon:
***************
*** 250,255 ****
--- 260,308 ----
------------------------------
+ Subject: How do I moderate a mailing list?
+
+ As your news administrator. If you are the news administrator, read RFC 1036. (also, refer to "How do I configure the /usr/lib/news/moderators file?")
+
+
+ ------------------------------
+
+ Subject: How do I configure the /usr/lib/news/moderators file?
+
+ Q: The 'moderators' file that comes with INN has only the following
+ lines:
+
+ gnu.*:%s@tut.cis.ohio-state.edu
+ *:%s@uunet.uu.net
+
+ Should this be changed? That is, if at Usenet site, does the news
+ admin have to configure this file in order for INN to email the local
+ posts to moderated newsgroups to the correct moderator? In this case
+ then, every time a new moderated group is created, and/or changes its
+ moderator, it should be necessary to change this file.
+
+ A: Fortunately not!
+
+ First of all, the default configuration says, "The moderator for
+ foo.bar is foo-bar@uunet.uu.net". The good people at UUNET keep mail
+ aliases for all the moderated newsgroups so that as moderators come and
+ go, they will always forward to the correct person.
+
+ Refer to the "How to Construct the Mailpaths File" FAQ, for an
+ explanation of the moderation mechanism. This article explains the
+ 'mailpaths' file from C News, which is similar in nature to the INN's
+ 'moderators' file although with a different syntax.
+
+ The file 'moderators' could be modified, though, according to that
+ article. For example, there are other sites that do what UUNET does,
+ and they might be closer to you.
+
+ Also, you might want to take a look to the inn.conf(5) man page to read
+ the 'moderatormailer' parameter description.
+
+
+ ------------------------------
+
Subject: Listing every article
People often ask for a way to list every file in the newsspool. There
***************
*** 298,303 ****
--- 351,429 ----
------------------------------
+ Subject: XHDR says Bad Article Number
+
+ Q: When I do a XHDR command the INN NNTP server may give
+ me article numbers which is not valid (get 403 Bad Article Number
+ when requesting the article text). Is this normal?
+
+ A: Absoltuely not!
+
+ Perhaps DIR_STYLE is wrong?
+
+
+ ------------------------------
+
+ Subject: Everything I receive, I re-feed to the feeder
+
+ "It seems that all the articles sent to me are resent back to my
+ provider. I only want to post those articles which have been locally
+ generated at my site back to my news feed provider."
+
+ or "I feed a site named foo.bar, but it puts something besides foo.bar
+ in their Path: header"
+
+ Let's look at a typical Path: line:
+
+ Path: plts!sdl!newsgw.mentorg.com!uunet!gatech!howland.reston.ans.net!agate!barrnet.net!jfrank.com!usenet
+
+ As a post goes from system to system, each site prepends their sitename
+ to the line. Usually a site uses their FQDN, but sometimes they register
+ something with the UUCP Mapping Project which makes sure no two sites use
+ the same name. In the above, we see a couple FQDN's and a couple sites
+ that are registered with the UUCP Mapping Project.
+
+ INN will not feed this article to any feed who's name appears in the Path:
+ header.
+
+ Suppose you have a feed to/from barrnet.net that looks like this:
+
+ netnews.barrnet.net:*,!control,!junk:Tf,Wnm:
+
+ This means "send all newsgroups except control and junk, but not if the
+ Path: line includes 'netnews.barrnet.net'". That's fine, but as we see
+ in the above Path: example, BarrNet puts "barrnet.net" in the path,
+ even though their netnews machine is called "netnews.barrnet.net".
+
+ Therefore, we change the newsfeeds file to include a "/barrnet.net"
+ which means "exclude posts that have gone through barrnet.net".
+
+ netnews.barrnet.net/barrnet.net:*,!control,!junk:Tf,Wnm:
+
+ Now you won't feed to netnews.barrnet.net articles that have already
+ gone through barrnet.
+
+ The best way to solve this problem is:
+ 1. Read the Path: line from an article that has passed
+ through that site already.
+ 2. Insert that sitename into the feeds description in newsfeeds.
+ 3. "ctlinnd reload newsfeeds fixed_feed"
+
+ OTHER USES:
+
+ Suppose two sites have very reliable NNTP feeds from uunet and psinet
+ but still want a feed between each other to increase redundency. They
+ might set up feeds like:
+
+ othersite/uunet,uupsi:...
+
+ so that they aren't sending articles that have already reached two of
+ the biggest sites on Usenet (and therefore must have gotten good
+ distribution already), but will pass on everything else.
+
+
+ ------------------------------
+
Subject: Suddenly my active and history files are owned by root!
rc.news runs from root. After that, everything else should run as
***************
*** 603,617 ****
------------------------------
! Subject: "innd: overview! spooling" and the file "overview!" in /usr/spool/news/out.going
> About once a month or so, I get the following warning messages:
>
> Jan 20 07:20:22 optima innd: overview!:31:proc:9193 cant flush count 14639 Operation would block
> Jan 20 07:20:22 optima innd: overview! spooling 14639 bytes
>
- > And there's a file "overview!" in /usr/spool/news/out.going with stuff in it.
- >
> Should I be doing anything more with this than ignoring it, and maybe
> occasionally deleting it (it just grows)?
--- 729,745 ----
------------------------------
! Subject: overchan can't keep up.
> About once a month or so, I get the following warning messages:
>
> Jan 20 07:20:22 optima innd: overview!:31:proc:9193 cant flush count 14639 Operation would block
> Jan 20 07:20:22 optima innd: overview! spooling 14639 bytes
+
+ or
+
+ > there's a file "overview!" in /usr/spool/news/out.going with stuff in it.
>
> Should I be doing anything more with this than ignoring it, and maybe
> occasionally deleting it (it just grows)?
***************
*** 618,647 ****
This happens because innd is feeding info to overchan faster than
overchan can process it. The overflow is sent to the file
"overview!". This file can be deleted, as nnrpd will grab the missing
! data out of the articles "manually". The slow-down won't be noticed.
! However, you can "expireover -a" to "fill in the holes".
To prevent this in the future, you need to make overchan run faster.
! This is easy to do. I found that moving the overview files into
! /usr/spool/news/over.view made things fast enough that the problem went
! away. Change "_PATH_OVERVIEWDIR" in config.data, recompile, and "make install".
! You will need to recompile any newsreaders that read via NFS or
! off the local disk. To move the files to their new home, use a
! one-liner like this:
awk '{ print $1 }' /usr/lib/news/active | tr . / | awk '{ print "mkdir -p /new/location/" $1 ; print "mv " $1 "/.overview /new/location/" $1 "/.overview" }'
- to generate a shell scrip that will move your .overview files.
Why does doing all this speed up overchan? overchan works by opening
! the proper .overview file, appending 1 line to it, then closing the
! file. If you have the .overview file in the same directory as 10000
! articles then opening the .overview file will take a huge amount of
! time. The open() call literally searches though an average 5000 (half
! of 10000) file names to find ".overview". If you move your .overview
files so that each one is in it's own directory, (say,
/usr/spool/news/over.view/{group}/{name}/.overview) then open() is
searching through 3 files ( ".", "..", and ".overview") to find 1
! file. ( O(N/2) where N=10000 vs. N=3... and you thought those
! freshman year CS classes would never be useful!)
There isn't much you can do to make the "append" and "close" steps much
faster, except maybe install a PrestoServe or similar write-cache, and
--- 746,790 ----
This happens because innd is feeding info to overchan faster than
overchan can process it. The overflow is sent to the file
"overview!". This file can be deleted, as nnrpd will grab the missing
! data out of the articles "manually". The slow-down won't be noticed,
! much. You can "expireover -a" to "fill in the holes".
To prevent this in the future, you need to make overchan run faster.
! This is easy to do. There are two things to do:
!
! 1. Increase the size of many of your kernel buffers. In particular,
! increase buffers relating to directory caches (the "namei" cache", to
! mention one). If you use SunOS, change "maxusers" to 200. Ignore the
! variable's name. This variable is used to calculate most of the other
! buffer sizes, etc. and 200 is good for a system that is as overworked
! as, say, a machine running netnews.
!
! 2. (this is more important than #1) Move the .overview files out of
! the /var/spool/news hierarchy. For example, moving the overview files
! into /var/spool/news/over.view made things fast enough on one machine
! that the problem went away. To do this: change "_PATH_OVERVIEWDIR" in
! "config.data", recompile, and "make install". You will need to
! recompile any newsreaders that read via NFS or off the local disk.
!
! For really great performance, put the NOV files on a separate disk.
! (Not just a separate partition, a separate disk or spindle.)
!
! This one-liner will generate a shell script that will move your NOV files:
awk '{ print $1 }' /usr/lib/news/active | tr . / | awk '{ print "mkdir -p /new/location/" $1 ; print "mv " $1 "/.overview /new/location/" $1 "/.overview" }'
+ WHY THIS WORKS:
+
Why does doing all this speed up overchan? overchan works by opening
! the proper ".overview" file, appending 1 line to it, then closing the
! file. If you have the ".overview" file in the same directory as 10000
! articles then opening the ".overview" file will take a huge amount of
! time. The open() call literally searches though about 5000 (half of
! 10000) file names to find ".overview". If you move your ".overview"
files so that each one is in it's own directory, (say,
/usr/spool/news/over.view/{group}/{name}/.overview) then open() is
searching through 3 files ( ".", "..", and ".overview") to find 1
! file. ( O(N/2) where N=10000 vs. N=3... and you thought those first
! year CS classes would never be useful!)
There isn't much you can do to make the "append" and "close" steps much
faster, except maybe install a PrestoServe or similar write-cache, and
***************
*** 648,666 ****
that won't help very much.
Profiling overchan (with PureSoft's Quantify product) found that the
! open() (actually searching the directory to find the .overview file)
! was around 80% of the execution time of overchan. That was reduced to
! 40% when I moved the .overview files to their own directory. With the
! change, overview's profiling statistics are pretty flat. (which is
! good).
! If you do not want to move your .overview files, run "expireover -a" to
! fix the problem temporarily. However, it will come back.
DO NOT try feeding the "overview!" file to overchan manually.
(1) overchan doesn't do any locking and you'll have two overchan's
running at once.
! (2) overchan only appends to the .overview files. If you've gotten
any articles since the "overview!" file was created (you will
have) then you'll be appending told old entries that are out of
order. Your ".overview" files must be in sorted order for the
--- 791,809 ----
that won't help very much.
Profiling overchan (with PureSoft's Quantify product) found that the
! open() call was around 80% of the execution time of overchan. That was
! reduced to 40% when I moved the ".overview" files to their own
! directory. With the change, overview's profiling statistics are pretty
! flat. (which is good).
! IF YOU CAN'T DO THE ABOVE CHANGES:
! Run "expireover -a" to fix the problem temporarily. However, it will
! come back.
DO NOT try feeding the "overview!" file to overchan manually.
(1) overchan doesn't do any locking and you'll have two overchan's
running at once.
! (2) overchan only appends to the ".overview" files. If you've gotten
any articles since the "overview!" file was created (you will
have) then you'll be appending told old entries that are out of
order. Your ".overview" files must be in sorted order for the
***************
*** 910,915 ****
--- 1053,1091 ----
------------------------------
+ Subject: How do I restrict access on certain newsgroups (like alt.sex)
+
+ >If I were running a news server, and some of my users complained that they
+ >didn't want their kids being able to access some of the newsgroups, would it
+ >be possible to block access to specific newsgroups on a per-user basis?
+
+ >I'm not asking if it's easy, just _possible_.
+
+ If they are not using NNTP for reading, you can make a /etc/group entry
+ for a group called something special, like "horny" and give only users
+ in group horny access to read that directory:
+
+ chown news /var/spool/news/alt/sex
+ chgrp horny /var/spool/news/alt/sex
+ chmod 750 /var/spool/news/alt/sex
+
+ Now only people in the group "horny" can read that newsgroup. Everyone
+ can subscribe to it, but only horny people can read it. innd (which
+ runs as "news") will still be able to do its business.
+
+ If the users are using NNTP, then you need a newsreader that can tell
+ the server what the user's name is. nnrpd will use that information
+ (see the nnrp.access man page) to restrict newsgroups. If the
+ newsreader software doesn't support this then you can restrict this on
+ a per-host basis. horny people would have to read netnews from a
+ particular machine or machines.
+
+ In 1.5 there will be a better protocol for doing this and it should
+ gain better acceptance than the current protocol.
+
+
+ ------------------------------
+
Subject: INN on one machine, UUCP modem on a different one
Say you have a machine named "newsy" and "modemhead". Newsy runs INN
***************
*** 945,950 ****
--- 1121,1134 ----
/bin/csh results in 'rnews: event not found' and escaping the '!'
inside sendbatch had no effect.
+
+ ------------------------------
+
+ Subject: Setting up proxy-nntp to talk through a firewall
+
+ Try ftp.cs.cmu.edu:misc/dnntpd/dnntpd.tar.Z
+
+ or look at backends/rcompressed.c in the INN distirbuiton.
------------------------------
--
Tom Limoncelli -- tal@plts.org (home) -- tal@big.att.com (work)
I know of job openings in New Jersey for:
Extremely good Unix sysadmins with great people skills,
Lotus Notes support people, PPP/SLIP PC/MAC/Unix experts.
Technical Details
Message-ID:
<dnn3_789642843@plts.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.answers.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!gw1.att.com!fnnews.fnal.gov!uwm.edu!cs.utexas.edu!swrinde!pipex!uunet!newsgw.mentorg.com!sdl!plts!not-for-mailReferences:
<inn3_789642843@plts.org>Show Full Headers
Complete Article Headers
Message-ID: <dnn3_789642843@plts.org> Subject: Changes to INN FAQ Part 3/4: Operating Guide & Tutorial Date: Mon, 09 Jan 1995 09:14:22 +0000 From: tal@plts.org (Tom Limoncelli) References: <inn3_789642843@plts.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.answers.mbox.zip!nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!gw1.att.com!fnnews.fnal.gov!uwm.edu!cs.utexas.edu!swrinde!pipex!uunet!newsgw.mentorg.com!sdl!plts!not-for-mail Newsgroups: news.software.nntp,news.software.b,news.answers Supersedes: <dnn3_788764782@plts.org> Followup-To: news.software.nntp Organization: P.L.T.S., Bridgewater Twp, New Jersey, USA Lines: 459 Approved: news-answers-request@MIT.EDU Distribution: inet Reply-To: tal@plts.org (Tom Limoncelli) NNTP-Posting-Host: plts.org Summary: This article is part 3 of a multi-part FAQ