.TH fetchnews 8 "@VERSION@" leafnode \" -*- nroff -*-
.\" DO NOT EDIT: @configure_input@
.\" Written by Arnt Gulbrandsen <firstname.lastname@example.org> and copyright 1995-96 Troll
.\" Tech AS, Postboks 6133 Etterstad, 0602 Oslo, Norway, fax +47 22646949.
.\" Use, modification and distribution is allowed without limitation,
.\" warranty, or liability of any kind.
.\" $Id: fetchnews.8.in,v 1.22 2006/03/18 12:30:11 emma Exp $
.\" hilit19 is stupid: "
fetchnews \- fetch news via NNTP
[\fB\-q\fR] [\fB\-v\fR] ... [\fB\-x\fR \fInumber\fR] [\fB\-l\fR] [\fB\-n\fR]
[\fB\-f\fR] [\fB\-P\fR] [\fB\-w\fR]
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
The design of
is intended to self-repair after problems, and to require no
(formerly called "fetch") is the program which submits and retrieves new
articles to or from the upstream NNTP server.
Be quiet. Suppresses some warnings. This flag cancels any previously
encountered \fB\-v\fR flags.
Be verbose. This flag cancels any previously encountered \fB\-q\fR
flags. A maximum of four
can be used (the more v, the more verbose):
Warn about non-critical errors.
Be verbose whenever a group command occurs.
Be verbose whenever an article command occurs.
For debugging purposes. Don't expect the additional output to make sense.
Wait mode. This causes the XOVER update (which runs after the article
fetch phase) to run in the foreground. By
default, the XOVER update runs in the background, detached from the
shell, on systems that offer a working fork(2) call. Helpful for
debugging and to avoid terminal clobbering when fetchnews is run
articles back and try to re-fetch what's missing. This can be useful to
pull data from broken servers that have either overview and group data
out of synch or create articles out of article number order.
Don't use supplementary servers (\fI\-l\fR is supposed to mean "local").
This does speed up the operation quite a bit.
Do not expire newsgroup subscriptions. Technically: do not unlink files in the
Erase the active.read file, thus force redownloading the whole active file from all upstream servers. This is
usually occurring only very infrequently because it takes a long time.
See \fItimeout_active\fR in \fBleafnode\fR(8).
.B DO NOT
use this option in cron jobs or otherwise regularly.
Only post articles that have accumulated in the
directory but do not fetch articles from upstream servers.
.SH "EXIT STATUS"
will exit with code 0 if it could connect to all servers and encountered
no other errors. It exits with code 2 when it was unable to connect to
at least one server, and it exits with code 1 on other errors.
.SH "FILES AND CONFIGURATION"
is a file to track when the active files have been successfully
downloaded from the upstream servers the last time. If it is missing,
this has the same effect as giving the \fB\-f\fR option. It is only
created after the active file of each upstream servers has been
.BR leafnode (8)
for the list of other files affected, and for information on configuring
\fBLN_SKIP_GROUPS=\fR\fIpattern[,pattern[...]]\fR (since v1.9.53)
If set, all groups that match one of the
.BR wildmat (3)
.IR pattern s
will be skipped during the fetch. This can be used as a quick
way of skipping binary groups during daytime, for instance, example:
env 'LN_SKIP_GROUPS=*binary*,alt.*' @sbindir@/fetchnews \-nq
This variable is parsed as an unsigned integer value and determines how
many seconds fetchnews will wait when trying to obtain the lock file
from another leafnode program. 0 means to wait indefinitely. This
variable takes precedence over the configuration file.
If this variable is defined (regardless of its value, including empty),
leafnode will skip checking the upstream server's time by means of the
NNTP DATE command.
Here is a brief description of what
First, after connecting to the upstream NNTP server,
all articles that have the u+r permission (0400) flag set in
are posted using POST. If a posting fails, that article is moved to
which an administrator has to clean up once in a while. Moving a file
is sufficient to retry the post it. The u+r flag is checked to prevent posting
an (incomplete) article that \fBleafnode\fR(8) is still receiving at the
same time. If a posting succeeds, the article is removed from out.going
in order to not post it twice into a moderated newsgroup on a different
server (which would send multiple copies of the article to the
older fetchnews versions tried to post on all servers first, but failed
to do so when one of the servers could not be reached. If you need to
work around a dodgy upstream server that is fast but doesn't forward
your posts reliably, prohibit posting to this server using the nopost
server option in the configuration file, see
.BR leafnode (8).
Second, the upstream server's list of newsgroups (obtained using LIST
and LIST NEWSGROUPS) is merged into
.BR leafnode "'s"
(if timeout_active has expired, the active.read file is not present or
the active file is empty) or updated (with NEWGROUPS).
iterates over the list of newsgroups, performing a GROUP, an XOVER (if
supported) or XHDR Message\-ID and a number of HEAD and BODY or ARTICLE
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 or equal to expire.
does not use NEWNEWS. NEWNEWS is not used because it is often very
expensive and therefore also disabled at many sites.
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.
The only way to control what newsgroups are accessible to local users
is to control what the upstream server lets
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
sets its real and effective uid to "news" when started as root and
refuses to run if it cannot get this user ID.
ignores the "Supersedes:" and "Control:" headers.
Older versions of
posted any articles found in out.going. Since v1.9.23,
will only post article files that have their user executable bit set.
sets this bit after it has successfully received a post. This behaviour
avoids posting incomplete articles when
receives a post at the same time
Written by Arnt Gulbrandsen <email@example.com> and copyright 1995\\-\[en]\\-96
Troll Tech AS, Postboks 6133 Etterstad, 0602 Oslo, Norway, fax +47
Modified by Cornelius Krasel <firstname.lastname@example.org\-wuerzburg.de>,
Markus Enzenberger <email@example.com\-muenchen.de>
and Randolf Skerka <Randolf.Skerka@gmx.de>.
Copyright of the modifications 1997\\-\[en]\\-1999.
Modified by Matthias Andree <firstname.lastname@example.org>, copyright of the
.SH SEE ALSO
.BR leafnode (8),
.BR texpire (8),
.BR newsq (1),
.BR @sysconfdir@/leafnode/filters.example .