.\" -*- 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 "INEWS 1" .TH INEWS 1 2024-04-01 "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 inews \- Post an article to a news server .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fBinews\fR [\fB\-ADEhHILNOPRSvVWXY\fR] [\fB\-acdefFimnorstwx\fR \fIvalue\fR] [\fB\-p\fR \fIport\fR] [\fIfile\fR] .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fBinews\fR reads a Usenet news article, perhaps with headers, from \fIfile\fR or standard input if no file is given. It adds some header fields and performs some consistency checks. If the article does not meet those checks, the article is rejected. If it passes the checks, \fBinews\fR sends the article to the news server specified in the \fIserver\fR parameter in \fIinn.conf\fR or overridden by the \f(CW\*(C`NNTPSERVER\*(C'\fR environment variable when running \fBinews\fR. .PP \&\fBinews\fR submits articles via POST and is suitable for posting articles that have not already been injecting into Usenet. Submitting articles received from other sources should generally use rnews(1) instead. .PP By default, if a file named \fI.signature\fR exists in the home directory of the posting user, it is appended to the post, preceded by a line that contains only \f(CW\*(C`\-\- \*(C'\fR. Signatures are not allowed to be more than four lines long. .PP Control messages other than cancel messages are only allowed if \fBinews\fR is being run by the news user or by a user in the news group and if the control message is recognized. If the article contains a Distribution header field with a distribution that matches one of the bad distribution patterns in \fIinn/options.h\fR (anything containing a period by default), the message will be rejected. The message will also be rejected if \&\fIcheckincludedtext\fR is true in \fIinn.conf\fR, it contains more quoted text than original text, and it is over 40 lines long. .PP If not provided, the Path header field body will be \f(CW\*(C`not\-for\-mail\*(C'\fR. If \fB\-x\fR is given, its value will be added to the beginning of the Path header field. You may for instance want to add a special \f(CW\*(C`path\-identity\*(C'\fR value related to the host running \fBinews\fR, which will appear as \f(CW\*(C`path\-identity!not\-for\-mail\*(C'\fR in the Path header field. .PP If posting fails, a copy of the failed post will be saved in a file named \&\fIdead.article\fR in the home directory of the user running \fBinews\fR. \&\fBinews\fR exits with a non-zero status if posting failed or with a zero status if posting was successful. .SH OPTIONS .IX Header "OPTIONS" Most of the options to \fBinews\fR take a single value and set the corresponding header field body in the message that is posted. If the value is more than one word or contains any shell metacharacters, it must be quoted to protect it from the shell. Here are all the options that set header fields and the corresponding header field body: .PP .Vb 10 \& \-a Approved \& \-c Control \& \-d Distribution \& \-e Expires \& \-F References \& \-f From \& \-m Message\-ID \& \-n Newsgroups \& \-o Organization \& \-r Reply\-To \& \-t Subject \& \-w Followup\-To \& \-x Path (prefix) .Ve .PP The \fB\-x\fR argument will be added to the beginning of the normal Path header field body; it will not replace it contrary to what other options do. This behaviour is historical, and was first implemented in the \fBinews\fR program shipped with B News (the original meaning of \fB\-x\fR was to say not to forward the article to a specified site). .IP "\fB\-A\fR, \fB\-V\fR, \fB\-W\fR" 4 .IX Item "-A, -V, -W" Accepted for compatibility with C News. These options have no affect. .IP "\fB\-i\fR, \fB\-I\fR, \fB\-L\fR, \fB\-s\fR, \fB\-v\fR, \fB\-X\fR" 4 .IX Item "-i, -I, -L, -s, -v, -X" Accepted for compatibility with \fBtinews.pl\fR, shipped with the news reader tin. These options have no effect. .IP "\fB\-D\fR, \fB\-N\fR" 4 .IX Item "-D, -N" Perform the consistency checks and add header fields where appropriate, but then print the article to standard output rather than sending it to the server. \fB\-N\fR is accepted as as synonym for compatibility with C News. .IP \fB\-E\fR 4 .IX Item "-E" If the article is empty (that is to say with no body), \fBinews\fR bails out with an error. When \fB\-E\fR is used, \fBinews\fR will just silently discard the message and exit. .Sp Note that control messages with no body are not rejected. .IP \fB\-h\fR 4 .IX Item "-h" Normally, this flag should always be given. It indicates that the article consists of headers, a blank line, and then the message body. If it is omitted, the input is taken to be just the body of the message, and any desired header fields have to be specified with command-line options as described above. .IP \fB\-H\fR 4 .IX Item "-H" Print to standard output a help message. .IP \fB\-O\fR 4 .IX Item "-O" By default, an Organization header field will be added if none is present in the article. To prevent adding the default (from \fIorganization\fR in \fIinn.conf\fR), use this flag. .IP "\fB\-p\fR \fIport\fR" 4 .IX Item "-p port" Connect to the specified port on the server rather than to the default (port 119). .IP \fB\-P\fR 4 .IX Item "-P" \&\fBinews\fR computes a sender address with the username of the user running \&\fBinews\fR and the hostname of the news server. It represents the actual poster of the article. .Sp By default, a Sender header field will be added with that value if none is present in the article or if the From header field is not already set to that value. Moreover, if a Sender header field is already present, it will be replaced with that value. .Sp To prevent adding or overwriting the Sender header field, use this flag. .IP \fB\-R\fR 4 .IX Item "-R" Reject all control messages. .IP \fB\-S\fR 4 .IX Item "-S" Do not attempt to append \fI~/.signature\fR to the message, even if it exists. .IP \fB\-Y\fR 4 .IX Item "-Y" By default, \fBinews\fR authenticates to the remote news server only if asked to, or if the initial NNTP banner corresponds to a state in which postings are not allowed. Using this flag leads \fBinews\fR to always authenticate, even if not asked to. .SH EXAMPLES .IX Header "EXAMPLES" The following examples show how to post an article with headers and body, separated by a blank line, written in a file named \fIarticle\fR. .PP To post it to the news server set in the \fIserver\fR parameter of \fIinn.conf\fR (which can be \f(CW\*(C`localhost\*(C'\fR if it is the local server), without adding a Sender header field: .PP .Vb 1 \& inews \-h \-P < article .Ve .PP To force \f(CW\*(C`news.uu.net\*(C'\fR as the server to send the article to: .PP .Vb 1 \& NNTPSERVER=news.uu.net inews \-h \-P < article .Ve .PP For testing purpose, to see the article that will be posted, without actually sending it but only writing it to the standard output: .PP .Vb 1 \& inews \-h \-P \-D < article .Ve .PP If \fIarticle\fR only contains a message without headers, you may use: .PP .Vb 1 \& inews \-t \*(AqHello\*(Aq \-n misc.test \-f \*(AqBob \*(Aq \-P < article .Ve .SH NOTES .IX Header "NOTES" If the NNTP server requests authentication, \fBinews\fR will try to read \&\fIpasswd.nntp\fR to get the username and password to use and will therefore need read access to that file. This is typically done by making that file group-readable and adding all users who should be able to use \fBinews\fR to post to that server to the appropriate group. .PP \&\fBinews\fR used to do even more than it does now, and all of the remaining checks that are not dependent on the user running \fBinews\fR should probably be removed in favor of letting the news server handle them. .PP Since INN's \fBinews\fR uses \fIinn.conf\fR and some other corners of an INN installation, it's not very appropriate as a general standalone \fBinews\fR program for general use on a system that's not running a news server. Other, more suitable versions of \fBinews\fR are available as part of various Unix news clients or by themselves. We try to keep compatibility with the flags other implementations use (like C News, inews-xt, and the still actively maintained \fBtinews.pl\fR shipped with the news reader tin or downloadable from for a standalone use). .SH HISTORY .IX Header "HISTORY" Written by Rich $alz for InterNetNews. Rewritten in POD by Russ Allbery . .SH "SEE ALSO" .IX Header "SEE ALSO" inn.conf(5), passwd.nntp(5), rnews(1).