chiark / gitweb /
wip filepoll poll interval variable
[innduct.git] / doc / man / nnrpd.8
1 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sh \" Subsection heading
6 .br
7 .if t .Sp
8 .ne 5
9 .PP
10 \fB\\$1\fR
11 .PP
12 ..
13 .de Sp \" Vertical space (when we can't use .PP)
14 .if t .sp .5v
15 .if n .sp
16 ..
17 .de Vb \" Begin verbatim text
18 .ft CW
19 .nf
20 .ne \\$1
21 ..
22 .de Ve \" End verbatim text
23 .ft R
24 .fi
25 ..
26 .\" Set up some character translations and predefined strings.  \*(-- will
27 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
29 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
30 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
31 .\" nothing in troff, for use with C<>.
32 .tr \(*W-
33 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34 .ie n \{\
35 .    ds -- \(*W-
36 .    ds PI pi
37 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
39 .    ds L" ""
40 .    ds R" ""
41 .    ds C` ""
42 .    ds C' ""
43 'br\}
44 .el\{\
45 .    ds -- \|\(em\|
46 .    ds PI \(*p
47 .    ds L" ``
48 .    ds R" ''
49 'br\}
50 .\"
51 .\" If the F register is turned on, we'll generate index entries on stderr for
52 .\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53 .\" entries marked with X<> in POD.  Of course, you'll have to process the
54 .\" output yourself in some meaningful fashion.
55 .if \nF \{\
56 .    de IX
57 .    tm Index:\\$1\t\\n%\t"\\$2"
58 ..
59 .    nr % 0
60 .    rr F
61 .\}
62 .\"
63 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
64 .\" way too many mistakes in technical documents.
65 .hy 0
66 .if n .na
67 .\"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70 .    \" fudge factors for nroff and troff
71 .if n \{\
72 .    ds #H 0
73 .    ds #V .8m
74 .    ds #F .3m
75 .    ds #[ \f1
76 .    ds #] \fP
77 .\}
78 .if t \{\
79 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 .    ds #V .6m
81 .    ds #F 0
82 .    ds #[ \&
83 .    ds #] \&
84 .\}
85 .    \" simple accents for nroff and troff
86 .if n \{\
87 .    ds ' \&
88 .    ds ` \&
89 .    ds ^ \&
90 .    ds , \&
91 .    ds ~ ~
92 .    ds /
93 .\}
94 .if t \{\
95 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101 .\}
102 .    \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 .    \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 .    \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
117 \{\
118 .    ds : e
119 .    ds 8 ss
120 .    ds o a
121 .    ds d- d\h'-1'\(ga
122 .    ds D- D\h'-1'\(hy
123 .    ds th \o'bp'
124 .    ds Th \o'LP'
125 .    ds ae ae
126 .    ds Ae AE
127 .\}
128 .rm #[ #] #H #V #F C
129 .\" ========================================================================
130 .\"
131 .IX Title "NNRPD 8"
132 .TH NNRPD 8 "2008-04-06" "INN 2.4.5" "InterNetNews Documentation"
133 .SH "NAME"
134 nnrpd \- NNTP server for reader clients
135 .SH "SYNOPSIS"
136 .IX Header "SYNOPSIS"
137 \&\fBnnrpd\fR [\fB\-DfnoSt\fR] [\fB\-b\fR \fIaddress\fR] [\fB\-c\fR \fIconfigfile\fR]
138 [\fB\-g\fR \fIshadowgroup\fR>] [\fB\-i\fR \fIinitial\fR] [\fB\-I\fR \fIinstance\fR] [\fB\-p\fR \fIport\fR]
139 [\fB\-P\fR \fIprefork\fR] [\fB\-r\fR \fIreason\fR] [\fB\-s\fR \fIpadding\fR]
140 .SH "DESCRIPTION"
141 .IX Header "DESCRIPTION"
142 \&\fBnnrpd\fR is an \s-1NNTP\s0 server for newsreaders.  It accepts commands on its
143 standard input and responds on its standard output.  It is normally
144 invoked by \fIinnd\fR\|(8) with those descriptors attached to a remote client
145 connection.  \fBnnrpd\fR also supports running as a standalone daemon.
146 .PP
147 Unlike \fIinnd\fR\|(8) \fBnnrpd\fR supports all \s-1NNTP\s0 commands for user-oriented
148 reading and posting.  \fBnnrpd\fR uses the \fIreaders.conf\fR file to control
149 who is authorized to access the Usenet database.
150 .PP
151 On exit, \fBnnrpd\fR will report usage statistics through \fIsyslog\fR\|(3).
152 .PP
153 \&\fBnnrpd\fR only reads config files (both \fIreaders.conf\fR and \fIinn.conf\fR)
154 when it is spawned.  You can therefore never change the behavior of a
155 client that's already connected.  If \fBnnrpd\fR is run from \fBinnd\fR (the
156 default) or from \fIinetd\fR\|(8), \fIxinetd\fR\|(8), or some equivalent, a new \fBnnrpd\fR
157 process is spawned for every connection and therefore any changes to
158 configuration files will be immediately effective for all new
159 connections.  If you are instead running \fBnnrpd\fR with the \fB\-D\fR option,
160 any configuration changes won't take effect until \fBnnrpd\fR is restarted.
161 .PP
162 The \fIinn.conf\fR setting \fInnrpdflags\fR can be used to pass any of the
163 options below to instances of \fBnnrpd\fR that are spawned directly from
164 \&\fBinnd\fR.  Many options only make sense when \fB\-D\fR is used, so these
165 options should not be used with \fInnrpdflags\fR.  See also the discussion
166 of \fInnrpdflags\fR in \fIinn.conf\fR\|(5).
167 .PP
168 When \fInnrpdloadlimit\fR in \fIinn.conf\fR is not 0, it will also reject
169 connections if the load average is greater than that value (typically 16).
170 \&\fBnnrpd\fR can also prevent high-volume posters from abusing your
171 resources. See the discussion of exponential backoff in \fIinn.conf\fR\|(5).
172 .SH "OPTIONS"
173 .IX Header "OPTIONS"
174 .IP "\fB\-b\fR \fIaddress\fR" 4
175 .IX Item "-b address"
176 The \fB\-b\fR parameter instructs \fBnnrpd\fR to bind to the specified \s-1IP\s0
177 address when started as a standalone daemon using the \fB\-D\fR flag. This
178 has to be a valid IPv4 or IPv6 address belonging to an interface of
179 the local host.  It can also be ::0 (although the default is 0.0.0.0
180 if unspecified).
181 .IP "\fB\-c\fR \fIconfigfile\fR" 4
182 .IX Item "-c configfile"
183 By default, \fBnnrpd\fR reads the \fIreaders.conf\fR to determine how to
184 authenticate connections.  The \fB\-c\fR flag specifies an alternate file
185 for this purpose.  If the file name isn't fully qualified, it is taken
186 to be relative to \fIpathetc\fR in \fIinn.conf\fR (this is useful to have
187 several instances of \fBnnrpd\fR running on different ports or \s-1IP\s0
188 addresses with different settings.)
189 .IP "\fB\-D\fR" 4
190 .IX Item "-D"
191 If specified, this parameter causes \fBnnrpd\fR to operate as a
192 daemon. That is, it detaches itself and runs in the background,
193 forking a process for every connection. By default \fBnnrpd\fR listens on
194 the \s-1NNTP\s0 port (119), so either \fIinnd\fR\|(8) has to be started on another
195 port or \fBnnrpd\fR \fB\-p\fR parameter.  Note that with this parameter,
196 \&\fBnnrpd\fR continues running until killed.  This means that it reads
197 \&\fIinn.conf\fR once on startup and never again until restarted. \fBnnrpd\fR
198 should therefore be restarted if inn.conf is changed.
199 .Sp
200 When started in daemon mode, \fBnnrpd\fR will write its \s-1PID\s0 into a file in
201 the \fIpathrun\fR directory.  The file will be named \fInnrpd\-%d.pid\fR, where
202 \&\f(CW%d\fR is replaced with the port that \fBnnrpd\fR is configured to listen on
203 (119 unless the \fB\-p\fR option is given).
204 .IP "\fB\-f\fR" 4
205 .IX Item "-f"
206 If specified, \fBnnrpd\fR does not detach itself and runs in the
207 foreground when started as a standalone daemon using the \fB\-D\fR flag.
208 .IP "\fB\-g\fR \fIshadowgroup\fR" 4
209 .IX Item "-g shadowgroup"
210 On systems that have a shadow password file, \fBnnrpd\fR tries to add the
211 group \fIshadow\fR as a supplementary group if it is running in
212 standalone mode. On many systems, members of that group have read
213 permission for the shadow password file. The \fB\-g\fR parameter instructs
214 \&\fBnnrpd\fR to try to add the named group as a supplementary group on
215 shadow systems instead of \fIshadow\fR. This only works if
216 \&\f(CW\*(C`HAVE_GETSPNAM\*(C'\fR in \fIinclude/config.h\fR is defined and \fBnnrpd\fR is
217 running in standalone mode since this call only works when \fBnnrpd\fR is
218 started as root.
219 .IP "\fB\-i\fR \fIinitial\fR" 4
220 .IX Item "-i initial"
221 Specify an initial command to \fBnnrpd\fR. When used, \fIinitial\fR is taken
222 as if it were the first command received by \fBnnrpd\fR.
223 .IP "\fB\-I\fR \fIinstance\fR" 4
224 .IX Item "-I instance"
225 If specified \fIinstance\fR is used as an additional static portion
226 within MessageIDs generated by \fBnnrpd\fR; typically this option would
227 be used where a cluster of machines exist with the same virtual
228 hostname and must be disambiguated during posts.
229 .IP "\fB\-n\fR" 4
230 .IX Item "-n"
231 The \fB\-n\fR flag turns off resolution of \s-1IP\s0 addresses to names.  If you
232 only use IP-based restrictions in \fIreaders.conf\fR and can handle \s-1IP\s0
233 addresses in your logs, using this flag may result in some additional
234 speed.
235 .IP "\fB\-o\fR" 4
236 .IX Item "-o"
237 The \fB\-o\fR flag causes all articles to be spooled instead of sending
238 them to \fIinnd\fR\|(8). \fBrnews\fR with the \fB\-U\fR flag should be invoked from
239 cron on a regular basis to take care of these articles. This flag is
240 useful if \fIinnd\fR\|(8) in accepting articles and \fBnnrpd\fR is started
241 standalone or using \fIinetd\fR\|(8).
242 .IP "\fB\-p\fR \fIport\fR" 4
243 .IX Item "-p port"
244 The \fB\-p\fR parameter instructs \fBnnrpd\fR to listen on \fIport\fR when
245 started as a standalone daemon using the \fB\-D\fR flag.
246 .IP "\fB\-P\fR \fIprefork\fR" 4
247 .IX Item "-P prefork"
248 The \fB\-P\fR parameter instructs \fBnnrpd\fR to prefork \fIprefork\fR children
249 awaiting connections when started as a standalone daemon using the
250 \&\fB\-D\fR flag.
251 .IP "\fB\-r\fR \fIreason\fR" 4
252 .IX Item "-r reason"
253 If the \fB\-r\fR flag is used, then \fBnnrpd\fR will reject the incoming
254 connection giving \fIreason\fR as the text. This flag is used by \fIinnd\fR\|(8)
255 when it is paused or throttled.
256 .IP "\fB\-s\fR \fIpadding\fR" 4
257 .IX Item "-s padding"
258 As each command is received, \fBnnrpd\fR tries to change its \f(CW\*(C`argv\*(C'\fR
259 array so that \fIps\fR\|(1) will print out the command being executed. To get
260 a full display, the \fB\-s\fR flag may be used with a long string as its
261 argument, which will be overwritten when the program changes its
262 title.
263 .IP "\fB\-S\fR" 4
264 .IX Item "-S"
265 If specified, \fBnnrpd\fR will start a negotiation for \s-1SSL\s0 session as
266 soon as connected. To use this flag, \f(CW\*(C`\-\-with\-openssl\*(C'\fR must have been
267 specified at \f(CW\*(C`configure\*(C'\fR time.
268 .IP "\fB\-t\fR" 4
269 .IX Item "-t"
270 If the \fB\-t\fR flag is used then all client commands and initial
271 responses will be traced by reporting them in syslog. This flag is set
272 by \fIinnd\fR\|(8) under the control of the \fIctlinnd\fR\|(8) \f(CW\*(C`trace\*(C'\fR command, and
273 is toggled upon receipt of a \f(CW\*(C`SIGHUP\*(C'\fR; see \fIsignal\fR\|(2).
274 .SH "SSL SUPPORT"
275 .IX Header "SSL SUPPORT"
276 If \s-1INN\s0 is built with \f(CW\*(C`\-\-with\-openssl\*(C'\fR, \fBnnrpd\fR will support news reading
277 over \s-1TLS\s0 (also known as \s-1SSL\s0).  For clients that use the \s-1STARTTLS\s0 command,
278 no special configuration is needed beyond creating a \s-1TLS/SSL\s0 certificate
279 for the server.  You should do this in exactly the same way that you would
280 generate a certificate for a web server.
281 .PP
282 If you're happy with a self-signed certificate (which will generate
283 warnings with some news reader clients), you can create and install one in
284 the default path by running \f(CW\*(C`make cert\*(C'\fR after \f(CW\*(C`make install\*(C'\fR when
285 installing \s-1INN\s0, or by running the following commands:
286 .PP
287 .Vb 6
288 \&    openssl req \-new \-x509 \-nodes \-out /usr/local/news/lib/cert.pem \e
289 \&        \-days 366 \-keyout /usr/local/news/lib/key.pem
290 \&    chown news:news /usr/local/news/lib/cert.pem
291 \&    chmod 640 /usr/local/news/lib/cert.pem
292 \&    chown news:news /usr/local/news/lib/key.pem
293 \&    chmod 600 /usr/local/news/lib/key.pem
294 .Ve
295 .PP
296 Replace the paths with something appropriate to your \s-1INN\s0 installation.
297 This will create a self-signed certificate that will expire in a year.
298 The \fBopenssl\fR program will ask you a variety of questions about your
299 organization.  Enter the fully qualified domain name of the server as the
300 name the certificate is for.
301 .PP
302 Most news clients currently do not use the \s-1STARTTLS\s0 command, however, and
303 instead expect to connect to a separate port (563) and start an \s-1SSL\s0
304 negotiation immediately.  \fBinnd\fR does not, however, know how to listen
305 for connections to that port and then spawn \fBnnrpd\fR the way that it does
306 for regular reader connections.  You will therefore need to arrange for
307 \&\fBnnrpd\fR to listen on that port through some other means.  This can be
308 done with the \fB\-D\fR flag (and \f(CW\*(C`\-P 563\*(C'\fR), but the easiest way is probably
309 to add a line like:
310 .PP
311 .Vb 1
312 \&    nntps stream tcp nowait news /usr/lib/news/bin/nnrpd nnrpd \-S
313 .Ve
314 .PP
315 to \fI/etc/inetd.conf\fR or the equivalent on your system and let \fBinetd\fR
316 run \fBnnrpd\fR.  (Change the path to \fBnnrpd\fR to match your installation if
317 needed.)  You may need to replace \f(CW\*(C`nntps\*(C'\fR with \f(CW563\fR if \f(CW\*(C`nntps\*(C'\fR isn't
318 defined in \fI/etc/services\fR on your system.
319 .SH "PROTOCOL DIFFERENCES"
320 .IX Header "PROTOCOL DIFFERENCES"
321 \&\fBnnrpd\fR implements the \s-1NNTP\s0 commands defined in \s-1RFC\s0 977, with the
322 following differences:
323 .IP "1." 4
324 The \f(CW\*(C`slave\*(C'\fR command is not implemented.  This command has never been
325 fully defined.
326 .IP "2." 4
327 The \f(CW\*(C`list\*(C'\fR command may be followed by the optional word \f(CW\*(C`active.times\*(C'\fR,
328 \&\f(CW\*(C`distributions\*(C'\fR, \f(CW\*(C`distrib.pats\*(C'\fR, \f(CW\*(C`moderators\*(C'\fR, \f(CW\*(C`newsgroups\*(C'\fR,
329 \&\f(CW\*(C`subscriptions\*(C'\fR, or \f(CW\*(C`Ioverview.fmt\*(C'\fR to get a list of when newsgroups
330 where created, a list of valid distributions, a file specifying default
331 distribution patterns, moderators list, a one-per-line description of the
332 current set of newsgroups, a list of the automatic group subscriptions, or
333 a listing of the \fIoverview.fmt\fR file.
334 .Sp
335 The command \f(CW\*(C`list active\*(C'\fR is equivalent to the \f(CW\*(C`list\*(C'\fR command. This
336 is a common extension.
337 .IP "3." 4
338 The \f(CW\*(C`xhdr\*(C'\fR, \f(CW\*(C`authinfo user\*(C'\fR and \f(CW\*(C`authinfo pass\*(C'\fR commands are
339 implemented.  These are based on the reference Unix implementation.  See
340 \&\s-1RFC\s0 2980.
341 .IP "4." 4
342 A new command, \f(CW\*(C`xpat header range|MessageID pat [morepat...]\*(C'\fR, is
343 provided.  The first argument is the case-insensitive name of the header
344 to be searched.  The second argument is either an article range or a
345 single Message\-ID, as specified in \s-1RFC\s0 977.  The third argument is a
346 \&\f(CW\*(C`uwildmat\*(C'\fR(3)\-style pattern; if there are additional arguments they are
347 joined together separated by a single space to form the complete pattern.
348 This command is similar to the \f(CW\*(C`xhdr\*(C'\fR command.  It returns a \f(CW221\fR
349 response code, followed by the text response of all article numbers that
350 match the pattern.
351 .IP "5." 4
352 The \f(CW\*(C`listgroup group\*(C'\fR command is provided.  This is a comment extension.
353 It is equivalent to the \f(CW\*(C`group\*(C'\fR command, except that the reply is a
354 multi-line response containing the list of all article numbers in the
355 group.
356 .IP "6." 4
357 The \f(CW\*(C`xgtitle [group]\*(C'\fR command is provided. This extension is used by
358 ANU\-News.  It returns a \f(CW282\fR reply code, followed by a one-line
359 description of all newsgroups thatmatch the pattern.  The default is the
360 current group.
361 .IP "7." 4
362 The \f(CW\*(C`xover [range]\*(C'\fR command is provided. It returns a \f(CW224\fR reply code,
363 followed by the overview data for the specified range; the default is to
364 return the data for the current article.
365 .IP "8." 4
366 The \f(CW\*(C`xpath MessageID\*(C'\fR command is provided; see \fIinnd\fR\|(8).
367 .IP "9." 4
368 The \f(CW\*(C`date\*(C'\fR command is provided; this is based on the draft \s-1NNTP\s0 protocol
369 revision (draft\-ietf\-nntpext\-imp\-04.txt).  It returns a one-line response
370 code of \f(CW111\fR followed by the \s-1GMT\s0 date and time on the server in the form
371 \&\f(CW\*(C`YYYYMMDDhhmmss\*(C'\fR.
372 .SH "HISTORY"
373 .IX Header "HISTORY"
374 Written by Rich \f(CW$alz\fR <rsalz@uunet.uu.net> for InterNetNews.  Overview
375 support added by Rob Robertston <rob@violet.berkeley.edu> and Rich in
376 January, 1993.  Exponential backoff (for posting) added by Dave Hayes in
377 Febuary 1998.
378 .PP
379 $Id: nnrpd.8 7880 2008-06-16 20:37:13Z iulius $
380 .SH "SEE ALSO"
381 .IX Header "SEE ALSO"
382 \&\fIctlinnd\fR\|(8), \fIinnd\fR\|(8), \fIinn.conf\fR\|(5), \fIsignal\fR\|(2), \fIuwildmat\fR\|(3).