1PULLNEWS(1) InterNetNews Documentation PULLNEWS(1)
2
3
4
6 pullnews - Pull news from multiple news servers and feed it to another
7
9 pullnews [-BhnOqRx] [-a hashfeed] [-b fraction] [-c config] [-C width]
10 [-d level] [-f fraction] [-F fakehop] [-g groups] [-G newsgroups] [-H
11 headers] [-k checkpt] [-l logfile] [-m header_pats] [-M num] [-N
12 timeout] [-p port] [-P hop_limit] [-Q level] [-r file] [-s to-
13 server[:port]] [-S max-run] [-t retries] [-T connect-pause] [-w num]
14 [-z article-pause] [-Z group-pause] [from-server ...]
15
17 The "Net::NNTP" module must be installed. This module is available as
18 part of the libnet distribution and comes with recent versions of Perl.
19 For older versions of Perl, you can download it from
20 <http://www.cpan.org/>.
21
23 pullnews reads a config file named pullnews.marks, and connects to the
24 upstream servers given there as a reader client. This file is looked
25 for in pathdb when pullnews is run as the user set in runasuser in
26 inn.conf (which is by default the "news" user); otherwise, this file is
27 looked for in the running user's home directory.
28
29 By default, pullnews connects to all servers listed in the
30 configuration file, but you can limit pullnews to specific servers by
31 listing them on the command line: a whitespace-separated list of
32 server names can be specified, like from-server for one of them. For
33 each server it connects to, it pulls over articles and feeds them to
34 the destination server via the IHAVE or POST commands. This means that
35 the system pullnews is run on must have feeding access to the
36 destination news server.
37
38 pullnews is designed for very small sites that do not want to bother
39 setting up traditional peering and is not meant for handling large
40 feeds.
41
43 -a hashfeed
44 This option is a deterministic way to control the flow of articles
45 and to split a feed. The hashfeed parameter must be in the form
46 "value/mod" or "start-end/mod". The Message-ID of each article is
47 hashed using MD5, which results in a 128-bit hash. The lowest
48 32 bits are then taken by default as the hashfeed value (which is
49 an integer). If the hashfeed value modulus "mod" plus one equals
50 "value" or is between "start" and "end", pullnews will feed the
51 article. All these numbers must be integers.
52
53 For instance:
54
55 pullnews -a 1/2 Feeds about 50% of all articles.
56 pullnews -a 2/2 Feeds the other 50% of all articles.
57
58 Another example:
59
60 pullnews -a 1-3/10 Feeds about 30% of all articles.
61 pullnews -a 4-5/10 Feeds about 20% of all articles.
62 pullnews -a 6-10/10 Feeds about 50% of all articles.
63
64 You can use an extended syntax of the form "value/mod:offset" or
65 "start-end/mod:offset" (using an underscore "_" instead of a colon
66 ":" is also recognized). As MD5 generates a 128-bit return value,
67 it is possible to specify from which byte-offset the 32-bit integer
68 used by hashfeed starts. The default value for "offset" is ":0"
69 and thirteen overlapping values from ":0" to ":12" can be used.
70 Only up to four totally independent values exist: ":0", ":4", ":8"
71 and ":12".
72
73 Therefore, it allows generating a second level of deterministic
74 distribution. Indeed, if pullnews feeds "1/2", it can go on
75 splitting thanks to "1-3/9:4" for instance. Up to four levels of
76 deterministic distribution can be used.
77
78 The algorithm is compatible with the one used by Diablo 5.1 and up.
79
80 -b fraction
81 Backtrack on server numbering reset. Specify the proportion (0.0
82 to 1.0) of a group's articles to pull when the server's article
83 number is less than our high for that group. When fraction is 1.0,
84 pull all the articles on a renumbered server. The default is to do
85 nothing.
86
87 -B Feed is header-only, that is to say pullnews only feeds the headers
88 of the articles, plus one blank line. It adds the Bytes: header
89 field if the article does not already have one, and keeps the body
90 only if the article is a control article.
91
92 -c config
93 Normally, the config file is stored in pullnews.marks in pathdb
94 when pullnews is run as the news user, or otherwise in the running
95 user's home directory. If -c is given, config will be used as the
96 config file instead. This is useful if you're running pullnews as
97 a system user on an automated basis out of cron or as an individual
98 user, rather than the news user.
99
100 See "CONFIG FILE" below for the format of this file.
101
102 -C width
103 Use width characters per line for the progress table. The default
104 value is 50.
105
106 -d level
107 Set the debugging level to the integer level; more debugging output
108 will be logged as this increases. The default value is 0.
109
110 -f fraction
111 This changes the proportion of articles to get from each group to
112 fraction and should be in the range 0.0 to 1.0 (1.0 being the
113 default).
114
115 -F fakehop
116 Prepend fakehop as a host to the Path: header of articles fed.
117
118 -g groups
119 Specify a collection of groups to get. groups is a list of
120 newsgroups separated by commas (only commas, no spaces). Each
121 group must be defined in the config file, and only the remote hosts
122 that carry those groups will be contacted. Note that this is a
123 simple list of groups, not a wildmat expression, and wildcards are
124 not supported.
125
126 -G newsgroups
127 Add the comma-separated list of groups newsgroups to each server in
128 the configuration file (see also -g and -w).
129
130 -h Print a usage message and exit.
131
132 -H headers
133 Remove these named headers (colon-separated list) from fed
134 articles.
135
136 -k checkpt
137 Checkpoint (save) the config file every checkpt articles (default
138 is 0, that is to say at the end of the session).
139
140 -l logfile
141 Log progress/stats to logfile (default is "stdout").
142
143 -m header_pats
144 Feed an article based on header matching. The argument is a number
145 of whitespace-separated tuples (each tuple being a colon-separated
146 header and regular expression). For instance:
147
148 -m "Hdr1:regexp1 !Hdr2:regexp2 #Hdr3:regexp3 !#Hdr4:regexp4"
149
150 specifies that the article will be passed only if the "Hdr1:"
151 header matches "regexp1" and the "Hdr2:" header does not match
152 "regexp2". Besides, if the "Hdr3:" header matches "regexp3", that
153 header is removed; and if the "Hdr4:" header does not match
154 "regexp4", that header is removed.
155
156 -M num
157 Specify the maximum number of articles (per group) to process. The
158 default is to process all new articles. See also -f.
159
160 -n Do nothing but read articles -- does not feed articles downstream,
161 writes no rnews file, does not update the config file.
162
163 -N timeout
164 Specify the timeout length, as timeout seconds, when establishing
165 an NNTP connection.
166
167 -O Use an optimized mode: pullnews checks whether the article already
168 exists on the downstream server, before downloading it. It may
169 help for huge articles or a slow link to upstream hosts.
170
171 -p port
172 Connect to the destination news server on a port other than the
173 default of 119. This option does not change the port used to
174 connect to the source news servers.
175
176 -P hop_limit
177 Restrict feeding an article based on the number of hops it has
178 already made. Count the hops in the Path: header (hop_count),
179 feeding the article only when hop_limit is "+num" and hop_count is
180 more than num; or hop_limit is "-num" and hop_count is less than
181 num.
182
183 -q Print out less status information while running.
184
185 -Q level
186 Set the quietness level ("-Q 2" is equivalent to "-q"). The higher
187 this value, the less gets logged. The default is 0.
188
189 -r file
190 Rather than feeding the downloaded articles to a destination
191 server, instead create a batch file that can later be fed to a
192 server using rnews. See rnews(1) for more information about the
193 batch file format.
194
195 -R Be a reader (use MODE READER and POST commands) to the downstream
196 server. The default is to use the IHAVE command.
197
198 -s to-server[:port]
199 Normally, pullnews will feed the articles it retrieves to the news
200 server running on localhost. To connect to a different host,
201 specify a server with the -s flag. You can also specify the port
202 with this same flag or use -p.
203
204 -S max-run
205 Specify the maximum time max-run in seconds for pullnews to run.
206
207 -t retries
208 The maximum number (retries) of attempts to connect to a server
209 (see also -T). The default is 0.
210
211 -T connect-pause
212 Pause connect-pause seconds between connection retries (see also
213 -t). The default is 1.
214
215 -w num
216 Set each group's high water mark (last received article number) to
217 num. If num is negative, calculate Current+num instead (i.e. get
218 the last num articles). Therefore, a num of 0 will re-get all
219 articles on the server; whereas a num of "-0" will get no old
220 articles, setting the water mark to Current (the most recent
221 article on the server).
222
223 -x If the -x flag is used, an Xref: header is added to any article
224 that lacks one. It can be useful for instance if articles are fed
225 to a news server which has xrefslave set in inn.conf.
226
227 -z article-pause
228 Sleep article-pause seconds between articles. The default is 0.
229
230 -Z group-pause
231 Sleep group-pause seconds between groups. The default is 0.
232
234 The config file for pullnews is divided into blocks, one block for each
235 remote server to connect to. A block begins with the host line (which
236 must have no leading whitespace) and contains just the hostname of the
237 remote server, optionally followed by authentication details (username
238 and password for that server). Note that authentication details can
239 also be provided for the downstream server (a host line could be added
240 for it in the configuration file, with no newsgroup to fetch).
241
242 Following the host line should be one or more newsgroup lines which
243 start with whitespace followed by the name of a newsgroup to retrieve.
244 Only one newsgroup should be listed on each line.
245
246 pullnews will update the config file to include the time the group was
247 last checked and the highest numbered article successfully retrieved
248 and transferred to the destination server. It uses this data to avoid
249 doing duplicate work the next time it runs.
250
251 The full syntax is:
252
253 <host> [<username> <password>]
254 <group> [<time> <high>]
255 <group> [<time> <high>]
256
257 where the <host> line must not have leading whitespace and the <group>
258 lines must.
259
260 A typical configuration file would be:
261
262 # Format group date high
263 data.pa.vix.com
264 rec.bicycles.racing 908086612 783
265 rec.humor.funny 908086613 18
266 comp.programming.threads
267 nnrp.vix.com pull sekret
268 comp.std.lisp
269
270 Note that an earlier run of pullnews has filled in details about the
271 last article downloads from the two rec.* groups. The two comp.*
272 groups were just added by the user and have not yet been checked.
273
274 The nnrp.vix.com server requires authentication, and pullnews will use
275 the username "pull" and the password "sekret".
276
278 pathbin/pullnews
279 The Perl script itself used to pull news from upstream servers and
280 feed it to another news server.
281
282 pathdb/pullnews.marks or ~/pullnews.marks
283 The default config file. It is stored in pullnews.marks in pathdb
284 when pullnews is run as the news user, or otherwise in the running
285 user's home directory.
286
288 pullnews was written by James Brister for INN. The documentation was
289 rewritten in POD by Russ Allbery <eagle@eyrie.org>.
290
291 Geraint A. Edwards greatly improved pullnews, adding no more than
292 16 new recognized flags, fixing some bugs and integrating the
293 backupfeed contrib script by Kai Henningsen, adding again 6 other
294 flags.
295
296 $Id: pullnews.pod 10283 2018-05-14 12:43:05Z iulius $
297
299 incoming.conf(5), rnews(1).
300
301
302
303INN 2.6.3 2018-05-14 PULLNEWS(1)