1fetchnews(8)                System Manager's Manual               fetchnews(8)
2
3
4

NAME

6       fetchnews - fetch news via NNTP
7
8

SYNOPSIS

10       fetchnews [-q] [-v] ... [-x number] [-l] [-n] [-f] [-P] [-w]
11
12

DESCRIPTION

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

OPTIONS

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

EXIT STATUS

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

FILES AND CONFIGURATION

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

ENVIRONMENT

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
107       LN_SUPPRESS_DATE
108              (since v1.11.7) If this variable is defined (regardless  of  its
109              value,   including  empty),  leafnode  will  skip  checking  the
110              upstream server's time by means of the NNTP DATE command.
111
112

ALGORITHM

114       Here is a brief description of what fetchnews does.
115
116       First, after connecting to the upstream NNTP server, all articles  that
117       have  the  u+r  permission (0400) flag set in /var/spool/news/out.going
118       are posted using POST.  If a posting fails, that article  is  moved  to
119       /var/spool/news/failed.postings  which an administrator has to clean up
120       once in a while.  Moving a file back  to  /var/spool/news/out.going  is
121       sufficient  to  retry  the  post it. The u+r flag is checked to prevent
122       posting an (incomplete) article that leafnode(8) is still receiving  at
123       the  same  time.   If  a  posting succeeds, the article is removed from
124       out.going in order to not post it twice into a moderated newsgroup on a
125       different  server  (which  would send multiple copies of the article to
126       the moderator).  Note: older fetchnews versions tried to  post  on  all
127       servers first, but failed to do so when one of the servers could not be
128       reached. If you need to work around a dodgy  upstream  server  that  is
129       fast  but doesn't forward your posts reliably, prohibit posting to this
130       server using the nopost server option in the  configuration  file,  see
131       leafnode(8).
132
133       Second,  the  upstream server's list of newsgroups (obtained using LIST
134       and LIST NEWSGROUPS) is merged into leafnode's (if  timeout_active  has
135       expired,  the  active.read  file  is  not present or the active file is
136       empty) or updated (with NEWGROUPS).
137
138       Third, fetchnews iterates over the list  of  newsgroups,  performing  a
139       GROUP,  an XOVER (if supported) or XHDR Message-ID and a number of HEAD
140       and BODY or ARTICLE  commands  for  each  group  which  has  been  read
141       recently.  It  assumes  that for the particular group it is looking at,
142       "maxage" was set to the groupexpire or global expire. As a consequence,
143       it makes only sense to set maxage lower than or equal to expire.
144
145

NOTES

147       Fetchnews  does  not  use  NEWNEWS.   NEWNEWS is not used because it is
148       often very expensive and therefore also disabled at many sites.
149
150       After some experiments, I decided that it was better to fetch  all  the
151       articles  in  a  group than to optimize away some; users would complain
152       too loudly when the optmizer guessed wrongly.
153
154       The only way to control what newsgroups are accessible to  local  users
155       is  to  control  what the upstream server lets fetchnews read, and that
156       will not keep out all crossposts (endemic in e.g. the alt.sex  groups).
157       If  your  site is big enough that you need to control newsgroup access,
158       consider using a news server which is designed for a big site.
159
160       Fetchnews sets its real and effective uid to  "news"  when  started  as
161       root and refuses to run if it cannot get this user ID.
162
163

BUGS

165       Fetchnews ignores the "Supersedes:" and "Control:" headers.
166
167

HISTORY

169       Older  versions  of  fetchnews  posted any articles found in out.going.
170       Since v1.9.23, fetchnews will only post article files that  have  their
171       user  executable bit set.  Leafnode sets this bit after it has success‐
172       fully received a post. This behaviour avoids posting  incomplete  arti‐
173       cles  when leafnode receives a post at the same time fetchnews is post‐
174       ing.
175
176

AUTHOR

178       Written  by   Arnt   Gulbrandsen   <agulbra@troll.no>   and   copyright
179       1995\-–\-96  Troll Tech AS, Postboks 6133 Etterstad, 0602 Oslo, Norway,
180       fax +47 22646949.
181
182       Modified  by  Cornelius  Krasel  <krasel@wpxx02.toxi.uni-wuerzburg.de>,
183       Markus  Enzenberger <enz@cip.physik.uni-muenchen.de> and Randolf Skerka
184       <Randolf.Skerka@gmx.de>.  Copyright of the modifications 1997\-–\-1999.
185       Modified  by Matthias Andree <matthias.andree@gmx.de>, copyright of the
186       modifications 2001\-–\-2004.
187
188

SEE ALSO

190       leafnode(8), texpire(8), newsq(1), /etc/leafnode/leafnode/filters.exam‐
191       ple.
192
193
194
195leafnode                            1.11.11                       fetchnews(8)
Impressum