1tinews.pl(1) Post and sign an article via NNTP tinews.pl(1)
2
3
4
6 tinews.pl - Post and sign an article via NNTP
7
9 tinews.pl [OPTIONS] < input
10
12 tinews.pl reads an article on STDIN, signs it via pgp(1) or gpg(1) and
13 posts it to a news server.
14
15 The article shall not contain any raw 8-bit data or it needs to already
16 have the relevant MIME-headers as tinews.pl will not add any MIME-
17 headers nor encode its input.
18
19 If the article contains To:, Cc: or Bcc: headers and mail-actions are
20 configured it will automatically add a "Posted-And-Mailed: yes" header
21 to the article and send out the mail-copies.
22
23 If a Cancel-Lock secret file is defined it will automatically add a
24 Cancel-Lock: (and Cancel-Key: if required) header.
25
26 The input should have unix line endings (<LF>, '\n').
27
29 -a "Approved" | --approved "Approved"
30 Set the article header field Approved: to the given value.
31
32 -c "Control" | --control "Control"
33 Set the article header field Control: to the given value.
34
35 -d "Distribution" | --distribution "Distribution"
36 Set the article header field Distribution: to the given value.
37
38 -e "Expires" | --expires "Expires"
39 Set the article header field Expires: to the given value.
40
41 -f "From" | --from "From"
42 Set the article header field From: to the given value.
43
44 -i header | --ignore-headers header
45 Comma separated list of headers that will be ignored during
46 signing. Usually the following headers will be signed if present:
47
48 From, Newsgroups, Subject, Control, Supersedes, Followup-To, Date,
49 Injection-Date, Sender, Approved, Message-ID, Reply-To, Cancel-Key,
50 Also-Control and Distribution.
51
52 Some of them may be altered on the Server (i.e. Cancel-Key) which
53 would invalid the signature, this option can be used the exclude
54 such headers if required.
55
56 -n "Newsgroups" | --newsgroups "Newsgroups"
57 Set the article header field Newsgroups: to the given value.
58
59 -o "Organization" | --organization "Organization"
60 Set the article header field Organization: to the given value.
61
62 -p "port" | --port "port"
63 use "port" as NNTP-port
64
65 -r "Reply-To" | --replyto "Reply-To"
66 Set the article header field Reply-To: to the given value.
67
68 -s directory | --savedir directory
69 Save signed article to directory directory instead of posting.
70
71 -t "Subject" | --subject "Subject"
72 Set the article header field Subject: to the given value.
73
74 -v | --version
75 Show version.
76
77 -w "Followup-To" | --followupto "Followup-To"
78 Set the article header field Followup-To: to the given value.
79
80 -x "Path" | --path "Path"
81 Set the article header field Path: to the given value.
82
83 -H | --help
84 Show help-page.
85
86 -I | --no-injection-date
87 Do not add Injection-Date: header.
88
89 -L | --no-canlock
90 Do not add Cancel-Lock: / Cancel-Key: headers.
91
92 --canlock-algorithm "Algorithm"
93 Digest algorithm used for Cancel-Lock: / Cancel-Key: headers.
94 Supported algorithms are sha1, sha256 and sha512. Default is sha1.
95
96 -R | --no-control
97 Restricted mode, disallow control-messages.
98
99 -S | --no-signature
100 Do not append $HOME/.signature.
101
102 -X | --no-sign
103 Do not sign the article.
104
105 -Y | --force-auth
106 Force authentication on connect even if not required by the server.
107
108 -A -V -W
109 These options are accepted for compatibility reasons but ignored.
110
111 -h | --headers
112 These options are accepted for compatibility reasons but ignored.
113
114 -O | --no-organization
115 These options are accepted for compatibility reasons but ignored.
116
117 -D | -N | --debug
118 Enable warnings about raw 8-bit data and set Net::NNTP(3pm) in
119 debug mode, enable warnings about raw 8-bit data, warn about
120 disabled options due to lacking perl-modules or executables and
121 unreadable files.
122
124 The following exit values are returned:
125
126 0 Successful completion.
127
128 !=0 An error occurred.
129
131 $NEWSHOST
132 Set to override the NNTP server configured in the source or config-
133 file. It has lower priority than $NNTPSERVER and should be
134 avoided.
135
136 $NNTPSERVER
137 Set to override the NNTP server configured in the source or config-
138 file. This has higher priority than $NEWSHOST.
139
140 $NNTPPORT
141 The NNTP TCP-port to post news to. This variable only needs to be
142 set if the TCP-port is not 119 (the default). The '-p' command-line
143 option overrides $NNTPPORT.
144
145 $PGPPASS
146 Set to override the passphrase configured in the source (used for
147 pgp(1)-2.6.3).
148
149 $PGPPASSFILE
150 Passphrase file used for pgp(1) or gpg(1).
151
152 $SIGNER
153 Set to override the user-id for signing configured in the source.
154 If you neither set $SIGNER nor configure it in the source the
155 contents of the From:-field will be used.
156
157 $REPLYTO
158 Set the article header field Reply-To: to the return address
159 specified by the variable if there isn't already a Reply-To: header
160 in the article. The '-r' command-line option overrides $REPLYTO.
161
162 $ORGANIZATION
163 Set the article header field Organization: to the contents of the
164 variable if there isn't already an Organization: header in the
165 article. The '-o' command-line option overrides $ORGANIZATION.
166
167 $DISTRIBUTION
168 Set the article header field Distribution: to the contents of the
169 variable if there isn't already a Distribution: header in the
170 article. The '-d' command-line option overrides $DISTRIBUTION.
171
173 pgptmp.txt
174 Temporary file used to store the reformatted article.
175
176 pgptmp.txt.asc
177 Temporary file used to store the reformatted and signed article.
178
179 $PGPPASSFILE
180 The passphrase file to be used for pgp(1) or gpg(1).
181
182 $HOME/.signature
183 Signature file which will be automatically included.
184
185 $HOME/.cancelsecret
186 The passphrase file to be used for Cancel-Locks. This feature is
187 turned off by default.
188
189 $HOME/.newsauth
190 "nntpserver password [user]" pairs for NNTP servers that require
191 authorization. Any line that starts with "#" is a comment. Blank
192 lines are ignored. This file should be readable only for the user
193 as it contains the user's unencrypted password for reading news.
194 First match counts. If no matching entry is found $HOME/.nntpauth
195 is checked.
196
197 $HOME/.nntpauth
198 "nntpserver user password" pairs for NNTP servers that require
199 authorization. First match counts. Lines starting with "#" are
200 skipped and blank lines are ignored. This file should be readable
201 only for the user as it contains the user's unencrypted password
202 for reading news. $HOME/.newsauth is checked first.
203
204 $XDG_CONFIG_HOME/tinewsrc $HOME/.config/tinewsrc $HOME/.tinewsrc
205 "option=value" configuration pairs. Lines that start with "#" are
206 ignored. If the file contains unencrypted passwords (e.g. NNTPPass
207 or PGPPass), it should be readable for the user only.
208
210 If you've configured or entered a password, even if the variable that
211 contained that password has been erased, it may be possible for someone
212 to find that password, in plaintext, in a core dump. In short, if
213 serious security is an issue, don't use this script.
214
216 tinews.pl is designed to be used with pgp(1)-2.6.3, pgp(1)-5, pgp(1)-6,
217 gpg(1) and gpg2(1).
218
219 tinews.pl requires the following standard modules to be installed:
220 Getopt::Long(3pm), Net::NNTP(3pm), <Time::Local(3pm)> and
221 Term::Readline(3pm).
222
223 If the Cancel-Lock feature (RFC 8315) is enabled the following
224 additional modules must be installed: MIME::Base64(3pm),
225 Digest::SHA(3pm) or Digest::SHA1(3pm) and Digest::HMAC_SHA1(3pm).
226 sha256 and sha512 as algorithms for canlock-algorithm are only
227 available with Digest::SHA(3pm).
228
229 gpg2(1) users may need to set $GPG_TTY, i.e.
230
231 GPG_TTY=$(tty)
232 export GPG_TTY
233
234 before using tinews.pl. See <https://www.gnupg.org/> for details.
235
236 tinews.pl does not do any MIME encoding, its input should be already
237 properly encoded and have all relevant headers set.
238
240 Urs Janssen <urs@tin.org>, Marc Brockschmidt <marc@marcbrockschmidt.de>
241
243 pgp(1), gpg(1), gpg2(1), pgps(1), Digest::HMAC_SHA1(3pm),
244 Digest::SHA(3pm), Digest::SHA1(3pm), Getopt::Long(3pm),
245 MIME::Base64(3pm), Net::NNTP(3pm), Time::Local(3pm),
246 Term::Readline(3pm)
247
248
249
2501.1.50 December 19th, 2018 tinews.pl(1)