fetchnews(8)

NAME
fetchnews - fetch news via NNTP

SYNOPSIS
fetchnews [-v] [-x number] [-l] [-n] [-f] [-P]

DESCRIPTION
Leafnode is a USENET package intended for small sites, where there are few users and little disk space, but where a large number of groups is desired.

The design of leafnode is intended to self-repair after problems, and to require no manual maintenance.

Fetchnews (formerly called "fetch") is the program which submits and retrieves new articles to or from the upstream NNTP server.

OPTIONS

-v  Be verbose. A maximum of four -v can be used (the more v, the more verbose):

-v  Warn about non-critical errors.

-vv Be verbose whenever a group command occurs.

-vvv
    Be verbose whenever an article command occurs.

-vvvv
    For debugging purposes. Don't expect the additional output to make sense.

-x number
    Go number articles back and try to re-fetch what's missing. Chiefly used for debugging purposes.

-l  Don't use supplementary servers ( -l is supposed to mean "local"). This does speed up the operation quite a bit.

-n  Don't unlink files in the interesting.groups directory. This avoids automatic unsubscription of newsgroups.

-f  Force rereading of whole active file from all upstream servers. This is usually occurring only very infrequently because it takes a long time.

-P  Only post articles that have accumulated in the out.going directory but do not fetch articles from upstream servers.

FILES AND CONFIGURATION
See leafnode(8) for the list of files affected, and for information on configuring fetch.

ALGORITHM
Here is a brief description of what fetchnews does.

First, after connecting to the upstream NNTP server, all articles in /var/spool/news/out.going are posted using POST. If a posting fails, that article is moved to /var/spool/news/failed.postings which an administrator has to clean up once in a while. Moving a file back to /var/spool/news/out.going is sufficient to resubmit it.

Second, the upstream server's list of newsgroups (obtained using LIST ACTIVE and LIST NEWSGROUPS) is merged into leafnode's (this step is most often optimized away).

Third, fetchnews iterates over the list of newsgroups, performing a GROUP, an XOVER (if supported) or XHDR Message-ID and a number of HEAD and BODY commands for each group which has been read recently. It assumes that for the particular group it is looking at, "maxage" was set to the groupexpire or global expire. As a consequence, it makes only sense to set maxage lower than expire.

NOTES
Fetchnews does not use NEWNEWS. NEWNEWS is not used because it is often very expensive.

After some experiments, I decided that it was better to fetch all the articles in a group than to optimize away some; users would complain too loudly when the optmizer guessed wrongly.

Fetchnews happens to support local groups, even though the rest of leafnode doesn't.

The only way to control what newsgroups are accessible to local users is to control what the upstream server lets fetchnews read, and that will not keep out all crossposts (endemic in e.g. the alt.sex groups). If your site is big enough that you need to control newsgroup access, consider using a news server which is designed for a big site.

Fetchnews sets its real and effective uid to "news", because almost all of the problems I have had with leafnode are due to files which aren't writable for user news.

BUGS
Fetchnews ignores the "Supersedes" and "Also-Cancel" headers. This needs to be fixed, or news.answers will suffer.

Never deletes a group from the list of active newgroups.

AUTHOR
Written by Arnt Gulbrandsen <agulbra@troll.no> and copyright 1995-96 Troll Tech AS, Postboks 6133 Etterstad, 0602 Oslo, Norway, fax +47 22646949.

Modified by Cornelius Krasel <krasel@wpxx02.toxi.uni-wuerzburg.de>, Markus Enzenberger <enz@cip.physik.uni-muenchen.de> and Randolf Skerka <Randolf.Skerka@gmx.de>. Copyright of the modifications 1997-1999.

SEE ALSO
tcpd(8), hosts.allow(5), leafnode(8), texpire(8), pcre(7), RFC 977