chiark / gitweb /
debugging for thing that crashed
[innduct.git] / doc / pod / inews.pod
1 =head1 NAME
2
3 inews - Post a Usenet article to the local news server
4
5 =head1 SYNOPSIS
6
7 B<inews> [B<-ADhNORSVW>] [B<-acdeFfnortwx> I<value>] [B<-p> I<port>] [I<file>]
8
9 =head1 DESCRIPTION
10
11 B<inews> reads a Usenet news article, perhaps with headers, from I<file>
12 or standard input if no file is given.  It adds some headers and performs
13 some consistency checks.  If the article does not meet those checks, the
14 article is rejected.  If it passes the checks, B<inews> sends the article
15 to the local news server as specified in F<inn.conf>.
16
17 By default, if a file named F<.signature> exists in the home directory of
18 the posting user, it is appended to the post, preceeded by a line that
19 contains only C<-- >.  Signatures are not allowed to be more than four
20 lines long.
21
22 Cancel messages can only be posted with B<inews> if the sender of the
23 cancel message matches the sender of the original message being
24 cancelled.  The same check is also applied to Supersedes.  Sender in this
25 case means the contents of the Sender header if present, otherwise the
26 From header.
27
28 Control messages other than cancel messages are only allowed if B<inews>
29 is being run by the news user or by a user in the news group and if the
30 control message is recognized.  If the article contains a Distribution
31 header with a distribution that matches one of the bad distribution
32 patterns in F<inn/options.h> (anything containing a period by default),
33 the message will be rejected.  The message will also be rejected if
34 I<checkincludedtext> is true in F<inn.conf>, it contains more quoted text
35 than original text, and it is over 40 lines long.
36
37 If not provided, the Path header of an article is constructed as follows:
38 The basic Path header will be "not-for-mail".  If I<pathhost> is specified
39 in F<inn.conf>, it will be added to the beginning Path.  Otherwise, if
40 I<server> is specified, the full domain of the local host will be added to
41 the beginning of the Path.  Then, if B<-x> was given, its value will be
42 added to the beginning of the Path.
43
44 If posting fails, a copy of the failed post will be saved in a file named
45 F<dead.article> in the home directory of the user running B<inews>.
46 B<inews> exits with a non-zero status if posting failed or with a zero
47 status if posting was successful.
48
49 =head1 OPTIONS
50
51 Most of the options to B<inews> take a single value and set the
52 corresponding header in the message that is posted.  If the value is more
53 than one word or contains any shell metacharacters, it must be quoted to
54 protect it from the shell.  Here are all the options that set header
55 fields and the corresponding header:
56
57     -a  Approved
58     -c  Control
59     -d  Distribution
60     -e  Expires
61     -F  References
62     -f  From
63     -n  Newsgroups
64     -o  Organization
65     -r  Reply-To
66     -t  Subject
67     -w  Followup-To
68     -x  Path prefix
69
70 The B<-x> argument will be added to the beginning of the normal Path
71 header; it will not replace it.
72
73 =over 4
74
75 =item B<-A>, B<-V>, B<-W>
76
77 Accepted for compatibility with C News.  These options have no affect.
78
79 =item B<-D>, B<-N>
80
81 Perform the consistency checks and add headers where appropriate, but then
82 print the article to standard output rather than sending it to the server.
83 B<-N> is accepted as as synonym for compatibility with C News.
84
85 =item B<-h>
86
87 Normally, this flag should always be given.  It indicates that the article
88 consists of headers, a blank line, and then the message body.  If it is
89 omitted, the input is taken to be just the body of the message, and any
90 desired headers have to be specified with command-line options as
91 described above.
92
93 =item B<-O>
94
95 By default, an Organization header will be added if none is present in the
96 article.  To prevent adding the default (from I<organization> in
97 F<inn.conf>), use this flag.
98
99 =item B<-p> I<port>
100
101 Connect to the specified port on the server rather than to the default
102 (port 119).
103
104 =item B<-R>
105
106 Reject all control messages.
107
108 =item B<-S>
109
110 Do not attempt to append F<~/.signature> to the message, even if it
111 exists.
112
113 =back
114
115 =head1 NOTES
116
117 If the NNTP server requests authentication, B<inews> will try to read
118 F<passwd.nntp> to get the username and password to use and will therefore
119 need read access to that file.  This is typically done by making that file
120 group-readable and adding all users who should be able to use B<inews> to
121 post to that server to the appropriate group.
122
123 B<inews> used to do even more than it does now, and all of the remaining
124 checks that are not dependent on the user running B<inews> should probably
125 be removed in favor of letting the news server handle them.
126
127 Since INN's B<inews> uses F<inn.conf> and some other corners of an INN
128 installation, it's not very appropriate as a general stand-alone B<inews>
129 program for general use on a system that's not running a news server.
130 Other, more suitable versions of B<inews> are available as part of various
131 Unix news clients or by themselves.
132
133 =head1 HISTORY
134
135 Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews.  Rewritten in
136 POD by Russ Allbery <rra@stanford.edu>.
137
138 =head1 SEE ALSO
139
140 inn.conf(5), rnews(1)
141
142 =cut