.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "RNEWS 1" .TH RNEWS 1 2024-02-12 "INN 2.7.2" "InterNetNews Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME rnews \- Inject individual articles and UUCP batches .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBrnews\fR [\fB\-abdNUv\fR] [\fB\-h\fR \fIhost\fR] [\fB\-P\fR \fIport\fR] [\fB\-rS\fR \fIserver\fR] [\fIfile\fR] .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBrnews\fR injects either individual articles or UUCP-style article batches into a local or remote news server. It submits articles via IHAVE and is suitable for injecting articles received from other sources; local postings should generally use inews(1) instead. It is also used to process spooled messages created by, for example, \fBnnrpd\fR while \fBinnd\fR is not available. .PP If authentication credentials are present for the remote server in the \fIpasswd.nntp\fR file in \fIpathetc\fR, then \fBrnews\fR will use them to authenticate. .PP The message is read from \fIfile\fR if given, spooled files (with the \fB\-U\fR flag) or standard input if no file is given. Articles are sent to the server given in the \fB\-r\fR or \fB\-S\fR command line options if given, otherwise to the server set via \fInnrpdposthost\fR in \fIinn.conf\fR, otherwise to the local server at \f(CW\*(C`127.0.0.1\*(C'\fR, and finally to the server set via \fIserver\fR in \fIinn.conf\fR. .PP When sent over UUCP, Usenet articles are typically collected in a single batch to reduce the UUCP overhead. Batches can also be compressed to reduce communication time. If the input to \fBrnews\fR does not begin with the characters \f(CW\*(C`#!\*(C'\fR, it is taken to be a single news article; otherwise, the first line of the input is interpreted as a batch command. .PP If the batch command is: .PP .Vb 1 \& #! rnews .Ve .PP then the next bytes (starting with the next line) are read as a news article. After that article is processed, the next line is again treated as a batch command. .PP If the command is: .PP .Vb 1 \& #! cunbatch .Ve .PP then the rest of the input is fed to \f(CW\*(C`gzip \-d\*(C'\fR to uncompress it, and then the resulting uncompressed output is re-read as if it were the original input to \fBrnews\fR. A compressed batch should therefore start with this line and contain a batch of articles separated by \f(CW\*(C`#!\ rnews\*(C'\fR lines and then compressed with compress(1). (Batches compressed with gzip(1) should instead use \f(CW\*(C`gunbatch\*(C'\fR as the batch command; INN just uses \fBgzip\fR rather than \fBcompress\fR because it can handle \fBcompress\fR\-style compression but is more widely available, due to old patent issues, than \fBcompress\fR.) .PP Otherwise, if the command is any other word and the \fB\-a\fR flag is not given, \fBrnews\fR will try to execute a program with that name, looking for it in the directory \fIpathbin\fR/rnews.libexec. The rest of the batch will be fed to that program's standard input, and the standard output from the program will be treated as if it were the original input to \fBrnews\fR. INN comes with three such standard batch processors: .IP \fBbunbatch\fR 2 .IX Item "bunbatch" It invokes \fBbzip2\fR and should be used for batches compressed with \fBbzip2\fR. .IP \fBc7unbatch\fR 2 .IX Item "c7unbatch" It undoes an ASCII encoding to recover the original binary compressed stream and then decompresses it as explained above. .IP \fBgunbatch\fR 2 .IX Item "gunbatch" It invokes \fBgzip\fR and should be used for batches compressed with \fBgzip\fR. .SH OPTIONS .IX Header "OPTIONS" .IP \fB\-a\fR 4 .IX Item "-a" By default, \fBrnews\fR looks for additional unpackers in the \&\fIrnews.libexec\fR sub-directory of \fIpathbin\fR (as set in \fIinn.conf\fR). If \fB\-a\fR is given, no additional batch processor will be used; only \&\f(CW\*(C`rnews\*(C'\fR and \f(CW\*(C`cunbatch\*(C'\fR will be recognized as valid batch commands. .IP \fB\-b\fR 4 .IX Item "-b" By default, \fBrnews\fR will log and discard any articles that are rejected by the server or cannot be parsed by \fBrnews\fR for some reason (such as a missing header field). If \fB\-b\fR is given, rejected articles will also be backed up in the \fIbad\fR sub-directory of \fIpathincoming\fR (as set in \fIinn.conf\fR). .IP \fB\-d\fR 4 .IX Item "-d" If \fB\-d\fR is given, \fBrnews\fR will log via syslog the message-ID and the Path header field body of each article rejected as a duplicate by the server. .IP "\fB\-h\fR \fIhost\fR" 4 .IX Item "-h host" If \fB\-h\fR is given, \fBrnews\fR will log the message ID and \fIhost\fR via syslog for each article that it offers to the server. This is used in conjunction with a UUCP feed to get a log of the messages received via that feed. This will also be done if the environment variable UU_MACHINE is set, but will only be done if \fIhost\fR is not an empty string. (You can therefore turn off logging even if UU_MACHINE will be set by passing the flag \f(CW\*(C`\-h \*(Aq\*(Aq\*(C'\fR to \fBrnews\fR.) .IP \fB\-N\fR 4 .IX Item "-N" Normally, if unpacking the input batch fails, it is re-spooled to \&\fIpathincoming\fR for another attempt later. If the \fB\-N\fR flag is given, no such re-spooling is done and \fBrnews\fR will instead exit with status 9 if unpacking fails. .IP "\fB\-P\fR \fIport\fR" 4 .IX Item "-P port" Use \fIport\fR as the server port to connect to rather than \fInnrpdpostport\fR (as set in \fIinn.conf\fR). Note that this value is only used if \fBrnews\fR does not connect to the local server (in other words, when \fB\-r\fR or \fB\-S\fR is given or \fInnrpdposthost\fR is set). .IP "\fB\-r\fR \fIserver\fR, \fB\-S\fR \fIserver\fR" 4 .IX Item "-r server, -S server" \&\fB\-r\fR and \fB\-S\fR are synonymous. If either is given, articles will be sent to \fIserver\fR rather than using the local server, overriding also the setting of \fInnrpdposthost\fR in \fIinn.conf\fR. .IP \fB\-U\fR 4 .IX Item "-U" If the server is not available, both \fBrnews\fR and \fBnnrpd\fR will spool posts to new files in the \fIpathincoming\fR directory (as specified in \&\fIinn.conf\fR). When \fBrnews\fR is invoked with the \fB\-U\fR option, it scans that directory and processes all spooled messages found there whose filenames do not begin with \f(CW\*(C`.\*(C'\fR, attempting to send them to the server again. It's a good idea to run this periodically out of cron to pick up any articles spooled due to temporary server unavailability. .IP \fB\-v\fR 4 .IX Item "-v" Enable verbose mode, with more traces, notably logging the reason why articles are rejected by the server. .SH BUGS .IX Header "BUGS" \&\fBrnews\fR cannot process articles that have embedded null characters in them. (Neither can the rest of INN at present.) .SH HISTORY .IX Header "HISTORY" Written by Rich $alz for InterNetNews. Rewritten in POD by Russ Allbery . .SH "SEE ALSO" .IX Header "SEE ALSO" bzip2(1), compress(1), gzip(1), inews(1), inn.conf(5), innd(8), nnrpd(8), passwd.nntp(5).