1fetchnews(8) System Manager's Manual fetchnews(8)
2
3
4
6 fetchnews - fetch news via NNTP
7
8
10 fetchnews [-q] [-v] ... [-x number] [-l] [-n] [-f] [-P] [-w]
11
12
14 Leafnode is a USENET package intended for small sites, where there are
15 few users and little disk space, but where a large number of groups is
16 desired.
17
18 The design of leafnode is intended to self-repair after problems, and
19 to require no manual maintenance.
20
21 Fetchnews (formerly called "fetch") is the program which submits and
22 retrieves new articles to or from the upstream NNTP server.
23
24
26 -q Be quiet. Suppresses some warnings. This flag cancels any previ‐
27 ously encountered -v flags.
28
29 -v Be verbose. This flag cancels any previously encountered -q
30 flags. A maximum of four -v can be used (the more v, the more
31 verbose):
32
33 -v Warn about non-critical errors.
34
35 -vv Be verbose whenever a group command occurs.
36
37 -vvv Be verbose whenever an article command occurs.
38
39 -vvvv For debugging purposes. Don't expect the additional output to
40 make sense.
41
42 -w Wait mode. This causes the XOVER update (which runs after the
43 article fetch phase) to run in the foreground. By default, the
44 XOVER update runs in the background, detached from the shell, on
45 systems that offer a working fork(2) call. Helpful for debugging
46 and to avoid terminal clobbering when fetchnews is run manually.
47
48 -x number
49 Go number articles back and try to re-fetch what's missing. This
50 can be useful to pull data from broken servers that have either
51 overview and group data out of synch or create articles out of
52 article number order.
53
54 -l Don't use supplementary servers (-l is supposed to mean
55 "local"). This does speed up the operation quite a bit.
56
57 -n Do not expire newsgroup subscriptions. Technically: do not
58 unlink files in the interesting.groups directory.
59
60 -f Erase the active.read file, thus force redownloading the whole
61 active file from all upstream servers. This is usually occurring
62 only very infrequently because it takes a long time. See time‐
63 out_active in leafnode(8). DO NOT use this option in cron jobs
64 or otherwise regularly.
65
66 -P Only post articles that have accumulated in the out.going direc‐
67 tory but do not fetch articles from upstream servers.
68
69
71 fetchnews will exit with code 0 if it could connect to all servers and
72 encountered no other errors. It exits with code 2 when it was unable to
73 connect to at least one server, and it exits with code 1 on other
74 errors.
75
76
78 /var/spool/news/leaf.node/active.read
79 is a file to track when the active files have been successfully
80 downloaded from the upstream servers the last time. If it is
81 missing, this has the same effect as giving the -f option. It is
82 only created after the active file of each upstream servers has
83 been downloaded successfully.
84
85 See leafnode(8) for the list of other files affected, and for informa‐
86 tion on configuring fetchnews.
87
88
90 LN_SKIP_GROUPS=pattern[,pattern[...]] (since v1.9.53)
91 If set, all groups that match one of the wildmat(3) patterns
92 will be skipped during the fetch. This can be used as a quick
93 way of skipping binary groups during daytime, for instance,
94 example:
95
96 env 'LN_SKIP_GROUPS=*binary*,alt.*' /usr/sbin/fetchnews -nq
97
98
99 LN_LOCK_TIMEOUT
100 This variable is parsed as an unsigned integer value and deter‐
101 mines how many seconds fetchnews will wait when trying to obtain
102 the lock file from another leafnode program. 0 means to wait
103 indefinitely. This variable takes precedence over the configura‐
104 tion file.
105
106
108 Here is a brief description of what fetchnews does.
109
110 First, after connecting to the upstream NNTP server, all articles that
111 have the u+r permission (0400) flag set in /var/spool/news/out.going
112 are posted using POST. If a posting fails, that article is moved to
113 /var/spool/news/failed.postings which an administrator has to clean up
114 once in a while. Moving a file back to /var/spool/news/out.going is
115 sufficient to retry the post it. The u+r flag is checked to prevent
116 posting an (incomplete) article that leafnode(8) is still receiving at
117 the same time. If a posting succeeds, the article is removed from
118 out.going in order to not post it twice into a moderated newsgroup on a
119 different server (which would send multiple copies of the article to
120 the moderator). Note: older fetchnews versions tried to post on all
121 servers first, but failed to do so when one of the servers could not be
122 reached. If you need to work around a dodgy upstream server that is
123 fast but doesn't forward your posts reliably, prohibit posting to this
124 server using the nopost server option in the configuration file, see
125 leafnode(8).
126
127 Second, the upstream server's list of newsgroups (obtained using LIST
128 and LIST NEWSGROUPS) is merged into leafnode's (if timeout_active has
129 expired, the active.read file is not present or the active file is
130 empty) or updated (with NEWGROUPS).
131
132 Third, fetchnews iterates over the list of newsgroups, performing a
133 GROUP, an XOVER (if supported) or XHDR Message-ID and a number of HEAD
134 and BODY or ARTICLE commands for each group which has been read
135 recently. It assumes that for the particular group it is looking at,
136 "maxage" was set to the groupexpire or global expire. As a consequence,
137 it makes only sense to set maxage lower than or equal to expire.
138
139
141 Fetchnews does not use NEWNEWS. NEWNEWS is not used because it is
142 often very expensive and therefore also disabled at many sites.
143
144 After some experiments, I decided that it was better to fetch all the
145 articles in a group than to optimize away some; users would complain
146 too loudly when the optmizer guessed wrongly.
147
148 The only way to control what newsgroups are accessible to local users
149 is to control what the upstream server lets fetchnews read, and that
150 will not keep out all crossposts (endemic in e.g. the alt.sex groups).
151 If your site is big enough that you need to control newsgroup access,
152 consider using a news server which is designed for a big site.
153
154 Fetchnews sets its real and effective uid to "news" when started as
155 root and refuses to run if it cannot get this user ID.
156
157
159 Fetchnews ignores the "Supersedes:" and "Control:" headers.
160
161
163 Older versions of fetchnews posted any articles found in out.going.
164 Since v1.9.23, fetchnews will only post article files that have their
165 user executable bit set. Leafnode sets this bit after it has success‐
166 fully received a post. This behaviour avoids posting incomplete arti‐
167 cles when leafnode receives a post at the same time fetchnews is post‐
168 ing.
169
170
172 Written by Arnt Gulbrandsen <agulbra@troll.no> and copyright 1995-96
173 Troll Tech AS, Postboks 6133 Etterstad, 0602 Oslo, Norway, fax +47
174 22646949.
175
176 Modified by Cornelius Krasel <krasel@wpxx02.toxi.uni-wuerzburg.de>,
177 Markus Enzenberger <enz@cip.physik.uni-muenchen.de> and Randolf Skerka
178 <Randolf.Skerka@gmx.de>. Copyright of the modifications 1997-1999.
179 Modified by Matthias Andree <matthias.andree@gmx.de>, copyright of the
180 modifications 2001-2004.
181
182
184 leafnode(8), texpire(8), newsq(1), /etc/leafnode/leafnode/filters.exam‐
185 ple.
186
187
188
189leafnode 1.11.5 fetchnews(8)